Well...Sven explained  #gtDisplayOn: and he nailed it.

On Tue, Aug 25, 2015 at 12:54 PM, Mariano Martinez Peck <
[email protected]> wrote:

> The problem is that KMCategory reimplements #name, which is not a good
> idea. And that is the method used by the inspector. Since the
> implementation of #name answers the instVar that's why it's nil. just
> remove KMCategory >> name and do the inspect again and you will see the
> different.
>
>
>
> On Tue, Aug 25, 2015 at 12:39 PM, Sven Van Caekenberghe <[email protected]>
> wrote:
>
>> Well, name is an instance variable that is simply nil.
>>
>> Self is printed as nil because this object has its own #gtDisplayOn:
>> method that prints just its name.
>>
>> You could try 'Basic Inspect' as well.
>>
>> > On 25 Aug 2015, at 17:30, Julien Delplanque <[email protected]> wrote:
>> >
>> > I didn't do anything like using these names as inst vars. You can
>> reproduce what I am talking about:
>> >
>> > KMCategory new inspect.
>> >
>> > On 25/08/15 17:25, Joachim Tuchel wrote:
>> >> I don't have an exact answer for you, but I think neither self nor
>> name are good names for inst vars.
>> >>
>> >>
>> >>
>> >>> Am 25.08.2015 um 15:57 schrieb Julien Delplanque <[email protected]>:
>> >>>
>> >>> Hi,
>> >>>
>> >>> I have an object that override KMCategory and that is initialized and
>> added to "KmRepository default" using #postLoadDoIt: message in BaselineOf
>> after the package is loaded in an image.
>> >>>
>> >>> But once it is loaded I have huge problems with keyboards entries,
>> they do not work any more, I get an exception each time I press a key.
>> >>>
>> >>> If I inspect the Singleton class variable of my category object I can
>> see it contains an instance of my object that have its "self" variable nil
>> and its "name" variable nil. Others variables look fine. How is it possible?
>> >>>
>> >>> I can remove my custom KMCategory by copy/paste code from sublime
>> text to Pharo and left click/do it and then everything is fine with my
>> keyboard: no more exception and it behave correctly.
>> >>>
>> >>> Thanks in advance,
>> >>>
>> >>> Julien
>> >>>
>> >>>
>> >
>> >
>>
>>
>>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>



-- 
Mariano
http://marianopeck.wordpress.com

Reply via email to