specifying an iconType
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
specifying an iconType
I've done it but forgot how. I want my icon to be displayed in my ask and answer comments. How do I do this?
Thanks
herb
Thanks
herb
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Re: specifying an iconType
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Re: specifying an iconType
Hi again,
I've tried both of these in the stack script and they don't work.
on startup
global gRevSmallAppIcon
put image id "1327" into gRevSmallAppIcon
end startup
on preOpenStack
global gRevSmallAppIcon
put image id "1327" into gRevSmallAppIcon
end preOpenStack
What's weird is the old icon keeps coming up and I can't find in any of the scripts of the stack a call that tells it to?
Any ideas?
Thanks
I've tried both of these in the stack script and they don't work.
on startup
global gRevSmallAppIcon
put image id "1327" into gRevSmallAppIcon
end startup
on preOpenStack
global gRevSmallAppIcon
put image id "1327" into gRevSmallAppIcon
end preOpenStack
What's weird is the old icon keeps coming up and I can't find in any of the scripts of the stack a call that tells it to?
Any ideas?
Thanks
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Re: specifying an iconType
Don't put the image itself into the global variable - just the ID of the image:
HTH,
Jan Schenkel.
Code: Select all
on startup
InitAppIcon
end startup
on preOpenStack
InitAppIcon
end preOpenStack
command InitAppIcon
global gRevSmallAppIcon
put 1327 into gRevSmallAppIcon
end InitAppIcon
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Re: specifying an iconType
I put the whole script you gave me in the stack script. I did a build and the old icon appeared in the dialog boxes. I opened the stack again and deleted the old Icon and rebuilt. Now no icon appears in the dialog boxes! I don't get it? The id is correct and it all looks right.
Suggestions?
Thanks
Suggestions?
Thanks
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Re: specifying an iconType
You could try giving the image an ID > 20000 and see if that helps.
Certain image IDs may be conflicting. Also note that the icon will only be used for 'plain' answer and ask dialogs.
Jan Schenkel.
Certain image IDs may be conflicting. Also note that the icon will only be used for 'plain' answer and ask dialogs.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Re: specifying an iconType
Hi again,
I changed it to 20001 and it was blank (showed no image) on the answer dialog boxes and ask dialog boxes. The image is 32x32 and like I said the original image use to display with no problem. Strange?
Any other ideas?
Thanks
I changed it to 20001 and it was blank (showed no image) on the answer dialog boxes and ask dialog boxes. The image is 32x32 and like I said the original image use to display with no problem. Strange?
Any other ideas?
Thanks
Re: specifying an iconType
Hi,
I made this little stack (it's attached to this e-mail) and put and icon in, it asks what day it is when opened. Your script is in the stack script and it does the same thing no icon when it asks the question?
I made this little stack (it's attached to this e-mail) and put and icon in, it asks what day it is when opened. Your script is in the stack script and it does the same thing no icon when it asks the question?
- Attachments
-
- dot test.zip
- (6.18 KiB) Downloaded 268 times
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Re: specifying an iconType
Ah, I see you're using a regular ask command, without specifying an icon type. In that case, you should use the global gRevAppIcon instead of gRevSmallAppIcon. So update your stack script to something like this:
According to the docs, the small icon should be used to 'badge' the regular specified icon (information/question/warning/error):
However, this doesn't work in LiveCode 4.5.3, and some snooping revealed this code was actually taken out in version 4.0.0.
I have a filed a bug report and asked to reinstate the badging behavior.
HTH,
Jan Schenkel.
Code: Select all
on startup
InitAppIcon
end startup
on preOpenStack
InitAppIcon
end preOpenStack
command InitAppIcon
global gRevAppIcon, gRevSmallAppIcon
put 400001 into gRevAppIcon -- the id of the 64x64 icon image
put 400002 into gRevSmallAppIcon -- the id of the 32x32 icon image
end InitAppIcon/code]
And then your large icon should appear:
[code]ask "What is today?"
answer it && "is a lovely day."
Code: Select all
answer information "This is some text"
I have a filed a bug report and asked to reinstate the badging behavior.
HTH,
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Re: specifying an iconType
Thanks, but it sounds like I'm screwed, I have 4.0. Why in the world would they take it out? How could we ever make a professional looking program without it?
Patrick
Patrick
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Re: specifying an iconType
Well, given that nobody noticed for over a year, it looks like no one was using the feature - or that their end-users didn't notice. And if you feel adventurous, you can fix it yourself in your version 4.0. MAKE SURE TO SAVE A BACKUP COPY BEFORE TINKERING WIH THE IDE.
HTH,
Jan Schenkel.
- Quit the IDE completely, and re-open it without loading any of your own stacks.
- Open the message box,
- Type the followingAnd hit return to open the relevant script.
Code: Select all
edit the script of card 1 of stack "Answer dialog"
- There you'll see a commented line of code:
Code: Select all
# OK-2009-10-08 : Removed for consistency with Windows / Linux
- Uncomment the next six lines to the next
Code: Select all
end if
HTH,
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Re: specifying an iconType
Jan thanks for all your help. I have a question about this comment:
# OK-2009-10-08 : Removed for consistency with Windows / Linux
If I do this as you advise is there going to be an issue in my Windows build? And, why was this feature removed?
Thanks,
Patrick
# OK-2009-10-08 : Removed for consistency with Windows / Linux
If I do this as you advise is there going to be an issue in my Windows build? And, why was this feature removed?
Thanks,
Patrick
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Re: specifying an iconType
You're not going to run into any issues on Windows, as those statements can only be reached if the 'tMacOSX' variable is 'true'.
I got a reply from RunRev HQ about the bug report, and they've promised to revert it back to the pre 4.0.0 behaviour.
Perhaps someone misinterpreted a requirement that it should behave the same whether you're on MacOSX, Windows or Linux.
After all, it is a Mac-specific feature, though some hgave asked to also support it on other platforms because it looks good
Oh, before I forget - make sure to use a transparent image for gRevSmallAppIcon as your 'badge' icon will overlap the generic icon.
Cheers,
Jan Schenkel.
I got a reply from RunRev HQ about the bug report, and they've promised to revert it back to the pre 4.0.0 behaviour.
Perhaps someone misinterpreted a requirement that it should behave the same whether you're on MacOSX, Windows or Linux.
After all, it is a Mac-specific feature, though some hgave asked to also support it on other platforms because it looks good

Oh, before I forget - make sure to use a transparent image for gRevSmallAppIcon as your 'badge' icon will overlap the generic icon.
Cheers,
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Re: specifying an iconType
Hi there
Anyone know if this behaviour has actually been re-instated? I'm running LC 5.5.0 and I can't make it work. I've tried using both the standalone app settings and using code to set the gRevAppIcon and gRevSmallAppIcon globals directly in my on openStack. The images I'm using are jpgs sized as recommended (64x64 and 32x32). I do get a light grey square at the left hand side of the answer dialogues, and the globals do contain the values I expect. The grey square and the expected variable values are there whether I've used the standalone settings or set them myself. If I remove all attempts to create these app icons that grey square is not there. So something's happening even though its not what I want.
Is anyone out there making these things work?
Thanks, Nishok
Anyone know if this behaviour has actually been re-instated? I'm running LC 5.5.0 and I can't make it work. I've tried using both the standalone app settings and using code to set the gRevAppIcon and gRevSmallAppIcon globals directly in my on openStack. The images I'm using are jpgs sized as recommended (64x64 and 32x32). I do get a light grey square at the left hand side of the answer dialogues, and the globals do contain the values I expect. The grey square and the expected variable values are there whether I've used the standalone settings or set them myself. If I remove all attempts to create these app icons that grey square is not there. So something's happening even though its not what I want.
Is anyone out there making these things work?
Thanks, Nishok
Re: specifying an iconType
Hi nishok,
hm, I use this all the time in my standalones and never had any problems!?
I just set these globals and all is well.
Best
Klaus
hm, I use this all the time in my standalones and never had any problems!?
I just set these globals and all is well.
Best
Klaus