How do I create a build for iOS and Mac?

This is the place to discuss anything relating to MobGUI

Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21

Post Reply
minx
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 43
Joined: Tue May 31, 2011 3:47 am

How do I create a build for iOS and Mac?

Post by minx » Mon Jul 11, 2011 10:25 pm

Hi,
I'm trying to build for iOS and Mac standalone with the GUI built using MobGUI. I'm new to the LiveCode environment. Can you walk me through what needs to be included for the build to work correctly? I have a simple test app to try it with. For example, do I need to copy any files, or include the MobGUI stack? I see several mobGUI calls in the handlers, how do these get incorporated into my build? Or should I cut them out?

splash21
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 369
Joined: Sun Dec 19, 2010 1:10 am
Location: UK
Contact:

Re: How do I create a build for iOS and Mac?

Post by splash21 » Tue Jul 12, 2011 8:39 am

Hi, Minx. You shouldn't have to take any extra steps for building with MobGUI. The library is automatically attached to your stack, so you should just go ahead and try building - without cutting out any code! Let me know how it goes! :)
LiveCode Development & Training : http://splash21.com

minx
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 43
Joined: Tue May 31, 2011 3:47 am

Re: How do I create a build for iOS and Mac?

Post by minx » Tue Jul 12, 2011 11:47 pm

Hello,
I've been having problems with my builds, and as I said I'm new to the LiveCode environment. But I think I did something with MobGUI that was a "no no" & caused me a minor freak out! I'm posting it here, so that other people won't end up with the same problems that I did. I put the MobGUI stack into my plugins folder, because I was using it to build my UI, and suddenly everything started acting "very strange".
Here's one example that was an eye-opener. I wanted to slide the card on my stack (you know with the "push right" command), and when I typed it into my code window, suddenly my code window started sliding!I remembered someone saying that the LiveCode interface was built as a stack. But I don't understand how the code was applied to it.
Also, when I built from Mac, Windows and iOS, I'd get 3 different behaving builds and they were all different from my development environment. Elements weren't the same place, buttons didn't respond.
So I went back and took out the MobGUI stack from the plugin area, then cut out all the MobGUI commands from the code just to get to a basic build, and they are now behaving predictably.
I thought as a way to proceed what I'd do is, create my GUI using regular Livecode, and then once I've got the interactions down, I'll replace it with the MobGUI elements. It's not exactly the same (because many of the elements are in groups), but should give me an path that's easier to follow.

splash21
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 369
Joined: Sun Dec 19, 2010 1:10 am
Location: UK
Contact:

Re: How do I create a build for iOS and Mac?

Post by splash21 » Wed Jul 13, 2011 12:13 am

Hi, Minx. Thanks for the report - I've not seen any of this behavior! Is there any chance you can post an example? What version of LiveCode are you using?

John.
LiveCode Development & Training : http://splash21.com

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7258
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: How do I create a build for iOS and Mac?

Post by jacque » Wed Jul 13, 2011 3:54 am

I've seen the visual effects applied to IDE windows. Don't worry, Splash, it isn't MobGUI, it's a focus bug in the IDE. I've seen my message box slide around, my script window "dissolve to black", and any number of other things -- long before MobGUI was around. I haven't seen it in the latest beta builds so maybe it's fixed. Or maybe I'm just not using as many visual effects these days.

The workaround is to close the script window and then click on some topstack or other. That seems to re-focus the IDE.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

minx
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 43
Joined: Tue May 31, 2011 3:47 am

Re: How do I create a build for iOS and Mac?

Post by minx » Wed Jul 13, 2011 5:40 am

Hello Jacque and John,
Thanks Jacque for letting me know about the IDE, because it did happen again and this time it was my top tool bar. I'll try your tip about closing the script window.
And to be clear, my problems weren't pointing at MobGUI. I'm new to LiveCode, so the environment and language are All new to me. And I'm building small simple examples so I can learn it better. When I added MobGUI on top of it, it complicated my problem space, so it made it harder for me to isolate exactly what was happening. I'm trying to figure out a way to simplify my problem set, so I can troubleshoot it more easily. More likely than not, I'm doing something "funny" with the language.
John, I'll try to find one of my examples that was causing problems send it to you. You'd asked which version of software I'm using, it's LiveCode 4.6.2 for Windows/Mac/iOS, and revMobGUI-1 stack. And I use it primarily on the Mac.

splash21
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 369
Joined: Sun Dec 19, 2010 1:10 am
Location: UK
Contact:

Re: How do I create a build for iOS and Mac?

Post by splash21 » Wed Jul 13, 2011 8:31 am

