AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

My Delphi 2010 is sick

Ein Thema von WojTec · begonnen am 4. Jul 2012 · letzter Beitrag vom 9. Jul 2012
Antwort Antwort
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.342 Beiträge
 
Delphi 12 Athens
 
#1

AW: Re: My Delphi 2010 is sick

  Alt 4. Jul 2012, 22:47
address 00000xxx = nil

Something does not exist.

Probably cbPath has not yet been created. Check it by adding "IF cbPath <> NIL" to the first line.
or if not Assigned(cbPath) then DoError; , Assert(Assigned(cbPath)); , Assert(cbPath <> nil); , ...
Ein Therapeut entspricht 1024 Gigapeut.

Geändert von himitsu ( 4. Jul 2012 um 22:49 Uhr)
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
482 Beiträge
 
Delphi XE6 Professional
 
#2

Re: My Delphi 2010 is sick

  Alt 5. Jul 2012, 09:03
@himitsu, you are talking about first or second address in message?

Let's say Delphi creates it incorrectly (I repeat: error after changes, before working) - what to do?
  Mit Zitat antworten Zitat
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.874 Beiträge
 
Delphi 11 Alexandria
 
#3

AW: My Delphi 2010 is sick

  Alt 5. Jul 2012, 09:27
The second. The First is the adress of the Code itself.
Markus Kinzler
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
482 Beiträge
 
Delphi XE6 Professional
 
#4

Re: My Delphi 2010 is sick

  Alt 5. Jul 2012, 09:35
Ok. So, what to do now?
  Mit Zitat antworten Zitat
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.874 Beiträge
 
Delphi 11 Alexandria
 
#5

AW: My Delphi 2010 is sick

  Alt 5. Jul 2012, 09:38
cbPath references not an existing Object. It seems that it is never set at all ( 0 = nil = nirvana)
Check if/where you set that variable.
Markus Kinzler
  Mit Zitat antworten Zitat
Benutzerbild von Stevie
Stevie

Registriert seit: 12. Aug 2003
Ort: Soest
4.045 Beiträge
 
Delphi 10.1 Berlin Enterprise
 
#6

AW: My Delphi 2010 is sick

  Alt 5. Jul 2012, 11:56
Your dfm file does not match the pas file.

When loading the form it streams the dfm file and creates the components and places the references in the published fields if they exist (yes, you can have a component on your form but no field in your pas file, if you don't need to access it). But it does not work the other way around. If you placed your component field in the published part (which is by default if you dont specify the visibility) but never created it yourself.

Usually the IDE also complains about this when saving your form (like "Field Form1.CheckBox1 does not have a corresponding component. Remove the declaration?")

Also: did you call inherited in your custom constructor?
Stefan
“Simplicity, carried to the extreme, becomes elegance.” Jon Franklin

Delphi Sorcery - DSharp - Spring4D - TestInsight
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
482 Beiträge
 
Delphi XE6 Professional
 
#7

Re: My Delphi 2010 is sick

  Alt 5. Jul 2012, 12:39
Delphi-Quellcode:
constructor Create(const AFirst, ASecond: TColor; const ASteps: TByteVal);
begin
  inherited Create(Application);

  // ...
end;

// ...

RenderGradient({...}, cbPath.Checked); // <-- no problem

// ...

if cbPath.Checked then // <-- AV here
Component is added to DFM.

Please note 2nd error showing another component (which is working before I add check box), not this check box (1st error). All component are created properly (form --> check box --> build --> run --> ok), due I want to access it in if statement (in function call I used the same propery and no errors).
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:11 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