Feb. 18th, 2009

jducoeur: (Default)
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...
jducoeur: (Default)
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...

Profile

jducoeur: (Default)
jducoeur

July 2025

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27 28293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags