propertyChanged message

Bob Sneidar bobsneidar at iotecdigital.com
Thu Sep 1 20:18:15 EDT 2022


As I see it working in my head, property changes, at least built in properties, would typically only be triggered in the IDE. Custom properties are another matter. Set those aside f or a moment. If we are only talking about built in properties, then the message would almost never get sent unless the developer was doing design work. And if the message never got handled, it would just fall through the message path. Not sure what kind of performance overhead that implies, but it can't be much in the scope of making changes to object properties while designing. Heck, just open the message watcher with IDE messages enabled, and the messages going by are so voluminous clicking something clears the buffer before you can see what just happened. :-)

In regards to "another way to do it" I suppose an entire utility stack and library could be written and objects subscribing to classes and subclasses would simply register themselves with the utility stack, but that would mean the utility stack would be the focus of any design changes. If the developer made any out of band changes to any object that was subscribed to a subclass, how would he know? But if a propertyChanged message was sent to the object, the developer handling the message could be alerted that the property was inherited from a subclass and he is about to override it. There is no present way to accomplish this.

So IMHO performance would not be an issue if custom properties were excluded from the process, or if two different messages were sent, one for custom properties and one for built in, leaving it up to the developer which to handle.

Also I think that if properly implemented, it would add even more consistency to the design process. The message could be one of those that can be handled without blocking it, so I don't think it would necessarily interfere with other libraries that depended on the messages.

I see your point with CSS. That would be viable if the only properties we wanted to inherit were able to be defined with CSS. I don't know much about CSS, but if all the aspects of an object could be addressed in this way, and if modifying the Style Sheet would cascade down to all the objects using it, then I suppose that would accomplish the same thing.

Bob S


On Sep 1, 2022, at 13:42 , Richard Gaskin via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:

Bob Sneidar wrote:

> I would like to see a propertyChanged message implemented that gets
> sent to any object when any of it's properties change. There could
> even be two messages, one for built-in properies and another for
> custom properties.

I like the idea (I'd love messages for all sorts of things), but conversations with Dr Raney remind me of the impact messages have on overall performance.



More information about the use-livecode mailing list