mobileControlCreate: misspelled "input", no compiler error

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
tetsuo29
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 103
Joined: Thu Jun 07, 2007 1:30 am

mobileControlCreate: misspelled "input", no compiler error

Post by tetsuo29 » Tue Nov 12, 2019 11:59 pm

A little rant, if I may. I need to vent.

Using mobileControlCreate to make a text field, I had misspelled "input" as "inupt" and my code compiled without error and ran without producing any errors other than my input field did not appear. The misspelled word wasn't even highlighted in the code editor. In fact, I only noticed the error when I was finally pasting my code into the forum here and "input" was underlined as being misspelled.

I'm kind of in shock that mobileControlCreate allows you to specify an invalid term for the kind of control you want to create. This seems to go against the one of the core philosophies of LiveCode. In fact, I just watched a YouTube video of Kevin Miller presenting about LiveCode at a conference (it's the one where he makes an iPad app in under 3 minutes) and one of the things he was saying is that this language doesn't make you waste time trying to find things like missing symbols (like a missing semicolon or a mismatched parenthesis). Well, in the case of mobileControlCreate, it certainly does and, it doesn't even give you the courtesy of kicking out an error. It just quietly goes about its business making you wonder why your control isn't appearing.

Ok, rant over. Maybe someone from LiveCode will read this and do something about it.

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: mobileControlCreate: misspelled "input", no compiler error

Post by Mikey » Wed Nov 13, 2019 4:16 pm

Correct. In fact, there are a number of things on mobile that are like this. The Tao of LC Compiled (especially on mobile) is this: stuff breaks silently. I think it was 2013 when I had a conference call with Kevin and Mark and they asked me what I wanted to change in LC. One of the things I told them was that about half of the lines I wrote on mobile were debugging lines because when LC has something bad happen on mobile, it just stops executing the script. Debugging mobile is very frustrating.
On the good news side, in compiled apps you can still extract your scripts and execute arbitrary commands.

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

Re: mobileControlCreate: misspelled "input", no compiler error

Post by FourthWorld » Wed Nov 13, 2019 4:37 pm

What is the value of "the result" after calling that function with the misspelled param?

And in Preferences, is "Strict Variable Checking" on or off?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

tetsuo29
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 103
Joined: Thu Jun 07, 2007 1:30 am

Re: mobileControlCreate: misspelled "input", no compiler error

Post by tetsuo29 » Thu Nov 14, 2019 1:42 am

What is the value of "the result" after calling that function with the misspelled param?
"the result" is empty
And in Preferences, is "Strict Variable Checking" on or off?
It was off but, I turned it on and it still compiles without error. (You're talking about "Strict Compilation Mode", right?)

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

Re: mobileControlCreate: misspelled "input", no compiler error

Post by FourthWorld » Thu Nov 14, 2019 2:30 am

tetsuo29 wrote:
Thu Nov 14, 2019 1:42 am
What is the value of "the result" after calling that function with the misspelled param?
"the result" is empty
And in Preferences, is "Strict Variable Checking" on or off?
It was off but, I turned it on and it still compiles without error. (You're talking about "Strict Compilation Mode", right?)
Good catch - yes.

Commands, functions, and standalone constants tend to get pretty good error checking by the engine, but some literals whose scope is limited to a specific function could apparently benefit from some addiotonal error-checking.

You might consider submitting an enhancement request for that one:
https://quality.livecode.com/
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “iOS Deployment”