CHB bug

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

CHB bug

Mikael Svane
This time I found a bug in the CHB (4.01 Professional PL1). Try this:

Create a new Object subclass called SuperClass.
Create a new SuperClass subclass called SubClass.

add a new method to SubClass, using an instance variable that you haven't
defined yet, for example:

SubClass>>testMethod
    test := 'test'

Accept this. You will get an Error: undeclared 'test' and the text turns
red.

Open another CHB on the SuperClass and add the instance variable 'test'
there. Now go back to the first CHB. The caption of the CHB will still read
SubClass (Unclassified), but the method #testMethod has now moved to
ToolbarItem. Accepting the method again doesn't work, since of course there
is no instance variable called 'test' in ToolbarItem.


Regards,

Mikael
[hidden email]


Reply | Threaded
Open this post in threaded view
|

SV: CHB bug

Mikael Svane
And here is another small CHB bug:

Create a new class. Go to it's Class side. Add a class instance variable and
accept. This changes the CHB to the Instance side of the class. It is a bit
annoying when you are creating Singletons and want to create a #current
class method after having added the class instance variable Current.


Best regards,

Mikael Svane
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: CHB bug

Blair McGlashan
In reply to this post by Mikael Svane
Mikael

You wrote in message news:9an5pe$5uhu2$[hidden email]...

> This time I found a bug in the CHB (4.01 Professional PL1). Try this:
>
> Create a new Object subclass called SuperClass.
> Create a new SuperClass subclass called SubClass.
>
> add a new method to SubClass, using an instance variable that you haven't
> defined yet, for example:
>
> SubClass>>testMethod
>     test := 'test'
>
> Accept this. You will get an Error: undeclared 'test' and the text turns
> red.
>
> Open another CHB on the SuperClass and add the instance variable 'test'
> there. Now go back to the first CHB. The caption of the CHB will still
read
> SubClass (Unclassified), but the method #testMethod has now moved to
> ToolbarItem. Accepting the method again doesn't work, since of course
there
> is no instance variable called 'test' in ToolbarItem.

Thanks for your bug report. When I read it I thought it was much more
serious that it actually turns out to be. There is no particular
significance to ToolbarItem, that just happens to be the nearest node in the
tree to which it moves the selection when the 'Superclass' class is removed
and re-added. The method hasn't really moved anywhere, since it has never
been compiled. The "bug" is that the CHB isn't correctly maintaining the
selection in this case. It is annoying though, I grant you. Anyway I've
added it to the bug system as defect no. 180.

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: CHB bug

Blair McGlashan
In reply to this post by Mikael Svane
Mikael

You wrote in message news:9asdop$6ig98$[hidden email]...
> And here is another small CHB bug:
>
> Create a new class. Go to it's Class side. Add a class instance variable
and
> accept. This changes the CHB to the Instance side of the class. It is a
bit
> annoying when you are creating Singletons and want to create a #current
> class method after having added the class instance variable Current.

Yes this one has annoyed me too a few times recently (though not
sufficiently to stir me from my torpor sufficently to do the decent thing
and put it in the bug system. It is now defect no. 181.

Regards

Blair