Archive for October, 2009

Oct
0

Refresh Automatically in Flash Catalyst Beta 2: a quick fix

Refresh Automatically in Flash Catalyst Beta 2: a quick fix

As explained the other day in this previous post, the new version version of Adobe Flash Catalyst Beta 2 doesn’t allow access anymore to it’s preferences so you cannot set it to refresh automatically. It’s kind of a pain when you use my synchronization tool, CatalystBuilderSync, as the synchronizations with Flash Builder do not reflect anymore in Catalyst.
So I’ve been digging a bit into Catalyst architecture and found an easy fix for that. You just need to edit the following file, depending on your platform (attention, .metadata is usually hidden by default):

  • On Mac:
    /Users/[your username]/Library/Application Support/Adobe/Flash Catalyst/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
  • On Windows 7 (and probably on Vista but unverified):
    C:\Users\[your username]\AppData\Roaming\Adobe\Flash Catalyst\workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.core.resources.prefs
  • On Windows XP:
    C:\Documents and Settings\[your username]\Application Data\Adobe\Flash Catalyst\workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.core.resources.prefs

Open one of those and add the following line:

refresh.enabled=true

Save, restart Catalyst and that would do the trick. I’ll simplify the whole process in CatalystBuilderSync next update, hopefully in a couple of days.

Oct
11

Mate examples: #11 Mediator (or Passive View)

Mate examples: #11 Mediator (or Passive View)

This blog post is related to My LFPUG Presentation about Mate blog post (I know, it was 3 months ago, it’s a shame but I also must work for a living).

If you haven’t done it yet you should have a look first at our previous examples: #1, #2, #3, #4, #5, #6, #7, #8, #9 and #10.

In our previous example we’ve studied a simple implementation of the Presentation Pattern. In this configuration, the View has a reference to its presentation model (or at least to its interface). But what if you want it to be the other way around? The view exists for itself and the model is the one who has a reference to the view. This approach definitely is a prime candidate if you want to use views generated in Flash Catalyst then synchronised with Flash Builder with CatalystBuilderSync. You can easily modify your views without affecting the logic whatsoever. The view is dumb or passive as explained in this other article by Paul Williams. It’s also one of the patterns used in PureMVC, called Mediator and we will keep the name here. So, how is it possible with Mate?

Let’s have a look (source is available by right-clicking on the demo after launching it):

Mate example

#11 Mediator (a la PureMVC) (click to Launch)

Continue Reading…

Oct
2

Flash Builder 4 beta2, Flash Catalyst Beta2 and CatalystBuilderSync? Good to go but…

Flash Builder 4 beta2, Flash Catalyst Beta2 and CatalystBuilderSync? Good to go but…

[Edit: there's a workaround for the preferences issue here]

I’ve been literally sucked up into a black hole of work recently (hence the obvious lack of activity on FlexStuff.co.uk), but not to the point I couldn’t check out the brand new Flash Builder 4 Beta 2 and its counterpart Flash Catalyst Beta 2 (like all good geeks I like novelties). So I took a couple of hours to see how the two of them behaved with CatalystBuilderSync and for what I’ve seen so far it’s still all good, with the usual caveats (not all your Flash Builder 4 code will necessarily play well in Catalyst). It looks like my approach remains entirely valid and I suspect it’ll remain valid even after Catalyst 1.0 release, but I can be wrong and obviously Adobe doesn’t warmly encourage this approach according to Andrew Shorten’s (excellent) article: Exploring Flash Catalyst and Flash Builder workflows:

Other workflows

Whilst not an official list of recommended workflows, the approaches described in this article are all supported within the current versions of the Flash Catalyst and Flash Builder.

There are a number of third-party tools and alternative workflows that you might like to consider as you work with Flash Catalyst and Flash Builder; these can often improve productivity further for advanced developers. Note, however, that some of these tools may use unsupported or non-recommended approaches that may not work with future versions of Flash Catalyst and Flash Builder.

So CatalystBuilderSync works well, BUT (of course there has to be a but) unfortunately Adobe limited one thing in Catalyst: there’s no right-click available anymore in Catalyst’s code view. Which means you can’t manually refresh the content of your project folder nor access Catalyst’s preferences in order to activate the Automatic Refresh (as explained in this previous post). There are a couple workarounds (like switching back and forth between design and code view or saving Catalyst project then choosing “Revert” in the file menu) but it’s a bit of a shame as we’re not children and I don’t really see the point of removing this functionality (now I’m also doomed to use the system’s default browser which is all but a convenience for me). I guess there must be somewhere in Catalyst some .ini file to edit (after all Catalyst is just another Eclipse distro) but I must say I don’t have a clue where this might be.
I’ll keep searching when I have the time but if someone has a suggestion I’d love to hear it. Now the good thing is CatalystBuilderSync is still working and it’s even more useful now with all the new Catalyst’s functionalities.