realbasic-nug
[Top] [All Lists]

Re: Testing whether a window is open

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Testing whether a window is open
From: Eric Williams <eric at oxalyn dot com>
Date: Thu, 31 Jan 2008 09:50:23 -0800
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <7AB59C07-175B-4EEB-A605-38432459A753 at stretchedout dot com>
On Jan 31, 2008, at 8:40 AM, GregO wrote:

> So is it possible to create a class extension that would tell us if a
> window of a particular type is showing? I was thinking of something
> like:
>
> ------------------------------------------------------------
> Function IsShowing(Extends w as Window) As Boolean
>    dim c,i as integer
>
>    c = WindowCount-1
>
>    for i = 0 to c
>      if window(i) isa w and w.visible then
>        return true
>      end if
>    next i
>
>    return false
> End Function
> -------------------------------------------------------------
>

Not to be presumptuous, but the fact that you are even asking this  
question brings me to question the structure of your application. Why  
do you need to do this? Is there some reason you're not keeping track  
of your windows when you create them?

Eric Williams
Oxalyn Software
http://software.oxalyn.com/

AE Monitor
http://software.oxalyn.com/AEMonitor/


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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


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