Bonjour Mark,
I replicated your recipe and it works here too.
One difference is that my behavior button is on another stack; but I
just tried that and it works as well. So the problem is not there.
The other difference is that my behavior button is not specific of the
button which show/hide the field. The behavior of several other
buttons in the stack is set to the same behavior button (with
different handlers: mouseDown, mouseUp, also a menuPick handler.
In these handlers, I distinguish the differents buttons using
if the short name of the target is "such button" then
or case the short name of the target is "such button"
(followed by the routine for this specific button)
I don't see why this could not work? especially as the mouseDown
handler does not work only on the first attempt (doesn't show the
field) after opening the stack, After one unsuccessful first attempt,
every mouseDown works normally. That"s what I found very intriguing!
Thanks a lot for your attention
Best regards
André
Le 15 juil. 10 à 19:09, Mark Schonewille a écrit :
Hi Andre,
I have created a button with the following script:
on mouseUp
if the id of the target is 1005 then hide fld 1
hide fld 1
end mouseUp
on mouseDown
if the id of the target is 1005 then show fld 1
end mouseDown
I have also created an additional button and have grouped it and set
its behaviour to the long id of the first button. There's also a
field on the card.
After quitting Revolution and re-opening the stack, all works as
expected. How is your stack different from mine?
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553
Download the Installer Maker plugin for Runtime Revolution at http://qurl.tk/ce
On 15 jul 2010, at 13:38, Andre.Bisseret wrote:
Le 15 juil. 10 à 11:44, Scott Rossi a écrit :
Recently, Richmond wrote:
Just "for fun" I grouped the btn and put this in the script-
editor of
the group:
on mouseDown
put "Hello"
end mouseDown
AND; when clicked the script in the button WAS executed, and the
script
in the group WAS NOT
executed.
Because the script of the button intercepted the mouseDown message.
btn -> group -> card -> stack
The message hierarchy has several more options than this (see the
list
archives), but this applies to what you are doing.
If you want the group mouseDown handler to trigger, you need to
remove the
button script, or pass the mouseDown message from the button by
adding "pass
mouseDown" to the button's script.
Bonjour Scott,
In my case, the script of the button is empty.
The handlers are in the script of the behavior to which the button
is set (in fact, I was wrong: it is not a behavior of the group of
the button; the behavior of the button is directly set to a
behavior button, sorry ;-).
This behavior button relates to several buttons with something like :
if the short name of the target is "suchButton" then
so that the message path is
button > behavior
What I don't understand is why the handler is not taken into
account on the first mouseDown message (which is actually sent)
while it is taken into account on any subsequent mouseDown message!
Best regards
André
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution