Hi,

I am trying to build a complex morph and install it in another morph in a 
background process such that it does not impact the rest of the user interface. 
After a discussion with Igor, I got to the code below (similar to what can be 
found in CodeAnnotationPane).

However, it still does not seem to have the desired effect as the main ui still 
appears to be blocked. Can anyone see any problem with the code?

The code can be found in the latest version of Glamour.

Cheers,
Doru


GLMWatcherWindow>>addContent: aBlockWhoseValueReturnsAMorph
        | newMorph |

        "if we are still rendering some contents for another watcher,
        we stop and replace with the current request"
        process ifNotNil: [ process terminate ].
        process := nil.
        
        process := [
                WorldState addDeferredUIMessage:  [
                        newMorph := aBlockWhoseValueReturnsAMorph value.
                        self contentsMorph
                                removeAllMorphs;
                                addMorph: newMorph fullFrame: (LayoutFrame 
fractions: (0@0 corner: 1@1))        
                ]
        ] newProcess. 
        process priority: Processor userBackgroundPriority.
        process resume

--
www.tudorgirba.com

"Problem solving should be focused on describing
the problem in a way that makes the solution obvious."





Reply via email to