Page 1 of 1

property profiles? what and how

Posted: Fri Aug 28, 2015 5:52 am
by rinzwind
Probably I misunderstand what it's about... but its not working as I think it should work.

I add a button, create a new property profile, change some properties like color. So far so good.

Then I would think I can apply the newly created profile to other controls. But no... it's not listed. Then I thought, oke maybe they inherit profiles from the parent. So I added a property profile to the stack or card. Still nothing.

So what's the intended use of these? The manual makes me think I am right but apparently not.

Re: property profiles? what and how

Posted: Fri Aug 28, 2015 2:28 pm
by rinzwind
hmm no one knows? That tells me something ;0

Re: property profiles? what and how

Posted: Sat Aug 29, 2015 1:13 am
by Simon
Hi rinzwind,
Who is the Big parent? Of the whole thing?
Try it there :)

But I'm not sure that's how it is supposed to be used, maybe, it does work for all new objects. I've seen it used for localization of apps.

Simon

Re: property profiles? what and how

Posted: Sat Aug 29, 2015 1:22 am
by Simon
For just color stuff I'd use the colors & patterns in the inspector of Big Daddy.

Simon

Re: property profiles? what and how

Posted: Sat Aug 29, 2015 4:47 am
by jacque
Profile settings have to be applied to each object individually. Once they are all set, you can change the current profile and all objects will change their settings at once. Profiles are more like a master switch for sets of pre-applied customizations. If you want all objects to be controlled by the parent object, don't use profiles; instead, set up the parent object and all objects belonging to it will inherit those settings (when applicable.)

For example, if you want all the buttons in a group to have red text, set the textcolor of the group to red. All objects that have a text property within that group will inherit the color.

Profiles are often used for things like language internationalization. You can set the French profile of a label field to the French text, its German profile to the German text, etc. Repeat for every language you want to support in every object that has text. Then when you apply the French profile to the stack, all objects with a French profile will display the French text, and so forth. You can do the same with any property settings. For example, you might want a "blue" theme. You'd set the background color of each object to a shade of blue. You'd set a "purple" theme the same way, setting each objects "purple" profile to an appropriate color. Then you can switch profiles to change the theme of your app all at once from blue to purple.

Re: property profiles? what and how

Posted: Sat Aug 29, 2015 8:14 am
by rinzwind
Thanks for the explanation Jacque. I do see the point in the translation example. But for theming it makes little sense if you still have to apply the color settings to each and every control. One would think that you could create a profile ButtonColorScheme with the custom colors set.. every button has that profile applied. And if you change the profile, every button with that profile will change with it. But that's not how it works I see now. If you make a profile 'Blue' you still would have to change each and every button if you change something in it. Right? That's also the only way the translation example can work (since every text has its own translation). So no sharing of profile information at all. Maybe time for a concept like Template or something?

Re: property profiles? what and how

Posted: Sat Aug 29, 2015 1:36 pm
by dunbarx
Are you perhaps thinking of, or wishing for, something along the lines of the templateButton (or template"AnyConttrol")?

This only applies to the creation of new controls, which will come into being with the properties of their template.

But you can roll your own easily, either via groups as Jacque mentioned, or where you can set the properties (here I literally mean "the properties" property) of a "group" of controls referenced by some common theme. Do you see what I mean? If you had ten buttons, and five of them were set apart in some way, perhaps by something common in their names, you can set the properties of all of those at once by setting that single, er, property to "the properties" of some "master" button.

The downside to that is that ALL the properties are set, not just a bunch of the ones you might be interested in. In that case, as I said, you would have to roll your own, setting the properties of that special group under script control. Still simple to do.

Craig Newman