1 mainstack and 2 substacks opened in the same time ?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

1 mainstack and 2 substacks opened in the same time ?

Post by jmburnod »

Hi All,
First time i use several substacks for an iOS app.
When i try to open one, an other one disappears
Is it possible to have one mainstack and two substacks opened in the same time ?
Best regards
Jean-Marc
https://alternatic.ch
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: 1 mainstack and 2 substacks opened in the same time ?

Post by FourthWorld »

Where would you display them? Mobile OSes are single-window.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: 1 mainstack and 2 substacks opened in the same time ?

Post by jmburnod »

Thanks for the hint Richard
Where would you display them? Mobile OSes are single-window.
I thought using a tool palettes over the mainstack for a paint app.
I wonder how I can change tools.
Jean-Marc
https://alternatic.ch
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: 1 mainstack and 2 substacks opened in the same time ?

Post by bogs »

Maybe group the tools for the painting screen? That way, it could either be part of the stack showing the painting canvas, or maybe could set it to visible/not on requirement.

*Note- I don't dev for mobile anything, so have no idea if this would work or not.
Image
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: 1 mainstack and 2 substacks opened in the same time ?

Post by jmburnod »

Hi Bogs,
Maybe group the tools for the painting screen? That way, it could either be part of the stack showing the painting canvas, or maybe could set it to visible/not on requirement.

Yes. The question now is how to set the visible of group when brush is the current tool ?
https://alternatic.ch
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: 1 mainstack and 2 substacks opened in the same time ?

Post by bogs »

I would imagine with a slider type button of some kind, or alternately, instead of completely invisible, have it reduce on screen to a much thinner representation, something like this-
In use:
Image
Not in use:
Image
Of course, I don't know if you can do any of this on mobile, I only am guessing it from things I have seen on mobile. I know you have the ability to put a button on mobile, so if I were doing this, and there was no other way for me to accomplish it, in a worst case scenario I might put a single slider button at the top of the pallette, slide one way its visible, slide the other it isn't.

That single button would take up a lot less space than a whole palette. Just my thoughts, good luck :)
Image
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: 1 mainstack and 2 substacks opened in the same time ?

Post by jmburnod »

Hi bogs,
Thanks for your thoughts.
The main problem is how return to browse tool to be able to send a mouseup when the current tool is a paint tool.
I believed got one way with a pending message but it doesn't work yet on mobile.
Once i found something, i will write back
Best regards
Jean-Marc
https://alternatic.ch
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: 1 mainstack and 2 substacks opened in the same time ?

Post by FourthWorld »

Ideally we'd be able to set the tool mode of a group, which would make a lot of custom drawing/painting apps much easier to develop:
http://quality.livecode.com/show_bug.cgi?id=623

In the meantime, we have a way to do the opposite, clumsy as it is to work with:

You can set the cantSelect property of every control that isn't the paint object.

CantSelect doesn't just prevent selection with the pointer tool, as its hastily-chosen name might suggest. It's better to think of it as alwaysBrowse, since that's what it does: regardless of the current global tool mode, any control with cantSelect set will behave as though you're using the browse tool with it.

This he annoying as hell during development, since it does indeed prevent you from selecting such controls.

But it's easy enough to write a loop that turns that on and off as needed....
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: 1 mainstack and 2 substacks opened in the same time ?

Post by bogs »

I was thinking that myself, but isn't this a case where using the within function to change the pointer would work? Again, if it doesn't work on mobile, forgive my ignorance, I can't think of how cursors/mouseLoc ops would work on mobile since you don't have one, per se.
Image
change field "help" to button "paintTools" and it seems a drop in place thing.
Image
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: 1 mainstack and 2 substacks opened in the same time ?

Post by FourthWorld »

The within function is a good way to check the mouseLoc, but there is no mouse on a touch device.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: 1 mainstack and 2 substacks opened in the same time ?

Post by bogs »

Yah, that is what I thought. Wasn't sphere recently wrestling with that same problem? Hmm.
Image
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: 1 mainstack and 2 substacks opened in the same time ?

Post by jmburnod »

@Richard
I tried to set the cantselect of no paint controls but no message is sent.
This way works for pointer tool and that could be very useful but not for paint tools
https://alternatic.ch
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: 1 mainstack and 2 substacks opened in the same time ?

Post by FourthWorld »

jmburnod wrote: Sat Dec 30, 2017 10:10 pm @Richard
I tried to set the cantselect of no paint controls but no message is sent.
This way works for pointer tool and that could be very useful but not for paint tools
Which message were you handling?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: 1 mainstack and 2 substacks opened in the same time ?

Post by jmburnod »

Which message were you handling?
I use Message watcher.
I noticed that only mouseenter and mouseleave are sent by paint control, nothing for others
https://alternatic.ch
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: 1 mainstack and 2 substacks opened in the same time ?

Post by FourthWorld »

No mouseDown or mouseUp? Is the image empty?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Post Reply