realbasic-nug
[Top] [All Lists]

Re: possible range for Window.handle

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: possible range for Window.handle
From: Charles Yeomans <yeomans at desuetude dot com>
Date: Thu, 30 Jun 2005 16:39:56 -0400
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <002b01c57dab$8d4f47f0$a301a8c0 at joe><23B8462F-9526-483D-8ECD-03C66BF46CFE at freaksw dot com> <c9cff46f17d10f7598ca35be5d74ae8c at great-white-software dot com> <006001c57db1$29bc3210$a301a8c0 at joe>

On Jun 30, 2005, at 4:20 PM, O.H. wrote:

Thank you all for the quick responses.

The reason I'm asking, is I'm making a subclass of window, and a system to track parentwindow/childwindow relationships by tracking the handles, and I
wanted to make sure (1) I could use a ParentWindowHandle of zero to
represent no parent window, and (2) if I needed to allow for the possibility
of negative window handles.

I take it that I can assume there will never be a window with a handle=0, and that I do need to allow for the possibility of negative window handles. If that's not a correct conclusion, please correct me... otherwise, thank
you all very much for your quick and helpful responses.  :o)


It is a reasonable assumption that there will never be a window with handle 0, but it is an assumption. Certainly REALbasic doesn't guarantee that Window.Handle will return a nonzero value. If you want to be careful, you might document your assumption with an assertion.

--------------
Charles Yeomans

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

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