Page 1 of 1
global gRevAppIcon
Posted: Fri Nov 15, 2013 9:30 pm
by chris25
global gRevAppIcon - put the short ID of image "Icon" into gRevAppIcon...........Ok this is self explanatory.....very nice
Until we read this:
To make the correct icon appear, create an image in one of your application's stacks. ((Well, does this mean I HAVE to create an image using the tools in the tool box, or can I import a png or gif))?
The image does not need to be visible, ((I presume obviously that you hide it like you would a button icon, obviously))
and the stack window it's in does not need to be open ((now this is really unclear, stack window not open? So if window, what on earth does it mean by "does not have to be open"? If you have an image in a card, hidden, its icon number recorded, what's with the window not open))?
The stack file needs only to be loaded into memory for the application to be able to use the image. ((Ok this last bit does make sense))
Someone please elaborate in English for me
Thankyou
chris
Re: global gRevAppIcon
Posted: Fri Nov 15, 2013 10:40 pm
by chris25
Well, I did everything that that was written
global gRevAppicon
put 1106 into gRevAppicon
I inserted into the stack and then card script and of course calculate button where it would be triggered
well of course it does not work does it..I mean...it's me...just following guides and instructions as normal...and getting it wrong....as normal

Re: global gRevAppIcon
Posted: Sat Nov 16, 2013 1:18 pm
by Klaus
Hi Chris,
ever thought of the possibility that an image used as an "icon" (in buttons or as the gRevAppIcon stuff)
could be located in a SUBstack that is currently NOT open but in memory? Obviously not.
global gRevAppicon
put 1106 into gRevAppicon
Works without problems here!
What and where did you try so far?
What happens on your side?
Wrong Icon?
No icon?
Error dialog?
It starts raining?
Your cat drops dead?
Best
Klaus
Re: global gRevAppIcon
Posted: Sat Nov 16, 2013 2:20 pm
by chris25
No, but now you told me, yes. The question is where do I put the code? I have put the code in the graphic, on the card, in the stack, in the calculate button. Its ID is correct, The dictionary really does not tell you what to do IF that is, there is something I am missing, then I do not see how I could possibly figure out what is wrong when I have absolutely no idea where to begin. The instructions are followed, the reasoning and knowledge is applied, the gRevAppicon is a special reserved runrev funtion that simply tells you what it does and how the code should be, so if I am missing something then it is not really my fault I do not think.
Nothing happens. the answer box still shows the LC icon, and my icon I made less than 64x64 pixels just to be safe for now. It's not raining and the cat is alive you will be pleased to hear
kind regards
chris
Re: global gRevAppIcon
Posted: Sat Nov 16, 2013 2:30 pm
by Klaus
Hi Chris,
good to hear all is alive and well
Well, since gRevAppIcon is a "built-in" GLOBAL variable, it should be enough to set it once "on openstack".
Of course you can always cahnge it if neccessary.
To be sure I tested this with a simple button script:
Code: Select all
on mouseup
global gRevAppIcon
put 1003 into gRevAppIcon
answer "Bla bla bla"
end mouseup
Et voila, my image ID 1003 appeared in the answer dialog!
You can post your stack here and I will take a look if you like.
Best
Klaus
Re: global gRevAppIcon
Posted: Sat Nov 16, 2013 3:19 pm
by chris25
Hi Klaus I just did the same thing in a button and it worked as expected. But still not in my stack. But now suddenly all different stacks from my collection are not displaying the LC icon itself correctly, very strange behaviour here, the LC has become corrupted everywhere.
I can not upload because I can not find any instructions on how how to upload a stack, I don't even know how you guys get that white background and scrollbar in your posts.
Ok I zipped it and it worked.
Re: global gRevAppIcon
Posted: Sat Nov 16, 2013 3:25 pm
by Klaus
You found the "Upload attachment" button, great!
Now take a look at the top of the text entry field when you answer a posting and you will also find a "Code" button.
That will format your selected text/script as desired, just like the other bottons for "B", "I", "URL" etc. are working

Re: global gRevAppIcon
Posted: Sat Nov 16, 2013 3:36 pm
by Klaus
Hi Chris,
congrats, you obviously discovered a bug
Looks like some internal Livecode image with this ID is interfering with the gRevAppIcon settings.
See attached screenshot for the complete image!
But ONLY when you set this global early like in your openstack handler!
When used directly in a buttons script as tested, it works
I will bug report this!
Best
Klaus
Re: global gRevAppIcon
Posted: Sat Nov 16, 2013 3:42 pm
by chris25
So you mean that ID 1105 is the problem? That of all the thousands of ID's Chris has to pick the one that does not work?
Re: global gRevAppIcon
Posted: Sat Nov 16, 2013 3:50 pm
by Klaus
chris25 wrote:So you mean that ID 1105 is the problem? That of all the thousands of ID's Chris has to pick the one that does not work?
Yep, definitively!
Maybe you should buy a lottery ticket immediately!

Re: global gRevAppIcon
Posted: Sat Nov 16, 2013 3:55 pm
by chris25
Ok this is weird still. I have enclosed two screen shots. I used the code you gave me without my image and then the same code but pointing to my image. You can see that it still does not work even though it works in a button. By the way I have only put the code in the calculate button. This global variable is deleted from everywhere else.
Re: global gRevAppIcon
Posted: Sat Nov 16, 2013 4:20 pm
by Klaus
Image ID 1003 is your image "BG.jpg", so the dialog is correct in the second screenshot
Whatever, this is a Livecode bug, since ALL other internal Livecode images have an
ID of >200000, so this should not happen at all.
I already bug reported it!
Re: global gRevAppIcon
Posted: Sat Nov 16, 2013 4:24 pm
by chris25
Ok, yes I recognised that 1003 was my background. But I did not expect the same thing to happen by just putting it into a button. Since we just did that. Anyway I will leave you with that. Mmm discovered a bug eh...interesting. Please keep me up to date on that one should it ever become repaired Klaus. I know you're busy, but only if you remember.Thankyou.
Re: global gRevAppIcon
Posted: Sat Nov 16, 2013 4:28 pm
by Klaus
Hi Chris,
chris25 wrote:Please keep me up to date on that one should it ever become repaired Klaus.
will do!
Best
Klaus
Re: global gRevAppIcon
Posted: Sat Nov 16, 2013 11:27 pm
by jacque
Just for the record, I'm using gRevAppIcon and gRevSmallAppIcon in my current project and they only appear to work sporadically. Sometimes I get the standard Rev icons instead of mine. (My image IDs are unique so it's a different issue from what Chris saw.) I haven't pinned down exactly what's going on yet, but the IDE must be resetting my icon IDs at some point.
Just a heads-up in case you see the RR icons instead of yours sometimes.