Updating button icon issue

Hi, thanks for stopping by.
Working with scriptUI panel and trying to update icon for my button, but something goes wrong with my code, I guess...
Can someone write what is the problem here?
var mainPanel;
function stabpanel(thisObj) {
    mainPanel =(thisObj instanceof Panel) ? thisObj : new Window("palette", "Change icon", undefined,{resizeable: true});
    var iconFolder = "~/path_1/";
    mainPanel.manSave =  mainPanel.add("iconbutton", [0,0,46,46], File (iconFolder+"AEP.png"), {style: "toolbutton"});
    mainPanel.changeButton = mainPanel.add("button", undefined, "Change icon");
    mainPanel.layout.layout(true);
mainPanel.layout.resize();
mainPanel.onResizing = mainPanel.onResize = function (){this.layout.resize ();}
mainPanel.changeButton.onClick = function(){
var iconFolder = "~/path_2/";
// code below doesn`t work
    mainPanel.layout.layout(true);
    return mainPanel;   
   return mainPanel;
   mainPanel.center();
stabpanel(this);

You don't need to use autolayout to change the icon, just set the "icon" property.
Something like this:
function stabpanel(thisObj) {
    var mainPanel;
    mainPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "Change icon", undefined,{resizeable: true});
    var iconFolders = ["~/path_1/", "~/path_2/"];
    var iconFolderState = 0;
    mainPanel.manSave =  mainPanel.add("iconbutton", [0,0,46,46], File(iconFolders[iconFolderState]+"AEP.png"), {style: "toolbutton"});
    mainPanel.changeButton = mainPanel.add("button", undefined, "Change icon");
    mainPanel.layout.layout(true);
    mainPanel.layout.resize();
    mainPanel.onResizing = mainPanel.onResize = function (){this.layout.resize ();};
    mainPanel.changeButton.onClick = function(){
        iconFolderState = (iconFolderState+1)%2;
        this.parent.manSave.icon = ScriptUI.newImage(File(iconFolders[iconFolderState]+"AEP.png"));
        return;
    return mainPanel;
    mainPanel.center();
stabpanel(this);
Xavier

Similar Messages

  • Display issue - horizontal white lines and vertical multicoloured lines.... UNRELATED: constant "update available" icon?

    Hi, my Curve 9300 on the OS 6.0 system has vertical and horizontal lines accross the display, with more appearing every day...   started and the top and left areas of the screen and seem to be slowly migrating & multiplying.
    I tried first turning the phone off and back on again.  Then the battery pull reset.  Now I've tried downloading the OS update direct from the blackberry site and reloading it....   all to no avail.
    Everything is functional, but lines accross the screen are constant.  Since my phone is past warranty anyway, I would like to open it and check the screen connection, but I do not have a torx driver that small to fit the little screw in the back....  Is there anything else I can try, or an easy enough way to remove that screw without having to buy a stupid screwdriver that I will likely never use again...?
    One other thing I've been meaning to find out about...   Despite attempting to update multiple times through the Blackberry Desktop Software, and even now after downloading the update direct from the Blackberry site, my phone continues to display the "update available" icon (with the star in a red circle on a BB outline), and indicates an update required for BB OS 6, yet the desktop software says "no updates available" and I couldn't find anything more recent on the Blackberry site unless there is a way to put OS 7 on the older blackberries.  Why might this be happening and have I missed something?
    Thank you!

    In terms of heat I'm not sure.
    It isn't only one spot that you can push to get it to come back. I have to manipulate the screen carefully in a number of different combinations. Also if the screen brightness is down the and screen fully open with an external monitor on the screen can sometimes clear up even after 4 hours plus of use. If I then move the screen up it will take a few minutes to go bad again. Even if the brightness is left down.
    I actually have a spare screen from an old 400mhz model which is identical brand. Its just not in as good condition and has to bright spots in the corners and one dull area middle bottom. Its just not in as good nic as the current one when its working. Is there a way to 'tighten' the LCD in case its a pressure problem or is still a heat issue?
    Many Thanks, Tre.

  • ITunes app store update button not working

    I'm using iTunes 11 on a windows 7 pc, and the problem is that the for apps with update available, the app page in the store is shown to be "downloaded" and not clickable, whereas in iTunes 10 the button says "update". I have a quite large app library with 1000+ apps and the checking for updates button does not always give all the available updates. And it's not latency issues because apps that have updates months before still show up in the store page as downloaded. Anyone else have this issue/bug? I really rely on the update button on the iTunes store page a lot, so any help wound be appreciated. Thanks!

    Not sure about the layout on PC but try this.
    (1) Starting at home screen (click the house icon top, middle). (2) Top right, click on Library button. (3) Next screen, top left, click the icon that says Music.  It will pull up a menu where you can select Apps (also movies, tv, etc).
    At the bottom right you should see your update button for your apps and telling you the count of those.
    Good luck

  • OS X Lion Server display problem with menu highlighting and button icons

    I have attached  Grab capture of my screen showing the problems with the window top bars and button icons. This happened after a routine security update.
    Does anyone have an idea how to fix this?
    Thanks
    George Harrison

    I have/had the same problem. Comparible setup running Lion Server GM. The natd service fires off the InternetSharing service from the prefspane instead of the regular natd service. This is verifiable by entries in the system log as well as the lack of the natd process running. Below are my findings from research/experimentation; please understand that this is what I have done to get it working, it is DEFINITELY not best practices and I'm sure not supported by Apple. I'm just conveying what I think is happening and how I dealt with it.
    Natd - Executing the binary referenced in the launchctl job directly launches the InternetSharing service on Lion server. This does NOT act this way in SL server, where it works as expected. Replacing the Lion binaries with The SL ones results in natd working as expected: nat_start and nat_stop in /usr/libexec. In short, if you replace the Lion binaries with the ones from SL, it-s a drop-in fix. Natd isn't your only problem though...
    Dns/named - It appears that Apple has limited named to binding on the loopback adapter only by default on Lion. Adding a listen-on clause to named.conf with the appropriate bindings will fix this. I'm assuming you're running natd, named and dhcpd on the same box...
    Dhcpd - Works fine. It appears broken only because the InternetSharing service is replacing natd (why?!?) and it has a built-in dhcpd server (dumbed down 192.168.2.0 subnet). Once you fix natd, this runs as expected.
    Firewall/ipfw - Gotta have this running so that natd will do translation. Remember to open the dhcp ports to allow the clients to get leases...
    I hope this helps, I'm sticking with SL until these issues are worked out...

  • I am unable to update my apps on my iphone5s. After entering the applied password, the update button reappears and nothing happens. Can anyone help? Thanks

    I am unable to update my apps on my iphone5s. After entering the applied password, the update button reappears and nothing happens. Can anyone help? Thanks

    Hey there Tonyaokb,
    It sounds like you are trying to update some of your apps and when you tap the update button, the update does not happen. I recommend starting by closing the running apps on the phone:
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    Double-click the Home button.
    Swipe left or right until you have located the app you wish to close.
    Swipe the app up to close it.
    When you have done that, sign out of your iTunes account in Settings > iTunes and App Stores, and restart the phone and try to update them again:
    iOS: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    If the issue persists I would next verify that you can find it in your purchased history with ths article:
    Tap App Store.
    Make sure you're signed in with the same Apple ID used for the original purchase.
    Tap Updates.
    Tap Purchased on the resulting screen.
    So that you can then delete the app and re install it:
    Reinstall the affected app
    Remove the app from your device and reinstall it:
    Tap and hold any app icon on the Home Screen until the icons start to wiggle and show a small "x" in the top-left corner of the app.
    Tap the "x" in the corner of the app you want to delete.
    Tap Delete to remove the app and all of its data from your device.
    Press the Home button.
    Go to the App Store.
    Search for the app and download it again.
    Note: If it's a paid app, make sure you're using the iTunes account you purchased the app with originally. If it isn't, you may be asked to purchase the app again. Learn more about downloading previously purchased items.
    From: iOS: Troubleshooting apps purchased from the App Store
              http://support.apple.com/kb/ts1702
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • When I try to update apps on my iPad mini, I tap the "Update" button, but the app just opens and doesn't update.

    I have an iPad mini, 16G, WiFi only. My operating system is iOS 7.0.3. My problem is that my App Store has stopped updating apps. And it's not like the update starts, but never finishes. It doesn't start at all. I touch the "Update" button, and the app opens instead of updating. I have 9 updates now, and none of them work. And the rest of the App Store is working fine. I have no problems searching for apps or downloading new apps. It's just the updates that don't work. I had thought that maybe I needed to update my software and then it would start working, but I can't. The available software update requires 5.9G of storage, and I only have 1.6G. I also thought that maybe there was not enough forage to update the apps, but if that was the case, then it would tell me that there is not enough storage instead of opening the app. Does anyone know how to fix this? I really need to update my apps!

    Hey there nstephanie0625,
    It sounds like you are unable to update your apps in the App store because they launch, rather than update. I would recommend starting by signing out of your Apple ID in Settings:
    iTunes: Using the iTunes Store for iPhone, iPad, and iPod touch
    Settings > iTunes & App Stores > Create New Apple ID on your device.
    Then quit all the running apps on your phone:
    iOS: Force an app to close
    Double-click the Home button.
    Swipe left or right until you have located the app you wish to close.
    Swipe the app up to close it.
    When you have done that restart the device and test the issue again:
    iOS: Turning off and on (restarting) and resetting
    Thank you for using Apple Support Communities.
    Regards,
    Sterling

  • Update button on sales order

    hi everyone
    maybe this is a simple problem...not sure.
    after updating sap 2007 to patch 41, the system seems to prompt me to click on the 'update' button everytime i open any sales order, even if i dont make a change on it. any reason why this is happening? any setting that i need to put off?
    thanks

    Prem,
    It is probably being caused by a Formatted Search on one of the Fields on the Sales Order.  This happens when the Formatted Search is set to Auto Refresh > Refresh Regularly.
    Please go to View > click Search Field...This will place a magnifying glass icon on the top right cornor of all the Fields which have a Formatted Search...This is for easy identification.
    Once you find the Formatted Search....Uncheck Refresh regularly and see how it works
    Suda

  • Customising Update buttons

    I've got my Forms and Reports talking to each other as portlets on the same page.
    I have another scenario partially working where I would also like get a portal page with a report portlet call a form component in a new window (by clicking on the record in the report) and automatically query the record that I clicked on the form. That I can do.
    When I perform the update (by clicking on an update button) I want the database update to continue as normal and then the pop-up form window to automatically close (by some form of window.close() call) and the parent window (the Portal page with the report portlet) to perform a refresh so that the report shows the new details.
    How can I do this? Is the do_event javascript function something I need to reference?
    regards,
    John

    OK, I've sort of figured this one out for myself -but there are potential issues.
    In the onClick options for the built-in 'Update' button (top or bottom) I typed the following:
    window.opener.location.reload();
    window.close();
    do_event(this.form, this.name,1,'ON_CLICK','');
    The parent page seems to refresh at the correct time - i.e., after the commit has taken place within this update event. However, I'm not sure if this is just random luck. For some reason I cannot place the do_event call before any of the other function calls otherwise I get a javascript error!! Is this a bug?
    Can anyone confirm my fear that the parent page refresh will not always accur after the commit of the form has completed, or suggest a workaround to the positioning of the function calls within this code segment?

  • ITunes 10.6.1 Update button for iOS update does not work (a bug)

    iTunes 10.6.1 Update button on iOS device Summary / Version page does not update devices. It only checks the iTunes version!
    With iTunes 10.6.1, connect an iPad, iPhone, iPod running pre-6 iOS version.
    On iPad Summary / Version page, next to  [Update] button the message says:
    "A newer version of the iPad software is available (version 6.0). To update your iPad with the latest software, click Update."
    However, clicking the [Update] button will not start update iPad. Instead it gives you a dialog saying:
    "This version of iTunes (10.6.1) is the current version".
    Obviously it should start updating the i-device there but instead just goes and check the iTunes version ?!?
    A Bug!
    What's really annoying in this bug is that it's the only way to update pre iOS 5.x devices, which is now impossible!
    Apple should get this fixed asap!
    Anyone found any workarounds?
    [Edit]: There seems to be another discussion of this issue already:
    https://discussions.apple.com/message/19671173#19671173

    Just forgot to add, yes, I know there's iTunes 10.7 but it's only available on Snow Leopard and higher.
    The machine in question is an old macbook, running Leopard (10.5.8), that it will propably never get upgraded.
    Since most  my older i-devices were initially synced with that particular machine, I'll be now stuck with iOS updates, without loosing content.

  • Keeps coming up that I need to update the FF 4.0 but when I click the update button & then the apply update button after the download it doesn't apply & just come back up to update firefox

    I have FireFox 4.0 it comes up and says that it needs to be updated, when I click the (NEXT) button & it does the contacting server/downloading the update. I click the apply update button & the fire fox window closes & the status bar come up with the installing the updates & will restart firefox in a moment. However once the window restarts, the notice that firefox needs to be updated come back. When I click the (next) button to download the update, the cycle begins.
    I clicked the HELP link at the top of the window & then the ABOUT FIREFOX to see if there might be multiple updates, but it's the same one each time "modzilla firefox yahoo edition yahoo 1.8"
    I love fire fox & until now have never had a problem when it comes to installing the updates.

    Well I went to the Tools/options/and general section & clicked on the restore default for the home page. However I am still having the same issue.

  • New Photos Don't Show On My Apple TV -- Is There a limit? An "Update" button? ...?

    I have my Apple TV 2nd gen set so that after two minutes is shows photos from my computer as screensaver.
    I have an album in iPhoto where I drag the photos I want and I've told the Apple TV to pick up those photos.  Has always worked fine.
    Recently I added some pictures to that album but they don't show on the Apple TV -- just the previous photos are on display.  Is there a limit?  There are 94 photos in that album.  Have I forgotten some sort of "update" button? ...
    All the settings both on the Apple TV and my iTunes look fine and I recently ran whatever update Apple wanted me to (I had this photo hiccup both before and after that upgrade so that ain't it).
    Any suggestions?
    Thanks

    Possible iTunes issue:
    Try the following after adding photos.
    Go to file
    Then Home Sharing
    Select photos to share
    Click on All Photos already selected Do anyway
    When Apply turns black click on Apply
    Now go to Apple TV to see if photos there
    Or restart iTunes.
    Works for me every time photos do not appear on my Apple TV 3
    Hopefully will work for you.

  • "Check for Updates" button in iTunes not working

    Hi there,
    Forgive this post if it is a repeat - I searched and didn't see this exact problem though (but perhaps it's a common one at any rate).
    I have a lot of apps on my "Applications" page, and until recently, iTunes did a great job of allowing me to quickly check and then download all of my updates (usually on a daily basis) from that page. Now, when I click the "Check for Updates" button at the bottom of the window it says I have none - even though my App Store icon confirms for me that I indeed have several updates ready to roll.
    I have de-authorized, re-authorized, restarted (computer and iPhone), re-logged into my account, and even deleted some and re-downloaded some of the applications.
    Does anyone know what might be happening?
    Thanks in advance,
    Max Izod

    you may need to uninstall and reinstall itunes. reauthorize the account after doing so.

  • Loaded updated no icons on desktop and windows load offscreen ***

    Loaded updated no icons on desktop and windows load offscreen ***

    Nobody has any thoughts or has had the same issue on this one? Any thoughts are greatly appreciated!
    Thank you!

  • FrameMaker update book icon not updating and custom formatting help

    Hi,
    I am fairly new to FrameMaker, and I am currently experiencing two issues:
    First Issue
    I am currently trying to create a book that currently has three chapters. I am trying to break it out into the following format:
    Main TOC - includes all the headers and related pages for the entire book
    Mini TOC - includes a mini TOC that highlights all the headers and pages associated with Chapter Source File A
    Chapter Source File A - includes all related content to Chapter Source File A
    Mini TOC - includes a mini TOC that highlights all the headers and pages associated with Chapter Source File B
    Chapter Source File B - includes all related content to Chapter Source File B
    Mini TOC - includes a mini TOC that highlights all the headers and pages associated with Chapter Source File C
    Chapter Source File C - includes all related content to Chapter Source File C
    Whenever I click the Update Book icon, however, it does not update the headers and page numbers. They still remain the same way when I first generated them. This occurs for both the main TOC and mini TOC.
    Second Issue
    In addition to the format structure I designed for my book, I also wanted to create a custom format look that remains constant whenever I update my TOC. I have tried testing this, but I noticed every time I generate a new TOC it is always in the unformatted FrameMaker style which you have reformat each time.
    Is there a way to create a custom format look that can retain the design and simply update the TOC headers and page numbers each time it needs to be updated?
    Any help is greatly appreciated
    Thank you!

    First I'd highly recommend getting Matt Sullivan's Publishing Fundamentals: Unstructured FM11 book - it's a pretty complete reference one to have on FM.
    Second, it sounds like you may not have your ToC reference pages set up correctly - if nothing changes when you've added content that should have created more ToC headings and shift pages around, then something is amiss. Your formatting problem is solved by doing a bit of a dodge - you create a ToC and generate it, then replace it with your formatted .fm doc keeping the exact name as the generated doc; then update again. Now the content is formatted the way you want and keeps being updated each time you update.

  • Earlier versions had a Update button to refresh displayed information Where is that button on v. 4.0.1?

    Earlier versions had a Update button to refresh displayed information Where is that button on v. 4.0.1?

    See [[Site Identity button]]
    You can reinstate the padlock by installing this add-on: https://addons.mozilla.org/en-US/firefox/addon/padlock-icon/?src=discovery-learnmore

Maybe you are looking for