Page 1 of 1

Ridiculous issue with fieldname is driving me crazy [Solved]

Posted: Wed Jun 03, 2015 2:36 pm
by antrax13
OK this is starting to be ridiculous
Can anyone explain me why this will not set the text of the label???? but it will answer it?

Code: Select all

on openCard
      put "POPULATE THIS TEXT TO HELPER FIELD" into fld "LblHelper" -- NOT WORKING 
      put the text of fld "LblHelper" into testVar
      answer testVar -- YES THIS IS WORKING
end openCard
What is wrong with field name "LblHelper"?
When I change name of it to anything else it is working where can I find dictionary of reserved words or words that I can not use for label?

Using Win 7

Re: Ridiculous issue with field name is driving me crazy

Posted: Wed Jun 03, 2015 2:47 pm
by Klaus
Hi antrax,

I just made a test with your script and it actually works fine here on my Mac in the LC 7.05 IDE!?

No idea what is going wrong there, but you should be able to label a field "on mouseup",
since this is only a STRING, it should not cause any problems.


Best

Klaus

Re: Ridiculous issue with field name is driving me crazy

Posted: Wed Jun 03, 2015 2:49 pm
by Klaus
Hi abntrax13,

on second reading:
antrax13 wrote:Can anyone explain me why this will not set the text of the label????
Do you really want to set the LABEL of your field?
If yes, the you should actually do it! 8)
...
set the LABEL of fld "LblHelper" to "POPULATE THIS TEXT TO HELPER FIELD"
...


Best

Klaus

Re: Ridiculous issue with field name is driving me crazy

Posted: Wed Jun 03, 2015 2:52 pm
by dunbarx
I also cannot see anything wrong with your handler. And even if there were no such field, you would encounter a runtime error, not just a lack of functionality.

And are you really sure that changing the name really enables the action? That is much more odd.

Craig Newman

Re: Ridiculous issue with field name is driving me crazy

Posted: Wed Jun 03, 2015 2:57 pm
by Klaus
Hi all,

sorry, forget about the LABEL of a field, this property does not exist for FIELD objects! :oops:


Best

Klaus

Re: Ridiculous issue with field name is driving me crazy

Posted: Wed Jun 03, 2015 3:11 pm
by antrax13
can you please open and import csv and then check if the label on card "CardLocation" has been updated?

Re: Ridiculous issue with field name is driving me crazy

Posted: Wed Jun 03, 2015 3:11 pm
by dunbarx
Klaus.
forget about the LABEL of a field, this property does not exist for FIELD objects!
Fields do have label properties:

Code: Select all

set the label of fld 1 to "XYZ" & random(999)
answer the label of fld 1
The contents of the label cannot be seen, but is a "container" where one might store data.

But the OP never tried to "set" the label property, he just wanted to place text into a field.

Craig

Re: Ridiculous issue with field name is driving me crazy

Posted: Wed Jun 03, 2015 3:35 pm
by Klaus
Hi Craig,

yes, I know, I meant there is no official and usefull(meaningfull property LABEL of fields in contrary to buttons! :D


Best

Klaus

Re: Ridiculous issue with field name is driving me crazy

Posted: Wed Jun 03, 2015 3:40 pm
by Klaus
Hi antrax13,

I checked your stack!

1. You have 3 (THREE) fields named "LblHelper" on your card "CardLocation"!
2. The first one, where the text in your script will go into!, is layered BEHIND the black graphic "Rectangle".
3. OH BOY! My good education prohibits a harsher comment! :(


Best

Klaus

Re: Ridiculous issue with field name is driving me crazy

Posted: Wed Jun 03, 2015 3:48 pm
by antrax13
Klaus wrote:Hi antrax13,

I checked your stack!

1. You have 3 (THREE) fields named "LblHelper" on your card "CardLocation"!
2. The first one, where the text in your script will go into!, is layered BEHIND the black graphic "Rectangle".
3. OH BOY! My good education prohibits a harsher comment! :(


Best

Klaus
Thanks