Justin du Coeur (jducoeur) wrote,
Justin du Coeur

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

  • Adtech

    Here's an interesting article about "adtech" -- those automated algorithms that companies like Google and Facebook use to spy on you and serve up…

  • Chrome instability?

    For the past week or two, Chrome has become surprisingly unstable -- it's been crashing on me about once a day. Weirdly, it is usually when I'm not…

  • Crossing the Uncanny Valley

    [Trying out posting from DreamWidth. Let's see if everything is configured right.] Just saw Rogue One. Capsule Summary: not an epic for the ages,…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded