On Nov 03, 2006, at 11:35 PM, Garth Hjelte wrote:
At 04:30 PM 11/2/2006, you wrote:
> Sorry to sound stupid, but how do you do this? I looked and I
saw how
> to create an Event Definition in a class, but where does the
code go,
> and how do I connect it up to a function pointer I can send the
dylib?
is that now a plugin or not?
No, a dylib, see above. I've always said it was a dylib, never a
plugin.
for a dylib you can give it a pointer to a global function in a
module
in Realbasic. Check the AddressOf command for that.
We're going around in circles. That's what I'm doing. The PROBLEM
is that during the function call to the dylib, the dylib send
messages to that function (via the function pointer you advised me
about), the function is coded to update a StaticText and a Progress
Bar, but nothing happens in RB until the function call ends. Then
all the messages, that seem to have piled up waiting to "get into"
RB, fall into that function pointer. Pretty useless - how does one
solve this problem?
(Tried calling the dylib in a separate thread, but that crashes RB,
which I mentioned before and your answer was that RB is not thread-
safe.)
OK, now, found the (probable) solution. Just added a App.DoEvents
call and everything seems to update properly. Evidentially the
callback couldn't update the windows with their changes without it.
I hope that's not an unstable thing to do.
Why not make this a plugin that can then send an event back to RB ?
It's not hard with David Addey's XCode starter and may let you then
call back safely and reliably
_______________________________________________
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>