Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Office Objects
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00143958
Message ID:
00144162
Views:
26
Hi Josh,

I gotcha. Thanks. We named our son Josh too. :-)
Bill

>I really don't worry about the reference going out of scope while the object remains. Once you create and display the appointment, it's really a separate application from VFP. Once you no longer need to manipulate it, you can drop the reference. If you wanted to wait for the user to finish with the appointment before continuing you could just loop until the appointment window no longer exists.
>
>>I am a little unclear on the following point. When an Office object is created from VFP or even VB, such as an Outlook item, eg:
>>
>>olApp = CreateObject("Outlook.Application") && Outlook object
>>olNameSpace = olApp.GetNameSpace("MAPI") && Namespace object
>>oEvent = olApp.CreateItem(1) && An appointment item
>>oEvent.display && Show it
>>
>>After the item is displayed, the code continues to execute since there is no mechanism to pause it. So if the variables are Local and the method/procedure ends, or I set the item object to null:
>>
>>oEvent = Null
>>
>>the Outlook object item still remains happily displayed and active and can be manipulated by the user as desired. The question is, is this an acceptable/appropriate way to handle this, or should some variable/property that does not go out of scope be used to hold the object. Even so, there is no way ( that I know of ) to know when the user has finished doing what they do with the created item that it might then be "destroyed". But there is something unsettling to me about the object variable going out of scope or otherwise being "destroyed" while the item that was created chugs merrily on its way and I just forget about it.
>>
>>Am I missing something here? I realize this may be reasonably vague as my thoughts are somewhat muddled on the issue and I would welcome explanations/comments/questions for clarification concerning it.
>>
>>Thanks,
>>Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform