AW: How to hilite a checkbox with send mouseup?

2011-02-15 Thread Tiemo Hollmann TB
Hi Jim,
thanks for your coaching. I wasn' t aware that sending the mousup message
wouldn't trigger the needed event.
So I was correct that I have to script both the message and the event.
Thank you
Tiemo

 -Ursprüngliche Nachricht-
 Von: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-
 boun...@lists.runrev.com] Im Auftrag von Jim Ault
 Gesendet: Dienstag, 15. Februar 2011 17:02
 An: How to use LiveCode
 Betreff: Re: How to hilite a checkbox with send mouseup?
 
 
 
 On Feb 15, 2011, at 7:07 AM, Tiemo Hollmann TB wrote:
 
  Hello,
 
  when sending:  send mouseup to btn test the button gets the
  mouseUp
  command, but doesn't hilite, though it's property Autohilite is true.
 
  Do I really have to set additionally the hilite of that button by
  script?
 
  I also have pass mouseUp in the buttons mouseUp handler and I am
  getting
  exit as the result in the message box
 
  What am I missing? Why do I get exit in the message box?
 
 mouseUp is a LCode message, not an event.
 
 just as 'mouseUpIwantToTrap' is a message you could send to an object,
 or a stack script, or a back script, etc.
 
 Clicking on a checkbox will both send the message and perform the event.
 set the hilite of btn chkboxStatus to true
 
 Sending the 'mouseUp' message will work just fine even if the check
 box is hidden, on a different card, or on a card in a different
 stack.  The same goes for setting the hilite.
 
 send mouseUp to btn id 1022 of card id 1446 of stack Survey
 Questions
 
 set the hilite of btn chkboxStatus of card id 1446 of stack Survey
 Questions to true
 
 
 Hope this helps
 -
 Why not step through your code and see what happens in the flow of the
 script?
 It sounds like 'pass mouseUp' is triggering the 'exit' string.
 
 Hope this helps
 
 Jim Ault
 Las Vegas
 
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
subscription
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: AW: How to hilite a checkbox with send mouseup?

2011-02-15 Thread Robert Brenstein

On 15.02.11 at 17:24 +0100 Tiemo Hollmann TB apparently wrote:

Hi Jim,
thanks for your coaching. I wasn' t aware that sending the mousup message
wouldn't trigger the needed event.
So I was correct that I have to script both the message and the event.
Thank you
Tiemo


In this case, you can use click instead of send:

click at the loc of btn test

This will create the event and send the mouseUp.

Robert

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: AW: How to hilite a checkbox with send mouseup?

2011-02-15 Thread Nonsanity
It would be better to do something like add another handler to the button:

on MouseUpWithHilite
set hilite of me to not hilite of me
mouseup
end MouseUpWithHilite

And send THAT message to the button from afar. This way, the existing
MouseUp handler in the button works as expected, and this message has the
same result as clicking the button (toggling the hilite in the process) and
enacting the MouseUp handler.

 ~ Chris Innanen
 ~ Nonsanity


On Tue, Feb 15, 2011 at 11:52 AM, Robert Brenstein r...@robelko.com wrote:

 On 15.02.11 at 17:24 +0100 Tiemo Hollmann TB apparently wrote:

 Hi Jim,
 thanks for your coaching. I wasn' t aware that sending the mousup message
 wouldn't trigger the needed event.
 So I was correct that I have to script both the message and the event.
 Thank you
 Tiemo


 In this case, you can use click instead of send:

 click at the loc of btn test

 This will create the event and send the mouseUp.

 Robert


 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode