Re: LispWorks and code compatibility
Raffael Cavallaro <raffaelcavallaro <at> mac.com>
2008-08-01 18:08:06 GMT
On Aug 1, 2008, at 1:11 PM, John DeSoi wrote:
> I use other Mac development tools that have great debuggers -- you
> can trace through any code including user interface code. So it is
> possible somehow.
> For me this is the biggest limitation of LispWorks on the Mac. I
> constantly want to set a breakpoint in an interface callback to step
> through the code. Currently, there no way to do this with LispWorks
To be more precise than Chun Tuan was, it is possible to run GUI
elements in separate threads (I do so in Clozure CL for example).
However, the AppKit itself is not thread safe so any call in any
thread that causes a GUI element to be modified (i.e., redrawn) needs
to happen on the main thread. The AppKit provides
performSelector:onMainThread:withObject:waitUntilDone: (and others)
for this purpose.
So yes, you can have GUI code on more than one thread, but then you
have to be careful to always call visible GUI element modifications on
the main thread. For example, you can allocate and initialize GUI
elements on a separate thread, but when you show them, you must do it
on the main thread.