How do I Create a Custom Property
David Burgun
dburgun at dsl.pipex.com
Wed Apr 21 09:06:26 EDT 2004
>On Mittwoch, Apr 21, 2004, at 14:38 Europe/Zurich, David Burgun wrote:
>
>>...
>>>from the "CustomKeys" dictionary page:
>>>"The customKeys of an object is a list of that object's custom
>>>property names, one per line."
>>>How is that not descriptive?
>>
>>Because when you type "list" or "property list" or any combination
>>of those into he same "dictionary" it gives nothing back! This is
>>true all over the place! It's like having a normal english
>>dictionary with an entry for (say) "Hog" that says "type of "Pig""
>>but then doesn't define a Pig!!!
>
>I actually never had problems knowing what a list is... and I am
>pretty sure you don't either. You have to stop think in programmers
>terms, a list is a listing, a row of items, an ordered mass.
>Everyone knows that.
Except that if you are talking about a nornal everyday list you don't
have to worry about the details, whereas in RR you do - see below.
>>>Also "propertylist" is just another way for saying: "that
>>>linedelimited list you get or set in relation to customKeys."
>>
>>It doesn't say that either!
>>
>>I'm just finding myself getting increasingly frustrated by (the
>>lack) of decent documentation!
>
>Maybe you shouldn't try to find documentation, and instead try to
>understand things, and if documentation is necessary for that, so be
>it.
The reason I looked for documentation is so I could understand it! I
mean if all you have to do is "understand" it then why bother to have
any documentation at all!
>>Also from reading:
>>
>>>>>put return & "myNewCustomProp" after myCustomKeys
>>
>>Does it say anywhere that the last entry doesn't have/need a return
>>character? The natural way of expecting a list to be formatted
>>would be to have a terminator at the end of each line. If there is
>>only one line, is there a return at the beginning of the line? at
>>the end? none at all?
>
>Again you're overly complex. If you do this:
>put return& "myNewCustomProp" & return after myCustomKeys
>you will achieve exactly the same as the above statement! Yes RunRev
>keeps you from worrying about every detail, and that is a good
>thing, don't you agree?
Except that it doesn't say anywhere that the last item in the list
doesn't have a terminator, so the line:
put "CustomTest1" after myCustomKeys
doesn't append to the "list" it appends to the last item of the list!
Instead you have to do:
put return & "myNewCustomProp" & return after myCustomKeys
Which means that you *HAVE* to know the details of how RR handles
"lists" and therefore need documentation!
Questions: if myCustomKeys is empty, would the statement:
put return & "myNewCustomProp" & return after myCustomKeys
Create a new blank entry as the first item in the "list"? If the last
item in the list had a terminator, would it create a new blank entry
in the last-1 item of the "list" ?
All the Best
Dave
More information about the use-livecode
mailing list