help! a simple image map?

Andreas Raab andreas.raab at gmx.de
Sat Dec 11 07:00:36 UTC 2004


> I'm sure as soon as I hit ^X y in pine I'll figure it out... but *sigh*

Maybe I can beat you to it ;-)

foo := Morph new.
foo openInWorld.
foo on: #mouseDown send: #value: to:
    [:evt| self inform: 'You clicked at ', evt position printString].

Cheers,
  - Andreas

----- Original Message ----- 
From: "aaron reichow" <areichow at d.umn.edu>
To: "squeak list" <squeak-dev at lists.squeakfoundation.org>
Sent: Friday, December 10, 2004 10:55 PM
Subject: help! a simple image map?


> Ahoy all!
>
> I'm wondering how I would go about making an image map. Within Morphic,
> but something that basically does what an HTML image map does. I was
> re-writting a really old (and poorly written) software keyboard for use on
> PDAs.  The way I did this a long time ago was truly dreadful- a "skin" (a
> gif of the keyboard layout) with a bunch of SimpleButtonMorphs placed on
> top, no border and totally transparent.  I worked- you clicked somewhere
> and it typed a letter. But boy was it slow, not so bad on a 600 MHz
> desktop CPU with a real live FPU, but on a 206 MHz StrongARM- whew. Putzy
> indeed.
>
> So, I'm trying something new.  I was wondering if anyone had any simple
> code around to achieve an image map effect. Heck, even the example on an
> AlignmentMorph or any other morph would be fine. I just want an event
> handler to point to some method that gets passed the coordinates of where
> the user clicked- in context of the morph. I know this is deathly simple
> and I know I've done it before- but I can't figure it out right now for
> the ilfe of me! frustating!
>
> I'm sure as soon as I hit ^X y in pine I'll figure it out... but *sigh*
>
> Regards,
> Aaron Reichow
>
> UMD Library :: (218) 726-6651 :: areichow at d.umn.edu
>
> 




More information about the Squeak-dev mailing list