Thanks for that info, Jacque - and I hope you don't run into the same problem again, Minx! It's not a problem I've ever seen (and I hope I don't!)
:D
LiveCode Development & Training : http://splash21.com

minx
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 43
Joined: Tue May 31, 2011 3:47 am

Re: How do I create a build for iOS and Mac?

Post by minx » Thu Jul 14, 2011 7:55 am

Hi John, I have a sample for you, but don't know how to load it here. It's a 2 card stack. Should I mail it to you? Or I could also post it to my website and you can copy it from there. Let me know. Thanks!

splash21
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 369
Joined: Sun Dec 19, 2010 1:10 am
Location: UK
Contact:

Re: How do I create a build for iOS and Mac?

Post by splash21 » Thu Jul 14, 2011 8:08 am

Hi, Minx. When you post a new forum message, there's an 'Upload attachment' tab under the area you type the message into. If you prefer, just send it to support -at mobgui dotcom.
LiveCode Development & Training : http://splash21.com

SparkOut
Posts: 2857
Joined: Sun Sep 23, 2007 4:58 pm

Re: How do I create a build for iOS and Mac?

Post by SparkOut » Thu Jul 14, 2011 8:14 am

You need to zip up a stack before you upload it though. The forum blocks certain file types. Zipping it first means it will be allowed.
Last edited by SparkOut on Thu Jul 14, 2011 9:22 am, edited 1 time in total.

minx
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 43
Joined: Tue May 31, 2011 3:47 am

Re: How do I create a build for iOS and Mac?

Post by minx » Thu Jul 14, 2011 8:59 am

Hey Guys, It's midnight here, so I'll do it tomorrow. Thanks!

minx
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 43
Joined: Tue May 31, 2011 3:47 am

Re: How do I create a build for iOS and Mac?

Post by minx » Thu Jul 14, 2011 4:54 pm

Hi, Got it zipped, along with problem description. I'm hoping you can help me solve this problem because I really want to use the tool. One thing I wanted to mention is, I'm not always sure which handler to use, or where to place my code (before or after the MobGUI calls). Thanks!
Attachments
Controls_test.zip
(118.38 KiB) Downloaded 330 times

splash21
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 369
Joined: Sun Dec 19, 2010 1:10 am
Location: UK
Contact:

Re: How do I create a build for iOS and Mac?

Post by splash21 » Thu Jul 14, 2011 7:14 pm

Hi, Minx. I've attached a modified version of your stack. You were using V0.11 - latest is V0.14 - you can use the updates button on the menu bar to update to the latest version! To update a stack written with an older version is very easy - see http://mobgui.com/doc.php?docId=17

On standalone for Mac & Windows
The plugin is aimed at mobile, so uses touch handlers. In the IDE it works OK as there are also mouse handlers that get translated into touch handlers (only if the environment = 'development') so that you can test things. In a standalone, touchEnd, etc. don't exist, so nothing happens. If you want to try desktop apps, you'll have to substitute touchEnd handlers for mouseUp handlers, etc.

On iOS
1/ ON/OFF switch gets set to OFF - bug fixed in version V0.12
2/ Slider bar resets to middle - it's a bug. I should have it fixed for the next update.
3/ Resizing controls - the only way I could get it NOT to work was to turn off messages from the LiveCode menu (The custom controls need to receive a 'resizeControl' message). With messages enabled, it let me resize controls OK.
4/ The slider bar value affects the glossiness of the On/Off switch: Now this was a mighty strange one. I notice that the gradients on the slider and switch components had been altered. The only way I'm aware of this being possible is for them to be manually edited unless the IDE did something very strange (like you were describing before). I copied the correct gradient settings from another switch and slider on to the controls and they are now OK. Deleting them and replacing with fresh controls would also work. This one was down to the individual components of the custom controls being altered.

There are also a few extra additions like the uText property for labels and buttons - you can set this property rather than having to set the text property of the field component of the control.


Hope this info helps :D


John

Controls.livecode.zip
(121.56 KiB) Downloaded 372 times
LiveCode Development & Training : http://splash21.com

minx
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 43
Joined: Tue May 31, 2011 3:47 am

Re: How do I create a build for iOS and Mac?

Post by minx » Fri Jul 15, 2011 9:40 pm

Whoops, just lost my previous post! I've rebuilt and now it all works on iOS sim! Very cool! I'm in the process of converting it so it'll also work in standalone. But I'm stuck on converting the On/Off switch. Which handlers should I replace or stub?
I realize it's strange to try to get it to run on the Desktop, but I want to create a stack for someone who doesn't have her iPhone yet. This way she can run a sample on her desktop.
Thanks so much for all your help!

Post Reply

Return to “MobGUI”