File, variable, array, split
ttasovac at Princeton.EDU
Thu Sep 26 11:35:01 EDT 2002
many thanks for your detailed post.
I will either split up the data into 2 separate custom property sets
(tTranslations and tForms) or keep the data in one set and collate the main
and the sub key myself. (Neither of which is a problem, because I'm making
the vocabulary database in FMPro and I can export it as a tabdelimited file
in whichever way I want).
But one final thing remains unclear to me. I don't seem to be getting the
customPropertySet thing -- which is why I couldn't figure out the code at
the end of your post. I looked at Geoff's wiki files, but was again hit
over the head by the stupid stick. You see, my original question was how
to keep the data file (words, forms, translation) invisible to the user,
i.e. how to store them in the application.
My code is currently this:
put url "file:translations" into tTranslations
split tTranslations with cr and tab
set the customProperties[cTranslations] of this stack to tTranslations
put url "file:forms" into tForms
split tForms with cr and tab
set the customProperties[cForms] of this stack to tForms
select the clickText
put the clickText into tClickedWord
put the cForms[tClickedWord] of this stack into fld "Translation Display"
put " " after fld "Translation Display"
put the cTranslations[tClickedWord] of this stack after fld "Translation
set the textStyle of word 1 of fld "Translation Display" to bold
set the textStyle of word 2 of fld "Translation Display" to italic
But for this, I still need external data files in the standalone app. What
should I change in the above code to have the data stored in the
Thanks a lot for all your help!
On 25.09.2002 01:23, "Jan Schenkel" <janschenkel at yahoo.com> wrote:
> One final piece of information before I end this
> lengthy post: you can have only one custom property
> set "active" at one time, but you can still access the
> data in other custom property sets at any given time.
> put the someCustomProp of this stack
> is internally handled by
> put the customPropertySet into tActiveSet
> put the tActiveSet[someCustomProp] of this stack
> All the information in custom properties is neatly
> stored away in arrays with the name of the set, and
> the name of the property as the key.
> You can always access the data of another custom
> property set with
> put the uAnInactiveSet[someCustomPropInThatSet] of \
> this stack
> And this works, regardless of what is the active set
> at that point.
More information about the Use-livecode