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.
mobileControlCreate: misspelled "input", no compiler error
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: mobileControlCreate: misspelled "input", no compiler error
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.
On the good news side, in compiled apps you can still extract your scripts and execute arbitrary commands.
-
- VIP Livecode Opensource Backer
- Posts: 9867
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: mobileControlCreate: misspelled "input", no compiler error
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?
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
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: mobileControlCreate: misspelled "input", no compiler error
"the result" is emptyWhat is the value of "the result" after calling that function with the misspelled param?
It was off but, I turned it on and it still compiles without error. (You're talking about "Strict Compilation Mode", right?)And in Preferences, is "Strict Variable Checking" on or off?
-
- VIP Livecode Opensource Backer
- Posts: 9867
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: mobileControlCreate: misspelled "input", no compiler error
Good catch - yes.tetsuo29 wrote: ↑Thu Nov 14, 2019 1:42 am"the result" is emptyWhat is the value of "the result" after calling that function with the misspelled param?
It was off but, I turned it on and it still compiles without error. (You're talking about "Strict Compilation Mode", right?)And in Preferences, is "Strict Variable Checking" on or off?
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
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn