How Do You Do Business Apps? (Morphic Design Philosophy)

Bob Arning arning at charm.net
Sat Feb 26 11:25:18 UTC 2000


On Sat, 26 Feb 2000 01:06:50 -0500 Paul Fernhout <pdfernhout at kurtz-fernhout.com> wrote:
[snip]
>
>I still think other issues raised related to making shippable apps like
>VM events vs. polling, certain standard widgets and behaviors, reduced
>footprint by building up from a minimum (especially for command line /
>headless operation), ease of developing major projects in Morphic (when
>everything is live), and possible bugs (need to check 2.8!) could be
>better addressed. For example, having tried Lex Spoon's excellent Tower
>of Hanoi app, I find it has a large footprint and is slow to load. But,
>it does work! So there is hope.
>
>I still find Morphic awkward -- it just feels too complicated compared
>to say TK or Delphi, and perhaps slower than it needs be. But, I'll give
>it another chance.

It may well be more complicated, but I suspect that is due in large part to all the things you *can* do in Squeak that you can't in some other environments. You may not need the ability to rotate arbitrary screen components in arbitrary amounts, but if you did, you would find it pretty much falls in your lap.

>Bob Arning wrote:
>> [Several good points snipped]
>> There isn't the fine grained Undo
>> >one might expect to be pervasive throughout a design system.
>> 
>> Maybe someday, but I can't say the lack impedes my work. Your mileage may vary.
>
>I find multi-level "Undo" to be a key feature in encouraging
>exploration.

I don't think I have ever had the pleasure of using such a system and I'm not sure my mental image of how they work is accurate, but Squeak offers an undo facility that meets my needs suprisingly well: changesets. Having the need and/or desire to ship units of work to other squeakers, I make it a habit to save what I am doing in changesets and to do so rather often. If I find I have wandered down an unproductive path, it is usually a trivial exercise to go back to a previous changeset and set off in a better direction. Maybe this cannot selectively undo the last N keystrokes where N is arbitrarily large, but it works well for me.

>I agree this is true. However, often things can be made easy to do right
>most of the time for the most common situations. For example, TK widget
>layout using "pack" often makes it easy to build a GUI in relatively few
>lines of TCL or Python which are almost always correct the first time.

Well, fewer lines of code is a big passion of mine, so here's an offer: If you find BobsUI (or Doug's follow-on, if he gets around to releasing it) still too verbose, show me an equivalent shorter bit in one of these other languages and I'll try to match it. Sounds like fun! 

>I guess I was getting at this point by saying "varying degrees", but I'm
>not sure how to impliment this. So, I can pretty much turn things off
>for all morphs or keep thing on for all. Could one perhaps "freeze" some
>morphs (with all submorphs) like FreeCell or Tetris or Browsers, but
>still having programmability live for stuff I am working on?

Oh, how I love a good challenge at 5am! I have attached a small changeset that does just that. Any morph (it's really only the outermost one that counts) can reject the cmd-(alt-)click for halos.

Cheers,
Bob

===========selective halo rejection==========
'From Squeak2.8alpha of 13 January 2000 [latest update: #1873] on 26 February 2000 at 6:10:09 am'!

!Morph methodsFor: 'event handling' stamp: 'RAA 2/26/2000 05:59'!
permitsMouseAction: aSymbol

	"Answer if this morph will accept interaction with the mouse as described by aSymbol"

	^true! !


!FreeCell methodsFor: 'as yet unclassified' stamp: 'RAA 2/26/2000 06:02'!
permitsMouseAction: aSymbol

	^(aSymbol == #halo) not! !


!HandMorph methodsFor: 'special gestures' stamp: 'RAA 2/26/2000 06:09'!
specialGesture: evt
	"Special gestures (cmd-mouse on the Macintosh) allow a mouse-sensitive morph to be moved or bring up a halo for the morph."
	"Summary:
		Cmd-click			pop up halo
		Cmd-drag			reposition morph"

	Preferences cmdGesturesEnabled ifFalse: [^ self].

	self newMouseFocus: nil.

	"if carrying morphs, just drop them"
	self hasSubmorphs ifTrue: [^ self dropMorphsEvent: evt].

	targetOffset _ menuTargetOffset _ self position.
	argument _ self argumentOrNil.
	(argument isNil or: [argument permitsMouseAction: #halo]) ifFalse: [^self].
	evt shiftPressed
		ifFalse:	[self popUpHaloFromClick: evt]
		ifTrue:	[self popUpHaloFromShiftClick: evt]
! !







More information about the Squeak-dev mailing list