...so far I've created a simple text editor using the Pluggable-brand Morphs and it's worked out pretty well (much simpler than say, Xt and Motif!).
I haven't tried it yet, but am I right in assuming that I can create a Model in a 'visual' manner by plunkinkg Morphs down on a playfield, as opposed to hand-coding them?
I've been trying my hand with Morphic recently, too. I built a CRC card using the pluggable components (at http://guzdial.cc.gatech.edu/st/CRCWindow.st if anyone's interested), and it did work great. But I did spend a lot of time trying to plunk down Morphs on a playfield as a way of creating the card.
I ended up with a lot of questions. If anyone here can lend a hand, I'd appreciate it!
- Is there a way to stick a StringMorph-like object (i.e., a non-editable text) into a SystemWindow? - Is there a way to get text with a scroll bar inside a RectangleMorph or a PlayField? - Is there a way to get TextMorphs to resize with a RectangleMorph or PlayField? I did get a TextMorph to fit the "owning" RectangleMorph, but I couldn't get the RectangleMorph to resize when I put it into another RectangleMorph or PlayField. - What's the advantage of making a morph into its own subclass? It just creates a class definition, right? Is there anyway to assemble a morph then somehow turn it into an openAsMorph method so that I can make many of them? - What's the advantage of naming the components? Does it interact somehow with making its own subclass? - What does it mean for something to be "sticky"?
Thank you! Mark
-------------------------- Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280 (404) 894-5618 : Fax (404) 894-0673 : guzdial@cc.gatech.edu http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.html
Mark Guzdial wrote:
I ended up with a lot of questions. If anyone here can lend a hand, I'd appreciate it!
I have written a couple of morphic applications also, the biggest being a collaborative writing tool with hooks to commercial Smalltalk for persistence storage in a database. Students use a text editing tool to edit, format, stylize and ultimately submit essays. Other students can then use a reviewing tool to highlight passages and add annotations to praise or suggest improvement areas. The original submitter can then review these comments to submit a revised essay with changes highlighted.
The environment has been fantastic so far, and we are very excited about giving students a good tool at no cost that will run on whatever platform they have available. We will be trying out the user interface and doing a pilot essay assignment with our Internet "Freshman English" students next month.
I have found that creating morphic applications currently is easiest using a browser and writing the basic code until I have some components that I can then assemble morph style. The scripting environment, to me, shows alot of promise and is very exciting, but needs "critical mass" yet. It could well be that I haven't made the mental shift from my code browser mentality, though...
- Is there a way to stick a StringMorph-like object (i.e., a non-editable
text) into a SystemWindow?
I'm not sure I understand your question.
- Is there a way to get text with a scroll bar inside a RectangleMorph or
a PlayField?
I use a PluggableTextMorph.
- Is there a way to get TextMorphs to resize with a RectangleMorph or
PlayField? I did get a TextMorph to fit the "owning" RectangleMorph, but I couldn't get the RectangleMorph to resize when I put it into another RectangleMorph or PlayField.
You may want to use the specialized case of a Rectangle Morph, the PasteUpMorph, which has the ability to resize to fit its owning morph. I use that in my own application for this purpose.
- What's the advantage of making a morph into its own subclass? It just
creates a class definition, right? Is there anyway to assemble a morph then somehow turn it into an openAsMorph method so that I can make many of them?
I think that the same advantages exist as for any subclassing design. You can override inherited behaviors, for one thing. Actions seem to ultimately be methods that belong to a special protocol for organizational reasons and for controlling exposure of certain groups of behaviors to the user as scripter (as opposed to the user as toolsmith). I think I see where this is heading, though I would love to hear from the more knowledgable in the community.
- What's the advantage of naming the components? Does it interact somehow
with making its own subclass?
It looks as if naming a component will make more sense as the scripting environment becomes more mature. After all, you will need some unique way to refer to morphs of the same kind within a script. There is a structure involving "players" as a type of model, "costumes" for holding morphs as view/controllers, and "slots" for establishing other relationships (named relationships being one type?) between application objects at the user scripting level. I don't think I fully understand the full intent of the naming scheme, however.
- What does it mean for something to be "sticky"?
Morphs which move around the playfield when you drag them with the mouse can be made sticky. They will stay put when you drag them unless you "grab" them using a menu or appropriate halo circle.
Thank you! Mark
Hope it helps. I am happy to share application code if it would be helpful, though it may prove more harmful if I don't "get it" yet. Part of the fun is not knowing if you are doing things the "right" way or not, I guess.
Happy Morphing!
Matt Rosen San Joaquin Delta College
When you browse the root of the file system, and click on a drive, e.g.
C:\
It seems to think that the $: is an illegal character, and replaces it with a $#
-- Mike
mklein@alumni.caltech.edu
Here is a fix for DosFileDirectory.
fullNameFor: fileName "Return the fully-qualified path name for the given file. Correct syntax errors in the file name." (fileName size = 2 and:[fileName first isLetter and:[fileName last = $:]]) ifTrue:[^fileName]. FileDirectory splitName: fileName to: [:path :localName | ^ (path isEmpty ifFalse: [path] ifTrue: [ pathName = self pathNameDelimiter asString ifTrue:[''] ifFalse: [pathName]]), self pathNameDelimiter asString, (self checkName: localName fixErrors: true)].
Andreas
squeak-dev@lists.squeakfoundation.org