realbasic-nug
[Top] [All Lists]

[ANNOUNCE] CSuspendAppleEvent class

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: [ANNOUNCE] CSuspendAppleEvent class
From: James Sentman <james at sentman dot com>
Date: Wed, 31 Jul 2002 00:31:52 -0400
Hi Folks,

This is something I've been thinking about for a while and of course, when the time pressure on another project gets critical, that's when I decide to work on it;)

This class allows you to handle apple events asynchronously. You can be processing any number of events at once as you like. You no longer need to return the data at the end of the HandleAppleEvent routine, but can do so at your leisure.

In your HandleAppleEvent event, you turn the event into a suspended event like:

MySuspendedEvent = new CSuspendedEvent( event)
return true

Any time later, but before the Apple Event timeout you can add a reply just as your used to:

MySuspendedEvent.replyString = "Send James Pizza"
if not MySuspendedEvent.send then
  msgbox "oops"
end if

Thats all. It's freeware and open source, but read the license. This is something that I have wanted to be able to do for a LONG time, I hope that other folks will get interested in it as well. I'll finish up the opposite where you don't have to wait for the results of an apple event in the next couple of days.

The class is written in RB code with declares. No plugins required. I've only tested with RB 4.5 on OSX, but it should work with earlier versions and OS9.

http://www.sentman.com/dev.htm

Thanks,
 James
--
_____________________________________________________________________________
James Sentman <james at sentman dot com>                      
http://www.sentman.com
 Enterprise server monitoring for Mac OS X:  http://whistleblower.sentman.com


<Prev in Thread] Current Thread [Next in Thread>