Copying custom controls to different stack/Object Library

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Copying custom controls to different stack/Object Library

Post by gyroscope » Wed Jul 09, 2008 2:08 pm

Hi, if I copy a custom control - a button, for instance - from a stack to another separate stack, it seems that the custom icons exist only as long as the original button's stack is open. So if I close Rev and reopen just the later stack, although all of the icon id numbers are shown, there are no images in the image library and the button shows as blank. I guess that this is what is meant by "Objects are only available within the currently running instance of Revolution" from the Users Guide.

OK, so I thought then that the Object Library would bring the icons across, but this doesn't happen either; the Image Library is still empty (in this test stack) but in Icons and Border, the icon id references are once again shown.

So my question here please: is there something which I've missed/can't find in the Rev prog to check, etc which would enable the custom images (icons) be copied over as well into the Image Library in one hit (to save having to reimport 24 images in again for 8 buttons, let's say,) or is this just the way it is?

:?

PS Fingers crossed I won't have to use the "whoops/embarrassed/right under my nose emoticon with the answer here...!

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Sat Jul 12, 2008 7:37 am

For each of my projects, I keep an 'icons' stack - I make this a substack of my project's mainstack, and then import them into that stack. In this way, I always have them loaded as I'm working on my project, and I can't forget to include them as I build a standalone. Also, I tend to use sequential IDs starting at a high number: 500000 or so.

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Post by gyroscope » Sun Jul 13, 2008 11:27 am

Hi Jan, thank you for the info.

I did make a generic image library a while back and then...forgot about it...
so...
Fingers crossed I won't have to use the "whoops/embarrassed/right under my nose emoticon with the answer here...!
:oops: (although I still think it'd be neat if the icons were copied across as well, when copying and pasting controls across different stacks...)
I tend to use sequential IDs starting at a high number: 500000 or so.
Good advice there, Jan, thank you. I'll start doing that as well.

:)

Post Reply