grab the names of all fields
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 349
- Joined: Tue Oct 28, 2008 1:23 am
- Contact:
grab the names of all fields
Hello: Is there a way to grab the names of every single field in a stack?
Re: grab the names of all fields
Sure. Write a short script that navigates to each card (I assume there are different fields on those cards) and collects the field name info on each.
The script ought to be about eight lines. This will be terrific practice, since you will be using two nested repeat loops. (hint)
Do you need help doing this? Write back if you need me to do it, but you should try first.
Craig Newman
The script ought to be about eight lines. This will be terrific practice, since you will be using two nested repeat loops. (hint)
Do you need help doing this? Write back if you need me to do it, but you should try first.
Craig Newman
Re: grab the names of all fields
adventuresofgreg wrote:Hello: Is there a way to grab the names of every single field in a stack?
Here is some code :
on mouseUp
local tmp
repeat with i=1 to the number of fields of this card
put the short name of field i &cr after tmp
end repeat
put tmp
end mouseUp
HTH
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
-
- Posts: 349
- Joined: Tue Oct 28, 2008 1:23 am
- Contact:
Re: grab the names of all fields
oh ya - use the field number. duh. I'm so used to ref field names, I forget they are sequentially numbered. Thanks. I'm writing a handler to save the state of a standalone to file - probably a cloud based file. I write the contents of every field, and state of each button, etc to an array and dump it into a file - then on open, read that array back in, and fill-in fields, and set buttons etc.
Re: grab the names of all fields
Hi.
Well and good, then.
Remember. The three main identifying properties of an object, and this dates back to 1987, are the name, number and id. LC has others for certain classes of objects, but these three should be able to handle any possible contingency. They each have their own special attributes. Make sure you know what the id can and cannot do.
Craig Newman
Well and good, then.
Remember. The three main identifying properties of an object, and this dates back to 1987, are the name, number and id. LC has others for certain classes of objects, but these three should be able to handle any possible contingency. They each have their own special attributes. Make sure you know what the id can and cannot do.
Craig Newman