Arrays and custom properties
Bill Vlahos
bvlahos at mac.com
Mon Aug 4 18:05:01 EDT 2003
I am struggling with the concept of arrays and custom properties and am
looking for a cookbook example.
Let's say I want to make something like the included Employee Database
example that comes with Rev. It makes a new card for each record but I
don't want to do that, I want to put the information in an array and
store it in a custom property. This will allow me to have complex
information in a field such as TABS, RETURNS, and maybe formatting in a
field (like a notes field) and encrypt the data by password protecting
the stack.
My problem is that I don't know how to actually code it. Here is a
simple scenario:
1. Stack named "Company Directory" as a standalone
2. Stack named "CDData.rev" where the data will be stored in a custom
property
3. Card named "Employees" with 4 fields
FirstName
LastName
Notes
Index (to show all of the records in a list field. Click on the item
to populate the other fields.)
All of the data will be in an array which is read from or written to
the custom property.
1. The array is modified when records are added, deleted, or changed.
2. The array is saved to the CDData.rev stack in a custom property when
the item is changed.
3. Upon opening the standalone, data is read from the custom property
which is then put into the Index field.
How would I do this? I think it is likely to be simple but I am unclear
on the execution.
Thanks in advance. I'll submit the finished stack to RunRev as a user
contribution.
Bill Vlahos
More information about the use-livecode
mailing list