[REQ] Control selection during browse mode

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: [REQ] Control selection during browse mode

Post by FourthWorld » Fri Dec 16, 2022 9:54 pm

stam wrote:
Fri Dec 16, 2022 9:18 pm
is it possible to use the pointer tool in standalone?
Tool modes have been a cornerstone of xTalks since HyperCard 1.0, and LiveCode is no exception.

LC has more tool options than HC, because HC had no vector graphics.

The Pointer tool mode first premiered in SuperCard in 1989, and was in MetaCard's first release in 1992. It's been there ever since.

The only limitation in LC is one of IDE design philosophy: their IDE often traps Pointer tool messages without passing them for your app to use. I've discussed this with various team members over the years, and while we've explored a wide range of options for moving beyond this IDE limitation, given the relatively few apps that deliver custom drawing environments it's been a low priority.

In short, yes, Pointer is among the tool options available via the choose command, even in standalones.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: [REQ] Control selection during browse mode

Post by stam » Sat Dec 17, 2022 12:51 am

FourthWorld wrote:
Fri Dec 16, 2022 9:54 pm
In short, yes, Pointer is among the tool options available via the choose command, even in standalones.
Well, I put that to the test and yes, you can choose 'pointer tool' in standalone. Who knew ;)

However - none of the functionality of the IDE is available, by default anyway.

By selecting Pointer tool in a standalone, you just end up with a non-functional app. Well, the only bits that work are the objects with cantSelect set to true, but other objects cannot be selected, let alone moved or resized. All of which defies the point of the exercise...

So not obvious Richard - and much as I'd like to, I can't see a way to use the built in IDE tools to move/resize objects.
I surmise from your previous comments that this must be possible, but it's really not obvious to me how. Any advice?

S.

Emily-Elizabeth
Posts: 101
Joined: Mon Jan 03, 2022 7:10 pm

Re: [REQ] Control selection during browse mode

Post by Emily-Elizabeth » Sat Dec 17, 2022 5:05 am

stam wrote:
Fri Dec 16, 2022 9:18 pm
But now I’m confused - is it possible to use the pointer tool in standalone? If that’s the case I definitely would use that and not bother rolling my own!
Yes, the pointer tool can be used in standalone (live and learn :) )

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: [REQ] Control selection during browse mode

Post by stam » Sat Dec 17, 2022 5:07 am

In my very limited testing I can switch to pointer tool, yes. But I can’t actually use it.
Have you had any luck with this?

Emily-Elizabeth
Posts: 101
Joined: Mon Jan 03, 2022 7:10 pm

Re: [REQ] Control selection during browse mode

Post by Emily-Elizabeth » Sat Dec 17, 2022 2:48 pm

stam wrote:
Sat Dec 17, 2022 5:07 am
In my very limited testing I can switch to pointer tool, yes. But I can’t actually use it.
Have you had any luck with this?
Yes, I built a copy of the application and tested it, works fine.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: [REQ] Control selection during browse mode

Post by FourthWorld » Sat Dec 17, 2022 5:02 pm

stam wrote:
Sat Dec 17, 2022 12:51 am
FourthWorld wrote:
Fri Dec 16, 2022 9:54 pm
In short, yes, Pointer is among the tool options available via the choose command, even in standalones.
Well, I put that to the test and yes, you can choose 'pointer tool' in standalone. Who knew ;)

However - none of the functionality of the IDE is available, by default anyway.
Which IDE features were you expecting in your standalone?
By selecting Pointer tool in a standalone, you just end up with a non-functional app. Well, the only bits that work are the objects with cantSelect set to true, but other objects cannot be selected, let alone moved or resized. All of which defies the point of the exercise...
I've been using the Pointer tool in standalones for decades. I'm confident we can figure out what you're seeing.

It sounds like cantSelect is doing what we'd expect, but I'm not clear on how other controls can't be selected while the Pointer tool is active.

Are those in toplevel windows?

Remember, although the tool property in LC is a global one, it only affects toplevel windows. Palettes and other window styles are unaffected by tool changes, to make it easier to build traditional drawing apps where tools and properties are set from palettes.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: [REQ] Control selection during browse mode

Post by stam » Sat Dec 17, 2022 6:54 pm

FourthWorld wrote:
Sat Dec 17, 2022 5:02 pm
Which IDE features were you expecting in your standalone?
[post edited]: As all above posts state, it's about selecting, repositioning and resizing objects, nothing else.

For some reason when I tried I my test stack it just didn't work - nothing could be selected, in spite pointer tool being active.

I can only presume this was some weird gremlin - as Emily-Elizabeth stated it worked as expected, I created a fresh stack and yes it does work as advertised in standalone: You can select reposition and resize objects just as in the IDE.
Really don't understand what wasn't working before but hey ho...

This is a massive boon and clearly the way to go - thank you for pointing that out.

S.

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: [REQ] Control selection during browse mode

Post by stam » Sat Dec 17, 2022 9:25 pm

FourthWorld wrote:
Sat Dec 17, 2022 5:02 pm
It sounds like cantSelect is doing what we'd expect, but I'm not clear on how other controls can't be selected while the Pointer tool is active.
OK so I think I've got to the bottom of why it wasn't working, and it wasn't a 'gremlin':

On a new stack with new objects and no behaviours I added a mouseDown handler to 1 object with the 1 line: select me
This indeeds selects on mouseDown, but it's impossible to move or resize when choosing pointer tool in standalone.

All other objects without this script work entirely as expected and are both movable and resizeable in the same context.

The problem I encountered previously was because the standalone I built was from the test stack I posted above, where all objects were set to become selected in a mouseDown handler.

So it seems that in the context of a standalone, if you switch to pointer tool and select an object where a mouseDown script selects this object, this blocks any further action.

This seems like a bit of a bug to me... but what do others think?

S.

scott_morrow
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 29
Joined: Tue Jun 27, 2006 8:35 pm
Location: Bellingham, WA USA
Contact:

Re: [REQ] Control selection during browse mode

Post by scott_morrow » Sun Dec 18, 2022 7:01 am

Ken Ray's Stykz application was one of the most popular apps in my third grade classroom. And by the end of the school year there were usually some hilariously creative products (at least if you were 9.) An amazing piece of work!
Elementary Software
...now with 20% less chalk dust!

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”