How do I Create a Custom Property

Trevor DeVore trevor at mangomultimedia.com
Wed Apr 21 12:41:11 EDT 2004


On Apr 21, 2004, at 10:23 AM, David Burgun wrote:
>> Set the myCustomProp of this stack to ""
>> put the myCustomProp of this stack into tTemp
>> put "This is line 1" into line (number of lines of tTemp + 1) of tTemp
>> set  the myCustomProp of this stack to tTemp
>>
>> OR
>>
>> Set the myCustomProp of this stack to "line 1"&cr&"line2"&cr&"line3"
>> put the myCustomProp of this stack into tTemp
>> put "This is line  4" into line (number of lines of tTemp + 1) of 
>> tTemp
>> set  the myCustomProp of this stack to tTemp
>
> This is basically what I was saying, the problem is that there if 
> there is just one entry in the Custom Properties, then it isn't always 
> terminated with a CR. So, doing
>
>
>> put "This is line 1" into line (number of lines of tTemp + 1) of tTemp
>
> would result on the line being appended to the last LINE not to the 
> container. Also from reading Klaus's posts, he seems to think that you 
> are to put the CR at the START of a line, means that if the container 
> is empty, you need to do a test for that and NOT prepend a return in 
> this case!
>
> I am guessing that the problems I was having yesterday is because I 
> entered some custom props in the IDE which by the looks of it, doesn't 
> add a CR to the last item in the list. As long as everything is 
> TERMINATED with a CR, then your code will work ok (and so will mine!).

Maybe I am not understanding what you want but with my example you 
don't need to worry about CR terminations.  Example 1 starts with an 
empty custom prop but properly puts "This is line 1" into the list on 
line 1 (number of lines of tTemp returns  when the list is empty).  
Example 2 doesn't have a CR at the end of line 3 but properly puts 
"This is line 4" on line 4.

Am I missing something.

-- 
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com



More information about the use-livecode mailing list