David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.335.mcz==================== Summary ====================
Name: Morphic-dtl.335
Author: dtl
Time: 10 February 2010, 4:21:10.888 pm
UUID: 536de13d-e637-4541-b050-ba05bfa359cb
Ancestors: Morphic-dtl.334
Remove VMC/Morphic dependencies from Form, FileList2, and Imports
Update FileList2>>openInWindow.
Add MorphicProject>>formViewClass
Add MorphicProject>>openImage:name:saveResource:
Better #notify: message in MorphicProject>>formEdit:
=============== Diff against Morphic-dtl.334 ===============
Item was changed:
----- Method: MorphicProject>>formEdit: (in category 'editors') -----
formEdit: aForm
"Start up an instance of the form editor on a form."
+ self inform: 'A Morphic editor has not been implemented. Enter an MVC project to edit this form or use #bitEdit'!
- self inform: 'A Morphic editor has not been implemented. Enter an MVC project to edit this form.'!
Item was added:
+ ----- Method: MorphicProject>>formViewClass (in category 'editors') -----
+ formViewClass
+ "Answer a class suitable for a view on a form or collection of forms"
+
+ ^ GraphicalDictionaryMenu!
Item was changed:
----- Method: FileList2>>openImageInWindow (in category 'own services') -----
openImageInWindow
"Handle five file formats: GIF, JPG, PNG, Form stoteOn: (run coded), and BMP.
Fail if file format is not recognized."
| image myStream |
-
myStream := (directory readOnlyFileNamed: fileName) binary.
+ [image := Form fromBinaryStream: myStream.
+ Project current openImage: image name: fileName saveResource: false]
+ ensure: [myStream close]
+ !
- image := Form fromBinaryStream: myStream.
- myStream close.
-
- Smalltalk isMorphic
- ifTrue: [(World drawingClass withForm: image) openInWorld]
- ifFalse: [FormView open: image named: fileName]!
Item was added:
+ ----- Method: MorphicProject>>openImage:name:saveResource: (in category 'editors') -----
+ openImage: aForm name: fullName saveResource: aBoolean
+ "Open a view on an image. If aBoolean is true, save the image as a project resource."
+
+ aBoolean ifTrue:
+ [self resourceManager
+ addResource: aForm
+ url: (FileDirectory urlForFileNamed: fullName) asString].
+ (World drawingClass withForm: aForm) openInWorld
+ !