Two or more parameters in the <Return>[SOLVED]

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
atout66
Posts: 266
Joined: Wed Feb 02, 2011 12:31 pm

Two or more parameters in the <Return>[SOLVED]

Post by atout66 » Thu Apr 03, 2014 9:29 am

Hi to all,

I can't extract the items inside a return when I call a function. I have this kind of code:

Code: Select all

put testLeReturn() into tResult -- tResult has 2 or 3 items. For example tResult = TRUE,2,a string. The debugger is fine to watch that ;-)
   put item 1 of tResult into lItem1
put item 2 of tResult into lItem2
put item 3 of tResult into lItem3
   if lItem1 = TRUE then
      -- do something
   end if
The problem is that lItem1 = tResult . As said in the dictionnary, I should not need to set the itemDelimiter to comma in that case, right ?
So I wonder what's wrong with this script ? Any idea would be much appreciated :wink:
Last edited by atout66 on Thu Apr 03, 2014 10:27 am, edited 1 time in total.
Discovering LiveCode Community 6.5.2.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Two or more parameters in the <Return>

Post by Mark » Thu Apr 03, 2014 9:37 am

Hi,

Can you post the testLeReturn() function?

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Two or more parameters in the <Return>

Post by Klaus » Thu Apr 03, 2014 10:11 am

And make sure you did not set another itemdelimiter in your (same) script before using "testLeReturn()"!

atout66
Posts: 266
Joined: Wed Feb 02, 2011 12:31 pm

Re: Two or more parameters in the <Return> [SOLVED]

Post by atout66 » Thu Apr 03, 2014 10:25 am

Hi Mark,

Oh please, forgive this topic, I'm blind sometimes :shock:
I didn't notice that earlier in my script calling the function, I had set the itemDelimiter to "." !!!
So for sure, the tResult couldn't be understood by LC, as long as I set back the itemDelimiter to comma :oops:
Discovering LiveCode Community 6.5.2.

atout66
Posts: 266
Joined: Wed Feb 02, 2011 12:31 pm

Re: Two or more parameters in the <Return>

Post by atout66 » Thu Apr 03, 2014 10:26 am

Klaus got it while I was responding !

Thanks to all of you...
Discovering LiveCode Community 6.5.2.

Post Reply