Justin du Coeur (jducoeur) wrote,
Justin du Coeur
jducoeur

Stupid bug of the day

So here I am, trying to add context menus (the ones that pop up on right-click) to my client app. The first menu item I add works just fine. But the second one, the Save button, doesn't work at all. No matter what I try, it simply doesn't show up in the menu. I spend half an hour trying to figure out why.

Turns out, it is because of Flash's standard menus. A Flash program has a huge raft of things that show up by default in the right-click menu, none of which are appropriate to my app, so I told it to turn them off. Turns out that one of those standard menu items is "Save" -- and if you turn it off, it not only turns off that particular item, but won't show any *other* menu items with the same name! The "hide standard picks" function turns out to work by *name*, not by the strongly-typed ContextMenuItem type.

I can just barely rationalize this on security grounds -- that it's potenially some sort of phishing vector if you could override the standard menu picks. But doing so without throwing an exception (or documenting the behaviour) is just plain dumb. And really, I think this is simply an internal bug: they're using strong typing in some places and string names in others, without regard to the effect this has on a decoupled program...
Tags: programming
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 2 comments