[ENH] XML UI Specs for Morphic and MVC (kind of long, but wor th it...)

NIJDAM,MARC (HP-Cupertino,ex1) marc_nijdam at hp.com
Thu Feb 22 22:42:17 UTC 2001


Tres COOL! This will help some of the home experimentation I'm starting to
do on "SqueakPDA". This would allow some pretty tight graphics bindings on
devices without having to re-work a lot of stuff. 

Now to figure out how I can have a development image with all the tools and
a "target" image which might or might not run on the device to deploy code,
and debug it. Anybody looking at this already?

Marc

-----Original Message-----
From: Sarkela [mailto:sarkela at home.com]
Sent: Thursday, February 22, 2001 11:21 AM
To: squeak at cs.uiuc.edu
Subject: [ENH] XML UI Specs for Morphic and MVC (kind of long, but worth
it...)


*** DANGER WILL ROBINSON... Squeak 2.8 based code included ***

Hey gang,

You've been asking for something like this, here is a start.
File in the supplied code and write applications that work
in MVC or Morphic (or any other widget environment for which
one has written a UIBuilder).

As part of the Squeak world tour we discovered that one of the
problems with trying to recompile the source code after a
shrink was a consequence of all of the references to Views
and Morphs littering the subclasses of Model. For example,
try dropping Morphic or MVC followed by evaluating,
ProtoObject withAllSubclasses do: [:e | e compileAll].
You will have many undeclared references and methods that
will not meaningfully recompile.

The result of tour refactorings is an XML based UI builder
for subclasses of Model. A sample application is included,
please read the ReadMeXML.text file for instructions.

All of this was developed in Squeak2.8 and should continue to
work in 3.0 (modulo consequences of those busy little elves up
in Glendale ;-}> ). Special thanks and kudos to Duane Maxwell,
for his posting of the Exobox XML parser that enables the
XML side of the magic.

For example, if I wanted to build an interface for a MessageSet
using this framework, I would define an instance method called
#defaultLabel that returns the string for the title bar. The
following spec would then result in a structured Morph or View being
created (as appropriate) that conforms to the specification.

'<?xml version="1.0" encoding="ISO-8859-1"?>
<window title="defaultLabel">
    <listWidget>
        <pluginList
            list="messageList"
            index="messageListIndex"
            setIndex="messageListIndex:"
            menu="messageListMenu:shifted:"/>
        <frame 
            leftFraction="0"
            topFraction="0"
            rightFraction="1"
            bottomFraction="0.2"/>
    </listWidget>
    <textWidget>
        <pluginText
            text="contents"
            setText="contents:notifying:"
            selection="contentsSelection"
            menu="codePaneMenu:shifted:"/>
        <frame 
            leftFraction="0"
            topFraction="0.2"
            rightFraction="1"
            bottomFraction="1"/>
    </textWidget>
</window>'

The XML is fairly straightforward (the simplest thing that could
possibly work) and is complete enough to describe the entire
standard development toolset with the exception of explorer based
tools. 

Future work...  
The frame declaration is obviously anticipating the existence of
LayoutFrames. Support for layout frames in both MVC and Morphic
would be "'yper cool" (said in my best French accent).

Support for a hierarchical widget would finish out the requirements
to completely refactor the base development tools so that they no
longer have any concrete knowledge of which kind of interface is
sitting upon them.

I am feverishly working on releasing all of the Squeak World Tour results
to date and will post to the list ASAP. Sorry for the delays, but I
seem to be having difficulties with the day job(s). Look for more
surprises in the weeks to come.

I will be posting more detailed documentation and SUnit tests for
these components later as well.

Tervetuloa,

John Sarkela :-}>
CTO ReThink Systems, Inc.





More information about the Squeak-dev mailing list