Ivan Benttini
2008-11-09 23:00:40 UTC
/*
Andrew,
where should i put a message that the form is OPEN
since I intent to open the form c:\AB\Password.wfm
before I open this here form(My main form).
and then close the c:\AB\Password.wfm to see if the message
changes to "The form c:\AB\Password.wfm is NOT OPEN"
again
*/
/////////////////////////////////////////////////
_app.aOpenForms = new assocArray() //here is what you mean before the app
start?
/////////////////////////////////////////////////
** END HEADER -- do not remove this line
//
// Generated on 11/09/2008
//
parameter bModal
local f
f = new testformOpenForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class testformOpenForm of FORM
with (this)
onOpen = class::FORM_ONOPEN
onClose = class::FORM_ONCLOSE
height = 16.0
left = 53.0
top = 0.0
width = 40.0
text = ""
endwith
this.RECTANGLE1 = new RECTANGLE(this)
with (this.RECTANGLE1)
left = 9.0
top = 4.0
width = 23.0
height = 1.5
text = "Test if a form is Open"
endwith
function form_onClose
_app.aOpenForms["PasswrdForm"]=false
release object _app.aOpenForms
_app.aOpenForms := null
return
function form_onOpen
_app.aOpenForms["PasswrdForm"]=true
return
endclass
Andrew,
where should i put a message that the form is OPEN
since I intent to open the form c:\AB\Password.wfm
before I open this here form(My main form).
and then close the c:\AB\Password.wfm to see if the message
changes to "The form c:\AB\Password.wfm is NOT OPEN"
again
*/
/////////////////////////////////////////////////
_app.aOpenForms = new assocArray() //here is what you mean before the app
start?
/////////////////////////////////////////////////
** END HEADER -- do not remove this line
//
// Generated on 11/09/2008
//
parameter bModal
local f
f = new testformOpenForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class testformOpenForm of FORM
with (this)
onOpen = class::FORM_ONOPEN
onClose = class::FORM_ONCLOSE
height = 16.0
left = 53.0
top = 0.0
width = 40.0
text = ""
endwith
this.RECTANGLE1 = new RECTANGLE(this)
with (this.RECTANGLE1)
left = 9.0
top = 4.0
width = 23.0
height = 1.5
text = "Test if a form is Open"
endwith
function form_onClose
_app.aOpenForms["PasswrdForm"]=false
release object _app.aOpenForms
_app.aOpenForms := null
return
function form_onOpen
_app.aOpenForms["PasswrdForm"]=true
return
endclass
Ivan,
Try the following untested code.
_app.aOpenForms = new assocArray()
_app.aOpenForms["YourUniqueFormName"] = true
_app.aOpenForms["YourUniqueFormName"] = false
release object _app.aOpenForms
_app.aOpenForms := null
regards, andrew
Try the following untested code.
_app.aOpenForms = new assocArray()
_app.aOpenForms["YourUniqueFormName"] = true
_app.aOpenForms["YourUniqueFormName"] = false
release object _app.aOpenForms
_app.aOpenForms := null
regards, andrew
Hi everyOne,
I understanding that checking to see if a form is Open,
the name of the class is to be use and NOT the name of
the form(.wfm), is that Correct?
If that is true, how to extract the CLASS NAME of forms
in a directy (or in a hard drive) and ADD it to an array, so that another
form
can ask, if it is open?
Is a piece of code anywhere with anyone that can be share with me.
"this form is already open, *do this* bla bla bla OR *do that* bla bla
bla..."
Thanks a million,
Ivan
I understanding that checking to see if a form is Open,
the name of the class is to be use and NOT the name of
the form(.wfm), is that Correct?
If that is true, how to extract the CLASS NAME of forms
in a directy (or in a hard drive) and ADD it to an array, so that another
form
can ask, if it is open?
Is a piece of code anywhere with anyone that can be share with me.
"this form is already open, *do this* bla bla bla OR *do that* bla bla
bla..."
Thanks a million,
Ivan