Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Objects not visible
Message
 
To
06/11/2002 17:33:26
Victor Verheij
International Film Festival Rotterdam
Rotterdam, Netherlands
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00719613
Message ID:
00720076
Views:
17
Hi Victor,

First off, when you create objects programatically, you need to set their visible property to .T. after you create them. I believe this was done by design to prevent objects from showing and then disappering if you didn't really want them to be visible at that time.

For you second question, 'goApp' is not really created until it's Init() method is finished executing. If you are trying to reference the application object from other objects during the Init() execution, you will get this error. Instead, try using THIS.Parent syntax from within your objects to reference the application object. This should work.

HTH,
Kurt

>hello
>
>i'm trying to create an mdi application.
>i'v created a main.prg in wich i programaticly define the main class (goapp) with some funtions to open specific forms.
>Thats working fine.
>
>i've alse created functions in this class wich create an object from a class.
>This is working not so fine.
>
>objects created don't show and there is an another problem when i call close(). I get the error that goapp is not an object.
>
>My main question is how to make the objects visible.
>Second question: why is the "goapp not an object" appearing when i make use of classes in my mdi and not when i only used functions to open forms.
>
>Thanks
>
>for clearity is include the main.prg:
>*----------------------------------------
>close all
>clear all
>
>PUBLIC goApp
>goApp = createobject("cstApplication")
>goApp.ReadEvents()
>
>clear all && calls destroy
>
>
>define class cstApplication as Custom
>oToolbar = .null.
>
> function init
> this.settings()
> this.install_menu()
> this.install_toolbar()
> this.udetails()
> endfunc
>
> function settings
> clear
> set classlib to c:\cursus_prog_vf\lab05\mylib additive && additive gaat altijd goed
> endfunc
>
> function install_menu
> do c:\cursus_prog_vf\lab05\Main.mpr
> endfunc
>
> function install_toolbar
> if wexist('standard') && wexist is standaard foxpro toolbar
> hide window standard
> endif
>
> this.oToolbar = createobject("tbrNav")
> this.oToolbar.dock(0)
> this.oToolbar.show
> endfunc
>
> function udetails
> details = createobject('udetails')
> details.show
> endfunc
>
> function readevents
> READ EVENTS
> endfunc
>
> function Close
> LOCAL llOk && pakt de .T. of .F. aan van het close() van activeform.
> llOk = .T.
> do while type("_screen.activeform")="O" and llOk && kijk of er nog active forms zijn en of llok nog .T. is.
> llOk = _screen.activeform.close() && roept de close() van het active form aan.
> enddo
> if llOk && als llok .T.
> clear events && break de events, zet een vlag voor het read events commando boven in.
> endif
> endfunc
>
> function destroy
> set sysmenu to default
> if wexist('standard')
> show window standard
> endif
> endfunc
>enddefine
>*-------------------
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform