On Mar 26, 2008, at 9:28 , Hilaire Fernandes wrote:
As a concrete simple example, how can I examine the content of this project file http://swiki.ofset.org:8000/super/36 (produced with a 3.8 image)?
It use 3 graphics and I am really curious to know what inside the .pr file.
The info I got from the .pr is: hilaire@tice:/tmp$ file ENGRENAGE4.001.pr ENGRENAGE4.001.pr: gzip compressed data, from FAT filesystem (MS- DOS, OS/2, NT)
Once gunzipped, I can't examine the content...
Why not? After gunzipping, you can inspect what is in it:
(FileStream readOnlyFileNamed:'ENGRENAGE4.001') fileInObjectAndCode
You get an ImageSegment containing 9195 objects with 250 outpointers. The objects have these classes:
(arrayOfRoots collect: [:each | each class]) asBag sortedCounts
a SortedCollection(1176->Point 1146->Association 1121->Array 908-
Rectangle 589->MorphExtension 555->Color 519->IdentityDictionary 434- Bitmap 342->TableLayout 342->TableLayoutProperties 328->Float 326- ByteString 167->SimpleBorder 141->Morph 139->ImageMorph 134- StringMorph 90->EventHandler 78->TileMorph 72->TilePadMorph 51- AlignmentMorph 42->PhraseTileMorph 39->SketchMorph 38- OrderedCollection 36->IconicButton 33->UpdatingStringMorph 32- CompiledMethod 24->SimpleButtonMorph 21->AssignmentTileMorph 18- DiskProxy 17->WeakArray 13->StepMessage 12->ScriptEditorMorph 12- ScriptInstantiation 12->TickIndicatorMorph 12->LinedTTCFont 12- UpdatingSimpleButtonMorph 12->UpdatingThreePhaseButtonMorph 12- UniclassScript 12->ScriptStatusControl 11->ScriptActivationButton 9- SlotInformation 9->ByteArray 6->Form 5->TTCFont 4->TranslucentColor
4->ShortPointArray 4->ActorState 4->TTGlyph 4->PasteUpMorph 3-
MorphicTransform 3->Metaclass 3->MethodDictionary 3->ColorForm 3- TransformationMorph 3->ScriptNameTile 3->ColorArray 3- ClassOrganizer 3->ThumbnailMorph 3->NumericReadoutTile 3- ViewerFlapTab 3->LayoutProperties 3->WatcherWrapper 2->MethodContext
2->Heap 2->Dictionary 2->DamageRecorder 2->HandMorph 2->BlockContext 1-
Player78 1->LocaleID 1->Player79 class 1->ChangeSet 1->Player78
class 1->MouseEvent 1->WorldState 1->TranscriptStream 1->Project 1-
Set 1->UnscriptedPlayer 1->LargePositiveInteger 1->Player77 class 1- Player77 1->MacRomanInputInterpreter 1->Presenter 1->Player79)
Or you could have a look which forms are in the segment:
arrayOfRoots select: [:each | each isKindOf: Form]
#(Form(197x132x16) ColorForm(443x444x8) ColorForm(152x152x8) Form(287x287x16) ColorForm(287x287x8) Form(152x152x16) Form(9x11x16) Form(443x444x16) Form(9x11x16))
These appear to be your 3 gears as originally imported (the 8-bit forms) plus the same but with a painted dot on top (the 16-bit forms).
And so on.
- Bert -