Thanks, Max, for your reply. I do in fact instantiate an object of my subclass.

Superclass: WindowsUSBNotificationMBS
Subclass: MyWindowsUSBNotification
Method added to subclass: Update
Instance: WinUSBNotification

WinUSBNotification.Update - does not work
MyWinUSBNotification(WinUSBNotification).Update - does not work

This is true regardless of whether WinUSBNotification is declared as a 
MyWinUSBNotification or as a WinUSBNotificationMBS.

Now here is the strange thing: my previous post about it working in modules was 
wrong. It still doesn't work in modules. What made me think it worked in 
modules is that I have similar code using a different MBS class that works, and 
that code is in a module. But it is not the fact that it is in a module that 
makes it work, it is the fact that it is a different MBS class. That class is 
MidiClientMBS. If I create a subclass of MidiClientMBS, "MyMidiClient", add an 
"Update" method, and create an instance "MidiClient", then

MyMidiClient(MidiClient).Update

works fine, anywhere in the application. So why does it work with MidiClientMBS 
and not with WinUSBNotificationMBS?

Thanks,
Julia





------------------------------

Message: 2
Date: Sat, 22 Sep 2012 09:40:58 +0200
From: Maximilian Tyrtania <[email protected]<mailto:[email protected]>>
Subject: Re: [MBS] Calling Methods of Subclasses
To: MBS Real Studio Plugin List 
<[email protected]<mailto:[email protected]>>
Message-ID: 
<[email protected]<mailto:[email protected]>>
Content-Type: text/plain; charset=windows-1252

In you other post you mention:

my subclass is called "MyWinUSBNotification" and my added method is called 
"Update":
    WinUSBNotification(MyWinUSBNotification).Update

which makes me wonder if maybe you just forgot to instantiate an object of the 
MyWinUSBNotification class, and call the .update method on that object. Your 
way of calling that method would work only if your method is marked as "shared".

Maximilian Tyrtania
http://www.contactking.de

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to