I have some code that I would like to move from a form unit to an
ordinary unit as the form unit is getting too long. The form is created
at runtime:
 
frmWizard := TfrmWizard.Create(nil)
 
frmWizard is a variable that I have declared in a unit that is used by
all other units. frmWizard is displayed correctly, no problem so far.
Now the code that I would like to move references frmWizard:
 
with sli, frmWizard do //sli is a TStringList, declared earlier
begin
    Clear; //clear sli
    Add('some text');
    Add(edb1.Text); //add edb1.Text to sli <-- exception here
    Add(edb2.Text);
end;
 
This code works fine from within frmWizards's form unit (of course
without the reference to frmWizard in the with ... do). However, it
throws an exception if I move it. I've added a watch and for some reason
it tells me frmWizard is nil but I don't know why. The frmWizard unit is
referenced from the other unit as is the unit that declares frmWizard,
so I thought that shouldn't be the problem but apparently it's not
enough??? 
 
It's got to be something really simple but I just can't see it.
 
Any pointers gratefully received.
 
TIA.
 
Brigitte


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/i7folB/TM
--------------------------------------------------------------------~-> 

-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




Reply via email to