how to list all objects of a class in PartsBin

Lulu yejuan_1204 at yahoo.com.cn
Thu Jan 15 07:34:54 UTC 2004


Hi, 
  
  I collect some pictures (as  "colorForm") in a class=
 "MyPictures". All objects of this class are persistent and=
 stored in a class variable "Extension". Now I describe class=
 initialization method and the statement used to add a picture.
    
      initialize
         self  extension:OrderedCollection new.
      
      extension
         ^Extension.

      extension:aValue
           Extension:=3DaValue.
  
     statements used to add a picture:
     aForm:=3DGIFReadWriter formFromFileNamed:'person.gif'.
     self extension add:aForm. =09=09=09=09

    Now I want to use a selector "listDirection: quadList:" of=
 PartsBin to display all objects of MyPictures. I have looked=
 through some codes about this. Every tuple in the argument of=
 "quadList:" must be in the following form: (<receivor>=
 <selector> <label> <balloonHelp>). For this, I copied the=
 associated selectors in Morph:

    partName: aName categories: aList documentation: aDoc
=09   ^ DescriptionForPartsBin new
=09=09formalName: aName
=09=09categoryList: aList
=09=09documentation: aDoc
=09=09globalReceiverSymbol: self name
=09=09nativitySelector: #newStandAlone.

   descriptionForPartsBin
=09^ self partName: =09'Photo'
=09=09categories:=09=09#('Photo')
=09=09documentation:=09'My Photos '.

   However, #newStandAlone is a class method, which can be used=
 to display an initialized morph object, while I want to display=
 all persistent objects in a class--"MyPictures". How can I do?
   I am sorry for my poor expression, however I indeed need your=
 help. 
   Sincerely,
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1Lulu=09=09

=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1Lulu
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1yejuan_1204 at yahoo.com.cn
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A12004-01-15





More information about the Squeak-dev mailing list