Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do form to - cannot return object - unload runs 2x
Message
From
15/08/2006 22:10:04
 
 
To
15/08/2006 20:59:32
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01145663
Message ID:
01145864
Views:
16
Hi Cetin:

Lot's of stuff you've given me to think about. I've played around with it and have done the following:

In form1, as you suggested, i did the following:

local loEmail,frmEmail
do form form1 name frmEmail

your suggestion to put the code:

loEmail = frmEmail.oEmail
frmemail.release()

created a problem for me. loEmail wasn't available to form1 after i released form2(frmemail). maybe b/c this code is in a command button on form1 so it wasn't available to the form itself?

Therefore, i added it as a property to the form1 (thanks to sergey and borislav for this)

form1.AddProperty("loEmail", frmEmail.oEmail)
frmEmail.release()

an interesting note is that i did it incorrectly at first. I did it as:

thisform.AddProperty("loEmail", frmEmail.oEmail)

after "frmEmail.release()", "thisform.loEmail" didn't show up as an object in the debugger. i'm assuming that "thisform" was still referencing frmemail(form2). as usual, this took me some time to figure out but once i did, i added the absolute reference to form1 and it was fine (however the debugger still didn't list "thisform.loEmail" as an object even later in the program, but "form1.loEmail" was listed as an object with the correct properties).

In the init of frmemail(form2), i added, based on your suggestion:

thisform.AddProperty("oEmail")
this.oEmail = createobject("empty")

it seems to be a bit simpler to run now and works well. i cycle through the properties to see who i am sending emails to and everything went smoothly. i'm glad i disconnected from the internet before sending the emails for testing as my outlook @ home isn't set up to save sent emails in the outbox first - it sends automatically. i would have had a lot of upset clients if i didn't figure this out before testing!

i will probably get some use out of your suggestions in the future. Thanks for your help!

Paul
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform