Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Jan 29, 2020 3:52 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Plugin Events
PostPosted: Thu Mar 17, 2011 12:13 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 7:57 am
Posts: 72
Location: Solihull UK
Guys I have defined two events in my plugin source


REALevent TestClassEvents[] = {
{ "SInformation( i as Integer ) as String", },
{ "SStrength( i as Integer ) as String", }
};



I then use

REALstring (*fpAction)(REALobject instance, long i) =
(REALstring (*)(REALobject, long))REALGetEventInstance( (REALcontrolInstance)instance, &TestClassEvents[ 0] );


And

REALstring (*fpAction)(REALobject instance, long i) =
(REALstring (*)(REALobject, long))REALGetEventInstance( (REALcontrolInstance)instance, &TestClassEvents[ 1 ] );


In the action events but only the first one fires, I can see both action events in RB and add code to them, if I then call one or the other only the first method gets called, I expected it to call definition(0) for the first and definition(1) for the other event ...

Have I defined them correctly !!

Help

Mark


Top
 Profile  
Reply with quote  
 Post subject: Re: Plugin Events
PostPosted: Thu Mar 17, 2011 4:30 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 7:57 am
Posts: 72
Location: Solihull UK
Sorted it out guy's I had the method definitions pointing to the same function

REALmethodDefinition EcholinkClassMethods[] = {
{ (REALproc)Connect,REALnoImplementation,"Connect(target As String)",REALconsoleSafe},
{ (REALproc)Connect,REALnoImplementation,"Connect2()",REALconsoleSafe},
};

Changed it to the proper defintion


REALmethodDefinition EcholinkClassMethods[] = {
{ (REALproc)Connect,REALnoImplementation,"Connect(target As String)",REALconsoleSafe},
{ (REALproc)Connect2,REALnoImplementation,"Connect2()",REALconsoleSafe},
};

And it all works out great now both of my events fire ok.

Mark


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group