[ENH] was: Acessing ImageImports by direct manipulation
Hannes Hirzel
hannes.hirzel.squeaklist at bluewin.ch
Tue Mar 4 00:06:30 UTC 2003
Hi Scott
thank you for your answer regarding image imports and the
attached changeSet. The graphics browser is just what I need!
It is really handy for populating projects ("slides" / worlds)
effectively.
Just for the record and because it might be interesting for others:
I added a line of code so that the resulting SketchMorph
has as a property giving the name of the file (without the extension)
it was created from. I will use this name as I create
an html page of the layout of a World and I want to refer to the
graphic by name.
In fact I use Squeak for generating web pages
with DHTML functionality. Squeak objects then correspond to JavaScript
objects which implement certain functions. I know of course
that for a Squeaker like Alan Kay doing such a thing is
like working with MSDOS. He is right in a sense. But at
the moment the product I'm working on has to obey
"standards" so I'm using Squeak as a generator - notably
something which others of us do at the moment as well
(e.g. generating Java class files). And the newer generation
of JavaScript is actually quite nice (1.5).
I changed GraphicalDictionaryMenu>>handMeOne
"before"
handMeOne
self currentHand attachMorph: (SketchMorph new form: (formChoices at:
currentIndex))
"after"
handMeOne
| skm |
skm _ SketchMorph new form: (formChoices at: currentIndex).
skm setNamePropertyTo: self nameOfGraphic.
self currentHand attachMorph: skm
Then I can access the name of the SketchMorph by
#knownName
anytime
Thanks again - your post just came in at a perfect time.
Cheers
-- Hannes
Scott Wallace <scott.wallace at squeakland.org> wrote:
> Hi, Hannes,
>
> There is a tool in the image, called GraphicalDictionaryMenu, which
> allows you to view, edit, and search any dictionary whose values are
> Forms. It's sort of like a DictionaryInspector, but you see the
> actual graphics rather than a textual description of each element.
>
> Two items in the morphic desktop's "help" menu bring up such a tool,
> namely "graphical imports" (this is the answer to your specific
> question) and "standard graphics library", which lets you browse
> through the dictionary of graphics used by various widgets in the
> Morphic UI.
>
> By coincidence, I had occasion to revisit and use this tool very
> recently, and I encountered the need for several further functions
> and refinements, which I offer fwiw in the attached fileout, which
> contains the following improvements:
>
> * The last keyword searched for is used as the default for 'find...'
> * When there is no new match in a search, but the current item does
> match that search, the tool flashes rather than claiming no match.
> * 'Find again' command added.
> * Added 'Browse symbol references' command, to browse all references
> to the key symbol of the currently-selected entry.
> * Added 'Browse string references' command, to track down all
> methods with string literals that may refer to the currently-selected
> entry.
> * Querying the StandardScriptingSystem for a form at a given key no
> longer needlessly interns the key if it's not already interned.
> * The tool's main menu now has a 'stay-up item'.
>
>
>
> Cheers,
>
> -- Scott
More information about the Squeak-dev
mailing list
|