realbasic-plugins
[Top] [All Lists]

Re: AddressOf equivalent?

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: AddressOf equivalent?
From: Jonathan Johnson <jonj at realsoftware dot com>
Date: Sat, 25 Jun 2005 14:55:33 -0500
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <f65ac17ed2ed7cbe04c8c5e11da5cc0c at mac dot com> <0188CAAA-8331-486D-87A9-DBAD4471ACED at einhugur dot com> <ff730a436b789ade9469dd91ff4f4adb at mac dot com>

On Jun 25, 2005, at 2:27 PM, Alfred Van Hoek wrote:


On Jun 25, 2005, at 12:53 PM, Björn Eiríksson wrote:



On 25.6.2005, at 16:25, Alfred Van Hoek wrote:


Is there an AddressOf equivalent for a plugin? For example, there is a need to get a function pointer to a RB defined method. Are there already tricks to accomplish something like this?

Alfred


LoadObjectMethod and LoadGlobalMethod ?


Both return a nil pointer,

How are you using them? They work for us just fine. One thing to note is that if a global method isn't being used in REALbasic code, it will be linked out, so you must refer to the method in question for it to be there at runtime.

that is why I wanted to use AddressOff, but it returns a ptr type. I was trying to put this into a memoryblock, by exploiting the memoryblock operator-convert from?, like

memblock = AddressOf("myMethod") but this leads to a syntax error?

The AddressOf syntax is this:

dim mb as MemoryBlock
mb = AddressOf myMethod

No quotes are allowed. The item passed in is not a string.

HTH,
Jon


--
Jonathan Johnson
REAL Software, Inc.

_______________________________________________
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>