Removing from array

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

Removing from array

Valdas Bucinskas
Hello ,

  As far as I know, it is impossible directly to remove element from an Array.
  However I want to remove an Obsolete class from 'Object
  allSublasses', which is an Array. (in order to make 'ReleaseBuilder new
  prepareReleaseImage' don't throw exception 'There are still obsolete
  behaviors in your image.').

  So what is the workaround?

--
Best regards,
 Valdas                          mailto:[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Removing from array

vaidasd
Valdai, pamiršai parašyti, kad esi "newbie". Man sugražina Set. Sakei,
kad taip būna dėmesingesni ;)  Manau kad Object allSublasses sukuria
masyvą tik tam, kad tau grąžinti rezultatą, čia tik rezultato
formatas, kuriuo tau Squeak atsako į klausimą. Žr.
Behavior>>allSubclasses
Iki,
Vaidas

2006/1/20, Valdas Bucinskas <[hidden email]>:

> Hello ,
>
>   As far as I know, it is impossible directly to remove element from an Array.
>   However I want to remove an Obsolete class from 'Object
>   allSublasses', which is an Array. (in order to make 'ReleaseBuilder new
>   prepareReleaseImage' don't throw exception 'There are still obsolete
>   behaviors in your image.').
>
>   So what is the workaround?
>
> --
> Best regards,
>  Valdas                          mailto:[hidden email]
>
>
>

--
Vaidotas Didžbalis


Reply | Threaded
Open this post in threaded view
|

Re: Removing from array

Marcus Denker
In reply to this post by Valdas Bucinskas

On 20.01.2006, at 20:16, Valdas Bucinskas wrote:

> Hello ,
>
>   As far as I know, it is impossible directly to remove element  
> from an Array.
>   However I want to remove an Obsolete class from 'Object
>   allSublasses', which is an Array. (in order to make  
> 'ReleaseBuilder new
>   prepareReleaseImage' don't throw exception 'There are still obsolete
>   behaviors in your image.').
>
>

You don't need to remove that from this Array... there is, after all,  
a reason
for that pointer to the obsolete class. So, there used to be a class  
PackageList,
which turned out to be not too usefull. So it was removed, but the  
entry in
the World Menu was not deleted. Thus a pointer to the deleted class  
remained.

You can just evaluate

TheWorldMenu removeObsolete

and after that,

SmalltalkImage current fixObsoleteReferences.

should not get you any complaints anymore.

There are a number of these things to be done for the 3.9a image...
that's why it's alpha, after all. And in a perfect world, we would have
an automatic build process that would catch and force us to fix
those early on...

               Marcus