Inappropriate Interface Behaviour during mouseDown

Scott Raney raney at metacard.com
Mon Nov 18 17:05:01 EST 2002


 On Fri, 2 Jan 1970 Igor de Oliveira Couto <info at pixelmedia.com.au wrote:

Looks like Igor has gone back in time to witness the birth of UNIX!

> I must admit, in my limited view, I fail to see how this
> implementation can be seen as a 'feature'. I fail to see why a
> control needs to 'own' the mouse until it is released. I (perhaps
> foolishly) thought that the appropriate message should be passed to
> whatever control happens to be underneath the mouse at a certain
> point in time, NOT to the last control where the mouse button was
> held down... If I put 3 buttons next to each other, press the mouse
> down on the first, and while still holding it down, move over the
> other 2 buttons, should they highlight?

It's an empirical question, which means you should try it yourself and
see.  In my experience on GUI systems (dating back to the Xerox Star)
I've never seen one work this way for regular pushbuttons.  Since
you're apparently back in 1970, however, I can't rule out that you
might find an early MIT or Xerox PARC prototype that works this way
;-)

> It seems to me that this implementation is also quite inefficient
> (it requires that a 'mouseRelease' message be implemented as well,
> while in other systems that message is unnecessary)

What other systems?

>, and it is
> probably the reason why we've observed the unexpected behaviour of
> controls on hiding/showing objects from under the mouse (I can see
> now that the hidden object still 'owns' the mouse).

Right, at least while the button is down.  Whether it should change
when the button is up, however, is a different question and one we're
currently researching.  But even if we change this it wouldn't solve
your problem.

(big snip)

> Yes, it might well be that I am not being able to see some
> incredibly useful functionality that has been given to us by the
> current implementation of the mouse messaging scheme in Revolution -

Yes, it's that incredibly useful functionality of working like every
other GUI application out there ;-)

> but from this newbie's perspective, it does indeed feel like a
> 'bug'... not a 'feature'...

There is a way to do what you want, using the within() function:
if within(me, the mouseLoc)
then show image 1
else hide image 1

The ugly syntax is because this is a SuperCard-compatibility feature
that I've never had much use for.  But then, I'm not trying to build
the kind of bizzarre UIs that seem to be so popular with Flash
developers, who seem to think that their worth is measured by how
different their creations are from everyone else's rather than by how
well they work.
  Regards,
    Scott

> Kind Regards,
> --
> Igor de Oliveira Couto
> ----------------------------------
> info at pixelmedia.com.au
> ----------------------------------

********************************************************
Scott Raney  raney at metacard.com  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...





More information about the use-livecode mailing list