realbasic-plugins
[Top] [All Lists]

Re: Subclassing Window

To: "Ross at Webwolves" <ross at webwolves dot com>, REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Subclassing Window
From: Mars Saxman <mars at realsoftware dot com>
Date: Tue, 31 May 2005 14:30:08 -0700
Cc:
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <BE8953C0 dot C666%vanhoek at mac dot com> <036501c56625$d6abbed0$6601a8c0 at whoscalling dot net>

On May 31, 2005, at 2:15 PM, Ross at Webwolves wrote:

RB-ers,

I have created a class, DPWindow, that has Window as its super class. DPWindow's constructor includes this code:

    // call the Window constructor, or Open events will not fire
    Super.Window()

DPWindow includes an Open event that does some housekeeping.

Now, I have created a window in my application called FrmMain, and its type is DPWindow. FrmMain has an Open event, too. Unfortunately, it is not getting called. The DPWindow class Open event is being called, which makes sense, but how can I get the FrmMain.Open to be called, too?

Where does the Open event you see in FrmMain come from? If DPWindow declares it, then DPWindow needs to invoke it. You say that DPWindow implements the Open event it inherited from its superclass, so that would be a good time to call the Open event it declared for its subclasses to implement.

Mars Saxman
REAL Software
_______________________________________________
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>

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