Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with disappearing Toolbar
Message
From
08/12/2003 15:37:13
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00856925
Message ID:
00856941
Views:
21
This message has been marked as the solution to the initial question of the thread.
>When I run my main application from the development envirnment or from the exe, I don't have a problem, only when I try to run the form directly in development.
>
>In my form (model) show method, I create a toolbar from my classlib
>
>if !vartype(oNoteBAR)=[O]
>  SET CLASSLIB TO  schtool addi
>  oNoteBar=CREATEOBJECT('NoteBar')
>  oNoteBar.visible=.t.
>  oNoteBar.dock(0)
>endif
>
>
>It initially display and then after the form is completly loaded, it disappears. Running from my main exe, it doesn't happen but then I have a read events. I want to put code in this toolbar to perform actions that are directly related to the form being displayed.

It seems the variable oNoteBar exists somewhere in your main.prg and stays visible for as long as your app is active. When you run the above code, the variable is created as private, and goes out of scope as soon as this code exits. This makes reference count for your toolbar go to zero, and it gets released.

Just try to create the variable in the command window before you run this form. It should be public then.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform