How do I Create a Custom Property, part 324

David Burgun dburgun at dsl.pipex.com
Wed Apr 21 10:34:23 EDT 2004


>Hi David,
>
>>>...
>>>What about:
>>>...
>>>if myCustomKeys = empty then
>>>   put "myNewCustomProp" after myCustomKeys
>>>else
>>>    put return & "myNewCustomProp" after myCustomKeys
>>>end if
>>>...
>>
>>Yes, I can see this, but you then need to know the "details" of how 
>>the "lines" are organized and since I cannot find any menton of 
>>this is in the Transcript dictionary, it just causes confusion and 
>>wastes time especially for a newbie who is not sure if it's their 
>>code that is causing the problems. That is what one big thing I 
>>find missing in RR, it doens't really say anywhere what is 
>>*supposed* to happen, so if a problem arrises you are not sure if 
>>it's your code or some "feature" of RR!
>
>I'm afraid you are thinking far to complicated, especialy in this case....

No, I was thinging "simple", RR complicated IHMO, for instance, how is:

if myNewCustomProp is empty then
put return & "myNewCustomProp" after myCustomKeys

simpler than:

put "myNewCustomProp" after myCustomKeys


>
>Most things in RR are "natural", i mean they are just like they are, 
>no misteries :-)
>
>Therefore i suggested to think of a list as a field (maybe with 
>"listbehaviour" set to true)...
>
>>But anyway, surely it would be MUCH better to have each item finish 
>>with a return,
>>that way you would never have to worry about the "empty" test.
>
>Are you sure? ;-)

Yes!

>Even in that case you could end up with an empty item, if you don't 
>check for "emptyness"!!!

How so? If you always did:

put "myNewCustomProp" & return after myCustomKeys

this would work regardless of the current contents of myCustomKeys!

Of course you'd get an empty line if you just did:

put return after myCustomKeys

but in that case you'd be explicity asking for an empty line and the 
same would be true of appending the return to the start of the new 
property anyway!

>And how could you differ LINES in that case?
>
>Sorry, but that would not work.

Don't understand what you mean "differ LINES". Why wouldn't the above 
work? Seems to me like it would work better than what is there 
already.

>>>>Just wish they would give a definition of the parameters in commands etc.
>>>I wish there was peace on earth ;-)
>>
>>Well haveing definitions of parameters in the dictionary would be 
>>one step towards that,
>>at least in my corner of the world!!!
>
>C'mon David!
>
>Where do you live?
>Absurdistan? :-D

I live in a land where terms that are mentioned in dictionaries aught 
be have those terms in the dictionary!

All the Best
Dave


More information about the use-livecode mailing list