Category Archiveflex
Note to self & actionscript & flex 10 Oct 2008 12:46 pm
Excellent Sample of Mate Document-Based Applications
I found an example of a Document-based Mate application out on Google code, referenced here and here on the Mate web site.
It’s pretty nice, with good examples of the LocalEventMap, etc. He’s built it using the Presentation Model design pattern which seems to be a natural fit to both Flex and Mate.
Paul Williams of Adobe has a series of articles on various design patterns including Presentation Model.
And of course Martin Fowler has some thoughts on the Presentation Model, aka Application Model pattern.
It could be a nice starting point for developing multiple document applications. And the Presentation Model pattern looks like it would provide some nice benefits, keeping the views nice and simple and making them a lot easier to test.
This project also has excellent documentation and about the only info I can find on LocalEventMaps.
actionscript flex Mate Note to self
Note to self & flex & ria 11 Sep 2008 10:16 am
Flex Builder 3, .swc Libraries and Linked Source
I’ve been using Mate for some time and liking it very much. I wanted to be able to use Flex Builder’s ability to navigate to and view the source of included types. With only having the downloaded .swc file in my /libs directory that wasn’t possible. It took me some time to sort it out, so here’s my recipe in case it helps anyone (and so I can remember next time).
This should also work for any project that you can download the source for, that just happened to be Mate for me. I’m using Flex Builder 3 — not sure what would be different if anything with FB2.
1. Download the source using the directions here
2. Create a Flex Library Project in Flex Builder, let’s call it ‘MateLib’
3. Import the source into the project, leaving out all the .svn directories, such that your folder structure looks like:
MateLib
/bin
/com
/asfusion
/mate
/etc....
manifest.xml
4. Right click the project in the FB Navigator view and select: Properties -> Flex Library Compiler. Set the Namespace URL: to “http://mate.asfusion.com/” and Mainifest file: to manifest.xml
5. Save and build the project.
6. In your project that uses the library, select Properties -> Flex Build Path and click Add SWC and navigate to the MateLib project -> /bin folder and select the MateLib.swc file there.
Now you can use the standard way to include Mate components in your mxml, with:
xmlns:mate="http://mate.asfusion.com/"
And you’ll be able to view the source code by command-clicking (control-click on Windows I think) a Mate component. You can also select the text, e.g. Dispatcher, and use the F3 key. And… the classes will also come up and be navigable with the Open Type, command-T, navigator.
flex Note to self ria
actionscript & flex & ria 01 Jul 2008 09:54 am
FlexBuilder 3 Security Sandbox Explained
I’ve been trying to load a local file with some dummy data and hitting a security warning. I was running out of FlexBuilder 3 and trying to read a local file, so wasn’t sure why I was getting a security error.
I’d come across many references to adding a cross domain policy to a web server, but this is the first full explanation of the security sandbox that made sense to me. Following this, I added:
-use-network=false
To the custom compiler line in the project preferences and all is well. Here’s the link with a great explanation:
http://blogs.adobe.com/flexdoc/2008/06/the_security_sandbox_in_flex_b.html
actionscript flex Note to self ria