Using the OLD plugin SDK at the moment

I've defined a class and an interface in a plugin

In my RB code I have a class that implements the interface

When I make a new instance of the plugins class, I need to construct  
it with an instance that implements the interface

Basically
        dim pc as PluginClass
        dim pi as RBClassThatImplementsTheInterface

        pi = new RBClassThatImplementsTheInterface

        pc = new PluginClass(pi)

in my plugin I have code that hangs on to the instance and locks it like

        void ConstructorWithParams ( REALobject instance, REALobject  
iFuncsProvider )
        
        {
                
                ClassData (Class, instance, data, local);
        
                REALLockObject(iFuncsProvider) ;
        
                local->iFuncsProvider = iFuncsProvider ;
        
        }

When trying to call one of the methods in the RB instance I'm doing

        Boolean  SomeFunc(data *instance)
        {
                Boolean (*func)(void);
                func = ( Boolean(*)(void) ) REALLoadObjectMethod(instance- 
 >iFuncsProvider, "SomeFunc() as Boolean");
                if (not func)
                        return false;
        
                return func();
        }

But I always get a failed assertion, failure condition classDef with  
no message

I think I have everything set up right.
If I change SomeFunc to

        Boolean  SomeFunc(data *instance)
        {
                if (instance->iFuncsProvider == NULL)
                        return false;
                else
                        return true ;   
        }

this returns true so I seem to have the object reference saved OK.  
It's at least non-null

Thoughts ?
I'd be happy to send my project to someone off list to go over it in  
more detail


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to