On 02/24/2018 03:08 PM, Ali Lloyd via use-livecode wrote:

The VCS-related use case for an expanded properties property still exists
though, as far as I can tell, although 'properties' is kind of a bad name
for it. Actually I think it might be better to add 'export' syntax for
classic controls. The nice thing about the export syntax is that you get
exactly the distinct pieces of information required to reconstruct the
widget (according to the widget author's implementation). It might actually
be a completely distinct representation of the widget state than that
provided by a list of properties and their values (although in practice,
it's usually a subset of the properties).

I've always found the property lists in the engine clumsy and hard to maintain, in addition to them not being accessible outside the engine other than getting a subset through "the properties".

It's actually very easy to reconstruct objects with a property list that may contain non-settable entries. I do this with preference files all the time to stay out of trouble...

local tList -- contains the cr-separated properties as
-- tPropertyName<tab>tValue

local tObject -- the object whose properties we're setting
local tProperty, tValue
repeat for each line tLine in tList
  put item 1 of tLine into tProperty
  put item 2 of tLine into tValue
    set the tProperty of tObject to tValue
  end try
end repeat

 Mark Wieder

use-livecode mailing list
Please visit this url to subscribe, unsubscribe and manage your subscription 

Reply via email to