bobsneidar at iotecdigital.com
Thu Sep 1 16:34:54 EDT 2022
Because there are a lot of parent objects for one, and changing the mainstack default font would change EVERYTHING. What I had in mind was a label type that I could create subtypes from, then instance from those. For example I use label fields for a form header, subheaders for datagrids, subheaders for multiline text fields, and of course labels for single line fields. Each one of those have common font, size, style, margins, alignments etc.
For if I had a main class called Labels, then a subclass for each of those mentioned, then instances off each depending on the use, I could effectively change a property of a subclass and only the instances of that subclass would change, and only the properties of that subclass that were defined in that subclass.
Visual Foxpro used to do (and probably still does) a very similar thing. It makes design 10 times faster, especially when you want to play around with different looks and feels.
Could I just group all the objects on a form for a specific subclass? Sure, but I use groups for other things. I group a field and it's label so I can move them as one. I group certain objects so I can show and hide groups on a form depending on which tab was selected and so on. Also, only that group or card would change, and not other cards and stacks etc.
One new message, propertyChanged would revolutionize the way design was done in LC.
On Sep 1, 2022, at 13:23 , Mark Wieder via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:
On 9/1/22 12:25, Bob Sneidar via use-livecode 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.
Imagine being able to change the font or size of a particular object, and then having all the other objects that "subscribed" to that object's font or size property ALSO have their fonts change. It would then be possible to build a kind of Object Oriented environment. What say you?
Why not just use the built-in hierarchy?: change the textfont of the parent object and all the child object automatically get the change.
ahsoftware at gmail.com<mailto:ahsoftware at gmail.com>
More information about the use-livecode