Page 1 of 2

1 mainstack and 2 substacks opened in the same time ?

Posted: Tue Dec 26, 2017 6:16 pm
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

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

Posted: Tue Dec 26, 2017 7:04 pm
by FourthWorld
Where would you display them? Mobile OSes are single-window.

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

Posted: Tue Dec 26, 2017 10:28 pm
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

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

Posted: Tue Dec 26, 2017 10:33 pm
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.

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

Posted: Wed Dec 27, 2017 11:30 am
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 ?

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

Posted: Wed Dec 27, 2017 1:46 pm
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 :)

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

Posted: Thu Dec 28, 2017 7:29 pm
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

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

Posted: Thu Dec 28, 2017 7:39 pm
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....

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

Posted: Thu Dec 28, 2017 8:52 pm
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.

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

Posted: Fri Dec 29, 2017 6:54 am
by FourthWorld
The within function is a good way to check the mouseLoc, but there is no mouse on a touch device.

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

Posted: Fri Dec 29, 2017 9:31 am
by bogs
Yah, that is what I thought. Wasn't sphere recently wrestling with that same problem? Hmm.

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

Posted: Sat Dec 30, 2017 10:10 pm
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

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

Posted: Sun Dec 31, 2017 12:23 am
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?

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

Posted: Sun Dec 31, 2017 10:42 am
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

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

Posted: Sun Dec 31, 2017 4:30 pm
by FourthWorld
No mouseDown or mouseUp? Is the image empty?