"The Result" and "It"

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

"The Result" and "It"

Post by teacherguy » Sun Oct 07, 2012 1:58 pm

Is there a tutorial or discussion anywhere regarding the similarities and differences between "the result" and "it"?

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

Re: "The Result" and "It"

Post by Klaus » Sun Oct 07, 2012 2:39 pm

No, just what the dictionary states.

the result = a function
IT = a variable

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: "The Result" and "It"

Post by teacherguy » Sun Oct 07, 2012 2:48 pm

OK. Well then for example if I use GET with a URL and then say

put it into myVariable

or

put the result into myVariable

would I expect the same?

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

Re: "The Result" and "It"

Post by Klaus » Sun Oct 07, 2012 3:05 pm

I have no idea what you exspect, but I wouldn't exspect the same! :D
Why don't you try this yourself?
...
get url("http://kfjsdlkfjsdklfjsdfkjsdlfkjsdf/indexx.html")
answer "it: " && it & CR & "result:" && the result
...
## or a valid server, but an unvalid page
get url("http://noserver.com/indexx.html")
answer "it: " && it & CR & "result:" && the result
...
## or a valid server, and a valid page
get url("http://runrev.com")
answer "it: " && it & CR & "result:" && the result
....
And SEE the difference!


Best

Klaus

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: "The Result" and "It"

Post by teacherguy » Sun Oct 07, 2012 3:17 pm

Thanks Klaus, this is what I have been working my way through recently in communicating with google docs. I had been careless in the use of "the result" and "it."

So let's see if I have this:

"the result" is empty when we are able to get "it"

and conversely

"the result" will contain some information (from the server?) when get fails and "it" is therefore empty

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

Re: "The Result" and "It"

Post by Klaus » Sun Oct 07, 2012 3:19 pm

Yep, something like this... :D

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: "The Result" and "It"

Post by teacherguy » Sun Oct 07, 2012 3:25 pm

Thanks Klaus, you are always very patient and helpful.

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

Re: "The Result" and "It"

Post by Klaus » Sun Oct 07, 2012 3:29 pm

You should see my monthly bills for "Valium"! :lol:

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: "The Result" and "It"

Post by Dixie » Sun Oct 07, 2012 3:56 pm

:D :D

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

Re: "The Result" and "It"

Post by Thierry » Sun Oct 07, 2012 5:00 pm

Klaus wrote:You should see my monthly bills for "Valium"! :lol:
Does it really work ? :roll:

Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

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

Re: "The Result" and "It"

Post by Klaus » Sun Oct 07, 2012 5:03 pm

Thierry wrote:Does it really work ? :roll:
Thierry
Not really, but at least it deters me from getting abusive! 8)

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7394
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: "The Result" and "It"

Post by jacque » Sun Oct 07, 2012 5:22 pm

teacherguy wrote: So let's see if I have this:

"the result" is empty when we are able to get "it"

and conversely

"the result" will contain some information (from the server?) when get fails and "it" is therefore empty
Well, not always. They contain different types of info. In an ask dialog, for example, the result will contain the name of the button clicked and "it" will contain the text the user enters.

The result generally contains error info (but there are exceptions.) The "it" variable generally contains data retrieved from a source.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: "The Result" and "It"

Post by teacherguy » Sun Oct 07, 2012 6:56 pm

Thanks Jacque. Yes I've noticed that when I query google docs "it" will sometimes include errors (like failure to authenticate). So that is when I started thinking that "the result" and "it" were the same thing.

Post Reply