I’ve been hanging out a bit lately over at Stack Overflow answering questions, earning badges, etc. I love to find older questions that have incomplete answers or answers that could be expounded upon. Here is the latest question I wrote an answer for.
What does [Bindable] mean in ActionScript?
You can either read my answer here or over on Stack Overflow.
[Bindable] is a one of several meta tags that you can use in flex ActionScript code. It can be applied to properties, or methods that are marked in any scope. It cannot be used with static class members.
The key to useing the [Bindable] meta tag is understanding what is going on under the hood when you use it. Essentially using data binding is a type of short hand for adding event listeners and dispatching events.
There are two basic forms of the [Bindable] tag. The first is just [Bindable] followed by a var/property declaration. The Second is [Bindable(event="eventname")] followed by either a var/property declaration, a function/method declaration or one half of a getter/setter declaration.
I’ll explain the longer notation first since the other builds on the same concept but with even more short hand.
Am I the only one that find’s it ironic that there are TWO terms for this same concept…
Oh crap! your laptop says “plugged in not charging” when you hover over the battery icon. It turns out that you probably do not have anything to worry about. Continue reading
I recently decided to migrate from Subversive to Subclipse as my SVN plugin for FlashBuilder (eclipse) I found it to be a very easy process. I found the video Migrating from Subversive to Subclipse in Servoy 5 to be especially useful.
For those people like myself that didn’t know…. Servoy Developer is apparently an eclipse based IDE / plug-in, that is not unlike FlashBuilder. (http://en.wikipedia.org/wiki/Servoy)
Since Servoy is eclipse and FlashBuilder is eclipse the process is almost exactly the same. The only difference being that instead of the Servoy Solution explorer you use the Project Explorer.
If you are curious as to why I decided to migrate to Subclipse; it mostly has to do with the failing of Subversive to properly integrate refactoring changes (moves) into the SVN repository. I use the eclipse automated refactoring frequently in the initial stages of a projects as I play with different package structures. The Subversive method of handling a move is to post two distinct SVN actions a delete and an add. This looses any history attachment and is not ‘proper’ in my opinion. (You can get around this by doing the SVN move outside of eclipse and then doing the refactor, but IMO this is just lame. ) I haven’t tried it yet but apparently Subclipse integrates closer to eclipse so that it will properly handle refactoring. (Most people suggest that you do an update before and commit after the re-factor. )
When you look at the way each of these came about it makes sense. Subversive was written by eclipse people to connect to SVN while Subclipse was written from the SVN perspective. If you are primarily concerned with SVN then move is a really important function (to maintain history) where as if you are coming at it from the IDE side of things it might not be as important and the easier delete/add would be sufficient.
I am in no way putting down Subversive, it is a great tool, and works well particularly if you don’t plan on doing any refactoring, then again who “plans” on refactoring
Imagine that you have an object that exposes a public property that is bindable. Now imagine you have a second object that uses this bindable property to provide it’s own bindable property. How do you simply and easily bind a UI element to this property on the second object, so that when the first object’s property updates, the UI updates.
As so many of these things go I’m sure this information is out there somewhere… I’ve even probably read it. For whatever reason it didn’t “click” for me. I figured out how to effectively leverage the Flex Event meta tags in FlexBuilder.
Now I’m not going to get into why you should use an event architecture… there are lots of articles on that and I’m sure by this time most developers are using events. I will lay out my preference on how to set up events.
So if you are not familiar with it there is this neat little meta tag for attaching events to the a dispatcher. The tag looks something like this:
Now as meta tags go this one is NOT required by the compiler (as opposed to say [Bindable] ) so it is completely optional. However if you are using FlashBuilder let me tell you what magic happens when you do use it correctly.
Ok the problem…. getting “content is not allowed in prolog” when trying to create an album on Picasa via the Picasa/Google API from inside of a Flex client.
From a bit of googleing I was able to determine that the problem was basically that my atom-xml request content was not formed properly. In particular that the xml content was preceded in the request by “something” Using Charles I was able to easily determine that the offending piece of data was my oauth signature and other oauth bits. The problem could best be summed up as the following: Continue reading