Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't Remove Object added to _Screen
Message
 
 
To
20/09/1996 17:07:06
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00008239
Message ID:
00008332
Views:
31
>>
>> >>I have created a visual navigation class for my application. After instantiating the object with
>> >>
>> >>oNavigate = CREATEOBJECT('navigation'),
>> >>
>> >>I add the object to _SCREEN using
>> >>
>> >>_SCREEN.AddObject('oNavigate')
>> >>
>> >>Before exiting the application, I want to remove this object.
>> >>
>> >>I issue _SCREEN.RemoveObject('oNavigate'). I am expecting the object to disappear from the screen. But this does not happen. After my application calls CL
>> >>
>> >>Is there another way to remove the object from the _SCREEN programatically?
>> >>
>> >>Thanx in advance.
>> >
>> >what about 'release oNavigate'
>>
>> Hi Dave,
>>
>> I have tried RELEASE oNavigate, but this does not remove the object from the _SCREEN.
>
>Hello Asif
> When u r adding object to _Screen you are creating refrence to that object,
>As Mr.Dave had mentioned to release the memory variable referenced to the object.
>Hope it should work. The syntax for adding object to container is
> Object.AddObject(cName, cClass [, cOLEClass] [, aInit1, aInit2 ...])
>where cName is refrence variable to the object.
>
>Thank Q
>Waheed

I've solved the problem. I only had one READ EVENTS statement in my application. When I called CLEAR EVENTS the first time, no more statements were processed. I simply added another READ EVENTS statement after the first READ EVENTS. In between, I added all my cleanup code which included _SCREEN.RemoveObject('oNavigate')

Thanks for your help!
Previous
Reply
Map
View

Click here to load this message in the networking platform