realbasic-nug
[Top] [All Lists]

Re: calling methods synchronously?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: calling methods synchronously?
From: Arnaud Nicolet <anic297 at mac dot com>
Date: Tue, 29 Apr 2008 01:02:15 +0200
Authentication-results: mx.google.com; spf=pass (google.com: domain of realbasic-nug-bounces at lists dot realsoftware dot com designates 66.116.103.65 as permitted sender) smtp dot mail=realbasic-nug-bounces at lists dot realsoftware dot com
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <beb8eafb0804281546q1e60e77ake503c761185efb93 at mail dot gmail dot com>
Le 29 avr. 08 à 00:46 (matin), David Stein a écrit:

> In a KeyDown event, I want to call a method which will close the
> current window (Window1) and display another window (Window2).  When I
> try to implement this, I get a NilObjectException.  I think the
> problem is that my NextWindow method is called and then the code in
> the KeyDown event handler keeps executing.  In the following example,
> if i=6 I don't ever want to see the "Got here." MsgBox.  I may be
> using the term incorrectly, but what I think I need is a way to call a
> method synchronously.  Can anyone help?
>
> David
>
> in the KeyDown event handler for Window1:
>
> If i = 6
>   NextWindow
> End If
> MsgBox "Got here."
> i = i + 1
>
> The NextWindow method:
>
>      Window2.Visible=True
>      Window1.Close

Does replacing "Window2.Visible=True" with "Window2.ShowModal" do  
what you expect?
_______________________________________________
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>