1 mainstack and 2 substacks opened in the same time ?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2225
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

1 mainstack and 2 substacks opened in the same time ?

Post by jmburnod » Tue Dec 26, 2017 6:16 pm

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

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

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

Post by FourthWorld » Tue Dec 26, 2017 7:04 pm

Where would you display them? Mobile OSes are single-window.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2225
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

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

Post by jmburnod » Tue Dec 26, 2017 10:28 pm

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

bogs
Posts: 2179
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Tue Dec 26, 2017 10:33 pm

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: 2225
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

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

Post by jmburnod » Wed Dec 27, 2017 11:30 am

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 ?

bogs
Posts: 2179
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Wed Dec 27, 2017 1:46 pm

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: 2225
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

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

Post by jmburnod » Thu Dec 28, 2017 7:29 pm

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

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

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

Post by FourthWorld » Thu Dec 28, 2017 7:39 pm

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
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

bogs
Posts: 2179
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Thu Dec 28, 2017 8:52 pm

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: 6145
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

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

Post by FourthWorld » Fri Dec 29, 2017 6:54 am

The within function is a good way to check the mouseLoc, but there is no mouse on a touch device.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

bogs
Posts: 2179
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Fri Dec 29, 2017 9:31 am

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: 2225
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

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

Post by jmburnod » 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

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

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

Post by FourthWorld » Sun Dec 31, 2017 12:23 am

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
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2225
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

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

Post by jmburnod » Sun Dec 31, 2017 10:42 am

Which message were you handling?
I use Message watcher.
I noticed that only mouseenter and mouseleave are sent by paint control, nothing for others

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

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

Post by FourthWorld » Sun Dec 31, 2017 4:30 pm

No mouseDown or mouseUp? Is the image empty?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Post Reply

Return to “iOS Deployment”