Followup: More about Inspectable

After getting some other work done today, I continued my search for the cause of the major instabilities I’m having with Flash. Last time, I tried to simplify things by creating a blank symbol and setting the class in the Component Definition dialog. Today, I took that a step further. I created the same class, but the class only contains public variables that are Inspectable. Every variable matches an Inspectable getter/setter combo from the original class. You can’t get much simpler than that.

I had hoped that Flash had been choking on my code somewhere, and that I could trick it by making simplified classes with the same interface. After just a couple tests, Flash gave me the same result. It failed to save after I set the component’s class, and I was forced to close the file and try again. I still wasn’t sure if the problem came from too many properties or something else.

I gave it some thought. I’m sure a couple of my coworkers were wondering what I was doing staring into space for so long. What if I started taking out some of the properties? I immediately decided to try removing the Inspectable tags on properties of the plain Object type. These were the most complicated, with multiple internal variables, and they seemed the most likely culprit. Once again, I worked from a blank symbol and added the class in the Component Definition. After setting the class at least a dozen times without fail, I finally decided I had found the cause.

I knew had tracked it down, but just to be sure, I created a blank class and added a few Inspectable Objects with a several variables each. After setting the class a few times, it failed to save. I went even simpler. I created a class with one Inspectable variable of the type Object. It took me a dozen tries, but it finally failed to save the file when I set the class.

Unfortunately, that’s the problem. Sometimes it works without a hitch, and sometimes it fails miserably. My only option, other than waiting for a bug-fix from Macromedia, is to add all the properties manually to the Component Definition. That works fine. Flash only seems to have trouble parsing the Inspectable tag. It’s too bad I have a hundred different properties that can be set.

About Josh Tynjala

Josh Tynjala is a frontend developer, open source contributor, bowler hat enthusiast, and karaoke addict. You might be familiar with his project, Feathers UI, an open source user interface library for Starling Framework that is included in the Adobe Gaming SDK.