[Glass] Strange behavior with ProcessLocalVariable ?

Mariano Martinez Peck marianopeck at gmail.com
Fri Nov 22 17:20:50 PST 2013


On Fri, Nov 22, 2013 at 8:28 PM, Dale K. Henrichs <
dale.henrichs at gemtalksystems.com> wrote:

>
>
> ------------------------------
>
> *From: *"Mariano Martinez Peck" <marianopeck at gmail.com>
> *To: *"Dale K. Henrichs" <dale.henrichs at gemtalksystems.com>
> *Cc: *glass at lists.gemtalksystems.com
> *Sent: *Friday, November 22, 2013 3:24:21 PM
>
> *Subject: *Re: [Glass] Strange behavior with ProcessLocalVariable ?
>
>
>
>
> On Fri, Nov 22, 2013 at 8:16 PM, Mariano Martinez Peck <
> marianopeck at gmail.com> wrote:
>
>>
>>
>>
>> On Fri, Nov 22, 2013 at 8:07 PM, Dale K. Henrichs <
>> dale.henrichs at gemtalksystems.com> wrote:
>>
>>>
>>>
>>> ------------------------------
>>>
>>> *From: *"Mariano Martinez Peck" <marianopeck at gmail.com>
>>> *To: *"Dale K. Henrichs" <dale.henrichs at gemtalksystems.com>
>>> *Cc: *glass at lists.gemtalksystems.com
>>> *Sent: *Friday, November 22, 2013 3:02:37 PM
>>> *Subject: *Re: [Glass] Strange behavior with ProcessLocalVariable ?
>>>
>>>
>>> Hi Dale,
>>>
>>> Of course, the nil I get is the one from #default:
>>>
>>> value
>>> "Answer the current value for this variable in the current context."
>>>  ^Processor activeProcess environmentAt: self ifAbsent: [self default].
>>>
>>> So maybe I am getting different processes instances for the #value:  and
>>> the #value  ...  while in Pharo it is the same...
>>>
>>> Yes. Especially when Seaside is involved ... there a number of forked
>>> processes along the way in GemStone that may match exactly what's happening
>>> in Pharo ...
>>>
>>>
>>> Question: is there a way to inspect or print to transcript from gemstone
>>> to the GemTools? I mean...say I want to do some Transcript show: in the
>>> code that is running  or some inspect, and I want that they are seen in the
>>> transcript / ide of GemTools. Is that possible?
>>>
>>> Yes, Transcript exists GemTools and it is attached to the Transcript
>>> window that is open when you login ... use it just like you would in Pharo
>>> ... If you are running without GemTools, the Transcript output is routed to
>>> the gem log ... all Transcript interaction is also recorded in the
>>> ObjectLog so you have a "permanent" record of your Transcript output from
>>> the very beginning:)
>>>
>>> Ok, thanks!


>
>> really???? mmm then something strange is happening in my image.....I have
>> a piece of code running in the server...I put some:  Transcript show:
>> 'xxx'; cr.
>> and nothing appears in my gemstools (in the transcript of the
>> gemtools).... I thoguht the code might now be passing over there (quite
>> strange), but I put a self halt just after the transcript and it halted!!
>> yet nothing is printed...
>>
>>
> even more funny...after halted, I can debug it in GemClient and if I do a
> 'do-it' to the Transcript show that was before the halt, IT DOES GET
> printed!!
> why the hell it is not printed in the real time? no clue...
>
> When you 'do-it' you are running the Transcript expression in a different
> process stack ... my money is on a exception handler interfering ...
>
>

Ahhhh good point there :)
mmmm probably we have some on: Error do: but I cannot image much more than
that. I guess that I can even if I would know which is the exception class
you use for the transaction, I might not have the chance to halt it (to see
which on:do: is the problematic) because me might not send anything to the
exception object....



So...coming back to the problem.... writing some flags on files (since
transcript was not working) it looked like even in the first time, the
original #value answered fine (not nil). But for some reason, when the
debugger comes (or the seaside error handler), the process is indeed
different (and the env) and hence I get a nil.
In Pharo it has another behavior but I imagine this is how
contexts/processor/debugger is implemented.
Anyway.....it is time to refactor my app code so that not to rely/assume
that ProcessLocalVariable will always be same. I will store that elsewhere.

Thanks!



>
>
>
>> Other stuff ARE printed in the transcript...so this is weird.
>>
>> I want to check the identityHash of the process in which I do the value:
>> and the #value but I need a transcript for that...ok...I can write it to a
>> file in the meanwhile...
>>
>> Thanks!
>>
>>
>>
>>
>>> Dale
>>>
>>>
>>
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.com
>>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20131122/84c65175/attachment.html>


More information about the Glass mailing list