realbasic-nug
[Top] [All Lists]

Re: Files I don't want to see!

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Files I don't want to see!
From: Charles Yeomans <yeomans at desuetude dot com>
Date: Sun, 30 Dec 2001 16:04:47 -0500

On Sunday, December 30, 2001, at 03:36  PM, Kevin Ballard wrote:

On 12/30/01 3:29 PM, "Charles Yeomans" <yeomans at desuetude dot com> wrote:

Yes it does.  WindowCount = 0 precisely when there are no windows open.
So the While loop executes if and only if there are windows open.

Yeah, but if a window refuses to close, then the loop will execute forever.
Bad idea.

That's right. But the point was to answer your question as to why For...Next loops aren't always appropriate. If you want reliable code for window-closing, then that requires a different answer.


Hence my Window.Close() feature request.


I saw that. I think you got it backward, in that you'd like Window.Close to return the negation of the CancelClose event handler. And I don't think that what you want is to overload the return value, which you cannot do in RB anyway; I think that Window.Close should always return a Boolean result. I'd never really considered it before, but now that you've raised it, it does make better sense for Window.Close to return a result, given that CancelClose extends the Close method.

Charles Yeomans




<Prev in Thread] Current Thread [Next in Thread>