Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Toolbar class
Message
From
11/07/2000 11:52:31
Jonathan Cochran
Alion Science and Technology
Maryland, United States
 
 
To
11/07/2000 11:13:52
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00390745
Message ID:
00390769
Views:
10
When s_arrange.prg is finished, your local variable oTemp is going out of scope, and the toolbar is being released along with the variable that holds the reference to it. If you need the toolbar to be around longer, you need to store it to a variable with a larger scope, like public or private.

>Hi,
>I've created a toolbar class and added it to my project. I initiate the class from a program called from a menu option.
>
>* main.prg
>set classlib to form_arrange && containing the toolbar class: tbr_arrangewin
>
>* mpr code
>ON SELECTION BAR 2 OF _mwindow do s_arrange
>
>* s_arrange.prg
>local oTemp
>oTemp = createobject('tbr_arrangewin')
>oTemp.show
>oTemp.visible
>
>However, this my toolbar just initiates and is immediately released. Do I need to initiate the class somewhere else?
>
>Ramil 7/11
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform