You may need to post a code sample to get better help, but I do this all of
the time with no problems. I'm betting that you're doing something to
instatiate the window before the line where you're passing it an argument.
As an example, the following works fine.
dim wProcessGiftCard as winProcessGiftCard
wProcessGiftCard = NEW winProcessGiftCard(amount)
wProcessGiftCard.ShowModal
Steve
-----Original Message-----
From: realbasic-nug-bounces at lists dot realsoftware dot com
[mailto:realbasic-nug-bounces at lists dot realsoftware dot com] On Behalf Of
BedeDurham
Sent: Thursday, June 30, 2005 1:25 PM
To: realbasic-nug at lists dot realsoftware dot com
Subject: Window open event and Constructor with Argument
Contrary to what many have told me, I cannot get this to work. Would someone
with more experience than I please check this for me. In a program I create
a widow using explicit instantiation so that I can pass a string to its
constructor. (A window using implicit instantiation can't be passed an
argument.) Now, here is the key that in my tests keep it from working. In
the window with the constructor (which is being passed the string), also put
a messagebox (or anything according to my tests) in the Open() event of the
window. When the window's constructor is called, the open() event gets
called before the constructor. In fact, the open() event will get called
again after the constructor (because it contains super.window()).
ANY help or verification would be greatly appreciated.
_______________________________________________
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>
_______________________________________________
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>
|