Skinning With Variables

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
modelmasters
Posts: 2
Joined: Sun May 29, 2011 4:37 am

Skinning With Variables

Post by modelmasters »

So far I can put objects for skinning into customProperties, such as png, jpg, etc. As well as obtain them and put them into a variable or export them to a file, etc.

When a property is in a variable, LiveCode cannot "see" the ID of that object. If that same object in on a card, etc. It;s ID can been seen by LiveCode.

For skinning,I need to be able to say, for example:
set the icon of btn "Tab" to the ID of tSkins[TabGoldPng.png] or
set the hilite of btn "Tab" to the ID of tSkins[TabGoldPng.png]
etc.
So, I can do all things with a customProperty except use it for skinning. In my ignorance, am I missing something in this regard? or is this a viable Feature Request?

Thanks,

William
BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Skinning With Variables

Post by BvG »

it's certainly not supported. you can't reference things that are not object in livecode. therefore, data (no matter how close to a real object the data might look) can never have an id.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Skinning With Variables

Post by jacque »

You can't do it with properties, and given the way LiveCode works, a feature request probably would be difficult or impossible to implement. But there's another way.

Place all your objects in a group. Then remove the group from the card (Object menu, Remove Group) so that it is not placed on any cards. Unplaced groups are often used for invisible object storage. Now all your objects have IDs and you can reference them as long as the stack is open or in use. It's a common technique for skinning.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
modelmasters
Posts: 2
Joined: Sun May 29, 2011 4:37 am

Re: Skinning With Variables

Post by modelmasters »

Hi Jacque,

Have previously used the group skinnnig technique you mentioned. Also written an article about the group skinning technique for RevUp that is still waiting to be published. For now, a colleague has "turned me on" to another another approach that does exactly what is required, but not using buttons to accomplish the task.

I will be asking him if I may write a RevUp article about this technique.

So, am now formally requesting a withdarwal of my request.

Best,

WIlliam
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Skinning With Variables

Post by jacque »

Oh, it's you. LOL. Right. Then of course you know all that.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
Post Reply