General information
Category:
Coding, syntax & commands
Title:
Objects not visible
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
*-------------------
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only