On 16 December 2012 19:02, Ciprian Teodorov <
ciprian.teodorov@gmail.com> wrote:
>
>
> On Sun, Dec 16, 2012 at 6:27 PM, Igor Stasenko <
siguctua@gmail.com> wrote:
>>
>> On 16 December 2012 16:05, Ciprian Teodorov <
ciprian.teodorov@gmail.com>
>> wrote:
>> > Hi Igor,
>> >
>> > Besides some other small comits, in NativeBoost-Core-CiprianTeodorov.103
>> > I
>> > have changed the way anonymous subclasses of NBExternalTypeValue and
>> > NBExternalArray are created.
>> >
>> > The reason is that using the old way we would create multiple instances
>> > of
>> > the same metaclass which is not allowed in the image.
>> > BTW, I was getting this problem when trying to modify (add or remove)
>> > class
>> > instance variables of the NBExternalArray.
>>
>> So, your problem is that you abusing it :)
>
> Lool. Yes I abused it a little bit ... ;) but not this time.
>>
>> Anonymous subclasses is there for sole purpose to provide common
>> minimal protocol
>> for their instances.
>> If you need something else, you can just make normal subclasses.
>>
>
> In your image just do
>
> before := NBExternalArray class allInstances size.
> myFloatArray := NBExternalArray ofType: #NBFloat32 .
> after := NBExternalArray class allInstances size.
>
> {before. after} inspect.
>
> the number of metaclass instances should be one. If there are more you get
> errors when refactoring your class.
>
> Now just image that I have create a few of these external array types...
> before being able to touch the NBExternalArray ever again you have to
> somehow get rid of all wrong instances ... I did that yesterday and is not
> funny...
>