incorrect Shout rendering in ObjectExplorer

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

incorrect Shout rendering in ObjectExplorer

Chris Muller-3
I noticed that we now have Shout colorization in the code pane of the Explorer.

That's nice except when I type the name of an instVar, it renders it
the color of error text instead of "instVar" text..

Reply | Threaded
Open this post in threaded view
|

Re: incorrect Shout rendering in ObjectExplorer

Levente Uzonyi-2
In an Explorer you can't evaluate an expression in the context of an
Object. That's what an Inspector is for.

Levente

On Mon, 4 May 2015, Chris Muller wrote:

> I noticed that we now have Shout colorization in the code pane of the Explorer.
>
> That's nice except when I type the name of an instVar, it renders it
> the color of error text instead of "instVar" text..
>
>

Reply | Threaded
Open this post in threaded view
|

Re: incorrect Shout rendering in ObjectExplorer

Herbert König
you evaluate it in the context of the selected object. I find that more
useful than having to prepend my evaluation with the name of the instvar
like in the Inspector.

Cheers,

Herbert

Am 04.05.2015 um 22:56 schrieb Levente Uzonyi:

> In an Explorer you can't evaluate an expression in the context of an
> Object. That's what an Inspector is for.
>
> Levente
>
> On Mon, 4 May 2015, Chris Muller wrote:
>
>> I noticed that we now have Shout colorization in the code pane of the
>> Explorer.
>>
>> That's nice except when I type the name of an instVar, it renders it
>> the color of error text instead of "instVar" text..
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: incorrect Shout rendering in ObjectExplorer

Chris Muller-3
In reply to this post by Levente Uzonyi-2
On Mon, May 4, 2015 at 3:56 PM, Levente Uzonyi <[hidden email]> wrote:
> In an Explorer you can't evaluate an expression in the context of an Object.
> That's what an Inspector is for.

Huh?  If I explore, say, Smalltalk, and select the "root" row of the
explorer, then I can evaluate any expressoins I want in the context of
the selected object, Smalltalk.

Likewise, I can directly access the selected objects instVars.  For
example, while the root is selected I can evaluate "globals class" and
it tells me its an Environment.

The problem, whether I'm in an Explorer or an Inspector, is the new
Shout color rendering is rendering instVars in the color I've chosen
for "invalid" (in the Shout style table).

See picture.  I style my "invalid" code an ugly magenta, so it stands
out.  But I don't want that when its not invalid, of course..



SmalltalkImage.png (10K) Download Attachment
cbc
Reply | Threaded
Open this post in threaded view
|

Re: incorrect Shout rendering in ObjectExplorer

cbc
That is probably due to Shout not knowing what variables are available/bound to the explorer pane.

To do that correctly, the available variables should change each time you change the selection in the list pane. 

In your example, globals should be a valid variable and colored as such.  
But as soon as you select, say, globals, then the text that you have written below should show globals as invalid again.

I suspect there may be some interesting code to play with in getting that right.

-cbc

On Mon, May 4, 2015 at 2:12 PM, Chris Muller <[hidden email]> wrote:
On Mon, May 4, 2015 at 3:56 PM, Levente Uzonyi <[hidden email]> wrote:
> In an Explorer you can't evaluate an expression in the context of an Object.
> That's what an Inspector is for.

Huh?  If I explore, say, Smalltalk, and select the "root" row of the
explorer, then I can evaluate any expressoins I want in the context of
the selected object, Smalltalk.

Likewise, I can directly access the selected objects instVars.  For
example, while the root is selected I can evaluate "globals class" and
it tells me its an Environment.

The problem, whether I'm in an Explorer or an Inspector, is the new
Shout color rendering is rendering instVars in the color I've chosen
for "invalid" (in the Shout style table).

See picture.  I style my "invalid" code an ugly magenta, so it stands
out.  But I don't want that when its not invalid, of course..






Reply | Threaded
Open this post in threaded view
|

Re: incorrect Shout rendering in ObjectExplorer

Levente Uzonyi-2
In reply to this post by Chris Muller-3
Interesting. I wonder when has that changed. Anyway, Shout is not prepared
for this scenario, so the API has to be changed a bit.

Levente

On Mon, 4 May 2015, Chris Muller wrote:

> On Mon, May 4, 2015 at 3:56 PM, Levente Uzonyi <[hidden email]> wrote:
>> In an Explorer you can't evaluate an expression in the context of an Object.
>> That's what an Inspector is for.
>
> Huh?  If I explore, say, Smalltalk, and select the "root" row of the
> explorer, then I can evaluate any expressoins I want in the context of
> the selected object, Smalltalk.
>
> Likewise, I can directly access the selected objects instVars.  For
> example, while the root is selected I can evaluate "globals class" and
> it tells me its an Environment.
>
> The problem, whether I'm in an Explorer or an Inspector, is the new
> Shout color rendering is rendering instVars in the color I've chosen
> for "invalid" (in the Shout style table).
>
> See picture.  I style my "invalid" code an ugly magenta, so it stands
> out.  But I don't want that when its not invalid, of course..
>

Reply | Threaded
Open this post in threaded view
|

Re: incorrect Shout rendering in ObjectExplorer

marcel.taeumel (old)
It is a quite simple fix to implement #aboutToStyle: in both Inspetor and ObjectExplorer to tell the styler about the current context. ;)

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: incorrect Shout rendering in ObjectExplorer

marcel.taeumel
In reply to this post by Levente Uzonyi-2
Of course, Shout is prepared for that. It calls #aboutToStyle: in all other tools out there to update its internal state. :)

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: incorrect Shout rendering in ObjectExplorer

marcel.taeumel
Ah, now I know, what you meant.

I added this: http://forum.world.st/The-Trunk-ToolBuilder-Morphic-mt-145-mcz-td4824574.html

Now you can send "self changed: #styleChanged" to let text morphs restyle.

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: incorrect Shout rendering in ObjectExplorer

marcel.taeumel
In reply to this post by Levente Uzonyi-2
cbc
Reply | Threaded
Open this post in threaded view
|

Re: incorrect Shout rendering in ObjectExplorer

cbc
very nice.

On Tue, May 5, 2015 at 6:11 AM, marcel.taeumel <[hidden email]> wrote:
Works now: http://forum.world.st/The-Trunk-Tools-mt-621-mcz-td4824603.html

Best,
Marcel



--
View this message in context: http://forum.world.st/incorrect-Shout-rendering-in-ObjectExplorer-tp4824413p4824604.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.