more MVC questions

Vassili Bykov vassili at objectpeople.com
Thu Feb 12 23:48:20 UTC 1998


At 06:17 PM 2/12/98 -0500, I wrote:
>The windows all start behaving weirdly, though.

Which is understandable, with two interface processes running
simultaneously.  Calling the modified #open:label: like this would do the
trick:

	tv := TextCollectorView open: TextCollector new label: 'Foo'.
	Processor terminateActive

Of course, actually modifying the existing #open:label: like this or
depending on the caller to terminate the active process is not a very good
idea. An interesting trick would be a continuation-passing style:

TextCollectorView class>>open: aTextCollector label: aString thenDo: aBlock
  "... like in TextCollectorView class>>open:label:..."
  topView controller openNoTerminate.
  aBlock value: aView.
  Processor terminateActive

and the point of the call:

  TextCollectorView
    open: TextCollector new
    label: 'Foo'
    thenDo: [:view | tv := view]

--Vassili

-- 
Vassili Bykov         vassili at objectpeople.com
The Object People     http://www.objectpeople.com
+1(613)225-8812





More information about the Squeak-dev mailing list