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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement