[BUG] Transcript don't work in 3.6 final in MVC mode
Lic. Edgar J. De Cleene
edgardec2001 at yahoo.com.ar
Sat Apr 17 10:11:39 UTC 2004
On 16/04/04 23:59, "David T. Lewis" <lewis at mail.msen.com> wrote:
> On Thu, Apr 15, 2004 at 09:37:26AM -0300, Lic. Edgar J. De Cleene wrote:
>> Today I work on a final 3.6 image and do some network stuff.
>> When I have the following code:
>>
>> Transcript open.
>> Transcript show: 'starting remote comm test';
>> cr.
>> Transcript show: 'initializing network ... '.
>>
>> Trannscript open , but don¹t show any text.
>>
>> Some can confirm this bug ?
>
> Confirmed. However, it's not really a bug, but rather a limitation
> of the way the Controller works in MVC. Here is what is happening:
>
> When you evaluate a block of code with "Transcript open" in it,
> the "Transcript open" acts like a "GO TO". A new StandardSystemView
> is created for the Transcript, and control is passed directly to
> the controller for this view (a StandardSystemController). Control
> never returns to the remaining expressions in your method, so it
> is just as if your "Transcript show" output goes into the bit bucket.
>
> Take a look at TranscriptStream>>openLabel: and you can see where
> this is happening.
>
> In order to do what you want in MVC, you will need to find a way
> to open the Transcript and have it visible on the screen before
> you write to it. See class DeferredActionStandardSystemController
> for an example of how this can be done. The idea is to use a
> DeferredActionStandardSystemController instead of a normal
> StandardSystemController, then send #addDeferredUIMessage: to
> the controller to schedule actions to occur after the new window
> has been opened.
>
> ProcessBrowser, CommandShell, and CrLfFileEditor provide examples
> of how this is done. CommandShell and CrLfFileEditor are in the
> CommandShell package on SqueakMap, and ProcessBrowser is part
> of the standard image.
>
> Dave
>
Dave:
Very, very thanks.
Deep and instructive.
Now I learn something more about the way Squeak works.
With your permission, I translated to Spanish and spread to people here .
Edgar
More information about the Squeak-dev
mailing list
|