Skip to content

Solution: Error: “This component is based on Application, which is not a visual component. Switch to source mode to edit it” (Flex Builder)

So a few months overdue I added the a new SDK after 3.0.0. As 3.3.0 is out I downloaded it from Adobe and added it in the folder alongside the other SDK versions. All is well. Add the datavisualization and all is well. Restart Flex 3 Builder and add the new SDK in properties to the project. all is fine.

However later in the day I wanted to see the visual display of a visual component directly in Builder and switch view in Flex Builder and is greeted by the yellow information square saying ‘Error: “This component is based on Application, which is not a visual component. Switch to source mode to edit it”‘.

Continue reading ›

Tagged , , ,

Rubber Duck Debugging

This is a fun tidbit that is actual useful as well as thought provoking as to easy ways to free up manpower and avoid superfluous peer reviews before code check in or with troubling bugs.

We called it the Rubber Duck method of debugging. It goes like this:

  1. Beg, borrow, steal, buy, fabricate or otherwise obtain a rubber duck (bathtub variety)
  2. Place rubber duck on desk and inform it you are just going to go over some code with it, if that’s all right.
  3. Explain to the duck what you code is supposed to do, and then go into detail and explain things line by line
  4. At some point you will tell the duck what you are doing next and then realise that that is not in fact what you are actually doing.

The duck will sit there serenely, happy in the knowledge that it has helped you on your way. Works every time. Actually, if you don’t have a rubber duck you could at a pinch ask a fellow programmer or engineer to sit in.

Tagged ,

Flex: Reacting to new data in renderitems without or in spite of databinding

So working with List’s one often use the ability to have renderitems (via the itemRenderer property) to populate the control and display data. For example a play list of music, or the likes. And ofcourse one can take advantage of databinding if any of the subitems properties are altered by another source and everything seems nice.

This is all great on a simple level but sometimes - atleast I have found - just filling the rendered subcomponent’s fields with data isn’t really enough. It’s a simplistic and non-dynamic approach - that again, often works - that doesn’t cover all usage areas. Continue reading ›

Tagged , , ,

Solution: Stopping Flex from removing imports it cannot resolve

Been a while since I posted here due to the workload, but one thing that was really annoying me when we increased the number of developers on a project and a major refactoring went into the project (with checkins to a SVN from another dev) was how Flex lost the understanding of the packages in the project.

Continue reading ›

Tagged , , ,

Followup: Twitteroo failing to post status updates to Twitter

So in a previous post I wrote about the fact that Twitteroo started failing to post status updates some weeks back. It does so for seemingly no reason as the API hasn’t changed. So today I decided to capture the traffic to see what the http-response was as Twitteroo doesn’t detect the failure-kid and it doesn’t even mention or detect that the normal success response wasn’t received. Continue reading ›

Tagged , , ,

Flex: Working against a RESTful server while HTTPService doesn’t support PUT or DELETE

While HTTPService is a great component to work with we quickly found a limitation that hindered us from working against a RESTful server to the full extent. Continue reading ›

Tagged , , , , , ,

Twitteroo failing to post updates to Twitter (and does it silently)

So I have been using Twitteroo to update my [project]private Twitter status. It’s a desktop-application which makes it much faster than having to surf to the Twitter-page and adding the info. All good and well - apart for that the latest days atleast, not sure for how long since it did so silently, it has been failing. Continue reading ›

Tagged , ,

Flex: The dangers of implicit casting and not strongly typed boolean expressions

While Flex Builder inherits a lot of it’s code-style from Java (and perhaps having been getting some inspiration from C# and other modern languages) one of the things I have come to both…like and dislike is the open typed approach to things. Be it the ability to add properties to any object by merely setting them to working with .getStyle()-properties with unclear type-setting.

Continue reading ›

Tagged , , ,

Flex: Solution to the “warning: unable to bind to property ‘x’ on class ‘Object’ (class is not an IEventDispatcher)”-message

So some days ago I was creating a arrayCollection on the fly, populated with basic Objects (that held 2 properties) so I could populate a List-component and use the properties as values to be pushed to the items in the itemRenderer. Straight forward enough I thought. Ofcourse this seemed to be a classic mistake to do. Continue reading ›

Tagged , , ,

Flex: Working with dynamic properties of an object or properties passed in as parameters

Thought I would just write this on up since it took a little while for me to track it down how it was done and it’s something that isn’t as straight forward to search for using Google neither (half the trick to searching: finding a good keyword).

So what if you have a (known or un-known, doesn’t matter really) object that has some properties. You want to write a blind function that for example…translates some parameters from a http-request, reads an XML row or the likes, and by that gets a property that you need to alter in the object. Continue reading ›

Tagged , , ,