realbasic-plugins
[Top] [All Lists]

Interface issues

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Interface issues
From: Marco Bambini <marco at sqlabs dot net>
Date: Fri, 20 Jan 2006 16:18:19 +0100
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
In a plugin I am developing I need to define some callbacks, so I have declared some interfaces and they are also the parameters to some methods in a class.

For example:

static REALmethodDefinition myInterfaceMethods[] =
{
        { NULL, NULL, "Compare(str1 As String, str2 As String) As Integer" }
};

REALinterfaceDefinition myTestInterface =
{
        kCurrentREALControlVersion,
        "myTestInterface",
        myInterfaceMethods,
        sizeof(myInterfaceMethods) / sizeof(REALmethodDefinition)
};

and in my Class:

REALmethodDefinition myMethods[] = {
....
{ (REALproc) myFunction, NULL, "myTest(name As String, callbackRoutine As myTestInterface)"},
....
}

and in PluginEntry:

        REALRegisterClass(&myClass);
        REALRegisterInterface(& myTestInterface);

in RB (2006) everything seems fine, I can build a new class in the IDE with the "myTestInterface" interface and I can also write:

        myClass.myTest("Sample", myClass2)

where myClass2 is just a class that implements the "myTestInterface" interface.

The problem is that every time I try to compile the code, I receive the following error into the line myClass.myTest: "Parameter is now compatible with this function".

What I am doing wrong? Any help?

Thanks a lot,
---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/



_______________________________________________
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>
  • Interface issues, Marco Bambini <=