Page 1 of 1

icons not appearing in standalone

Posted: Tue Nov 24, 2015 5:50 pm
by rumplestiltskin
This is probably just a pebkac error but I'm stumped.

I'm developing in Community 7.1 and, in the dev environment, icons I've spec'd for three buttons (the same icons) appear and change as scripted. Here's the script for one of the buttons:

Code: Select all

on mouseUp
   set the itemDelimiter to tab -- must do this because items are normally separated by commas
   if the icon of me is 0 then set the icon of me to 200275
   set the icon of button "sortListbyAmount" to 0
   set the icon of button "sortListbyDate" to 0
   if the icon of me is 200275 then
      sort lines of field "theList" by item 1 of each
      set the icon of me to 200276
   else
      sort lines of field "theList" descending by item 1 of each 
      set the icon of me to 200275
   end if
end mouseUp
The buttons sort ascending or descending by one of three columns and remove the indicators (up or down icons) from the other two columns.

The problem comes when I create the standalone. The Mac version has the icons appearing as scripted. The Windows version has no icons. Note I am doing the development in Windows and the icons appear in the development environment. Is there an inclusion I am missing in the settings?

Thanks,
Barry

edit: I should mention this stack remains a stack. I use another stack as the standalone which opens this stack as it is changed by the user who is adding/changing line items in the list.

Re: icons not appearing in standalone

Posted: Tue Nov 24, 2015 6:00 pm
by rumplestiltskin
I think I found my problem. The standalone doesn't use the icons so, once I compile, Livecode isn't providing the icons to the stack (the stack that remains a stack).

So I guess the icons either have to be part of the compiled app -or- I need to embed those icons in the stack. Sound right?

Barry

edit: hmmm....so why do the icons appear when I run this on my Mac. Same (writable) stack on both platforms; only the compiled app portion changes (and that is just a window with a button that opens the writable stack).

2nd edit: Nope, no icons in the OSX stack. Same issue. Answer: Include the icons in some manner in the compiled app and they will appear in the add'l stack. Problem solved.

Re: icons not appearing in standalone

Posted: Tue Nov 24, 2015 6:17 pm
by rumplestiltskin
Indeed, it appears that I need to have the icons embedded in the standalone so the stack file that actually needs them will have access to them.

Strange thing, though; At the end of the compile process, an error message comes up telling me that the icons are missing in the v6.6 engine even though I'm using v7.1 of the Community app. I searched through my hard drive and I don't see any v6.6 anywhere so maybe the v6.6 engine is part of the 7.1 Dev environment?

Regardless, the icons now appear in the Windows version of my app. As usual, this forum provides an answer - either through just being able to post and re-considering my options or (more likely) some kind dev's suggesting answers. Looks like I beat them to it this time. :lol:

Barry

Re: icons not appearing in standalone

Posted: Wed Jan 23, 2019 5:07 pm
by MaxV
Please, can you explain the procedure? I too can't change button icon in the standalone.
The icon of a button is included, but the others that it will change not.

Re: icons not appearing in standalone

Posted: Wed Jan 23, 2019 5:21 pm
by MaxV
Ok solved, you have to put a button with the icon for each icon you want to see in your standalone.
For example, if you have a button that can change icon with 3 different icon, you have to put somewhere, even invisibles, a button with each of the icon.
This way Livecode includes their graphics in the standalone, otherwise Livecode can't evince from the script which graphics you need to include.

Re: icons not appearing in standalone

Posted: Thu Jan 24, 2019 6:41 pm
by jacque
It's enough to just include the icon images, you don't actually need to create a button. Note that an import will change the image ID, so you can either change it back or adjust the IDs for the button that will use the icons.