Search found 11172 matches

by Klaus
Wed Oct 09, 2019 11:14 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Possible to easily assign lists to variables & vice-versa?
Replies: 52
Views: 1335

Re: Possible to easily assign lists to variables & vice-versa?

Use paramcount() instead:

Code: Select all

function createTabList
  ## answer the number of items in the params 
  ## returns 3, not 2
  answer paramcount() 
  ## returns 2, correctamente
end createTabList
by Klaus
Wed Oct 09, 2019 7:45 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Possible to easily assign lists to variables & vice-versa?
Replies: 52
Views: 1335

Re: Possible to easily assign lists to variables & vice-versa?

Hi Craig, nope, the first creates a list from the CONTENT of the five variables! The second will create one just the string -> var1, var2, var3, var4, var5 Here a little test, make your own conclusions :-) on mouseUp put "eins" into var1 put "zwei" into var2 put "drei" into var3 put (var1, var2, var...
by Klaus
Wed Oct 09, 2019 7:01 pm
Forum: Android Deployment
Topic: I have a bug when typing 0,35 or 0.35 in fields at Android phones
Replies: 12
Views: 246

Re: I have a bug when typing 0,35 or 0.35 in fields at Android phones

Hi Uros, it works correctly if I first convert ALL neccessary field to -> OHNE_KOMMA and THEN do all the calculations. I think this is the way to go! local zwischenrechnung,kapmm,hauptmm,hauptkvadrat,kapkvadrat,schlagmm,schlagkvadrat on mouseDown put ohne_komma(field "kapmm") into kapmm put kapmm^2 ...
by Klaus
Wed Oct 09, 2019 6:29 pm
Forum: Android Deployment
Topic: I have a bug when typing 0,35 or 0.35 in fields at Android phones
Replies: 12
Views: 246

Re: I have a bug when typing 0,35 or 0.35 in fields at Android phones

Hi Uros, hm, with the values in your screenshot I get this when entering values WITH comma 0,35: --------------------------------------------------------------------------- Die benötigte Füllschnurlänge in Meter beträgt : 1224962,5 Auf die Rolle passen in Meter insgesamt : 4900000 ------------------...
by Klaus
Wed Oct 09, 2019 12:28 pm
Forum: Feature Requests
Topic: Assign multiple variables from a split list on the fly
Replies: 4
Views: 350

Re: Assign multiple variables from a split list on the fly

Hi Michael,

Hint:
This is a place to discuss feature requests, the LC team does NOT read here on a regular base and does not take this discussion as "official". To place an "officical" feature request, you need to do it here: https://quality.livecode.com


Best

Klaus
by Klaus
Wed Oct 09, 2019 12:15 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Possible to easily assign lists to variables & vice-versa?
Replies: 52
Views: 1335

Re: Possible to easily assign lists to variables & vice-versa?

Very important hint:

Code: Select all

...
put 'Dave,46,sr. engineer,colorado,23' into data
split data by comma
## put data[0] into theName
put data[1] into theName
put data[2] into age
...
In LC the keys of an Array start at 1 (ONE)!
by Klaus
Wed Oct 09, 2019 11:58 am
Forum: Android Deployment
Topic: I have a bug when typing 0,35 or 0.35 in fields at Android phones
Replies: 12
Views: 246

Re: I have a bug when typing 0,35 or 0.35 in fields at Android phones

Ah, I see.

So although it works fine in the IDE (without COMMA) but fails on Android with or without COMMA. Is that correct?
Then I would consider this a bug!

But please also post your WITH COMMA script, just to be sure!
by Klaus
Wed Oct 09, 2019 11:45 am
Forum: Android Deployment
Topic: I have a bug when typing 0,35 or 0.35 in fields at Android phones
Replies: 12
Views: 246

Re: I have a bug when typing 0,35 or 0.35 in fields at Android phones

Hi Uros, you do not check for COMMA or DOT in that stack at all!? And the "preopenstack" handler in the "mousedown" handler of the button does not make sense. And please supply some example data for that stack to see what is happening. Not being a fisherman I have no idea what values the fields are ...
by Klaus
Tue Oct 08, 2019 8:53 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Possible to easily assign lists to variables & vice-versa?
Replies: 52
Views: 1335

Re: Possible to easily assign lists to variables & vice-versa?

Yes, you are right, I had "the params" a bit different in mind, sorry. 8)
by Klaus
Tue Oct 08, 2019 8:20 pm
Forum: Android Deployment
Topic: Change "," with "." one mouseUp with - if there is???
Replies: 7
Views: 144

Re: Change "," with "." one mouseUp with - if there is???

And in the IDE everything works as exspected?
If not please supply some example data (for kapkvadrat etc.) and I will check it.
by Klaus
Tue Oct 08, 2019 8:01 pm
Forum: Android Deployment
Topic: Change "," with "." one mouseUp with - if there is???
Replies: 7
Views: 144

Re: Change "," with "." one mouseUp with - if there is???

Don't forget, this is the ENGLISH LC forum. 8)

But the script is identical as in the IDE?
No, sorry, no idea, I do not own any mobile device, so cannot test, just check the script(s).
by Klaus
Tue Oct 08, 2019 7:37 pm
Forum: Android Deployment
Topic: Change "," with "." one mouseUp with - if there is???
Replies: 7
Views: 144

Re: Change "," with "." one mouseUp with - if there is???

Hi Uros, oops, sorry, just came from the german forum... Du benötigst aber keine IF Abfrage hier, wenn kein Komma im Feld ist, kann es auch nicht ersetzt werden! 8) No need for a IF THEN clause here, if there is no comma in that field, it cannot be replaced! ... replace "," with "." in fld "kapmm" ....
by Klaus
Tue Oct 08, 2019 7:27 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Possible to easily assign lists to variables & vice-versa?
Replies: 52
Views: 1335

Re: Possible to easily assign lists to variables & vice-versa?

Annoyingly, for a function "the params" returns in the form of: functionName('item1', 'item2', 'item3'), so I have to strip the function name and the opening and closing parenthesis before I can access the first or last item. No need for a verbose custom function, use the build-in -> paramcount No ...

Go to advanced search