"Unselectable" makes edit mode invalid

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

"Unselectable" makes edit mode invalid

Post by sritcp » Fri Nov 13, 2015 5:04 pm

1. Create a new stack; Draw a filled rectangle (or any graphic).

2. Make the graphic unselectable by clicking on the icon on the project browser

3. With the cursor in the Edit mode, click on the graphic; it sends a "mouseUp" message to the card underneath, as detected by the card script

Code: Select all

on mouseUp
   answer "The Card was sent a mouseUp message"
end mouseUp
This doesn't happen if you lock size and position in the inspector (rather than the project browser).

LC 6.7 on a Mac.

Regards,
Sri

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: "Unselectable" makes edit mode invalid

Post by FourthWorld » Fri Nov 13, 2015 5:49 pm

Correct: choosing the option to make a control unselectable will make it unselectable, and that behavior is different from the option to prevent interactive resizing, which will only prevent interactive resizing.

If you want an object to remain selectable don't turn on the cantSelect property for it.

If you want an object to prevent having its size or position altered interactively, set the lockLoc checkbox in the Inspector.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: "Unselectable" makes edit mode invalid

Post by dunbarx » Fri Nov 13, 2015 5:54 pm

Hi.

The message is sent in all cases for me, as it should. Making an object unselectable does not change its ability to receive mouse events. Disabling will do that, of course.

Craig Newman

EDIT:

I just read Richard's post. Were you interested in resizing? I did not get that from your post. It looked to me like you were talking about messages.

sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

Re: "Unselectable" makes edit mode invalid

Post by sritcp » Fri Nov 13, 2015 6:52 pm

My point was,
this happens in the Edit mode (i.e., the mouseUp message is sent to the card).
This left me a little confused because I thought no messages were sent in the Edit mode.

Regards,
Sri

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: "Unselectable" makes edit mode invalid

Post by dunbarx » Fri Nov 13, 2015 7:04 pm

Sri.

Ah. I see what you mean now. Making an object unselectable enables messages with the edit tool. Feature or bug?

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: "Unselectable" makes edit mode invalid

Post by FourthWorld » Fri Nov 13, 2015 7:38 pm

I would suggest the engine's fine, and perhaps this is an unfortunate design decision in the IDE.

The cantSelect property is described in the Dictionary as maintaining browser tool behavior for a control even when the pointer tool is active. This is very valuable for a wide range of applications that sometimes use the pointer tool, and the behavior seems to work as described.

The question here is: What is the value of having that in the Project Browser?

Personally, I see much value in having lockLoc there, but none at all in having cantSelect there.

If anyone here feels strongly enough about it to file an enhancement request to replace the current cantSelect option with something more useful like lockLoc, please note the report number here so interested folks can add themselves to the CC list to follow the request's progress.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

Re: "Unselectable" makes edit mode invalid

Post by sritcp » Fri Nov 13, 2015 8:05 pm

FourthWorld wrote:..... I see much value in having lockLoc there, but none at all in having cantSelect there......
+1

Regards,
Sri

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: "Unselectable" makes edit mode invalid

Post by FourthWorld » Fri Nov 13, 2015 8:38 pm

Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply