The Pointer Tool does not recognize a button's disabled property
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
The Pointer Tool does not recognize a button's disabled property
Greetings all,
The attached stack demonstrates that mouseEnter and mouseLeave handlers for a disabled button are triggered if the Pointer Tool is selected.
I see this as a genuine bug; but discretion cautions me to post this to the Forum before filing a bug report in case I'm missing something.
Cheers!
Rob
The attached stack demonstrates that mouseEnter and mouseLeave handlers for a disabled button are triggered if the Pointer Tool is selected.
I see this as a genuine bug; but discretion cautions me to post this to the Forum before filing a bug report in case I'm missing something.
Cheers!
Rob
- Attachments
-
- Pointer Tool Issue.zip
- (2.18 KiB) Downloaded 56 times
Rob Cozens dba Serendipity Software Company
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: The Pointer Tool does not recognize a button's disabled property
Rob.
I see where you are coming from, that is, a disabled control ought to be seen but not heard.
But the dictionary is very clear that a disabled control cannot receive mouse clicks or keyboard presses. It says nothing about such things as "mouseEnter". In other words, it may not make sense, yet may not be considered a bug.
Craig
I see where you are coming from, that is, a disabled control ought to be seen but not heard.
But the dictionary is very clear that a disabled control cannot receive mouse clicks or keyboard presses. It says nothing about such things as "mouseEnter". In other words, it may not make sense, yet may not be considered a bug.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: The Pointer Tool does not recognize a button's disabled property
And I see now what you are on about, at least a little; the browse tool does not invoke those messages in a disabled control. That makes the whole idea of disabling rather more twisted.
If not a bug, it surely stinks.
Craig
If not a bug, it surely stinks.
Craig
Re: The Pointer Tool does not recognize a button's disabled property
Confirmed on a different stack.
But whether that constitutes a bug is debatable - like many things in livecode there's more than one way of looking at things.
I mean it's pretty minor issue having to guard against mouseEnter/Leave messages in disabled state (eg if the disabled of me then exit to top, or some such).
But in the scenario where the button must be disabled but you still want to implement some action on mouseEnter/Leave even if 'disabled', then that gets trickier... so arguably the current implementation gives more flexibility. Arguably...
But whether that constitutes a bug is debatable - like many things in livecode there's more than one way of looking at things.
I mean it's pretty minor issue having to guard against mouseEnter/Leave messages in disabled state (eg if the disabled of me then exit to top, or some such).
But in the scenario where the button must be disabled but you still want to implement some action on mouseEnter/Leave even if 'disabled', then that gets trickier... so arguably the current implementation gives more flexibility. Arguably...
Re: The Pointer Tool does not recognize a button's disabled property
Craig, Stam, et al<
So a bug or a "feature"?
It's certainly a distraction: even now that I'm aware, I still do a double take when messages pop up where I don't expect them. The first few times this occurred I spent some time trying to track down what was triggering it.
Anyway, thanks for checking it out.
Rob
So a bug or a "feature"?
It's certainly a distraction: even now that I'm aware, I still do a double take when messages pop up where I don't expect them. The first few times this occurred I spent some time trying to track down what was triggering it.
Anyway, thanks for checking it out.
Rob
Rob Cozens dba Serendipity Software Company
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: The Pointer Tool does not recognize a button's disabled property
The button's disabled property will prevent browser tool messages. And its cantSelect will prevent pointer tool interactions, effectively locking it to browse mode regardless of the current tool. Try setting both disabled and cantSelect and see if that does what you need.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: The Pointer Tool does not recognize a button's disabled property
Richard.
The dictionary is silent on the idea that certain messages can be enabled or disabled depending on the state of "cantSelect" and the current tool. It deals mainly with direct user actions like clicking on it or dragging across it.
I do not blame the dictionary for neglecting these sorts of esoteria.
Craig
The dictionary is silent on the idea that certain messages can be enabled or disabled depending on the state of "cantSelect" and the current tool. It deals mainly with direct user actions like clicking on it or dragging across it.
I do not blame the dictionary for neglecting these sorts of esoteria.
Craig
Re: The Pointer Tool does not recognize a button's disabled property
Hi Richard,FourthWorld wrote: ↑Thu Mar 23, 2023 5:18 pmTry setting both disabled and cantSelect and see if that does what you need.
Thanks for your suggestion. The current configuration works fine for the user experience I desire; the issue only arises when I toggle between the Browse Tool and the Pointer Tool during testing & debugging. I could, of course, turn cantselect on and off whenever I toggle the disabled property, and may do so if I find the issue too annoying.
After further testing today I would note that this issue also arises with disabled fields. It's not a major issue because I'm just displaying help messages; but if someone else had more complicated mouseEnter/mouseLeave handlers, having them rum unexpectedly might cause bigger problems.
i find it difficult to believe this is a feature, not a bug.
Rob
Rob Cozens dba Serendipity Software Company
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
Re: The Pointer Tool does not recognize a button's disabled property
Actually, this will not work for me: If I am testing/debugging, I may indeed want to select the button to retrieve its properties or script.
Rob
Rob Cozens dba Serendipity Software Company
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: The Pointer Tool does not recognize a button's disabled property
Rob.
If you are testing/developing, add a little something, like holding down the optionKey.
Craig
If you are testing/developing, add a little something, like holding down the optionKey.
Craig
Re: The Pointer Tool does not recognize a button's disabled property
I decided to skirt this issue by submitting an enhancement request instead of a bug report.
My submission is blocked because I have not entered the Windows version #, which I have no opportunity to enter.
Step 4 of the submission process ("I can see this bug in") only sporadically displays the O/S piulldown after I select "IDE", and after selecting Windows it does not display the version pulldown.
What's a mother to do??
Rob
Rob Cozens dba Serendipity Software Company
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
Re: The Pointer Tool does not recognize a button's disabled property
Ignore my last comment: by changing my pulldown responses and reentering them I was successful.
Bug 24150 - Pointer Tool should respect a control's disabled property but ignore its cantSelect property.
Rob
Bug 24150 - Pointer Tool should respect a control's disabled property but ignore its cantSelect property.
Rob
Rob Cozens dba Serendipity Software Company
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
Re: The Pointer Tool does not recognize a button's disabled property
Some time ago there was a discussion on the LC mailing list about whether "mouseenter" and "mouseleave"
in a button script should be triggered also with the pointer tool selected. IT ACTUALLY DOES!
And finally "they" came to the conclusion that this is in fact a feature and not a bug.
I still don't get it...
in a button script should be triggered also with the pointer tool selected. IT ACTUALLY DOES!
And finally "they" came to the conclusion that this is in fact a feature and not a bug.
I still don't get it...
-
- VIP Livecode Opensource Backer
- Posts: 261
- Joined: Sat Aug 16, 2008 9:48 am
- Location: Stockholm, Sweden
- Contact:
Re: The Pointer Tool does not recognize a button's disabled property
Say what?! What would be the point of the cantSelect property if the pointer tool was allowed to ignore it???
That's basically the only thing I use cantSelect for - to prevent the pointer tool from selecting the control. E.g. when 'rectangle-selecting' several controls in complex layouts, and making sure certain controls don't get accidentally included in the selection and moved or deleted.
The control can still be easily selected in the project browser when needed.
Re: The Pointer Tool does not recognize a button's disabled property
I must admit it did occur to me that including the cantSelect property in my request might trigger that response, Andy. I really don't know what the Pointer Tool is used for beyond what I use it for, which is to be able to select a control when testing/debugging without triggering a mouseUp handler. If it has other uses that impact end users, then I need to rethink my position.
But from my perspective, the Pointer Tool provides developers a means for using the mouse during testing/debugging in ways that differ from the Browser Tool's capabilities. If during testing I want to look at or change the properties or script of a control whose cantSelect property is true, I must currently gain access to the control via the Project Browser or the Message Box. Allowing a developer to select a control whose cantSelect is true has no more more effect on the end user's experience than allowing that developer to click on a control without triggering mouseUp.
Cheers!
Rob
Rob Cozens dba Serendipity Software Company
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.