![]() |
delphi zugriffsverletzung bei adresse in modul. lesen von adresse
Hallo,
Fehlermeldung : "delphi zugriffsverletzung bei adresse in modul. lesen von adresse" den oben gennanten Fehler taucht haüfig auf,wenn idCmdTCPClient einen StringGrid mit neuen Daten zu aktualisieren. woran liegt es, und wie kann ich beheben .. vielen Dank |
AW: delphi zugriffsverletzung bei adresse in modul. lesen von adresse
Du darfst in Zeile 237 nur die ersten 20 Zeichen in die aktuelle Zelle kopieren. Nee, im Ernst, was sollen wir ohne Code denn sagen :glaskugel: ?
|
AW: delphi zugriffsverletzung bei adresse in modul. lesen von adresse
hallo,
den ClientTeil bekommt Autos vom Server :
Delphi-Quellcode:
und danach fügt diese Daten in eine StringGrid zu:
procedure TfrCarTic.ScoutPCommandHandlers0Command(ASender: TIdCommand);
var aCar : TCarRecord; begin //memo1.Text := memo1.Text + ' ' + inttostr(Asender.Params.Count); aCar.id := Asender.Params[0]; aCar.tel1 := Asender.Params[1]; aCar.tel2 := Asender.Params[2]; aCar.marke := Asender.Params[3]; aCar.OnlyModell := Asender.Params[4]; aCar.farbe := Asender.Params[5]; aCar.ez := Asender.Params[6]; aCar.preis := Asender.Params[7]; aCar.stadt := Asender.Params[8]; aCar.plz := Asender.Params[9]; aCar.km := Asender.Params[10]; aCar.kw := Asender.Params[11]; aCar.aufbau := Asender.Params[12]; aCar.klima := Asender.Params[13]; aCar.fuel := Asender.Params[14]; aCar.getriebe := Asender.Params[15]; aCar.description := Asender.Params[16]; aCar.doors := Asender.Params[17]; aCar.unfall := Asender.Params[18]; aCar.anbieter := Asender.Params[19]; aCar.neu := Asender.Params[20]; aCar.ABS := Asender.Params[21]; aCar.ESP := Asender.Params[22]; aCar.Metallic := Asender.Params[23]; aCar.allRadAntrieb := Asender.Params[24]; aCar.leichtmetallfelgen := Asender.Params[25]; aCar.lederAusstattung := Asender.Params[26]; aCar.schiebedach := Asender.Params[27]; aCar.navigationSystem := Asender.Params[28]; aCar.schadstoffklasse := Asender.Params[29]; aCar.umwepltPlakette := Asender.Params[30]; aCar.image1 := Asender.Params[31]; aCar.image2 := Asender.Params[32]; aCar.image3 := Asender.Params[33]; aCar.servolenkung := Asender.Params[34]; aCar.standheizung := Asender.Params[35]; aCar.condition := Asender.Params[36]; aCar.version := Asender.Params[37]; aCar.modell := aCar.OnlyModell + ' ' + aCar.version; if isGridFree then begin isGridFree := false; try putongrid(aCar); except end; isGridFree := true; end; end;
Delphi-Quellcode:
Danke
var urlkomplett : string;
begin with frCarTic.GridErg do begin InsertRows(1,1,true); // Anpassen der Col anzahl der einträge //AddCheckBox(vNr,1,false,false); frcartic.GridErg.AutoNumberCol(0); Cells[vid,1] := aCar.id ; Cells[vmarke,1] := aCar.marke; Cells[vmodell,1] := aCar.modell ; Cells[vfarbe,1] := aCar.farbe ; Cells[vez,1] := aCar.ez ; Cells[vpreis,1] := aCar.preis ; Cells[vstadt,1] := aCar.stadt ; Cells[vplz,1] := aCar.plz ; Cells[vkm,1] := aCar.km ; Cells[vkw,1] := aCar.kw ; Cells[vaufbau,1] := aCar.aufbau ; Cells[vCondition,1] := aCar.condition ; Cells[vklima,1] := aCar.klima ; Cells[vfuel,1] := aCar.fuel; Cells[vtel1,1] := aCar.tel1 ; Cells[vtel2,1] := aCar.tel2 ; Cells[vgetriebe,1] := aCar.getriebe ; Cells[vdescription,1] := aCar.description ; Cells[vdoors,1] := aCar.doors ; Cells[vanbieter,1] := aCar.anbieter ; Cells[vschadstoffklasse,1] := aCar.schadstoffklasse ; Cells[vumweltPlakette,1] := aCar.umwepltPlakette ; Cells[vimage1,1] := aCar.image1 ; Cells[vimage2,1] := aCar.image2 ; Cells[vimage3,1] := aCar.image3 ; } //Cells[vuhr,1] := TimeToStr(time); {Cells[vboerse,1] := aCar.boerse ; Cells[vnurModell,1] := aCar.OnlyModell ; Cells[vversion,1] := aCar.version ; frcartic.GridErg.RowColor[1] := ColorToSelect; } end; { frcartic.GridErg.AddCheckBox(vUnfall,1,aCar.unfall = 'y',false); frcartic.GridErg.Cells[vAnbieter,1] := aCar.anbieter; frcartic.GridErg.AddCheckBox(vneu,1,aCar.neu = 'N',false); frcartic.GridErg.AddCheckBox(vlederausstattung,1,aCar.lederAusstattung = '1',false); frcartic.GridErg.AddCheckBox(vnavigationsystem,1,aCar.navigationSystem = '1',false); frcartic.GridErg.AddCheckBox(vschiebedach,1,aCar.schiebedach = '1',false); frcartic.GridErg.AddCheckBox(vAllradAntrieb,1,aCar.allRadAntrieb = '1',false); frcartic.GridErg.AddCheckBox(vABS,1,aCar.ABS = '1',false); frcartic.GridErg.AddCheckBox(vleichtmetallfelgen,1,aCar.leichtmetallfelgen = '1',false); frcartic.GridErg.AddCheckBox(vESP,1,aCar.ESP = '1',false); frcartic.GridErg.AddCheckBox(vservolenkung,1,aCar.servolenkung = '1',false); frcartic.GridErg.AddCheckBox(vstandheizung,1,aCar.standheizung = '1',false); frcartic.GridErg.AddCheckBox(vMetallic,1,aCar.Metallic = '1',false); } frcartic.GridErg.RowHeights[1] := 35 ; inc(rowcounter); frcartic.GridErg.RowCount := rowcounter; //frcartic.GridErg.Row := frcartic.GridErg.Row + 1; //frcartic.GridErg.FixedRows := 1 ; // if playSnd = true then // sndPlaySound(PWideChar('.\Media\'+SoundToPlay+'.wav'),SND_ASYNC); //SND_ASYNC = 0 end; |
AW: delphi zugriffsverletzung bei adresse in modul. lesen von adresse
In welcher Zeile tritt der Fehler denn auf?
|
AW: delphi zugriffsverletzung bei adresse in modul. lesen von adresse
Die Zeile wird nicht gezeigt. Einfach mehrere FehlerMeldungsfenster mit unterschiedlichen adresswerten werden nacheinander göffnet.
|
AW: delphi zugriffsverletzung bei adresse in modul. lesen von adresse
Zitat:
Man Debugge sich Befehl/Zeile für Befehl/Zeile durch den Code und schaue wo es knallt. |
AW: delphi zugriffsverletzung bei adresse in modul. lesen von adresse
Hallo,
den Fehler taucht in folgendem Teil: for R := FixedCols to ColCount - 1 do begin RH := ColWidths[R]; if R < LeftCol then Inc(TotalHiddenWidth,RH + GLW); Inc(TotalScrollableWidth,RH + GLW); end; aus
Delphi-Quellcode:
procedure TAdvStringGrid.UpdateHScroller;
var R,GLW,RH,TCW: Integer; TotalFixedWidth: Integer; TotalScrollableWidth: Integer; TotalHiddenWidth: Integer; ViewRatio: Single; IdealNMax: Single; IdealNPos: Single; ScrollInfo: TScrollInfo; begin if (csLoading in ComponentState) or (csDesigning in ComponentState) then Exit; if not ScrollProportional then Exit; if FScrollLock then Exit; { Get current scroll information } {$IFNDEF TMSDOTNET} FillChar(ScrollInfo,SizeOf(ScrollInfo),0); {$ENDIF} {$IFDEF TMSDOTNET} ScrollInfo.cbSize := Marshal.SizeOf(TypeOf(ScrollInfo)); {$ENDIF} {$IFNDEF TMSDOTNET} ScrollInfo.cbSize := SizeOf(ScrollInfo); {$ENDIF} ScrollInfo.FMask := SIF_ALL; GetScrollInfo(Handle,SB_HORZ,ScrollInfo); { Calculate proper scrolling region ratio } GLW := GridLineWidth; TotalFixedWidth := GLW; for R := 0 to FixedCols - 1 do begin Inc(TotalFixedWidth,ColWidths[R] + GLW); end; TotalScrollableWidth := GLW; TotalHiddenWidth := GLW; [B][COLOR="Red"]for R := FixedCols to ColCount - 1 do begin RH := ColWidths[R]; if R < LeftCol then Inc(TotalHiddenWidth,RH + GLW); Inc(TotalScrollableWidth,RH + GLW); end;[/COLOR][/B] TCW := 0; for R := 0 to ColCount - 1 do TCW := TCW + ColWidths[R]; ViewRatio := (Width - TotalFixedWidth)/TotalScrollableWidth; if (ViewRatio >= 0.9999) then Exit; IdealNMax := (127 + ViewRatio) / (1 - ViewRatio); if (TotalScrollableWidth > Width) then IdealNPos := TotalHiddenWidth / (TotalScrollableWidth - Width) * 128 else IdealNPos := ScrollInfo.nPos; { Set scroll information } ScrollInfo.nMax := Trunc(IdealNMax); ScrollInfo.nPage := ScrollInfo.nMax - 127 + 1; ScrollInfo.nPos := Trunc(IdealNPos); SetScrollInfo(Handle,SB_HORZ,ScrollInfo,TRUE); UpdateHScrollBar; // total column width smaller than grid width or no horiz. scrollbar selected, hide the scrollbar if (ScrollBarAlways in [saNone, saVert]) then if (TCW < Width) or not (ScrollBars in [ssHorizontal,ssBoth]) then ShowScrollBar(Handle,SB_HORZ,False); end; |
AW: delphi zugriffsverletzung bei adresse in modul. lesen von adresse
Hallo ,
ich habe den Fehler gefunden .... Vielen Dank für deine nette Hilfe |
AW: delphi zugriffsverletzung bei adresse in modul. lesen von adresse
dann sei doch wenigstens so freundlich und a) teile allen anderen mit, die evtl. den selben Fehler haben, wie sie ihn beheben und b) änder den Titel auf was aussagekräftigeres. So ziemlich jede AV produziert diesen Wortlaut.
Bernhard |
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:20 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz