By newtriks
|
June 24, 2009
If anyone has checked any of my PureMVC Flex examples that connect to a Remote Service (usually ColdFusion) they will notice I use a delegate class as the gateway to ColdFusion from all of my Proxies. I have recently noticed that most of my examples on line (typically named RemoteDelegate.as) usually pass an Object as a parameter for the remote request and I have not uploaded a version to accept multiple arguments in the call from the proxy to the delegate and in turn the request to ColdFusion.
Below is a link to a more flexible RemoteDelegate.as Class which now handles multiple arguments to invoke a remote request. Obviously the delegate uses RemoteObject and so can be changed to a different destination so your not limited to just ColdFusion.
An example of how to invoke the RemoteDelegate within a proxy and make a remoting call is below.
Actionscript:
-
private var remoteDelegate:RemoteDelegate;
-
-
remoteDelegate = new RemoteDelegate( this, CF_API );
-
-
remoteDelegate.call( "cfMethod", param1, param2, param3 );
RemoteDelegate.as
* NOTE *
Thanks to docsultant for the dynamic method invocation heads up.
By newtriks
|
June 19, 2009
I know that there are quite a few associate problems with IFrames and Flex. Unfortunately it was a must for one application I was working on. My problem arose when I re-wrapped my swf up using SWFObject. As you can see from my post I had some good help but it overrode the logic laid out by flex-iframe by hardcoding in the CSS for the iframe in the html. But as Aran quite rightly pointed out, it was down to the method in the iframe to position it correctly. After some trial and error I found the blighter that was causing the issue with IFrames in Flex whilst using SWFObject in particular.
Read More »
By newtriks
|
June 12, 2009
Once again today I downloaded a directory of classes, popped them into a project I had under SVN control and got loads of SVN related errors due to the supplier of the classes including all their .svn files with source.
I saw a cool Automator action (copied and thanks to team bkwld, I just just added Growl support instead of a text file dump) which will remove all the .svn files from a folder and its nested directories. It can be run by right clicking the folder you need to cleanup > More > Automator > ClearSVN.
Put the automator plugin into:
/Volumes/Users/{your home dir name}/Library/Workflows/Applications/Finder/
clearsvn workflow
By newtriks
|
May 27, 2009
Yup this is a plug but deserved, these guys are pushing out some concentrated good material so check out the latest magazine here: ffdmag.com
By newtriks
|
May 18, 2009
I have had a weekend of playing around with Flex Ant Tasks and I still can't believe that I have not submerged myself in this subject earlier. I have used Flex Ant related scripts in the past but never really dived in and had a good ol' play in depth coding some up myself. There were a few reasons why I got my hands dirty with Flex Ant Tasks, heres two of them:
1) A more efficient method of altering the existing html-template wrapper i.e. index.template.html to use SWFObject (as does Gumbo) which didn't involve me copying and pasting my source files into each Flex project manually each time.
2) Wanting to have a more structured build and release process for my project files in a multi developer environment.
Read More »
By newtriks
|
May 11, 2009
This is a quick post with some source code that may be of use to someone. I needed to format the Number 560 (a figure representing total pence) into pounds and pence £5.60. Obviously I needed to ensure that the decimal was in the correct place and if two digits were passed that I would have to format it appropriately to precede the digits with a zero and a decimal place i.e. £0.60. Here is the source to the 2 very small classes I use to achieve this via a static method like so:
Actionscript:
-
private var exampleOne:Number = 560; // Expect £5.60
-
private var exampleTwo:Number = 50; // Expect £0.50
-
-
public function testCurrency():void
-
{
-
trace( CustomPriceFormatter.getPrice( exampleOne.toString(), "£" ) );
-
trace( CustomPriceFormatter.getPrice( exampleTwo.toString(), "£" ) );
-
}
By newtriks
|
May 6, 2009
I am pleased to be a speaker at Flash Camp in Birmingham on Tuesday 16th June 2009 @ 17:00 with a topic titled Getting started with Flex & PureMVC. I will be giving an over view of the framework with a super simple lesson on setting up your Flex project utilising all the goodness of PureMVC! Also speaking are Mike Jones (Flashgen), James Whittaker (RefreshingApps), Rob Bateman (Away3D) and Enrique Duvos (Adobe Systems)!
By newtriks
|
May 6, 2009
I have had some requests and seen some developers asking about managing a ViewStack using the PureMVC StateMachine utility. Slacker is a well known demo detailing how to manage View components using deferred instantiation. Combining this demo and the StateMachine utility is a straight forward route to managing a ViewStack in your PureMVC application. I have knocked up a demo which demonstrates how to achieve this.
Read More »
By newtriks
|
April 20, 2009
Due to my eldest daughter (a) having proper homework which involves more than 10 minutes work (b) having a laptop, I have now decided to set up my Canon IP3000 printer on the network. I use a DrayTek Vigor 2800G router which has a USB printer port and presumed the set up on Mac OS X would be straight forward. I found a couple of obstacles and loads of confusing documentation online advising LPR on the Mac OS X with Canon printers and some conflicts on drivers required.
DrayTek provide the following link which proves from their end its super easy (which it was). The problem arose when it came to selecting the Canon IP3000 driver in the Print Using: dialogue, because it didn't display the correct driver. So I went to the Canon site and downloaded the latest driver, restarted the computer and still it wouldn't show. Then I found online some options, one involved CUPS, the second unfortunately cost $ and lastly I found Gutenprint!
Gutenprint provide a super simple installation process, no restart required and immediately the driver showed up when I started the Printer IP setup process! Job done....
By newtriks
|
April 14, 2009
My buddy Steve asked me for a skeleton PureMVC example application, something very basic to get your head around the work flow. I thought I may as well upload it for all as it may be of use to someone else out there. It really is a super simple example Flex application with a View component and Mediator containing a DataGrid thats populated by an ArrayCollection in a Proxy. It uses the Mulitcore version of PureMVC and also demonstrates how to send a simple notification through the framework when a button is clicked. That's all folks:
source