At 02:08 AM 11/4/2006, you wrote:

> 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

That's a good plan, but I have some urgent things to accomplish with this for the time being.

Right now the dylib is in Codewarrior, but can be fairly easily moved to XCode (for the purpose of Universal Binary) and it seems right instead of moving it as a dylib, move it in as a plugin.

Thank you very much Alfred (as well as for your other work) for the re-entrency explanation and especially the solution. It is important to call long function to plugins or dylibs and leave hem to work while getting a minimum of interface feedback.

Now, going further, what about real-true "call it and forget it, with feedback" things? Lets complicate the situation by saying this:

Lets say my program is a task assigner that allows you to set up long 1-hour processing tasks. You setup something, click "Do It" and the process starts off and does it's thing while giving you feedback on what it's doing and how far along it is. During that period, you set up something else and click "Do It" for that task, and on and on.

These are all hour-long processes that are initiated by one function call, like my need earlier.

If you are exclusively in RB, this is no problem - that's what Thread classes are for.

However, what if the long processes are (like my need earlier) are in a plugin or dylib, and you'd like feedback during the process?

Perhaps the solution would be to "move up" Alfreds solution so there would be a Thread class for each operation, and the plugin would callback the Thread class which would have a timer, etc.

But as Christian pointed out, RB is not thread-safe, so this probably wouldn't work. Does this mean that this type of architecture would just have to wait until RealSoftware makes RB thread-safe?

Garth Hjelte
Sampler User

_______________________________________________
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>

Reply via email to