Getting a widget to display the whole transcript output

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting a widget to display the whole transcript output

ZuLuuuuuu
Hello,

I have a GTK+ widget which has a text view in it. I want to redirect all Transcript output to this widget. I implemented #nextPutAll: for this widget and did:

Transcript message: myWidget -> #nextPutAll:.

But whenever an error happens, it still displays the first few words of the error on the console and the rest of the error on the widget. For example when I evaluate:

 6 blabla

the console displays:

 Object: 6

and the rest of the error is displayed on my widget's text view:


  error: did not understand #blabla
 MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254)
 SmallInteger(Object)>>doesNotUnderstand: #blabla (SysExcept.st:1407)
 optimized [] in UndefinedObject>>Doit (a String:2)
 UndefinedObject>>Doit (a String:1)
 [] in Behavior class(Behavior)>>evalString:to: (Behavior.st:428)


Anyone has an idea what the problem might be? I might try to create a sample code if you have no idea...
Canol Gökel
Reply | Threaded
Open this post in threaded view
|

Re: Getting a widget to display the whole transcript output

Paolo Bonzini-2
On 07/15/2011 12:41 PM, ZuLuuuuuu wrote:

> Hello,
>
> I have a GTK+ widget which has a text view in it. I want to redirect all
> Transcript output to this widget. I implemented #nextPutAll: for this widget
> and did:
>
> Transcript message: myWidget ->  #nextPutAll:.
>
> But whenever an error happens, it still displays the first few words of the
> error on the console and the rest of the error on the widget. For example
> when I evaluate:
>
>   6 blabla
>
> the console displays:
>
>   Object: 6
>
> and the rest of the error is displayed on my widget's text view:
>
>
>    error: did not understand #blabla
>   MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254)
>   SmallInteger(Object)>>doesNotUnderstand: #blabla (SysExcept.st:1407)
>   optimized [] in UndefinedObject>>Doit (a String:2)
>   UndefinedObject>>Doit (a String:1)
>   [] in Behavior class(Behavior)>>evalString:to: (Behavior.st:428)
>
>
> Anyone has an idea what the problem might be? I might try to create a sample
> code if you have no idea...

Yes, the "Object: 6" part is printed using #basicPrint which hardcodes
the output to stderr.  It's done that way to make it vaguely easier to
understand infinite error loops, but perhaps it's time to drop this
historical relic.

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk