Groups > dBase > dBase support > Re: Form.readModal()




Form.readModal()

Form.readModal()
Sat, 29 Mar 2008 23:46:30 -070
Hello.

This seems so simple, but I'm stumped.

Just wanted to test out the readModal() method for a new form.  I made sure 
my dummy form first worked properly when called by the open() method.  
However, when I substitute the readModal() method, as per below, nothing 
happens.  The onOpen event did not get triggered.

Why did the modal form not open?


//--- TESTMODAL.PRG:

local oThisForm
oThisForm = new Form()

with(oThisForm)
   mdi      := false
   top      := 0
   left     := 25
   onOpen   := {;? "oThisForm opened at " + time(0)}
   onClose  := {;clear}
endwith

oThisForm.open()
//oThisForm.readModal()


Thanks in advance for your assistance.

-- 
Post Reply
Re: Form.readModal()
Sun, 30 Mar 2008 11:16:19 +020
Cecil Green wrote
>
> This seems so simple, but I'm stumped.
>
> Just wanted to test out the readModal() method for a new form.  I made 
> sure
> my dummy form first worked properly when called by the open() method.
> However, when I substitute the readModal() method, as per below, nothing
> happens.  The onOpen event did not get triggered.
>
> Why did the modal form not open?
-------
A non-mdi form needs at least one object that can receive focus. Try adding 
a pushbutton or an entryfield.

Roland
Post Reply
Re: Form.readModal()
Sun, 30 Mar 2008 13:13:18 -070
Hello Roland.


In article <gChdUmkkIHA.1556@news-server>, ich@daheim.de says...
> -------
> A non-mdi form needs at least one object that can receive focus. Try adding

> a pushbutton or an entryfield.
> 
-------------
Thanks.  I thought it might be that but I could not find information about it 
in the OLH or KB.

Apparently, a simple textlabel would also do.  It didn't occur to me that 
type of object has a focus of sorts, even though there is no tabstop property 
or setfocus() method.

Anyways, thanks again.

-- 
Post Reply
about | contact