Wednesday, November 28, 2007

Good online place for cheap unlocked phones

http://www.blogger.com/img/gl.link.gif

Sunday, November 25, 2007

Wednesday, November 21, 2007

Another automated CRUD generator for Flex/CF

Looks like it generates XML too (which I don't want), but in case I ever get sick of the visualizer that comes with FlexBuilder, Illudium PU-36 looks like an option.

Monday, November 19, 2007

Probably better basic remoteobject actionscript example code from Adobe documentation

Found here.

ActionScript equivalent of mx:remoteobject


import mx.rpc.remoting.RemoteObject;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.InvokeEvent;
import mx.messaging.Channel;
import mx.messaging.channels.AMFChannel;
import mx.messaging.ChannelSet;
import flash.events.Event;

import mx.controls.Alert;


public function onCreationComplete () : void
{
//create the remote objects first
createRemoteObjects();

//set the AMF Channel on the remote objects
setUpAmfChannel();
}

public function createRemoteObjects () : void
{
ro = new RemoteObject();
ro.destination = "ColdFusion";
ro.source = "path.to.cfc";

ro.addEventListener("fault",ro_fault_handler);

//You probably want and need a result handler...
ro.methodName.addEventListener("result",methodName_result_handler);
//You may need this if you need to do something when a method is called
ro.methodName.addEventListener("invoke",methodName_invoke_handler);
//You may need this if you need to catch and handle errors differently
ro.methodName.addEventListener("fault",methodName_fault_handler);
//This is just sugar, you really dont need it unless you want it.
ro.methodName.showBusyCursor = true;
}


/* You can call the following method anytime to set the amf channel for a remote object on the fly */
public function setUpAmfChannel () : void
{
var amfChannel:Channel = new AMFChannel("my-cfamf","http://server/flex2gateway/");
amfChannelSet = new ChannelSet();
amfChannelSet.addChannel(amfChannel);

//repeat the following line for all remoteObjects
this.ro.channelSet = amfChannelSet;
}

public function ro_fault_handler ( event:FaultEvent ) : void
{
Alert.show( event.fault.faultString, 'Error');
}

public function call_methodName () : void
{
//use this to call the method
ro.methodName(/*pass arguments here*/);
}

public function methodName_invoke_handler ( event:InvokeEvent ) : void
{
//this will fire when the method is invoked
}

public function methodName_fault_handler ( event:FaultEvent ) : void
{
//this will fire when the method throws an error
}

public function methodName_result_handler ( event:ResultEvent ) : void
{
//this will fire when a result comes back from the method
}

Sunday, November 18, 2007

Getting started with FlexLib 2.1

This link helped me figure out how the heck to setup the FlexLib 2.1 library. Kinda flailed before reading this...yes I'm a newb.

Got stuck on Session and Global variables in a flex app

I need to keep these around for a CF8 Exchange set of operations.

Had to go all the way to this India post to find the full path for accessing variables declared in the Application scope. Not sure why Mike Chambers in his post didn't put the full path.

Friday, November 16, 2007

Oh my GOSH, getting CFEclipse installed was a total pain!

Wow, it should NOT have been this hard. Writing this down so I don't have to figure this all out again later...

- Eclipse seemed to work fine with THIS version of the Java 2 Standard Edition (J2SE) Java Runtime Environment (JRE) 1.5.0 update 11 found here.
Eclipse versions of Java supported

- Then I installed the Eclipse for RCP/Plug-in developers

- But the FINAL trick was that you can't just double click on any CFM/CFC file. Arg! You have to create a project first with the files in the right part of the hierarchy. Aaaaaah! I think I even had this working before, but uninstalled because of the blank window issue.
See post here.

This one showed me why adding CFEclipse to the Flex Builder 2 install didn't work.

Now I find that Eclipse 3.3 isn't compatible with FlexBuilder 2.0.1. Ack! Looks like Flex Beta 3 might fix it...

Tuesday, November 13, 2007

Decent post on DOA's, Gateways and beans

Found here.

Oh MY gosh, this killed me for two days...

Couldn't figure out why all the examples were breaking...until I remembered to do a Google on the error message I was receiving:
"VerifyError: Error #1053: Illegal override of subtopic in mx.messaging.Consumer"

The answer is to:
If you look in the properties for a Flex project under FB2 w/a CF8 server, you'll see that there's an entry pointing to {cf_install_path}/wwwroot/WEB-INF/flex/libs/fds.swc. This library conflicts with the Flex2 framework SWCs that come with FlexBuilder. The solution?? Pretty easy.

In the project's Properties panel (right-click the project and hit Properties...) you'll see a Flex Build Path entry in the list on the left. Click it, then choose the Library Path tab on the right. Now click "Add SWC Folder..." and navigate to your CF server's {cf_install_path}/wwwroot/WEB-INF/flex/libs folder and click Choose. This will add the {cf_install_path}/wwwroot/WEB-INF/flex/libs folder as a Flex2 library folder to your project.

Arg! Full original post with more info is here.

Monday, November 12, 2007

A whole doc on CF MX and Flex 2

Right here.

Secret sauce to hooking up CF to Flex

Looks like the simple example I was looking for is here from the Flex Doc team.

Create mysql database

mysql> CREATE DATABASE menagerie;

To list db inside of MySQL server

Can't remember this stuff...
Just type "show databases;" from sql command line.

How to backup an MySQL db

Described here.

To restore just type:
mysql projecttracker < bobber.sql

Saturday, November 10, 2007

May need this later...

http://www.jeffryhouser.com/index.cfm/2007/10/9/Why-does-ColdFusion-return-a-CFC-to-Flex-as-a-generic-object

Friday, November 9, 2007

Custom keyboard shortcuts on 10.3+

Couldn't remember if I needed to enter the parent menu name; answer no. Also saw that to enter ellipses you hit Cmd+;. Nice.

Article here.

Monday, November 5, 2007

To install CF Extension wizards to FB2

Follow the instructions in the folder installed during FB2 install:

Installing the ColdFusion Extensions for Adobe® Flex™ Builder™ 2

Before you install the ColdFusion Extensions for Flex Builder, you must have the following products installed:

Flex Builder 2
ColdFusion MX 7.0.2
Note: If you installed a previous version of the ColdFusion Extensions for Flex Builder, you must uninstall that version before installing the ColdFusion Extensions for Flex Builder feature. To do so, stop Flex Builder, delete all files that begin with "com.adobe.coldfusion." from the plugins folder that is under the Flex Builder folder, and then restart Flex Builder.

To install the ColdFusion Plugin for Flex Builder 2:

In Flex Builder, select Help > Software Updates > Find and Install.
Select the Search For New Features To Install option, and then click Next.
Click New Archived Site.
Select the ColdFusion_FlexBuilder_Feature.zip file, and then click Open.
When the Edit Local Site dialog box appears, click OK.
Ensure that the ColdFusion_FlexBuilder_feature.zip is selected, and then click Finish.
In the Search Results window, select the check box next to ColdFusion_FlexBuilder_Feature.zip, and then click Next.
Select the I Accept The Terms In This License Agreement option, and then click Next.
Click Finish.
Click Install All.
When the installation is complete, click Yes to restart Flex Builder.
To uninstall the ColdFusion Extensions for Flex Builder, you must first disable them, and then uninstall them.

To uninstall the ColdFusion Extensions for Flex Builder:

Select Help > Software Updates > Manage Configuration.
Select the ColdFusion Plugins feature.
Click Disable and then click OK.
Click Yes to restart Flex Builder.
When Flex Builder restarts, select Software Updates > Manage Configuration.
Click the Show Disabled Feature button, if you don't see the ColdFusion Flex Builder feature.
Select the ColdFusion Flex Builder feature and click Uninstall.
Click Yes to confirm that you want to uninstall.
Restart Flex Builder.

CF Wizards in Flex Builder?

I'll have to look at these videos...

Saturday, November 3, 2007

Thursday, November 1, 2007

When to use # marks in CF code and when not

I was getting really confused for a while. Per page 179 in Ben Forta's web app construction kit book:

The following is the same functionally:
<cfset fullname="#FirstName# #LastName#">
<cfset fullname=FirstName & " " & LastName>

But his rule is: only use number signs when referring to variables and functions WITHIN A BLOCK OF TEXT.

I wish some of the sample code was more clear on this (like that generated by DW wizard).

Had to use this link to figure out how to get the demo code to appear.

But turns out it's a little harder than that. Tags like cfinvokeargument expect strings for each of each named value pairs, so we require "#variable#" syntax if we are passing in a struct...oy...