Indeed, you need to make a few changes to make it work in beta2 : - http://www.macromedia.com/2005/mxml, changed to : http://www.adobe.com/2006/mxml, - phone="{phoneList.selectedItem}", changed to : phone="{phoneList.selectedItem as PhoneVO}", - <mx:SetProperty property="enabled" value="false" />, changed to : <mx:SetProperty name="enabled" value="false" />, - public class PhoneVO implements ValueObject, changed to : public dynamic class PhoneVO implements ValueObject. (or you can implement IUID interface as explained here http://www.macmartine.com/blog/2006/03/binding_custom_objects_to_tile.html)
I've uploaded an updated version of this Cairngorm2/ColdFusion sample app: http://www.benorama.com/flex/samples/PhonesCairngorm2.zip Benoit Hediard -----Message d'origine----- De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] De la part de Rick Schmitty Envoyé : samedi 15 avril 2006 01:52 À : flexcoders@yahoogroups.com Objet : [flexcoders] Cairngorm Phone Selector in F2B2 Hello I'm trying to get the phone selector running on cairngorm 2 and am having some problems After chaning references to http://www.adobe.com/2006/mxml and changing ApplicationView.mxml setPropety from <mx:SetProperty property="enabled" value="false" /> to <mx:SetProperty name="enabled" value="false" /> I also changed PhoneVO.as to implement ValueObject I now get: "Implicit coercion of a value with static type 'Object' to a possibly unrelated type 'com.mycompany.phones.model:PhoneVO'" Here is the ApplicationView.mxml <?xml version="1.0" encoding="utf-8"?> <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:view="com.mycompany.phones.view.*" currentState="{model.applicationState}" height="400" layout="horizontal" title="Nokia Phone Selector" width="700"> <mx:Script> <![CDATA[ import com.mycompany.phones.model.ApplicationModel; import com.mycompany.phones.model.PhoneVO; import com.mycompany.phones.controller.PhoneGetEvent; import flash.events.Event; public static var STATE_DEFAULT:String = ""; public static var STATE_LOADING:String = "loading"; [Bindable] public var model:ApplicationModel = ApplicationModel.getInstance(); ]]> </mx:Script> <mx:List id="phoneList" dataProvider="{model.phones}" height="100%" labelField="name" width="150" /> <view:PhoneDetails id="phoneDetails" phone="{phoneList.selectedItem}" width="100%" /> <mx:states> <mx:State name="{STATE_LOADING}"> <mx:SetProperty name="enabled" value="false" /> </mx:State> </mx:states> </mx:Panel> And here is the PhoneVO: package com.mycompany.phones.model { import org.nevis.cairngorm.vo.ValueObject; [Bindable] [RemoteClass(alias="com.mycompany.phones.model.PhoneVO")] public class PhoneVO implements ValueObject { public var name:String; public var description:String; public var price:Number; public var image:String; public var series:String; public var triband:Boolean; public var camera:Boolean; public var video:Boolean; public var highlight1:String; public var highlight2:String; public function PhoneVO() { name = ""; description = ""; price = 0; image = ""; series = ""; triband = false; camera = false; video = false; highlight1 = ""; highlight2 = ""; } } } And here is PhoneVO.cfc <cfcomponent> <cfproperty name="name" type="string" default=""> <cfproperty name="description" type="string" default=""> <cfproperty name="price" type="numeric" default="0"> <cfproperty name="image" type="string" default=""> <cfproperty name="series" type="string" default=""> <cfproperty name="triband" type="boolean" default="false"> <cfproperty name="camera" type="boolean" default="false"> <cfproperty name="video" type="boolean" default="false"> <cfproperty name="highlight1" type="string" default=""> <cfproperty name="highlight2" type="string" default=""> <cffunction name="init" output="false" returntype="com.mycompany.phones.model.PhoneVO"> <cfscript> this.name = ""; this.description = ""; this.price = 0; this.image = ""; this.series = ""; this.triband = "false"; this.camera = "false"; this.video = "false"; this.highlight1 = ""; this.highlight2 = ""; </cfscript> <cfreturn this /> </cffunction> <cffunction name="populate" output="false" returntype="void"> <cfargument name="data" type="Struct" /> <cfscript> this.name = data.name; this.description = data.description; this.price = data.price; this.image = data.image; this.series = data.series; this.triband = data.triband; this.camera = data.camera; this.video = data.video; this.highlight1 = data.highlight1; this.highlight2 = data.highlight2; </cfscript> </cffunction> </cfcomponent> I can't tell what other object I'm not being strict enough on, anything obvious missing? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/