AIRMenuBuilder Question (Third Time's A Charm?)

This will be the third time I've posted this same question in
various ways. Having received no responses, I'm wondering if anyone
out there is actually using AIRMenuBuilder....but here goes anyway:
Once I've created a root menu with AIRMenuBuilder, can I
replace it with another? For example, my initial menu has 5
horizontal, top-level items (A,B,C,D,E). The first four (A,B,C,D)
have submenus, but when the fifth (E) is selected, I'd like to
overwrite the initial horizontal menu with a new one.
The menus are created from JSON files, and the onSelect
events are handled by Javascript. Running into the "Adobe AIR
runtime security violation for JavaScript code in the application
security sandbox," I created a parent sandbox bridge. The value of
the new JSON file is successfully passed (and displayed in alerts),
but I'm still getting a security violation and the new menu does
not appear. Relevant snippets below.
Thanks in advance for any suggestions you could offer.
Snippet 1 from index.html:
<script type="text/javascript">
var root = air.ui.Menu.createFromJSON ("menus/rootmenu.js");
air.ui.Menu.setAsMenu (root);
var bridgeInterface = {};
var newRootMenu = bridgeInterface.newRootMenu;
bridgeInterface.newMenu = function(newRootMenu){
var menuSource = "menus/" + newRootMenu + ".js";
alert(menuSource); // displays properly, with correct values
root = air.ui.Menu.createFromJSON(menuSource);
alert('About to put up a new menu...'); // never displays,
security violation must be line above
air.ui.Menu.setAsMenu(root);
alert('Well, we tried putting up a new menu, but...'); //
never displays
function engageBridge(){
document.getElementById('contentArea').contentWindow.parentSandboxBridge
= bridgeInterface;
alert('Bridge is engaged!'); // displays properly
</script>
Snippet 2 from index.html:
<iframe
id="contentArea" name="contentArea" bgcolor="white"
width="100%" height="98%"
src="
http://192.168.x.x/local/ui.html"
sandboxRoot="
http://192.168.x.x/local/"
documentRoot="app:/sandbox/"
ondominitialize="engageBridge()"></iframe>
Snippet from print.js:
case "E":
var menuName = "eMenu";
bridgeInterface.newMenu(menuName);
break;

:) Third time is lucky. Jokes aside, I apologize for the late
response. I forgot to subscribe to the earlier thread.
You should be able to replace the root menu using the
setAsMenu(newMenu, true) call.
createFromJSON() does an eval() call to parse the JSON
object. eval() is only allowed in the application sandbox while the
application is starting up. Take a look at JSONDataSource in
AIRMenuBuilder.js. If you can modify that to parse the JSON string
in any other way other than via eval() (as3corelib has a JSON
parser) you'll have what you want.
In your case, I think simply using the XML way to load a menu
should solve your problem. You don't need the bridge.
P.S: And don't worry, this time I've subscribed to this post.
:)

Similar Messages

  • [svn:fx-trunk] 10173: Third time's a charm.

    Revision: 10173
    Author:   [email protected]
    Date:     2009-09-11 15:15:30 -0700 (Fri, 11 Sep 2009)
    Log Message:
    Third time's a charm. This is a fix for the checkbox/radiobutton bug where halo components with spark skins were not positioning the icons correctly when the components had no label. The fix is to always make room (vertically) for a label, whether it is there or not. This allows these controls to align nicely with other labeled versions of those controls. It will break some Mustella tests that assign a smaller vertical height.
    Note that the earlier attempt at this fix applied the vertical adjustment to all halo components, even when running with the halo theme. This new version restricts the fix to only halo components running with the spark theme (which is where the problem was to begin with, since the adjustment is necessary due to the different padding styles in spark skins). So only halo components with spark skins should be affected by this change.
    QE notes: Breakage in Checkbox and globalization Mustella tests due to larger vertical size of CheckBox and RadioButton. (updates have been made and will follow this checkin)
    Doc notes: None
    Bugs: SDK-21850
    Reviewer: Glenn
    Tests run: checkintests, Mustella components/CheckBox components/RadioButton
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21850
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as
        flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt

    Dude,
    I'm not surprised they deleted your posts. you should read the Terms of Use (link in right hand column).
    This place if for people like you to help people like you. This is not the correct place to complain about service or to ask Apple ANYTHING!
    If you think you have discovered a bug please report it here:
    http://www.apple.com/feedback/macosx.html
    If you have a specific technical question or issue please post it here.
    hth,
    b.

  • Why do I have to keep re-asking my questions - third time for this forum?

    I have several questions:
    1) This is the third time I have asked questions on this forum and I seem to be in a loop - like Groundhog Day;
    2) All of a sudden, upon loading Photoshop, my adjustment layers do not work.  When I click on one, it just puts a blank layer above my main picture layer;
    3) My plug-ins are missing (Topaz, Nik)?

    1 - moved from the general forum to the correct Photoshop forum... these are user to user forums, you won't get an answer if you ask in the wrong place, or if nobody knows the answer
    2 - These questions below may be for a different product... but the KIND of information you need to supply is the same, for the products you use
    More information needed for someone to help... please click below and provide the requested information
    -Premiere Pro Video Editing Information FAQ http://forums.adobe.com/message/4200840
    Also, when I look at your activity, this is the FIRST question you have asked TWentz3

  • Ok, third time is a charm...I am looking to purchase photoshop and from what I understand it is no longer possible to purchase a hard copy at the store?  how do I purchase and use photoshop... and please pretend you are explaining it to your intellegent 3

    what is the difference between CS5 and CS6?

    The Subject line is for a brief summary of your question. Use the message area for the details.
    The difference is that you can buy CS6, but not CS5. It is no longer supported. CS6 allows you to use the latest Adobe Camera Raw software, CS5 does not.
    Click on this link: https://www.adobe.com/products/catalog/cs6._sl_id-contentfilter_sl_catalog_sl_software_sl_ creativesuite6.html?start=10
    Choose "buy" and specify Full or upgrade.
    Click on Select.
    That will take you to the Checkout.
    Click on "edit" if you want a Mac version or another language.
    One you finish the purchase, you will be emailed the license key and the download link for the software.

  • The Third Time's the Charm. Or is it?

    Upon upgrading my internet service to cable from dial-up, I purchased a Linksys wireless router so that my parents computer (two floors up from the router) could use the high speed internet as well, and split the bill with me. On several occasions, my parents internet was not working, and I chalked it up to the distance between their computer and the router that was causing the problem. I called the cable company, and they said to reset the router by unplugging it for 30 seconds and then plugging it back in. This worked, but every once in a while I had to 'reset' the router. It was annoying, but that's about it. I now live in an apartment, and I purchased the same router (brand new) and placed it directly next to my computer, and I have a LAN cable running to my roommate's computer, and my computer on wireless. This router ALSO constantly disconnects both the wireless and wired connections. Whether it's once a month, or ten times a day, it randomly stops working, and, keeping in mind that I know what I'm doing when it comes to hardware/software, the only way to fix the problem is by 'resetting' the router in the above mentioned way. Figuring it was the luck of the draw, I bought yet another router of the same model number (also brand new), and I'm STLL having the same problem. What on earth am I doing wrong? Am I just unlucky, or is this router really just a piece of junk? Everyone who knows anything about networking hardware recommends a Linksys router hands down over any other, but I'm starting to wonder why. If anyone else is having, or has had, this problem, or even better can offer a solution, please, by all means let me know! Thanks.
    PS: I think the router knows I'm complaining. It disconnected me while I was typing this post. ;-)
    Let's make it happen.

    Try updating firmware to latest version. After update hard reset router for 30 seconds. Clone router's MAC address with that of your computer, and reduce MTU to 1350.

  • I ask the third time: How can I enlarge the menue symbols and the text of the menue in Photoshop CS6 vers.13 so that I can read them??? My laptop has Win 8.1 and a screen resolution of 3840x2160

    I ask the third time:
    How can I enlarge the menue symbols and the text of the menue in Photoshop CS6 vers.13 so that I can read them??? My laptop has Win 8.1 and a screen resolution of 3840x2160.
    It is unbelievable that such an expensive software does not provide a proper lay out wit a high screen resolution!
    It is also unbelivable that it is not possible to get a qualified employee of ADOBE on the phone in Germany.
    hope of feed back: e-mail: [email protected]

    Chris Cox answered your question here:
    I have PS cs6 extended and a new laptop with screen resolution of 3840x2160. Now all control elements and menues are so small that I can not reed them. How can I make them readable without reducing the resolution of the schreen?

  • IPod Mini, the third time around...

    I've had quite a few problems with the Mini.
    The Apple Store has replaced my Mini 3 times, and I wish "the third try's a charm" could apply in this case. The other two were replaced due to faulty batteries (they would not last over 2 hours) and then a faulty click-wheel.
    For my third,
    1.) I plugged in my Mini to my USB port and got the folder with the exclamation point.
    2.) I scavanged the Support site for advice, trying the 5Rs.
    3.) My iPod Mini is now locked on the Apple logo. I can't get it to go to Disk Mode. Pressing Menu+Select makes the logo appear again, but nothing happens after that.
    4.) Downloaded the iPod Updater just for kicks; it doesn't recognize it. My Computer does not recognize it either.
    I'm very tired of experiencing all these problems with the Mini. If there's no technical advice you can give me, could you at least tell me how to convince the Apple Store to give me a nice Nano instead :P ?
    iPod Mini   Windows XP Pro  
      Windows XP Pro  

    I've had quite a few problems with the Mini.
    The Apple Store has replaced my Mini 3 times, and I wish "the third try's a charm" could apply in this case. The other two were replaced due to faulty batteries (they would not last over 2 hours) and then a faulty click-wheel.
    For my third,
    1.) I plugged in my Mini to my USB port and got the folder with the exclamation point.
    2.) I scavanged the Support site for advice, trying the 5Rs.
    3.) My iPod Mini is now locked on the Apple logo. I can't get it to go to Disk Mode. Pressing Menu+Select makes the logo appear again, but nothing happens after that.
    4.) Downloaded the iPod Updater just for kicks; it doesn't recognize it. My Computer does not recognize it either.
    I'm very tired of experiencing all these problems with the Mini. If there's no technical advice you can give me, could you at least tell me how to convince the Apple Store to give me a nice Nano instead :P ?
    iPod Mini   Windows XP Pro  
      Windows XP Pro  

  • HT204088 iTunes Store Credit card can't be processed again...tired of this happening. This is the third time in four days.

    iTunes Store
    Credit card can't be processed again...tired of this happening. This is the third time in four days.

    Well, thanks for feeling with me, patkosanke ... AND for your wise advice.
    I did followed your advice immediately and erased all the service number as well as S/Ns.
    Can you, however, give me any "direct number" through which I can get hold of someone and request for what you're suggesting?
    I believe I had talked with the person by the name of "Charlie" (I think... I hope I'm correct...) when I was having the same problem with the last device. He was very kind and helpful, though I ended up getting the device that brought the same problem.
    Charlie told me that if I had any more problems I should call him. But I forgot to take down his direct number.
    Or maybe I should call the main office and ask for him. But my memory is questionable as to his name, and besides I don't even know his last name either. There could be more than one "Charlies" in Palm.
    So, if you could somehow email me some direct number (other than the one that keeps on hooking me up with those people in the overseas who are answering the phone only to sympathize with & apologize to me but can only issue a false hope with the SRO#. More than once I was given the promise that the supervisor would call me back within an hour or two but I ended up calling back after I had been left hanging in the air all night long.) where I can talk to someone like I did with Charlie last time who can truly carry out the promise, I would truly appreciate it, patkosanke. ^^
    Thanks
    jcinlovewpalmTX
    Post relates to: Palm TX
    Post relates to: Palm TX
    Message Edited by jcinlovewpalmTX on 03-05-2009 06:36 PM
    Message Edited by jcinlovewpalmTX on 03-05-2009 06:36 PM

  • USB for the third time

    When I plug in my iPod to my PC it says USB device malfunctioned and not recognised.
    It also does that for my camera and my sons other mp3 player.
    When I look in device manager it shows unknown device. I can delete the device but when I try plugging in the iPod again it says found new device but then it reverts to the malfunctioned message.
    It's something to do with my PC.
    In device manager it says there are no drivers for that device?
    The iPod is playing fine - I have reloaded boy iPod and iTunes software.
    I can use my USB printer and the internet modem and a dongle in any of the USB ports OK.
    What is going on?
    Any ideas?

    OK so it sounds like you have a problem with your Windows machine and not your iPod or iTunes specifically. So perhaps you should post your question to a PC forum somewhere, not here where the discussion is about iPods. You have already stated your iPod works fine and the problem is the PC and its port or your operating system.
    Posting for a third time is not going to get you any additional help since your problem appears to be outside the scope of these groups and posting a third time will instead just get replies like this one telling you that you need to go find a PC, Windows, USB, whatever forum somewhere else for help.
    But for kicks, did you even try any of the suggestions in this article...
    http://docs.info.apple.com/article.html?artnum=61711
    that was suggested to you by another poster on one of your other two threads? If so, what happened?

  • Hello, I have two questions on time capsule  I can only have it on my external hd files and free up my internal memory to my mac  I can use an external hard drive, in my case a lacie rugged as shared memory for my two computers

    Hello, I have two questions on time capsule  I can only have it on my external hd files and free up my internal memory to my mac  I can use an external hard drive, in my case a lacie rugged as shared memory for my two computers

    I have a mackbook pro and an iMac if I buy a time capsule 2tb airport, I can use it with time machine and what would be the best way to use it.
    There is no particular setup required for TM.. both computers will create their own backup sparsebundle which is like a virtual disk.. Pondini explains the whole thing if you read the reference I gave you.
    and how to use time capsule airport whit other external hd to use my old lacie airport with the new time capsule
    Up to you.. you can plug the external drive into the TC and enjoy really slow file transfers or you can plug it into your computer and use it as external drive.. which is faster than the TC.. and TM can include it in the backup.
    Again everything is explained in the reference.. you are not reading it.

  • How can I prevent deleted mail from ending up in "All Mail"     and "Archives"?  To my horror, I've emptied these boxes and lost all my mail from all my boxes  (and why do I need to enter this question three times?"

    How can I prevent deleted mail from ending up in "All Mail" and "Archives"? 
    To my horror, I emptied these boxes and lost all my mail from all my boxes .
    All mail also disappeared from my iPad, I suppose because they are "synched"
    (Also, no offense, but why do I need to enter this question multiple times?)
    Thanks for any thoughts.

    I'm having a similar but slightly different problem. My company just migrated to Gmail, and it's saving mail drafts every 30 seconds into my Trash folder.
    I unchecked the "Show in IMAP" preference in the Gmail settings, but my Drafts folder completely disappeared. I went back and checked it and the folder reappeared (with my drafts still in there).
    I like the idea if starting an email on my laptop and having the option of finishing it on my iPhone or iPad, so only saving Drafts locally would not be ideal.

  • I downloaded a ringtone yesterday and set it as my default ringtone.  Today it is gone and I need to know how to find it or download it again without having to pay for it for a third time......

    I downloaded a ringtone yesterday and set it as my default ringtone.  Today it is gone and my ringtone is the standard default that came with the phone.  I cannot find the ringtone in my settings and I don't want to have to pay for a ringtone for the third time.  The ringtone does show up in my purchased file in itunes.  How do I download it again?

    http://support.apple.com/en-us/HT204076

  • I'm using a new computer and to open one website I have to answer the security questions each time saying that the site doesn't recognize this computer.

    Each time I try to open my "ubt" website, I get a message that says the site does not recognize this computer so I have to answer the security questions each time. I get the message "You are attempting to log in to your account from a computer that we do not recognize..." All other websites work just fine. The Mac store person could not figure it out. This site works on Safari, but I prefer Firefox.

    The ipod is not a backup device. The music sync is one way - computer to ipod.  The only exception is itunes purchases:  Without syncing:File>transfer Purchases
    Copy everything from your backup copy of your  old computer to your new one.

  • My laptop y510p has an issue for the third time and i need a replacement

    my y510p laptop got an issue for three times and i need a replacement
    i bought it in april/2014 and more than 2 and half months wasted for maintenance.
    first time:
    after few weeks i got problem with screen colors and i sent the laptop and the problem was in the motherboard and they replaced it.
    second time:
    i got it from maintenance center with 2 issues:
    1- camera wasn't working
    2- suddenlly  freeze from time to time , sometime a blue screen appear after ,  i need to turnoff laptop from the power button to work again and it takes so long to open after that.
    i sent the laptop again.
    note: maintenance center claims that there wasn't any issue and even the camera that they told me that they fixed it they didn't wirte it in report. that's what i figured out when i talked with lenovo customer services
    third time:
    suddenly freeze from time to time again when i tried to enter bios immediatly after freeze happen i found that 
    harddisk wasn't  appearing.
    so i sent it again and i asked for replacement
    maintenance replied that it's a motherboard and hardisk issues.
    stayed there for 45 days and i called them for like 7 times to know what is the reply on my request and every time they ask me to wait more.
    today i called them and they told me that the request of replacement is refused ...!
    and they told me to post a message here if i insist on replacement.
    laptop serial no:xxxxxxxxx
    Mod comment: Removed Serial number for posters security.

    It´s crazy how many people have the same kind of problems with this computer.. and what´s even worse is that it seems that the only option is to send it to Lenovo for a motherboard replacement. I have the same problem (mainboard dead) but unluckily for me, my y510p is out of warranty (I only used it for like 4-5 months then it was stored while I was away). Everyday I get on the internet to look for a motherboard replacement myself but I just can´t find any.. Why is that? 
    Also, this is a "new" computer, if I´m not wrong it was released around the end of 2013. How is it that they already discontinued it? Do they usually discontinue their products that fast? Or is it perhaps all these Y510P computers had problems from production? How can someone spend over a thousand dollars, use the computer for a few months (normal use, not even gaming..) and one day is dead and the motherboard needs replacement?? Why nobody really complains about this? I really don´t know what to do as that were all my money. I really just want to get rid of this crap and never ever buy Lenovo again and never ever recommend it to anyone. I don´t even feel secure spending the money on a motherboard replacement because it seems to me that the problem will come back. Because as I said this seems to be a problem in their production of this particular model. Again, over a thousand dollars computer and its quality is worst than the cheapest ones.. shame on Lenovo.

  • Why do I have to answer security questions every time I download an app

    Not sure why I have to answer my security questions every time I try to download an app? How do I change that setting?

    Contact iTunes
    Apple - Support - iTunes - Contact Us
    To reset the them:
    From a Kappy  post
    The Three Best Alternatives for Security Questions and Rescue Mail
       1. Use Apple's Express Lane.
              Go to https://expresslane.apple.com ; click 'See all products and services' at the
              bottom of the page. In the next page click 'More Products and Services, then
              'Apple ID'. In the next page select 'Other Apple ID Topics' then 'Forgotten Apple
              ID security questions' and click 'Continue'. Please be patient waiting for the return
              phone call. It will come in time depending on how heavily the servers are being hit.
         2.  Call Apple Support in your country: Customer Service: Contacting Apple for support or
              Apple ID- Contacting Apple for help with Apple ID account security. Ask to speak to
              Account Security.
         3.  Rescue email address and how to reset Apple ID security questions.
    How to Manage your Apple ID: Manage My Apple ID

Maybe you are looking for

  • Adobe Media Encoder CS4 runtime error

    I am wondering why I am getting a runtime error while attempting to use Adobe Media Encoder CS4...As soon as I launch Adobe Media Encoder CS4, it crashes I have installed and reinstalled Flash a couple time, to see if this corrects the problem, which

  • My mac keeps freezing....

    Bought a Mac Pro a few months back, it's sometimes frozen before. But at the moment, it freezes at least once a day, normally it happens when I open the lid and run my finger over the clicker pad to wake it up. Would I have to take it into store or w

  • Books and pdf on IPad don't appear in IBooks on MAC

    I've read through several solutions to this similar problem and none of the solutions work for me. I've uploaded several ebooks to my mac and they don't appear on the IPad. I've got content (PDF's) on my ipad that doesn't appear on my mac. For exampl

  • Form to pdf convesion in apex3.2

    hi all, i created a form in oracle apex3.2 and after submitting it a print button is activated...how can i generate a pdf format of the form details by clicking on that print button... please help me if anybody knows the answer Edited by: user9139675

  • HT5312 I have forgotten my security questions

    I was trying to buy an app for my iphone but i had forgotten my security questions / answers. I tried to contact apple support regarding this via the website (frustrating!!!!) I read how to create a rescue email .... So I went to my account ..... Pre