Tuesday, July 13, 2010

The cost of copy/paste in Flex

Sometimes a bug comes around that just sucks out your will to live. It may be incredibly complex, but more often that not it turns out to be something so simple and annoying that you just can't help blogging about it.

We have had a bug in our UI for about a month now that prevents users from being able to copy and paste from *all* popup dialogs in the UI. Now how can that be? Copy and paste just comes along for the ride in every app these days. On top of that, it is probably one of the most used features of any app, globally!

Well it just so happens that today I finally stumbled across the solution. I came across an SDK bug from Adobe (https://bugs.adobe.com/jira/browse/SDK-26182) that discussed how components nested inside of spark panels (speaking Flex 4 here) can't use the context menu items (the right-click menu). As it turns out, this little gem is the exact same bug causing my copy/paste woes. The fix was as easy as setting mouseEnable=true on both my panel subclass and its skin.

How stupid of me you may be thinking. Why didn't I just create a proper skin in the first place, right? Well the thing is, I let Flex Builder create the skin for me...and it set mouseEnable=false in it!

My boss had a great suggestion. He said I should start adding cost info to my blog posts. So here it is...

My team has spent a combined 12 hours debugging how to make copy and paste work in a web-based app. How is that for a waste of time? I'm expecting to be reimbursed by Adobe any day now...


No comments:

Post a Comment