Viewing by month: March 2006

Mar 31 2006

Ray Camden releases MGDoc

Ray Camden has released a piece of code called "MGDoc," a cool tool that'll take your ModelGlue.xml file and produce a PDF showing you its settings, controller configuration, and event-handler data. Very nice, and it'll definitely come in handy where I work!

Download / see example at http://ray.camdenfamily.com/index.cfm/2006/3/30/MGDoc-a-ModelGlue-documentor.

1 comments - Posted by Joe Rinehart at 7:58 AM - Categories: Model-Glue

Mar 30 2006

Something I *hate* about Flex!

I was talking to Simeon Bateman earlier today on GTalk, and while we were talking, I hit a point in a project where I was ready to fire up CFEclipse and do some ColdFusion work. When I fired it up and started working, this little interchange occurred:

Joe: You know something I positively hate about Flex?

Simeon Bateman: well tell me more

Joe: it makes it really painful to go back to HTML work!

I just typed "<cfoutput query="Services"><tr><td>#name#</td>" and was like "I shouldn't have to do this."

Simeon Bateman: ha ha ha
thats the best!

Seriously - I've been working on a Flex app in my spare time for the past 3-4 days, and I never realized how much time I spent on simply managing HTML. I'm already feeling much more productive with Flex, and I've only been seriously at it for a week!

6 comments - Posted by Joe Rinehart at 11:26 AM - Categories: Flex and ColdFusion

Mar 28 2006

Model-Glue.com: Back after these messages

So much for automatic renewal - Model-Glue.com turned into a GoDaddy splash screen this AM. Thanks to those who've notified me - the renewal is being processed right now.

0 comments - Posted by Joe Rinehart at 8:23 AM - Categories: Model-Glue

Mar 24 2006

Flex 2 itemRenderer: Bonehead!

It looks like I just learned a basic lesson about Flex 2 databinding. Thanks go out to Dirk, who pointed out that I wasn't modifying the data that the checkbox was bound to in my previous post, so that when then item renderer was "recycled," it got "dirty" state.

Here's a revision of my earlier MXML that works properly:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"   layout="vertical" width="100%" height="100%">
   <mx:Script>
      <![CDATA[
         import mx.collections.ArrayCollection;
         
         var items:ArrayCollection = getItems();
         
         public function getItems():ArrayCollection {
            var i:int;
            var items:ArrayCollection = new ArrayCollection();
            for (i=0;i<50;i++) {
               var item:Object = new Object();
               item["label"] = i.toString();   
               item["selected"] = false;
               items.addItem(item);
            }
            
            return items;
         }
      ]]>
   </mx:Script>

   <mx:List dataProvider="{items}" width="200" height="200">
      <mx:itemRenderer>
         <mx:Component>
            <mx:Canvas>
               <mx:CheckBox id="complete" width="20" x="10" y="4" selected="{data.selected}" click="{data.selected = complete.selected}"/>
               <mx:Text id="taskname" text="{data.label}" x="27" width="100%" y="4" selectable="false" />         
            </mx:Canvas>
         </mx:Component>
      </mx:itemRenderer>
   </mx:List>
</mx:Application>

3 comments - Posted by Joe Rinehart at 11:22 AM - Categories: Flex and ColdFusion

Mar 24 2006

Flex 2 itemRenderer: Bug or bonehead?

I'm starting to work with Flex 2 at night, in between Model-Glue 2.0 and CFUnited presos. I wanted to get the hang of custom item renderers in the list controls last night, so I started fooling around with them.

It went really well for a while: I made a simple list, bound it to a dataprovider, and dropped in an inline renderer that displayed a checkbox next to the label. However, when I check the checkbox and then scroll, wackiness happens: the checkbox may/may not stay checked, others become checked, etc...

You can view this at http://clearsoftware.net/zzztemp/Scratch.swf.

It looks like it has to do with how the control renders things - if I display 5 items, and check the first, then scroll, the sixth is shown as checked as well.

Looking at the code below, can anyone tell me if this is a bug, or if I'm making a boneheaded noob mistake?

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"   layout="vertical" width="100%" height="100%">
   <mx:Script>
      <![CDATA[
         import mx.collections.ArrayCollection;
         
         public function getItems():ArrayCollection {
            var i:int;
            var items:ArrayCollection = new ArrayCollection();
                        
            for (i=0;i<50;i++) {
               var item:Object = new Object();
               item["label"] = i.toString();   
               items.addItem(item);
            }
            
            return items;
         }
      ]]>
   </mx:Script>

   <mx:List dataProvider="{getItems()}" width="200" height="200">
      <mx:itemRenderer>
         <mx:Component>
            <mx:Canvas>
               <mx:CheckBox id="complete" width="20" x="10" y="4" />
               <mx:Text id="taskname" text="{data.label}" x="27" width="100%" y="4" selectable="false" />         
            </mx:Canvas>
         </mx:Component>
      </mx:itemRenderer>
   </mx:List>
</mx:Application>

3 comments - Posted by Joe Rinehart at 8:43 AM - Categories: Flex and ColdFusion

Mar 23 2006

Flex 2 + ColdFusion: Scott Stroz Saves the Day

I spent a while last night swearing at Flex 2. I just couldn't get it to connect to ColdFusion to save my life. In Beta 1, there was the "wrong path web.xml" issue for multiserver installs. In Beta 2, that's been fixed, but there's apparantly a new multiserver "wrong path" fix that you need to put in place that Scott Stroz informed me of. After installing the CF/Flex Connectivity Update (Mystic), do the following:

  1. Shut ColdFusion back down.
  2. Rename c:jrun4jre to c:jrun4jre_old
  3. Copy c:jrun4 untimejre to c:jrun4jre
  4. Restart CF

This should fix the "Error: faultCode:Client.Error.MessageSend faultString:'Send failed' faultDetail:'Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 500'" that you may be getting.

Flex seems to be a great product, but it'd help us out a lot if more QA went into the installers!

3 comments - Posted by Joe Rinehart at 9:58 AM - Categories: ColdFusion MX

Mar 22 2006

Stupid ColdFusion Mistake...

I've been puzzled for a few minutes over why both things are happening in the following conditional (inside of a ). I thought I'd share, it's really kind of cute.

<cfif foo>
<cfset someComponent.doSomething() />
<else>
<cfset someComponent.doSomethingElse() />
</cfif>

Do ya see it?

8 comments - Posted by Joe Rinehart at 2:12 PM - Categories: ColdFusion MX