realbasic-plugins
[Top] [All Lists]

Re: Trying to call a class event via a callback

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Trying to call a class event via a callback
From: "Joseph J. Strout" <joe at strout dot net>
Date: Fri, 21 Apr 2006 10:54:04 -0600
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <C06EC9B8 dot 4ABAA%listmail1 at dsl dot pipex dot com>
At 5:41 PM +0100 4/21/06, Dave Addey wrote:

I'm trying to add a new event to a class, and then call that event by
installing a callback (using part of the Mac OS IOKit).

Ow! :) As you found, you can't do that. Events can ONLY be called
from the class where they are defined.

Moreover, how would IOKit know to pass in the object reference that is any class method's first parameter?

Is this the same case from within a plugin too?  If so, is there a way for
me to define a global module method from within the plugin, which would be
called (in RB) by the callback?

Sure, why not? I'm not sure I understand this question. Defining global methods is demonstrated by most of the plugin samples.

Best,
- Joe

--

Joseph J. Strout
joe at strout dot net
_______________________________________________
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>