[Glass] Tode problematic

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Tue Jul 11 07:43:50 PDT 2017


This looks like a different problem now ... you shouldn't have gotten a 
reference to the method isNotNil if it is not present in the method 
dictionaries for Object ...

Have you refreshed the method list (by clicking on the Object class in 
the class pane)? tODE does not automatically update the lists when 
methods are removed, so this is one possibility for the error ..

You are missing a stack for B), so I cannot comment on that error --- it 
would be useful to see the stack when you are trying to define the 
method again ...

At this point in time it does not appear that the method is present and 
that it is possible that the method list is just out of date ...

Try refreshing the method list ... and reporting stacks at each point 
where you hit an error ...

Another possibility is that you have somehow gotten the 
category/selector dictionary for Object out-of sync with the method 
dictionaries, but I haven't seen any evidence of that in the stacks ... yet.

Dale

On 7/11/17 2:25 AM, Trussardi Dario Romano via Glass wrote:
>
> Dale,
>>
>> From the stack I was able to figure out what you might have done to 
>> create the method and I was finally able to reproduce your bug ...
>>
>> You added the new method to Object in a pre-exisiting category that 
>> was not prefixed with a $* ... and this is a bug in tODE .... that's 
>> been around for quite awhile ...
>>
>>
>> You can patch tODE using the following in TDMethodDefinition>>source:
>>
>> source
>>   self username
>>     ifNotNil: [
>>       ^ (self theBehavior perform: #'persistentMethodAt:' with: self 
>> selector)
>>         sourceString ].
>>   ^ (self theBehavior
>>     compiledMethodAt: self selector
>>     environmentId: 0
>>     otherwise: nil
>>     usePackages: true) sourceString
>>
>
> I update the  TDMethodDefinition>>source as above.
>
> A) Now when in the class browser i select the isNotNilmethod the 
> system answer:
>
>         a MessageNotUnderstood occurred (error 2010), a
>         UndefinedObject does not understand  #'sourceString'
>
>         --------------------
>
>         1. MessageNotUnderstood>>defaultAction @2 line 3
>
>         2. MessageNotUnderstood(AbstractException)>>_signalWith: @5
>         line 25
>
>         3. MessageNotUnderstood(AbstractException)>>signal @2 line 47
>
>         4. UndefinedObject(Object)>>doesNotUnderstand: @9 line 10
>
>         5.
>         UndefinedObject(Object)>>_doesNotUnderstand:args:envId:reason:
>         @7 line 12
>
>         6. TDMethodDefinition>>source @12 line 10
>
>         7. TDMethodDefinitionElementBuilder>>elementSource @3 line 2
>
>         8.
>         TDMethodDefinitionElementBuilder(TDClientCodeElementBuilder)>>formattedElementSource
>         @2 line 3
>
>         9.
>         TDMethodDefinitionElementBuilder(TDClientSourceElementBuilder)>>firstSource
>         @2 line 2
>
>         10.
>         TDMethodDefinitionElementBuilder(TDClientSourceElementBuilder)>>buildClientElementUsing:editorAspect:
>         @6 line 8
>
>         11.
>         TDMethodDefinitionElementBuilder(TDClientMethodElementBuilder)>>buildClientElementUsing:editorAspect:
>         @2 line 2
>
>         12.
>         TDMethodDefinitionElementBuilder>>buildClientElementUsing:editorAspect:
>         @2 line 2
>
>         13. [] in ExecBlock2(TDTopezServer)>>clientElementFor:using:
>         @4 line 9
>
>         14. [] in TDTopezServer>>editorNodeFor:aspect:do: @8 line 9
>
>         15. [] in
>         ExecBlock1(TDTopezServer)>>editorNodeClassNameFor:aspect:do:
>         @5 line 10
>
>         16.
>         TDTopezServer>>lookupClassNameFor:aspect:defaultAspect:in:do:
>         @24 line 28
>
>         17. TDTopezServer>>editorNodeClassNameFor:aspect:do: @5 line 3
>
>         18. TDTopezServer>>editorNodeFor:aspect:do: @2 line 3
>
>         19. TDTopezServer>>clientElementFor:using: @3 line 4
>
>         20. TDTopezServer>>edit:using: @2 line 3
>
>         21. TDMethodDefinition(Object)>>editUsing: @4 line 3
>
>         22. TDMethodDefinition>>itemSelected: @8 line 8
>
>         23.
>         TDClassicClassSelectorListElementBuilder>>itemSelected:at:shiftPressed:
>         @10 line 7
>
>         24.
>         TDClassicClassSelectorListElementBuilder(TDClientListElementBuilder)>>itemSelected:at:shiftPressed:listSelectionsDictionary:
>         @2 line 4
>
>         25. [] in
>         TDClassicClassSelectorListElementBuilder(TDClientListElementBuilder)>>itemSelectedBlock
>         @8 line 7
>
>         26.
>         TDClassicClassSelectorListElementBuilder(ExecBlock)>>cull:cull:cull:cull:
>         @7 line 4
>
>         27. GsNMethod class>>_gsReturnToC @1 line 1
>
>
> B) If compile the new method  isNotNil in the class browser the system 
> answer:
>
> a LookupError occurred (error 2021), reason:rtErrKeyNotFound, A 
> reference using
>      the non-existent key #'isNotNil' was made into the dictionary Object
>
> C) If i select the isNotNil  remove menu option  the system answer:
>
>         a MessageNotUnderstood occurred (error 2010), a
>         UndefinedObject does not understand  #'inClass'
>
>         --------------------
>
>         1. MessageNotUnderstood>>defaultAction @2 line 3
>
>         2. MessageNotUnderstood(AbstractException)>>_signalWith: @5
>         line 25
>
>         3. MessageNotUnderstood(AbstractException)>>signal @2 line 47
>
>         4. UndefinedObject(Object)>>doesNotUnderstand: @9 line 10
>
>         5.
>         UndefinedObject(Object)>>_doesNotUnderstand:args:envId:reason:
>         @7 line 12
>
>         6. TDMethodDefinition>>methodCategory @5 line 6
>
>         7. TDMethodDefinition>>removeFromSystem: @4 line 4
>
>         8.
>         TDClassicClassSelectorListElementBuilder>>cutObjectMenuAction:selectionIndex:
>         @9 line 6
>
>         9.
>         TDClassicClassSelectorListElementBuilder(TDWindowBuilder)>>handleMenuActions:listElement:actionArg:
>         @12 line 10
>
>         10. [] in
>         TDClassicClassSelectorListElementBuilder(TDClientListElementBuilder)>>menuActionBlock
>         @2 line 7
>
>         11.
>         TDClassicClassSelectorListElementBuilder(ExecBlock)>>value:value:value:
>         @2 line 11
>
>         12. GsNMethod class>>_gsReturnToC @1 line 1
>
>>
>> I'll submit a tODE bug and update the source with the patch when I 
>> get chance ... I'm under the gun for a project deadline ...
>
> I think to replicate the code in a new gemstone environment  ( i hope 
> without this problematic )
>
> The only strangeness I remember is that by mistake i do the revert 
> command on the project entry.
>
> I'm available in any case to solve this problematic if you have other 
> considerations.
>
> Thanks,
>
> Dario
>
>
>> Dale
>>
>> On 07/10/2017 12:24 AM, Trussardi Dario Romano via Glass wrote:
>>> Dale,
>>>
>>>> Dario,
>>>>
>>>> There is nothing special about isNotNil ... I guess I'd like to see 
>>>> the actual source code for the method in case there is something 
>>>> odd in the source --- most likely not ...
>>>>
>>>> To get started, I would really like to see the whole stack for the 
>>>> LookupError. In tODE if you select debug to bring up a debugger, 
>>>> then in the stack frame list window use the `Window > print window` 
>>>> menu item, and then send me the printed stack.
>>>>
>>> this is the printed stack:
>>>
>>>         a LookupError occurred (error 2021),
>>>         reason:rtErrKeyNotFound, A reference using the non-existent
>>>         key #'isNotNil' was made into the dictionary Object
>>>
>>>         --------------------
>>>
>>>         1. LookupError(AbstractException)>>_signalWith: @5 line 25
>>>
>>>         2. LookupError(AbstractException)>>signal @2 line 47
>>>
>>>         3. Object class(Object)>>_error:args: @15 line 11
>>>
>>>         4. Object class(Behavior)>>compiledMethodAt:environmentId:
>>>         @5 line 9
>>>
>>>         5. Object class(Behavior)>>sourceCodeAt:environmentId: @2 line 7
>>>
>>>         6. Object class(Behavior)>>sourceCodeAt: @2 line 3
>>>
>>>         7. TDMethodDefinition>>source @4 line 2
>>>
>>>         8. TDMethodDefinitionElementBuilder>>elementSource @3 line 2
>>>
>>>         9.
>>>         TDMethodDefinitionElementBuilder(TDClientCodeElementBuilder)>>formattedElementSource
>>>         @2 line 3
>>>
>>>         10.
>>>         TDMethodDefinitionElementBuilder(TDClientSourceElementBuilder)>>firstSource
>>>         @2 line 2
>>>
>>>         11.
>>>         TDMethodDefinitionElementBuilder(TDClientSourceElementBuilder)>>buildClientElementUsing:editorAspect:
>>>         @6 line 8
>>>
>>>         12.
>>>         TDMethodDefinitionElementBuilder(TDClientMethodElementBuilder)>>buildClientElementUsing:editorAspect:
>>>         @2 line 2
>>>
>>>         13.
>>>         TDMethodDefinitionElementBuilder>>buildClientElementUsing:editorAspect:
>>>         @2 line 2
>>>
>>>         14. [] in ExecBlock2(TDTopezServer)>>clientElementFor:using:
>>>         @4 line 9
>>>
>>>         15. [] in TDTopezServer>>editorNodeFor:aspect:do: @8 line 9
>>>
>>>         16. [] in
>>>         ExecBlock1(TDTopezServer)>>editorNodeClassNameFor:aspect:do:
>>>         @5 line 10
>>>
>>>         17.
>>>         TDTopezServer>>lookupClassNameFor:aspect:defaultAspect:in:do:
>>>         @24 line 28
>>>
>>>         18. TDTopezServer>>editorNodeClassNameFor:aspect:do: @5 line 3
>>>
>>>         19. TDTopezServer>>editorNodeFor:aspect:do: @2 line 3
>>>
>>>         20. TDTopezServer>>clientElementFor:using: @3 line 4
>>>
>>>         21. TDTopezServer>>edit:using: @2 line 3
>>>
>>>         22. TDMethodDefinition(Object)>>editUsing: @4 line 3
>>>
>>>         23. TDMethodDefinition>>itemSelected: @8 line 8
>>>
>>>         24.
>>>         TDClassicClassSelectorListElementBuilder>>itemSelected:at:shiftPressed:
>>>         @10 line 7
>>>
>>>         25. [] in
>>>         TDClassicClassSelectorListElementBuilder(TDClientListElementBuilder)>>itemSelectedBlock
>>>         @4 line 4
>>>
>>>         26.
>>>         TDClassicClassSelectorListElementBuilder(ExecBlock)>>cull:cull:cull:cull:
>>>         @7 line 4
>>>
>>>         27. GsNMethod class>>_gsReturnToC @1 line 1
>>>
>>>
>>> Thanks,
>>>
>>> Dario
>>>>
>>>> With that I will know where the error is occuring and start looking 
>>>> into figuring out what went wrong and how to fix it ...
>>>>
>>>> Dale
>>>>
>>>> On 07/07/2017 06:38 AM, Trussardi Dario Romano via Glass wrote:
>>>>> Ciao,
>>>>>
>>>>> i have a Tode problematic.
>>>>>
>>>>> I submit this to the: tode at noreply.github.com 
>>>>> <mailto:tode at noreply.github.com>
>>>>>
>>>>> but idoubt it's not the right procedure.
>>>>>
>>>>>>         Ciao,
>>>>>
>>>>>>
>>>>>>            i have a tode image working with  on 3.2.12 environment.
>>>>>
>>>>>>
>>>>>>            Now in the tode class browser i found ( i don't
>>>>>>         remember when and how i create it )
>>>>>
>>>>>>
>>>>>>            the      Object isNotNil     message.
>>>>>
>>>>>>
>>>>>>            When in the class browser i select this method the
>>>>>>         system answer:
>>>>>
>>>>>>
>>>>>>                a LookupError occurred (error 2021),
>>>>>>         reason:rtErrKeyNotFound, A reference using
>>>>>
>>>>>>                the non-existent key #'isNotNil' was made into the
>>>>>>         dictionary Object
>>>>>
>>>>>>
>>>>>>            Any other command:
>>>>>
>>>>>>
>>>>>>                remove the relative protocol
>>>>>
>>>>>>
>>>>>>                compile a new isNotNil method
>>>>>
>>>>>>
>>>>>>                remove the method with:  method remove Object
>>>>>>         >>isNotNil
>>>>>
>>>>>>
>>>>>>            answer the same error.
>>>>>
>>>>>>
>>>>>>            When i save the relative package the Object isNotNil
>>>>>>         method is not saved.
>>>>>
>>>>>>
>>>>>>            When the code call:         isNotNil     the system
>>>>>>         answer: does not understand.
>>>>>
>>>>>>
>>>>>>            Thanks for considerations,
>>>>>
>>>>>>
>>>>>>                Dario
>>>>>
>>>>>
>>>>>
>>>>> Does anyone know the right procedure?
>>>>>
>>>>> If in the meantime you have an indication regarding my problem,
>>>>>
>>>>> i would be grateful.
>>>>>
>>>>> Dario
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Glass mailing list
>>>>> Glass at lists.gemtalksystems.com
>>>>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>>>>
>>>> _______________________________________________
>>>> Glass mailing list
>>>> Glass at lists.gemtalksystems.com <mailto:Glass at lists.gemtalksystems.com>
>>>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>>>
>>>
>>>
>>> _______________________________________________
>>> Glass mailing list
>>> Glass at lists.gemtalksystems.com
>>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>>
>> _______________________________________________
>> Glass mailing list
>> Glass at lists.gemtalksystems.com <mailto:Glass at lists.gemtalksystems.com>
>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20170711/9edf7a78/attachment-0001.html>


More information about the Glass mailing list