Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Oct 25, 2014 8:23 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Where are the events?
PostPosted: Sat Jun 13, 2009 9:47 am 
I created a plugin. It doesn't have a window. (REALinvisibleControl)
I instantiate the plugin in code.
dim o as new myObject

Where do events for this object go and how to I code a method that handles the event?

This was no problem if the control had a window, because then the event handler showed up in the list of methods for the control.

Lost again...


Top
  
 
 Post subject: Re: Where are the events?
PostPosted: Sat Jun 13, 2009 9:50 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
You can drop a class or control on a window to make an instance there.

Or you make a subclass in your REALbasic code.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
 
 Post subject: Re: Where are the events?
PostPosted: Sat Jun 13, 2009 9:58 am 
MonkeybreadSoftware wrote:
You can drop a class or control on a window to make an instance there.

I assume you mean drag and drop from the toolbar with all the controls on the left.
As it doesn't have a window my control doesn't show up there.

So I assume I need to create a sub class and then drop that onto my window.
But there is something I don't get.
If there are multiple instances of this being created during run time... how do I know which instance generated the event?
There is only one instance on the window.


Top
  
 
 Post subject: Re: Where are the events?
PostPosted: Fri Mar 25, 2011 3:30 am 
Offline
User avatar

Joined: Thu Jan 07, 2010 7:57 am
Posts: 72
Location: Solihull UK
Hi, did you ever solve this issue I am using posix threads
and my application / plugin works great but I too have an issue that if I try and call an event definition
the app dies as it cannot get a handle to the instance.

I pass the instance in my arguments and its valid as I can get a handle to the properties and change these
or read them, do anything but events no way.

it calls into the RB API and at some stage the handle becomes invalid with SIG_EXEC_BADACCESS which means
it cannot talk to the ram..

I think its to do with the fact that the handle refers to the proc that generated the handle that of course now does not live
as I have returned to RB (the thread is still running of course)

I did wonder what if I passed the instance handle from lower down the chain !!


Mark


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group