On Feb 26, 2005, at 5:41 PM, Scott Goelzer wrote:
I think the problem is how the canvas super class is addressing the
listbox super class. The call I am using from the canvas superclass
is:
datawnd.listbox1.whateverIneeded
DataWnd is always going to be the instance created automatically for
you by simply referencing it. Instead, either of these two approaches
would work better (although there are many other solutions):
1) Make your Canvas subclass simply expose events that you can write
implementations for on the windows you need it on. This makes it easier
to keep your canvas reusable among many projects.
2) Put a property on your Canvas subclass such as "Owner as DataWnd".
Then, inside of your canvas, simply reference "Owner". All you need to
do is set this property up in your open event such as:
MyCanvasClass's Open Event on the Window:
Sub Open()
me.Owner = Self // me is the canvas, Self is the DataWnd instance
End Sub
HTH,
Jon
--
Jonathan Johnson
REAL Software, Inc.
--
REAL World 2005 - The REALbasic User Conference
March 23-25, 2005, Austin, Texas
<http://www.realsoftware.com/realworld>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|