What's wrong with this code?

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
shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

What's wrong with this code?

Post by shawnblc » Tue Mar 04, 2014 8:28 am

Last night I had this code working, but today it isn't. Perhaps I changed something, but I'm not getting errors, but I'm not getting any results either.

Is there something wrong with this code? If so, any pointers?

Code: Select all

put line 1 of the hostNameToAddress of the hostName into the fld "fldIPAL"

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: What's wrong with this code?

Post by Simon » Tue Mar 04, 2014 10:49 am

The problem isn't the obvious except for the misplaced something opposite to the indefinite article. I the think. :D

Klaus will know the the answer.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

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

Re: What's wrong with this code?

Post by Klaus » Tue Mar 04, 2014 11:50 am

:D

Hi Shawn,

do not use THE when addressing Livecode objects!
THE is reserved for addressing custom properties, so leave out the THE and it will work,
as long as you really have a field named "fldIPAL". 8)
...
put line 1 of the hostNameToAddress of the hostName into fld "fldIPAL"
...
Tested and works :D

But maybe you want to use the "usual" FUNCTION syntax, which is better readable in my opinion:
...
put line 1 of hostNameToAddress(the hostName) into fld "fldIPAL"
...

Best

Klaus

Post Reply