Le 29 déc. 06 à 21:15 Soir, Chuck Pelto a écrit:

On Dec 29, 2006, at 11:03 AM, Norman Palardy wrote:


On Dec 29, 2006, at 10:46 AM, Chuck Pelto wrote:

Perhaps I'm not describing it properly.

I understand the new Window1 approach.

What I'm dealing with here is an existing Window.

I have several Windows.

Window1
Window2
Window3

In Window1 I have declared a property known as relatedWindow as Window

I set relatedWIndow to Window2 by the following:

relatedWindow = Window2

Then I try to set values of properties, e.g., a string property, in Window2 via the relatedWindow property by:

relatedWindow.aProperty = "Something or other...."

This does not compile.

Hope that explains my situation better.

The relatedWindow is not JUST a plain Window, it is a Window2
A Window does not have a property called "aProperty" but a Window2 does
The problem is that you're not using the right kind of variable

Actually, aProperty is just a generic name for any sort of property that one could declare. Sort of like myFoo.

If you declare relatedWindow as Window2 this would work

The problem is that I want something that is more generic for ANY sort of Window. Not just a Window2 or Window3. I'm looking for something that can be set to either a Window2 or Window3 or WindowX.

So, if I understand correctly, you have, say, 3 windows (Win1, Win2, Win3). All have a property, say MyProperty As Boolean. In your main window (an other window than Win1, Win2 and Win3), you have a property, e.g MyWindow As window. MyWindow can be a Win1, Win2 or a Win3. You want to modify the MyWindow.MyProperty since these 3 windows has a MyProperty property. Is that right?

Well, I already tried. The problem is that you can't subclass a window (you can't have a class whose Super is "window", in RB).
You will have to do so (if I understood your question):

if MyWindow isa Win1 then
        Win1(MyWindow).MyProperty=true
elseif MyWindow isa Win2 then
        Win2(MyWindow).MyProperty=true
elseif MyWindow isa Win3 then
        Win3(MyWindow).MyProperty=true
end if

Hope this help_______________________________________________
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>

Reply via email to