1. [Win32Lib] How to keep a window from opening in onOpen

Hi...

Does anyone know what returnValue() will cause a window not to open in an
onOpen event?  It's not crucial; I'm just curious. smile

Andrew Hall

new topic     » topic index » view message » categorize

2. Re: [Win32Lib] How to keep a window from opening in onOpen

----- Original Message ----- 
From: "Andrew Hall" <barnacle83-euforum at yahoo.com>
To: <EUforum at topica.com>
Subject: [Win32Lib] How to keep a window from opening in onOpen


> 
> 
> Hi...
> 
> Does anyone know what returnValue() will cause a window not to open in an
> onOpen event?  It's not crucial; I'm just curious. smile
> 

Firstly, onOpen does not CAUSE a window to be opened. The onOpen event is
triggered by calling openWindow() either directly or indirectly, is is triggred
just prior to the window being opened.

I assume you are actually asking how to open a window but not make it visible.
Opening a window is a LOT more than just rendering it on the screen.

You could try in the onActivate event to "setVisible(theWindow, 0)" or even
"closeWindow(theWindow)". That might work, except for the main window. Doing that
will close the app down.

However, the simplest method might be to just not open it in the first place.
-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

3. Re: [Win32Lib] How to keep a window from opening in onOpen

----- Original Message ----- 
From: "Andrew Hall" <barnacle83-euforum at yahoo.com>
To: <EUforum at topica.com>
Subject: FW: [Win32Lib] How to keep a window from opening in onOpen


[snip]
> 
> P.S.  Derek, every time I learn a something more about Win32Lib, I
> appreciate the hard work you have put into it even more.  I couldn't do so
> much as open a window on my own without Win32Lib.  I'm thankful for every
> day that I don't have to dig around in the API.  Thanks for all you do!

Thank you very much. However the original win32lib was written by David Cuny,
who deserves the bulk of the appreciation. I just maintain it now, based mainly
on the ideas and code submitted by others.

-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

4. Re: [Win32Lib] How to keep a window from opening in onOpen

----- Original Message ----- 
From: "Andrew Hall" <barnacle83-euforum at yahoo.com>
To: <EUforum at topica.com>
Subject: FW: [Win32Lib] How to keep a window from opening in onOpen


> 
> 
> Brian wrote
> > That's a good question at first glance and I don't think there is an
> > answer to it.  However, it raises the question: Why would you prevent
> > your window from being opened in your w32HOpen handler? (you should use
> > setHandler() instead of onOpen for future compatibility)
> >
> > Why wouldn't you check before opening the window in the first place?
> 
> I would.  Like I said, the answer isn't critical; I'm just curious if
> there's a way to keep a window from opening inside an w32HOpen handler.  (By
> the way, I am using setHandler().)  If there isn't a way, that's OK with me.
> I've just been looking around at the possible applications of returnValue(),
> and since you can returnValue(True) in a w32HClose handler to keep a window
> from closing, I thought that there might be a similar effect for w32HOpen.
> 
> Derek wrote:
> <snip>
> > I assume you are actually asking how to open a window but not make it
> > visible. Opening a window is a LOT more than just rendering it on the
> > screen.
> >
> > You could try in the onActivate event to "setVisible(theWindow, 0)"
> 
> I actually wasn't asking how to open a window without making it visible; but
> thanks for the tip. smile
> 

Ok, I've updated the library to cater for this now. If an onOpen handler calls
returnValue(-1), the window is not opened.

-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

5. Re: [Win32Lib] How to keep a window from opening in onOpen

Derek Parnell wrote:

>----- Original Message ----- 
>From: "Andrew Hall" <barnacle83-euforum at yahoo.com>
>  
>
>>P.S.  Derek, every time I learn a something more about Win32Lib, I
>>appreciate the hard work you have put into it even more.  I couldn't do so
>>much as open a window on my own without Win32Lib.  I'm thankful for every
>>day that I don't have to dig around in the API.  Thanks for all you do!
>>    
>>
>Thank you very much. However the original win32lib was written by David Cuny,
>who deserves the bulk of the appreciation. I just maintain it now, based mainly
>on the ideas and code submitted by others.
>  
>
Don't be so modest, Derek! Saying you "just maintain it now" should win 
for either Greatest Understatement of 2004 or Biggest Lie of 2004. ;) 
David Cuny did great in getting us a first generation Win32Lib, but you 
and the rest of the Win32Lib team (I think Matthew Lewis and a few 
others have made significant contributions, right?) have succeeded in 
taking Win32Lib to G3* (and beyond?). :)

(And I'd also like to throw out props to Judith's IDE, without which I 
simply would not do Windows applications...)

-ck

*That's "Generation 3" for you neophytes.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu