[flexcoders] Question about printing
I haven't played with printing much, but I've been looking and haven't been able to find a good answer to this anywhere yet... This might be an oversimplification, but apparently when it comes to the FlexPrintJob you can either print what's displayed (visible) in your app, or else employ the PrintDataGrid which allows you to print things that are not necessarily displayed visually anywhere. My problem is that I have a List component that uses a custom rederer, and it typically displays hundreds of items, with less than ten visible on the screen at any one time. The reason I have a custom renderer is because there's too much data for a DataGrid (would result in too many unusably thin columns.) When I try to print the List component I only get the few that are visible on the screen... when I use the List's dataprovider in a PrintDataGrid there's too many columns and the data is unreadable. But... when my customer hits print, they want a prinout of all the items in the List, not just what's visible. My question is this... can I use a custom renderer in a PrintDataGrid? Or is there a way to loop through the List's dataprovider, make each item somehow visible so it can be added to the printjob? My first pref would be to create a custom renderer for a PrintDataGrid so that I can control output format better than a datagrid, have all items visible to the printjob even though they're not visible to the user, use print paging, etc. but I can't seem to find any good documentation on that anywhere. There's a tidbit here: http://www.nabble.com/Can-Flex-really-handle-complex-printing--td15744019.html but I'm curious if this is recommended, or if there's a happier place I could go :-) ThanksDarren
RE: [flexcoders] Question about printing
Sorry, I'm new to printing so none of that made much sense... You can almost always make a DG look like a List by having one column with the headers invisible. So, start with temporarily replacing your list with a single column DG, work out the kinks, then shovel it off to PDG to print. Maybe I'm misunderstanding, but how could that work? If I replace my current List with a DG and get it to work the same as now, that's fine (although I'd have to rework a bunch of code)... but not sure I see the point. When I shovel it off to a PrintDG I'm just sending the dataprovider to the PrintDG, so it's still going to print too many columns all squeezed. Unless... are you suggesting I use a DG with a custom rendered single cell for normal display, then use the DG's custom renderer in the PrintDG? So build a custom renderer that work in either so it can be shared? Darren From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darren HouleSent: Friday, August 15, 2008 10:34 AMTo: Flexcoders GroupSubject: [flexcoders] Question about printing I haven't played with printing much, but I've been looking and haven't been able to find a good answer to this anywhere yet... This might be an oversimplification, but apparently when it comes to the FlexPrintJob you can either print what's displayed (visible) in your app, or else employ the PrintDataGrid which allows you to print things that are not necessarily displayed visually anywhere. My problem is that I have a List component that uses a custom rederer, and it typically displays hundreds of items, with less than ten visible on the screen at any one time. The reason I have a custom renderer is because there's too much data for a DataGrid (would result in too many unusably thin columns.) When I try to print the List component I only get the few that are visible on the screen... when I use the List's dataprovider in a PrintDataGrid there's too many columns and the data is unreadable. But... when my customer hits ! print, they want a prinout of all the items in the List, not just what's visible. My question is this... can I use a custom renderer in a PrintDataGrid? Or is there a way to loop through the List's dataprovider, make each item somehow visible so it can be added to the printjob? My first pref would be to create a custom renderer for a PrintDataGrid so that I can control output format better than a datagrid, have all items visible to the printjob even though they're not visible to the user, use print paging, etc. but I can't seem to find any good documentation on that anywhere. There's a tidbit here: http://www.nabble.com/Can-Flex-really-handle-complex-printing--td15744019.html but I'm curious if this is recommended, or if there's a happier place I could go :-) ThanksDarren
[flexcoders] Array reference vs values
This might be a basic AS question, but I encountered it building a Flex app, so... I create a Date var date:Date = new Date(); I create an Array var arr:Array = new Array(); I set the first element of the array equal to the date arr[0] = date; I create another date variable that refers to the first array element var ref:Date = arr[0] as Date; if I trace(date=+date+, arr[0]=+arr[0]+, ref=+ref) I get date=Wed Jul 16 21:04:45 GMT-0400 2008, arr[0]=Wed Jul 16 21:04:45 GMT-0400 2008, ref=Wed Jul 16 21:04:45 GMT-0400 2008 Now I null out the ref variable ref=null; Since AS uses references instead of values I would expect to null out the original date, but no... If I trace(date=+date+, arr[0]=+arr[0]+, ref=+ref) I now get date=Wed Jul 16 21:04:45 GMT-0400 2008, arr[0]=Wed Jul 16 21:04:45 GMT-0400 2008, ref=null I thought everything was a reference in AS? Shouldn't nulling ref also null arr[0] which would null out date? Ultimately... I have a custom object that has several fields each containing a Date. I create an array and make each element in the array = each Date in the custom obj. I need to be able to null an array element and have it carry backwards into the object and null out the original Date. Any ideas? Am I missing something really obvious?
RE: [flexcoders] Array reference vs values
Josh Yes, what you're describing is exactly what I described and is, in fact, what it happening... but to say I don't ever need to do this? Well... yes... I need to do this... and it has nothing to do with the garbage collector. Here, let me explain in another way I have a custom object... lets say it's a Person object. It has various properties, but several are Date types. These are all consecutive, like a workflow, and I want to be able to address them in order via an array... like this... var person : Person = new Person(); person.wakeup = new Date();person.breakfast = new Date();person.lunch = new Date();person.dinner = null;person.bedtime = null; var timeArr : Array = new Array(); timeArr[0] = person.wakeup;timeArr[1] = person.breakfast;timeArr[2] = person.lunch;timeArr[3] = person.dinner;timeArr[4] = person.bedtime; Then some other code figures out where we are in the flow of the day's events... var status : int; if (some criteria) { event = 2; } But I determine lunch hasn't actually happened yet, so it shouldn't have a Date yet. I need to blank out this value that was previously set in the Person object... if (some criteria) { timeArr[event] = null; } But since these references don't seem to propogate backwards, nulling one of the array elements doesn't affect the original property. That's the *whole purpose* of reference vs value... a reference is a pointer to memory space... so if I null that memory space it should affect all the vars pointing to that memory space. Does that make more sense?Darren To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Thu, 17 Jul 2008 11:30:29 +1000Subject: Re: [flexcoders] Array reference vs values When you do this: var date:Date = new Date();You're creating an instance of Date and a reference to it named date.When you do this: var ref:Date = arr[0] as Date;You're creating another reference to the same instance, this time your reference is named ref. So when you set ref = null, you're making ref point to nothing. date and arr[0] remain unchanged. You don't need to, nor can you remove the date instance created above. That's the job of the garbage collector.-Josh On Thu, Jul 17, 2008 at 11:25 AM, Darren Houle [EMAIL PROTECTED] wrote:
RE: [flexcoders] Array reference vs values
Josh Okay, so here's what I did... var person : Person = new Person(); person.wakeup = new Date();person.breakfast = new Date();person.lunch = new Date();person.dinner = null;person.bedtime = null; var wfArr : Array = new Array(); timeArr[0] = wakeup;timeArr[1] = breakfast;timeArr[2] = lunch;timeArr[3] = dinner;timeArr[4] = bedtime; var event : int;if (some criteria) { event = 2; } if (some criteria) { person[timeArr[event]] = null; }and it works... person.lunch... aka person[lunch]... was set to null... thanks, you rock!! Darren To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Thu, 17 Jul 2008 12:18:35 +1000Subject: Re: [flexcoders] Array reference vs values On Thu, Jul 17, 2008 at 11:55 AM, Darren Houle [EMAIL PROTECTED] wrote: Josh Yes, what you're describing is exactly what I described and is, in fact, what it happening... but to say I don't ever need to do this? Well... yes... I need to do this... and it has nothing to do with the garbage collector. Here, let me explain in another way I have a custom object... lets say it's a Person object. It has various properties, but several are Date types. These are all consecutive, like a workflow, and I want to be able to address them in order via an array... like this... var person : Person = new Person(); person.wakeup = new Date();person.breakfast = new Date();person.lunch = new Date();person.dinner = null;person.bedtime = null; var timeArr : Array = new Array(); timeArr[0] = person.wakeup;timeArr[1] = person.breakfast;timeArr[2] = person.lunch;timeArr[3] = person.dinner;timeArr[4] = person.bedtime; Then some other code figures out where we are in the flow of the day's events... var status : int;if (some criteria) { event = 2; } But I determine lunch hasn't actually happened yet, so it shouldn't have a Date yet. I need to blank out this value that was previously set in the Person object... if (some criteria) { timeArr[event] = null; } But since these references don't seem to propogate backwards, nulling one of the array elements doesn't affect the original property. That's the *whole purpose* of reference vs value... a reference is a pointer to memory space... so if I null that memory space it should affect all the vars pointing to that memory space. Does that make more sense?DarrenI think so. But you're definitely going about it the wrong way - hear me out:In ECMAScript, you can access any public field by indexing its name as a string. Now assuming person has these fields, and you want to be able to access them (and mess with them) in order. There's a few ways to do this:const fieldOrder : Array = ['wakeup','breakfast','lunch','dinner', 'bedtime', ];Then you can do this:trace(myPerson.lunch); // == date.toString()myPerson[fieldOrder[2]] = null;trace(myPerson.lunch); // == nullBut while you can mute that instance of date, you can't delete it. It defeats the purpose of garbage collection (and probably makes it a lot harder to implement).If say, myPerson is *dynamic* either by the dynamic keyword on the class definition, or because it's created with {} instead of new ClassName(), you can also do thisdelete myPerson[fieldOrder[2]];trace(myPerson.lunch); // === undefined, or an exception is thrown depending on various conditions of myPerson :)This will completely remove the lunch field from the myPerson instance, but the Date instance itself will still be sitting around waiting for garbage collection.-Josh-- Therefore, send not to know For whom the bell tolls. It tolls for thee.:: Josh 'G-Funk' McDonald:: 0437 221 380 :: [EMAIL PROTECTED]
[flexcoders] Code for preventing browser caching of SWF
I'm trying to stop the client's browser from caching my flex app swf so that each time they call the html wrapper they get the latest swf. I've found some suggestions out there for accomplishing this, and I think adding the myapp.swf?build=12341234 (some timestamp) solution looks cleanest, but I was wondering... Has anyone modified their index.template.html wrapper so that each time you compile your app it auto-generates and appends that random (or time based) number like this? Anyone know if there's an example out there I can look at? It would be nice if this was automatic and I didn't have to implant a new number in the wrapper each time by hand. Thanks Darren
[flexcoders] Opening CFM disguised as Flashpaper SWF
Not purely a Flex question, but came up as a result of building a Flex reporting component... Using IE 6.0.2... When I download http://myserver.com/index.htm with a SWF embedded in the HTML Flash works fine and runs the embedded SWF in the browser. When I download http://myserver/filename.swf Flash also works fine and runs the SWF in the browser. But when I download http://myserver/reportwrapper.cfm?rpt=1 which contains cfreport template=#url.rpt#.cfr format=flashpaper IE prompts me with a popup dialog box that says: File name: reportwrapper.cfm File type: Shockwave Flash Object From: myserver.com Would you like to open it or save it to your computer? Why is it that filename.swf will trigger the Flash browser plugin but a CFM that has a Shockwave Flash Object mime type won't? Is IE confused because the file ext doesn't match the mime type? Is there a fix or workaround for this? Something i can do in Coldfusion to re-set the mime type to something else, or set content headers first, or something? Doesn't seem to do this in IE 7, but I have some IE 6 browsers in my organization and need to figure out a way to handle this. Thanks Darren
[flexcoders] FlashPaperLoader Crashes Browser!
I'm using Darron Schall's FlashPaperLoader to load cfr's into a flex app. Works great (thanks Darron!) for the first report, but when I load the second report the entire browser crashes. Do I need to explicitly unload the first Flashpaper swf before loading the next? How? Are there other known gotchas with Flashpaper swfs crashing things? Using SWFLoader by itself isn't an option because it won't size properly, so I really need to figure out why FlashPaperLoader is crashing things and correct it! Help?! Darren
RE: [flexcoders] FDS / CF Endpoints
Yes, I have a * crossdomain policy in place (on both servers, just in case.) Darren To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Wed, 18 Apr 2007 17:59:54 -0300Subject: Re: [flexcoders] FDS / CF EndpointsDarrenDid you configuration of your app crossdomain.xml to allow this thing?Regards. On 4/18/07, Darren Houle [EMAIL PROTECTED] wrote: I'm building an FDS app but instead of defining an assembler.class, dao.class, and customobject.class on the FDS server in Java I'm defining them on a ColdFusion server using CFCs. I'm following Tom Jordahl's article located here: http://www.adobe.com/devnet/flex/articles/coldfusionflex_part1_02.html But, while Tom is running both FDS and CF on a single physical server, I have two separate physical servers... http://srv1.mydomain.com (FDS with integrated JRun)http://srv2.mydomain.com (ColdFusion Ent 7.0.2) My Flex client is being served out to the browser from SRV1 (the FDS server) and I have ObjAssembler.cfc, ObjDAO.cfc, and Obj.cfc on SRV2 (the ColdFusion server) In my Flex client I define a DataService to manage my Obj's in a simple grid just to test that it's all wired correctly, but it's not working. I believe my problem is that I have my endpoints defined incorrectly in the services-config.xml that resides on SRV1 (the FDS server) In Tom's article he says to just use... endpoint uri=rtmp://{server.name}:2048 class=flex.messaging.endpoints.RTMPEndpoint/endpoint uri=http://{server.name}:{server.port}/{context.root}/messagebroker/cfamfpolling; class=flex.messaging.endpoints.AMFEndpoint/ But since my CF server is physically separate I changed these endpoints toendpoint uri=rtmp://srv2.mydomain.com:2048 class=flex.messaging.endpoints.RTMPEndpoint/endpoint uri=http://srv2.mydomain.com:{server.port}/messagebroker/cfamfpolling; class= flex.messaging.endpoints.AMFEndpoint/ But it does not work. No errors, it just doesn't ds.fill() or anything. Are these endpoints supposed to point to the CF server (SRV2)... or one to the CF server and one to the FDS server... or to the FDS server (SRV1)? How do I know what port to specify for the AMFEndpoint? How does the whole messagebroker/cfamfpolling path work when there's nothing under there? I'm pretty lost when it comes to configuring endpoints in general. Thanks!Darren-- Igor Costawww.igorcosta.orgwww.igorcosta.comskype: igorpcosta
RE: [flexcoders] FDS / CF Endpoints
Peter I was just following Tom's article, which specifies you add the following to your FDS services-config.xml !-- ColdFusion specific RTMP channel --channel-definition id=cf-dataservice-rtmp class=mx.messaging.channels.RTMPChannel endpoint uri=rtmp://{server.name}:2048 class=flex.messaging.endpoints.RTMPEndpoint/ properties idle-timeout-minutes20/idle-timeout-minutes serialization!-- This must be turned off for any CF channel -- instantiate-typesfalse/instantiate-types /serialization /properties/channel-definition!-- ColdFusion specific HTTP channel --channel-definition id=cf-polling-amf class=mx.messaging.channels.AMFChannel endpoint uri=http://{server.name}:{server.port}/{context.root}/messagebroker/cfamfpolling; class=flex.messaging.endpoints.AMFEndpoint/ properties serialization !-- This must be turned off for any CF channel -- instantiate-typesfalse/instantiate-types/serialization polling-enabledtrue/polling-enabled polling-interval-seconds8/polling-interval-seconds /properties/channel-definition Tom appears to be running both FDS and CF on the same physical server, so he's left {server.name} in the endpoint. I need to know whether that changes - as well as {server.port} - when you're running CF on a different server than your FDS server. Also, he's specified /{context.root}/messagebroker/cfamfpolling as the AMF endpoint path, and that apparently works in his example app. If this needs to change I have no idea what to change it too. There's no mention in his article (or anywhere else I can find) of how to modify these endpoints for any other server configuration when running FDS and CF on separate boxes. Darren To: flexcoders@yahoogroups.com From: [EMAIL PROTECTED] Date: Thu, 19 Apr 2007 07:36:33 -0700 Subject: RE: [flexcoders] FDS / CF Endpoints Is there really a servlet mapping in your ColdFusion web application's /WEB-INF/web.xml file on your srv2.mydomain.com site that is /messagebroker/*? I think ColdFusion uses /flex2gateway/* instead of /messagebroker/* for their message broker servlet mapping.
RE: [flexcoders] FDS / CF Endpoints
Igor Not sure what other details you need, I thought I covered pretty much everything. Anything else that's missing is basically the information I'm looking for :-) My Flex client is served up from SRV1 (the FDS server). It contains the following... --- mx:DataService id=TransferCenterDS destination=cftransfer / --- That destination is defined in the FDS services-config.xml... --- services service id=data-service class=flex.data.DataService messageTypes=flex.data.messages.DataMessage adapters adapter-definition id=coldfusion-dao class=coldfusion.flex.CFDataServicesAdapter/ /adapters destination id=cftransfer adapter ref=coldfusion-dao/ channels channel ref=cf-dataservice-rtmp/ channel ref=cf-polling-amf/ /channels properties componentapplications.flex.transfer-center.cf.TransferAssembler/component scoperequest/scope metadataidentity property=TransferId/ /metadata /properties /destination /service/services --- These two CF specific channels are also defined in the FDS services-config.xml like this (but here's where I'm having endpoint woes)... --- channel-definition id=cf-dataservice-rtmp class=mx.messaging.channels.RTMPChannelendpoint uri=rtmp://srv2.mydomain.com:2048 class=flex.messaging.endpoints.RTMPEndpoint/properties idle-timeout-minutes20/idle-timeout-minutes serialization instantiate-typesfalse/instantiate-types /serialization /properties /channel-definition channel-definition id=cf-polling-amf class=mx.messaging.channels.AMFChannelendpoint uri=http://srv2.mydomain.com:{server.port}/messagebroker/cfamfpolling; class=flex.messaging.endpoints.AMFEndpoint/properties serialization instantiate-typesfalse/instantiate-types /serialization polling-enabledtrue/polling-enabled polling-interval-seconds8/polling-interval-seconds/properties /channel-definition--- My Flex client also contains an ArrayCollection... --- mx:ArrayCollection id=TransferCenterAC / --- There is also a datagrid that has a dataprovider bound to this ArrayCollection. --- mx:DataGrid id=junkDG width=98% height=50% dataProvider={TransferCenterAC} mx:columns mx:DataGridColumn headerText=ID dataField=TransferId/ mx:DataGridColumn headerText=Transfer Agency dataField=TransferInfo_AgencyCB/ . /mx:columns/mx:DataGrid--- I also have a test button... --- mx:Button label=Fill click=TransferCenterDS.fill(TransferCenterAC);/--- I don't know what other information I could give you. There's not much to it. Problem is that no matter what I use for endpoints I always seem to get one type of communication error message or another. There's too many combinations of endpoints and errors to list here. All I'm really looking for is an article or blog that talks about endpoints and channels and possibly describes how they can be configured in a distributed architecture such as mine. It's surprising it's not already out there as Flex, FDS, and CF are all supposed to work together so nicely. You'd think there'd be more information on how to set the three up in a distributed way. You can find tons of tutorials on FDS using java assembler, dao, and object classes, but almost nothing on using CFCs on a CF server running on a separate physical server. Thanks Darren To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Thu, 19 Apr 2007 12:10:59 -0300Subject: Re: [flexcoders] FDS / CF EndpointsGive more detailswith the information you sent me it's very limitated to understand what you're looking for.Regards. On 4/19/07, Darren Houle [EMAIL PROTECTED] wrote: Yes, I have a * crossdomain policy in place (on both servers, just in case.) Darren To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Wed, 18 Apr 2007 17:59:54 -0300 Subject: Re: [flexcoders] FDS / CF EndpointsDarrenDid you configuration of your app crossdomain.xml to allow this thing?Regards. On 4/18/07, Darren Houle [EMAIL PROTECTED] wrote: I'm building an FDS app but instead of defining an assembler.class, dao.class, and customobject.class on the FDS server in Java I'm defining them on a ColdFusion server using CFCs. I'm following Tom Jordahl's article located here: http://www.adobe.com/devnet/flex/articles/coldfusionflex_part1_02.html But, while Tom is running both FDS and CF on a single physical server, I have two separate physical servers... http://srv1.mydomain.com (FDS with integrated JRun)http://srv2.mydomain.com (ColdFusion Ent 7.0.2) My Flex client is being served out to the browser from SRV1 (the FDS server) and I have ObjAssembler.cfc, ObjDAO.cfc, and Obj.cfc on SRV2 (the ColdFusion server) In my Flex client I define a DataService to manage my Obj's in a simple grid just to test that it's all wired correctly, but it's not working. I believe my problem is that I have my endpoints
RE: [flexcoders] FDS / CF Endpoints
If you are just using FDS with CF and they run in different servers you'll have to define a hostname property to tell FDS where to find CF (I think, it's in the resource config folder, check the data-management-config.xml to check the exact property). This property must be defined in each destination you'll create. João, yes, from what I understand that's what the... !-- ColdFusion specific RTMP channel --channel-definition id=cf-dataservice-rtmp class=mx.messaging.channels.RTMPChannelendpoint uri=rtmp://{server.name}:2048 class=flex.messaging.endpoints.RTMPEndpoint/ and !-- ColdFusion specific HTTP channel --channel-definition id=cf-polling-amf class=mx.messaging.channels.AMFChannelendpoint uri=http://{server.name}:{server.port}/{context.root}/messagebroker/cfamfpolling; class=flex.messaging.endpoints.AMFEndpoint/ sections are for in the services-config.xml Channels definition. Tom says to add them to the services-config.xml because all the standard FDS channel definitions are already in there... but you need to add the CF channels so FDS can talk to the CF server. I've done that, my problem is that I can't seem to get the CF endpoints right. What is /messagebroker/cfamfpolling and how do I know what port it's running on? There's nothing in Tom's article syaing you need to go into CFIDE and turn anything on, so...? Also the messaging gateway have something similar that is the allowedIP addresses (CF servers) to connect and send messages to that destination. Not sure if you mean the crossdomain file... I have that. If you mean something else then maybe you could be more specific? In the CFIDE there are checkboxes to let FDS talk to CF... those are checked. There's also an IP listed in the allow box so CF will allow the FDS server in, so... are you talking about something else? So if you serve your FDS app from the FDS server, just let {server.name} where it was since it will resolve at runtime to server1.yourdomain.com and connect to FDS... Yes, that's fine for the standard FDS channel definitions... but you need correct endpoints for the CF channels. The EndPoint must target always FDS and never CF. Yes, the FDS endpoints target FDS... but the CF endpoints must be set correctly for FDS to find CF... that's where I'm having a problem. It's supposed to be cut n paste when the CF server is on the same box as the FDS server, but when it's not... then what? Thanks! Darren
[flexcoders] FDS / CF Endpoints
I'm building an FDS app but instead of defining an assembler.class, dao.class, and customobject.class on the FDS server in Java I'm defining them on a ColdFusion server using CFCs. I'm following Tom Jordahl's article located here: http://www.adobe.com/devnet/flex/articles/coldfusionflex_part1_02.html But, while Tom is running both FDS and CF on a single physical server, I have two separate physical servers... http://srv1.mydomain.com (FDS with integrated JRun) http://srv2.mydomain.com (ColdFusion Ent 7.0.2) My Flex client is being served out to the browser from SRV1 (the FDS server) and I have ObjAssembler.cfc, ObjDAO.cfc, and Obj.cfc on SRV2 (the ColdFusion server) In my Flex client I define a DataService to manage my Obj's in a simple grid just to test that it's all wired correctly, but it's not working. I believe my problem is that I have my endpoints defined incorrectly in the services-config.xml that resides on SRV1 (the FDS server) In Tom's article he says to just use... endpoint uri=rtmp://{server.name}:2048 class=flex.messaging.endpoints.RTMPEndpoint/ endpoint uri=http://{server.name}:{server.port}/{context.root}/messagebroker/cfamfpolling; class=flex.messaging.endpoints.AMFEndpoint/ But since my CF server is physically separate I changed these endpoints to endpoint uri=rtmp://srv2.mydomain.com:2048 class=flex.messaging.endpoints.RTMPEndpoint/endpoint uri=http://srv2.mydomain.com:{server.port}/messagebroker/cfamfpolling; class=flex.messaging.endpoints.AMFEndpoint/ But it does not work. No errors, it just doesn't ds.fill() or anything. Are these endpoints supposed to point to the CF server (SRV2)... or one to the CF server and one to the FDS server... or to the FDS server (SRV1)? How do I know what port to specify for the AMFEndpoint? How does the whole messagebroker/cfamfpolling path work when there's nothing under there? I'm pretty lost when it comes to configuring endpoints in general. Thanks! Darren
[flexcoders] Programmatically Define Service Adapter
I've found AS code examples for dynamically/programmatically defining channel sets, channels, RemoteObjects, endpoint URI's, etc for RPC services at runtime... but nowhere can I find an example of someone defining/selecting an adapter (adapter-definition) to use. IE the JavaAdapter, ColdfusionAdapter, etc. Anyone know how to do this or where to find an AS code example? Thanks! Darren
RE: [flexcoders] FDS to CF RemoteObject
Probably the easiest thing to do is to setup a crossdomain.xml file on your CF server. This should be setup to allow SWFs hosted on your FDS server to make connections to CF. I didn't think I needed a crossdomain file if the FDS server and CF server were running on localhost:8700 and localhost:80 ...? For the CF side of things, you can probably leave the configuration with its defaults. You just need to take a look at the endpoint uri attribute in the channel-definition and then set that as the endpoint attribute on the mx:RemoteObject tag, and then consider the remoting service destination. You can either create your own destination or rely on the default ColdFusion destination Well, when I copy the service tags from the services-config on my CF server (which works) to the services-config on my FDS server, I get the following in the FDS console window... 03/16 12:40:25 error Could not pre-load servlet: MessageBrokerServlet [1]flex.messaging.MessageException: Cannot create class of type 'coldfusion.flash.messaging.ColdFusionAdapter'. Type 'coldfusion.flash.messaging.ColdFusionAdapter' not found. but... if I change the adapter type from the coldfusion.flash.messaging.ColdFusionAdapter to the flex.messaging.services.remoting.adapters.JavaAdapter I get cannot create class of type transfer_center.cf.transfer_center returned in the RO call's event.fault.faultString (the path to my CFC is localhost\transfer_center\cf\transfer_center.cfc) Can't you use the ColdFusion adapter when the Flex client is compiled and served from the FDS server? Darren From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darren Houle Sent: Thursday, March 15, 2007 7:41 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] FDS to CF RemoteObject Peter, Awesome advice, yes, I've found several reasons I'd rather do it programatically. Thanks! But... my question still remains what channel(s), adapter(s), and destination setting(s) do I use (xml or programatically) to have my Flex client, served from an FDS server, call ROs on a paralell CF Ent server? Darren From: Peter Farland [EMAIL PROTECTED] mailto:pfarland%40adobe.com Reply-To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: RE: [flexcoders] FDS to CF RemoteObject Date: Thu, 15 Mar 2007 13:32:43 -0700 In FDS 2.0.1 and CF 7.0.2 I would use the services-config.xml for the new Flex Data Management stuff, and just programmatically create a ChannelSet for my RemoteObject and avoid channel configuration for this simpler use case. For RPC services like RemoteObject, compiling against a config file is only meant to be a convenience so that the compiler will generate some code for you to create a matching ChannelSet for a destination... you can always just do this yourself in ActionScript. Pete From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Darren Houle Sent: Thursday, March 15, 2007 3:56 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] FDS to CF RemoteObject I have built a Flex app that loads from the CF server and successfully calls a RemoteObject (CFC) back on that same CF server. I'm using the basic ColdFusion destination in the services-config.xml which looks like... channels channel-definition id=my-cfamf class=mx.messaging.channels.AMFChannel endpoint uri=http://{server.name}:{server.port}/{context.root}/flex2gateway/; class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled serialization instantiate-typesfalse/instantiate-types /serialization /properties /channel-definition /channels services service id=coldfusion-flashremoting-service class=flex.messaging.services.RemotingService messageTypes=flex.messaging.messages.RemotingMessage adapters adapter-definition id=cf-object class=coldfusion.flash.messaging.ColdFusionAdapter default=true/ /adapters destination id=ColdFusion channels channel ref=my-cfamf/ /channels properties source*/source access use-mappingsfalse/use-mappings method-access-levelremote/method-access-level /access property-case force-cfc-lowercasefalse/force-cfc-lowercase force-query-lowercasefalse/force-query-lowercase force-struct-lowercasefalse/force-struct-lowercase /property-case /properties /destination /service /services That works fine, but I have just installed FDS w/integrated Jrun on the same physical box CF Enterprise is running on. What I need to do is move this Flex app to the newly installed FDS server so that I can add Data Management functionality to the app, but I want the app to also continue using that existing RemoteObject call. I realize I can't use the same CF channel or service definitions
[flexcoders] FDS to CF RemoteObject
I have built a Flex app that loads from the CF server and successfully calls a RemoteObject (CFC) back on that same CF server. I'm using the basic ColdFusion destination in the services-config.xml which looks like... channels channel-definition id=my-cfamf class=mx.messaging.channels.AMFChannel endpoint uri=http://{server.name}:{server.port}/{context.root}/flex2gateway/; class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled serialization instantiate-typesfalse/instantiate-types /serialization /properties /channel-definition /channels services service id=coldfusion-flashremoting-service class=flex.messaging.services.RemotingService messageTypes=flex.messaging.messages.RemotingMessage adapters adapter-definition id=cf-object class=coldfusion.flash.messaging.ColdFusionAdapter default=true/ /adapters destination id=ColdFusion channels channel ref=my-cfamf/ /channels properties source*/source access use-mappingsfalse/use-mappings method-access-levelremote/method-access-level /access property-case force-cfc-lowercasefalse/force-cfc-lowercase force-query-lowercasefalse/force-query-lowercase force-struct-lowercasefalse/force-struct-lowercase /property-case /properties /destination /service /services That works fine, but I have just installed FDS w/integrated Jrun on the same physical box CF Enterprise is running on. What I need to do is move this Flex app to the newly installed FDS server so that I can add Data Management functionality to the app, but I want the app to also continue using that existing RemoteObject call. I realize I can't use the same CF channel or service definitions in the FDS services-config.xml, but what do I use? I've tried many unsuccessful combinations including... channels channel-definition id=cf-amf class=mx.messaging.channels.AMFChannel endpoint uri=http://localhost/{context.root}/messagebroker/amf; class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled /properties /channel-definition /channels services service id=remoting-service class=flex.messaging.services.RemotingService messageTypes=flex.messaging.messages.RemotingMessage adapters adapter-definition id=java-object class=flex.messaging.services.remoting.adapters.JavaAdapter default=true/ /adapters default-channels channel ref=cf-amf/ /default-channels destination id=TransferCenterAuth properties source*/source scoperequest/scope /properties /destination /service /services Is there a simple solution for using RO's in FDS when redirecting them to a parallel CF server, or do I have to set up all kinds of complicated channels, destinations, and messaging gateways on both servers just to call a RO? Thanks! Darren
RE: [flexcoders] FDS to CF RemoteObject
Peter, Awesome advice, yes, I've found several reasons I'd rather do it programatically. Thanks! But... my question still remains what channel(s), adapter(s), and destination setting(s) do I use (xml or programatically) to have my Flex client, served from an FDS server, call ROs on a paralell CF Ent server? Darren From: Peter Farland [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] FDS to CF RemoteObject Date: Thu, 15 Mar 2007 13:32:43 -0700 In FDS 2.0.1 and CF 7.0.2 I would use the services-config.xml for the new Flex Data Management stuff, and just programmatically create a ChannelSet for my RemoteObject and avoid channel configuration for this simpler use case. For RPC services like RemoteObject, compiling against a config file is only meant to be a convenience so that the compiler will generate some code for you to create a matching ChannelSet for a destination... you can always just do this yourself in ActionScript. Pete From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darren Houle Sent: Thursday, March 15, 2007 3:56 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] FDS to CF RemoteObject I have built a Flex app that loads from the CF server and successfully calls a RemoteObject (CFC) back on that same CF server. I'm using the basic ColdFusion destination in the services-config.xml which looks like... channels channel-definition id=my-cfamf class=mx.messaging.channels.AMFChannel endpoint uri=http://{server.name}:{server.port}/{context.root}/flex2gateway/; class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled serialization instantiate-typesfalse/instantiate-types /serialization /properties /channel-definition /channels services service id=coldfusion-flashremoting-service class=flex.messaging.services.RemotingService messageTypes=flex.messaging.messages.RemotingMessage adapters adapter-definition id=cf-object class=coldfusion.flash.messaging.ColdFusionAdapter default=true/ /adapters destination id=ColdFusion channels channel ref=my-cfamf/ /channels properties source*/source access use-mappingsfalse/use-mappings method-access-levelremote/method-access-level /access property-case force-cfc-lowercasefalse/force-cfc-lowercase force-query-lowercasefalse/force-query-lowercase force-struct-lowercasefalse/force-struct-lowercase /property-case /properties /destination /service /services That works fine, but I have just installed FDS w/integrated Jrun on the same physical box CF Enterprise is running on. What I need to do is move this Flex app to the newly installed FDS server so that I can add Data Management functionality to the app, but I want the app to also continue using that existing RemoteObject call. I realize I can't use the same CF channel or service definitions in the FDS services-config.xml, but what do I use? I've tried many unsuccessful combinations including... channels channel-definition id=cf-amf class=mx.messaging.channels.AMFChannel endpoint uri=http://localhost/{context.root}/messagebroker/amf; class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled /properties /channel-definition /channels services service id=remoting-service class=flex.messaging.services.RemotingService messageTypes=flex.messaging.messages.RemotingMessage adapters adapter-definition id=java-object class=flex.messaging.services.remoting.adapters.JavaAdapter default=true/ /adapters default-channels channel ref=cf-amf/ /default-channels destination id=TransferCenterAuth properties source*/source scoperequest/scope /properties /destination /service /services Is there a simple solution for using RO's in FDS when redirecting them to a parallel CF server, or do I have to set up all kinds of complicated channels, destinations, and messaging gateways on both servers just to call a RO? Thanks! Darren
Re: [flexcoders] FDS services-config for CFC's
From: Tom Chiverton [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] FDS services-config for CFC's Date: Fri, 9 Mar 2007 14:34:19 + On Friday 09 Mar 2007, Darren Houle wrote: You don't install FDS on Coldfusion 7.0.2, it includes built in support for FDS with CFCs It does ?!? You're not confusing FDS with plain Remoting are you ? I don't think so. In the 7.0.2 CFIDE (CF Administrator) if you click Data Services and then Flex Integration you get a page with several settings. There are two checkboxes at the very top... Enable Flash Remoting support This enables a Flash client to connect to this ColdFusion server and invoke ColdFusion Components (CFCs). If you are not using this feature, it is recommended that it be disabled. Enable Flex Data Management support This enables Flex Data Services to connect to this ColdFusion server and use ColdFusion Components (CFCs) as the implementation for the reading and updating of data that supports a Flex application. If you are not using this feature, it is recommended that it be disabled. and the CFIDE help file for this admin page adds this... Enable Flash Remoting support Specifies whether to enable Flash clients to connect to this ColdFusion server and invoke methods in ColdFusion components (CFCs). Enable Flex Data Management support Specifies whether to enable a Flex Data Services server to connect to this ColdFusion server and invoke methods in CFCs to fill, sync, get, or count records in a result set used in a Flex application. I see fill and Flex Data Services and CFC's, so... If I'm misunderstanding something then someone *please* correct me. Is FDS in there already, or does this just allow CF to talk to an FDS app but you still have to install something somewhere? From what I understand CF is a big java app that can be installed on an existing instance of JRun, or else by default CF installs on a bare server with it's own internal JRun, so... if you wanted to install FDS express on CF you wouldn't use the integrated JRun version because then you'd have two JRun's... but you could install FDS as a J2EE app on your existing JRun... IF... the CFIDE didn't have those checkboxes under Flex Integration to confuse things. So... I'm *assuming* I can use the Flex Builder Extensions to view RDS, select a database and table, click Generate CFCs, create the assembler, dao, and bean, drop them in my CF site, enable the FDS checkbox in CFIDE, and then... what? I need to map some things in the services-config.xml file. Do I specify an adapter? or just the service-to-assembler cfc path? *Something* has to be mapped, right? If I could just get an example / sample services-config.xml where someone is using FDS with CF CFCs I'd be fine. Darren
Re: [flexcoders] FDS services-config for CFC's
Okay, but... install it how, where? Not using the integrated JRun server, right, because CF is already running on an app server, right? So where do you unpack the fds war file? Into which directory under the CF Enterprise install? Darren From: João Fernandes [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] FDS services-config for CFC's Date: Fri, 09 Mar 2007 16:06:06 + Data management option in the CF admin is just to allow CF to be contacted by a FDS server. No FDS is integrated with CF. Install FDS express and look at those resources/config folder that I mentioned before. There is everything you'll need. João Fernandes -- 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 Yahoo! Groups Sponsor ~-- Great things are happening at Yahoo! Groups. See the new email design. http://us.click.yahoo.com/lOt0.A/hOaOAA/yQLSAA/nhFolB/TM ~- -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
[flexcoders] FDS services-config for CFC's
There seems to be lots of services-config.xml samples out there for defining FDS destinations using the java and hibernate adapters, but I can't seem to find a sample that details how to define an FDS destination when using CFC's as your assembler/dao/bean. Does anyone know where I could find one? Thanks Darren
Re: [flexcoders] FDS services-config for CFC's
You don't install FDS on Coldfusion 7.0.2, it includes built in support for FDS with CFCs, but there's no instructions or sample files anywhere that describe how to configure the services-config.xml destination or what (if any) adapter to use. Darren From: João Fernandes [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] FDS services-config for CFC's Date: Thu, 08 Mar 2007 22:33:22 + Darren, When you install FDS you'll get a resource folder, inside you have what you're looking for. João Fernandes -- 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 Yahoo! Groups Sponsor ~-- Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/kOt0.A/gOaOAA/yQLSAA/nhFolB/TM ~- -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
[flexcoders] FDS and single items
I am developing my first FDS application. It's small, and basically just a big form comprised of about 75 fields; radio groups, comboboxes, text inputs, etc. Each time a new form is submitted it creates one row in a large table. The form can be retreived and edited later, which just updates the values in that existing row. Since two or three people can have the same form (record) open at the same time, I would like to use FDS to manage the data and stop them from overwriting each other when they click save but... the FDS documentation and tutorials state in several places that you can only manage ArrayCollections of objects. Problem is that in my case I couldn't possibly pull over 3000 records into an ArrayCollection, it would be too big and slow. Is there a way to retreive and manage a single custom object containing a single form/record instead of an entire ArrayCollection of objects? Any examples or tutorials out there showing how to do this? Could I possibly use some function to identify select a single record, and then pull that one record over into an ArrayCollection that FDS would manage? That seems a little cumbersome. Darren
[flexcoders] ChangeWatcher inside Cairngorm ModelLocator
I'm building a Cairngorm app and trying to use a ChangeWatcher in the ModelLocator, but I can't seem to get it to work. In the ModelLocator, I create a few vars like normal, and then in the Constructor I call initDefaults() that inits all the app vars (handy for when the user logs out and then logs right back in, it's an easy way to reset everything at login.) Anyway, after initDefaults() completes there should be a ChangeWatcher attached to the ArrayCollection's source, which is empty at init, but when I later fire an RPC to get data and populate the ArrayCollection (which works fine) the ChangeWatcher doesn't see it... I never make it into watcherHandler() even though the source of the ArrayCollection changes. What am I doing wrong? Am I missing something obvious? Thanks! Darren package org.myCompany.myApp.model { import com.adobe.cairngorm.model.ModelLocator; import mx.collections.ArrayCollection; import mx.binding.utils.ChangeWatcher; import mx.events.PropertyChangeEvent; [Bindable] public class AppModelLocator implements ModelLocator { private static var modelLocator : AppModelLocator; public var qAcctVO : ArrayCollection; public var myQWatcher : ChangeWatcher; // singleton public static function getInstance() : AppModelLocator { if ( modelLocator == null ) modelLocator = new AppModelLocator(); return modelLocator; } // constructor public function AppModelLocator() { if ( modelLocator != null ) throw new Error( Only one ModelLocator instance can be instantiated ); // init model vars initDefaults(); } // run when constructed and from subsequent LoginCommand calls public function initDefaults() : void { qAcctVO = new ArrayCollection(); myQWatcher = ChangeWatcher.watch(qAcctVO, source, watcherHandler); } // changewatcher should fire this function when ArrayCollection changes public function watcherHandler(event:PropertyChangeEvent):void { // do something } } } -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
RE: [flexcoders] ChangeWatcher inside Cairngorm ModelLocator
Okay, so I think I see that you can't use a ChangeWatcher to simply watch for a change to an ArrayCollection, you use a ChangeWatcher to watch a binding, so... I use BindingUtils to create a binding between the ArrayCollection source property and a ModelLocator dummy property. Then I create a ChangeWatcher to watch that new binding. public var qAcctVO : ArrayCollection; public var qDummy : Array; public var qBinding : ChangeWatcher; public var qWatcher : ChangeWatcher; public function initDefaults() : void { qAcctVO = new ArrayCollection(); qBinding = BindingUtils.bindProperty(this, qDummy, qAcctVO, source); qWatcher = ChangeWatcher.watch(this, qDummy, watchHandler); } Although that now seems to make perfect sense to me, it still doesn't work... it never runs watchHandler() even when the debugger shows the source property change. Anyone? Darren From: Darren Houle [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] ChangeWatcher inside Cairngorm ModelLocator Date: Fri, 15 Sep 2006 10:59:45 -0400 I'm building a Cairngorm app and trying to use a ChangeWatcher in the ModelLocator, but I can't seem to get it to work. In the ModelLocator, I create a few vars like normal, and then in the Constructor I call initDefaults() that inits all the app vars (handy for when the user logs out and then logs right back in, it's an easy way to reset everything at login.) Anyway, after initDefaults() completes there should be a ChangeWatcher attached to the ArrayCollection's source, which is empty at init, but when I later fire an RPC to get data and populate the ArrayCollection (which works fine) the ChangeWatcher doesn't see it... I never make it into watcherHandler() even though the source of the ArrayCollection changes. What am I doing wrong? Am I missing something obvious? Thanks! Darren package org.myCompany.myApp.model { import com.adobe.cairngorm.model.ModelLocator; import mx.collections.ArrayCollection; import mx.binding.utils.ChangeWatcher; import mx.events.PropertyChangeEvent; [Bindable] public class AppModelLocator implements ModelLocator { private static var modelLocator : AppModelLocator; public var qAcctVO : ArrayCollection; public var myQWatcher : ChangeWatcher; // singleton public static function getInstance() : AppModelLocator { if ( modelLocator == null ) modelLocator = new AppModelLocator(); return modelLocator; } // constructor public function AppModelLocator() { if ( modelLocator != null ) throw new Error( Only one ModelLocator instance can be instantiated ); // init model vars initDefaults(); } // run when constructed and from subsequent LoginCommand calls public function initDefaults() : void { qAcctVO = new ArrayCollection(); myQWatcher = ChangeWatcher.watch(qAcctVO, source, watcherHandler); } // changewatcher should fire this function when ArrayCollection changes public function watcherHandler(event:PropertyChangeEvent):void { // do something } } } -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
RE: [flexcoders] ChangeWatcher inside Cairngorm ModelLocator
Okay, that's downright annoying. I got it to work by doing the opposite of what the documentation says to do. I'm not binding to property to property, I'm binding object to object... public var qAcctVO : ArrayCollection; public var qDummy : Array; public var qBinding : ChangeWatcher; public var qWatcher : ChangeWatcher; public function initDefaults() : void { qAcctVO = new ArrayCollection(); qBinding = BindingUtils.bindProperty(this, qDummy, this, qAcctVO); qWatcher = ChangeWatcher.watch(this, qDummy, watchHandler); } The documentation for bindProperty() says Binds a public property prop on the site:Object, to a bindable property or property chain. The constructor requires a site property to be bound to a host property. It also says that you'll know the properties you can bind to because they'll say This property can be used as the source for data binding. Nowhere does can I find where it says you can just bind a site Obj to a host Obj. Not only that but binding the AC.source property to another AC.source property didn't even work, as the documentation would have you believe. What's up with this? Darren From: Darren Houle [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] ChangeWatcher inside Cairngorm ModelLocator Date: Fri, 15 Sep 2006 10:59:45 -0400 I'm building a Cairngorm app and trying to use a ChangeWatcher in the ModelLocator, but I can't seem to get it to work. In the ModelLocator, I create a few vars like normal, and then in the Constructor I call initDefaults() that inits all the app vars (handy for when the user logs out and then logs right back in, it's an easy way to reset everything at login.) Anyway, after initDefaults() completes there should be a ChangeWatcher attached to the ArrayCollection's source, which is empty at init, but when I later fire an RPC to get data and populate the ArrayCollection (which works fine) the ChangeWatcher doesn't see it... I never make it into watcherHandler() even though the source of the ArrayCollection changes. What am I doing wrong? Am I missing something obvious? Thanks! Darren package org.myCompany.myApp.model { import com.adobe.cairngorm.model.ModelLocator; import mx.collections.ArrayCollection; import mx.binding.utils.ChangeWatcher; import mx.events.PropertyChangeEvent; [Bindable] public class AppModelLocator implements ModelLocator { private static var modelLocator : AppModelLocator; public var qAcctVO : ArrayCollection; public var myQWatcher : ChangeWatcher; // singleton public static function getInstance() : AppModelLocator { if ( modelLocator == null ) modelLocator = new AppModelLocator(); return modelLocator; } // constructor public function AppModelLocator() { if ( modelLocator != null ) throw new Error( Only one ModelLocator instance can be instantiated ); // init model vars initDefaults(); } // run when constructed and from subsequent LoginCommand calls public function initDefaults() : void { qAcctVO = new ArrayCollection(); myQWatcher = ChangeWatcher.watch(qAcctVO, source, watcherHandler); } // changewatcher should fire this function when ArrayCollection changes public function watcherHandler(event:PropertyChangeEvent):void { // do something } } } -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
[flexcoders] WebService vs RemoteObject
This was not designed as a controlled experiment, just something I coded, noticed, and thought I'd pass on... I'm building a small Cairngorm application and one of it's functions is to display two sets of network user accounts in two datagrids. Initially I used a WebService to call a Coldfusion CFC that returns simple Query objects pulled from an Oracle database. Datagrid 1 retrieves and displays about 400 accounts, and datagrid 2 about 3000 accounts. Using a WebService the retreival time appeared to be about 2-3 seconds (roughly based on the amount of time the showCursor clock was spinning) before the result handler fired, and the render time to fit the data into the grids was approximately another 6-7 seconds. I just converted all the RPC calls to RemoteObject calls and now the total retrieval AND render time is well under 2 seconds total. Retrieval time is faster (the spinning cursor is almost non existent) and the render time is insanely fast. I'm guessing that AMF and not needing to parse thru the SOAP return payloadmade the difference. Pull back a simple boolean with either type of RPC call, not so much, but pull back 3500 records and you *definitely* see a difference with RemoteObject. Darren -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
Re: [flexcoders] RemoteObject Setup
Very cool, thanks again Gred :-) Darren From: greg h [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] RemoteObject Setup Date: Wed, 6 Sep 2006 21:02:21 -0700 Darren, Glad to hear that you got Ben's Phone Selector Sample Application up and going. It is pretty sweet, isn't it? Now that you have your basic CF/Flex Builder 2/mx:RemoteObject configuration working, you might want to also check out some of the other amazing goodies that the good folks at Adobe put together specifically for CF developers moving to Flex 2 and using mx:RemoteObject First on my list is the Flex Builder 2 ColdFusion/Flex Application Wizard. Essentially it is a code generator. You use a visual query builder that is provided to build SQL against any tables in your datasources, and off the Wizard goes to create everything else: CFCs and MXML. (And of course the MXML uses mx:RemoteObject to call the methods on the CFCs that are generated. Pretty much RAD at its finest!) There are two links for Captivate demos that provide introductions to using the App Gen Wizard at the following link (total runtime of the two demos combined is about 23 minutes): www.adobe.com/devnet/coldfusion/articles/wizards.html (There is also a link there for a third Captivate demo of Other Wizards and Utilities that are also a part of the ColdFusion Extensions for Flex Builder 2.) fyi ... At the end of your Flex Builder 2 installation a pop-up prompted you to install the ColdFusion Extensions for Flex Builder 2. You can check if you have them installed by going to the main menu in Flex Builder 2 and going to either: 1) File -- New -- Other -- ColdFusion Wizards 2) Window -- Other Views -- ColdFusion If you do not see either of these, post back and I will dig up the instructions on how to install the Extensions. The documentation for the ColdFusion Extensions for Flex Builder 2 is in Chapter 5 of the documentation that can be download from here: http://download.macromedia.com/pub/documentation/en/flex/2/using_cf_with_flex2.pdf Lastly, Nahuel Foronda and Laura Arguello published an article last month in the ColdFusion Developer's Journal that also focuses on using mx:RemoteObject and is entitled Your First Flex Application with a ColdFusion Backend: The wow factor plus usability http://coldfusion.sys-con.com/read/256076_1.htm I have not yet had a chance to go through this article, but Nahuel and Laura do top notch work, so I expect that this article will be another great resource. Happy Flexing! g On 9/6/06, Darren Houle [EMAIL PROTECTED] wrote: Greg, where do I send the check? :-) It did work, although I had to tweak a little... the CFIDE.samples.Phones.CF.Catalog path is hard-coded all over the place and I used a different path. Ben also forgot a file in his instructions (you have to copy over the Thumbs.mxml file too) but that was obvious and I got it working. Now I get to take it apart and learn how to plug RemoteObjects into my own projects. Thanks Greg!! -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
Re: [flexcoders] RemoteObject Setup
Actually Greg I do have a question. I downloaded the zip (thanks!) and started in on the instructions but hit a problem right away... Step 2 says Create a folder named Phones in the CFIDE/samples folder (under the web root). If a folder named samples does not exist under your CFIDE folder, create it. Note: You must place the application (both the ColdFusion and Flex bits) under the Web root. Here's my dilema... It says the Web root must have a WEB-INF/flex folder under it, and by default this is under C:\CFusionMX7\wwwroot. But if I build an app using RemoteObjects and I have to place code there how will I deploy this to a hosting provider? They don't allow access to that directory on their shared plans. I only have access to the web root of my website, not the web root of the CF server itself. Am I misunderstanding, or... is there a way around this, or... is this a limitation of RemoteObject, or...? Thanks! Darren From: greg h [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] RemoteObject Setup Date: Tue, 5 Sep 2006 14:36:39 -0700 Darren, You might want to check out Ben Forta's article up on DevNet on Using ColdFusion with Flex: Creating and Running a Phone Selector. www.adobe.com/devnet/flex/articles/coldfusionflex_part3.html Ben's article provides a zip file and detailed instructions. All files needed are provided for installing: - a CFC that reads an XML file - Flex 2 MXML files that use mx:RemoteObject to call the CFC which returns text that is presented in the Flex 2 app along with appropriate gif images. Altogether, it is a pretty simple, straightforward starter application. If you can get Ben's Phone Selector application working, then you will have a working Flex 2/CF configuration, and a working application that you can model your own applications on. Please post back if you encounter any problems, or if this sample application is not consistent with what you are looking for. hth, g -- 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/
Re: [flexcoders] RemoteObject Setup
Greg, where do I send the check? :-) It did work, although I had to tweak a little... the CFIDE.samples.Phones.CF.Catalog path is hard-coded all over the place and I used a different path. Ben also forgot a file in his instructions (you have to copy over the Thumbs.mxml file too) but that was obvious and I got it working. Now I get to take it apart and learn how to plug RemoteObjects into my own projects. Thanks Greg!! Darren From: greg h [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] RemoteObject Setup Date: Wed, 6 Sep 2006 09:04:45 -0700 Darren, No problem. You will just create a duplicate directory structure and file in your deploy directory. And it really is just the file services-config.xml. So you create: wwwroot\WEB-INF\flex\services-config.xml Could you try deploying Ben's Phone Selector Sample Application on your hosted account and see if this works? (fyi ... Be sure to confirm they are running CF 7.0.2.) I have CF behind Apache and the remoting/RemoteObject work fine. If you run into any problems, please post back. hth, g On 9/6/06, Darren Houle [EMAIL PROTECTED] wrote: Actually Greg I do have a question. I downloaded the zip (thanks!) and started in on the instructions but hit a problem right away... Step 2 says Create a folder named Phones in the CFIDE/samples folder (under the web root). If a folder named samples does not exist under your CFIDE folder, create it. Note: You must place the application (both the ColdFusion and Flex bits) under the Web root. Here's my dilema... It says the Web root must have a WEB-INF/flex folder under it, and by default this is under C:\CFusionMX7\wwwroot. But if I build an app using RemoteObjects and I have to place code there how will I deploy this to a hosting provider? They don't allow access to that directory on their shared plans. I only have access to the web root of my website, not the web root of the CF server itself. Am I misunderstanding, or... is there a way around this, or... is this a limitation of RemoteObject, or...? Thanks! Darren From: greg h [EMAIL PROTECTED] flexsavvy%40gmail.com Reply-To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: Re: [flexcoders] RemoteObject Setup Date: Tue, 5 Sep 2006 14:36:39 -0700 Darren, You might want to check out Ben Forta's article up on DevNet on Using ColdFusion with Flex: Creating and Running a Phone Selector. www.adobe.com/devnet/flex/articles/coldfusionflex_part3.html Ben's article provides a zip file and detailed instructions. All files needed are provided for installing: - a CFC that reads an XML file - Flex 2 MXML files that use mx:RemoteObject to call the CFC which returns text that is presented in the Flex 2 app along with appropriate gif images. Altogether, it is a pretty simple, straightforward starter application. If you can get Ben's Phone Selector application working, then you will have a working Flex 2/CF configuration, and a working application that you can model your own applications on. Please post back if you encounter any problems, or if this sample application is not consistent with what you are looking for. hth, g -- 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/
[flexcoders] RemoteObject Setup
Can anyone point me to concise setup instructions for starting to use RemoteObjects? For instance... 1. Make sure you have CF 7.0.2 2. Write some CFCs and put them here [...] 3. Edit the remoting-config.xml in CF and add this code [...] to point to your CFCs 4. Create remoteObject tags in mxml that look like this [...] 5. etc Something that spells it out fairly simply? Thanks! Darren -- 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/
RE: [flexcoders] HTTPService Result to ArrayCollection
Depends on your XML data. An ArrayCollection is basically an Array of Arrays, so... if your XML is complicated and multilayered with lots of nested tags in nested tags I'm not sure you can easily convert it to an ArrayCollection. But... if your XML looks something like this: person nameJohn/name nameJames/name nameJude/name /person person nameMark/name nameLuke/name nameMatthew/name /person Then you might have a chance :-) Darren From: DJ Lift [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] HTTPService Result to ArrayCollection Date: Tue, 29 Aug 2006 18:09:58 - Hi there, I'm new and I don't understand something :) Hopefully someone can help me out. I have a datagrid that I am attempting to populate. I've been able to successfully populate the grid with xml from and HTTPService with no problem. But now I want to be able to filter and create specific sort functions for the grid, which I understand requires the dataProvider for the dataGrid to be an ArrayCollection. Is this true? If so, can i somehow take the XML result from the HTTPService and make an ArrayCollection out of it? I'm having trouble attempting this. Below is what i have so far... mx:HTTPService id=jobInfoReq url=http://mccray/~mm/oracle/joblookup.php; useProxy=false method=GET showBusyCursor=true mx:request xmlns= pirateLoc{pirateLocSelector.label}/pirateLoc pirateClient{pirateClientSelector.label}/pirateClient pirateProduct{pirateProductSelector.label}/pirateProduct /mx:request /mx:HTTPService -- 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/
RE: [Junk E-Mail - LOW] [flexcoders] Retriggering a creationComplete function?
I know it's more work, but... Instead of using creationComplete=someFunction() in your first view, take the button/widget or whatever that causes the app to switch over to the first view and add your someFunction() to that button/widget's click= event. In other words call sommeFunction() every time you click on something (which can happen N times) not just at creation (which only happens once.) Darren From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Stefan Schmalhaus Sent: Saturday, August 26, 2006 3:33 PM To: flexcoders@yahoogroups.com Subject: [Junk E-Mail - LOW] [flexcoders] Retriggering a creationComplete function? I have a view component with a creationComplete function. This component is part of another view that contains different states. When the first component is created for the first time the creationComplete function is executed. Later when I switch back to this state the function isn't executed again. How can I retrigger the creationComplete function every time I switch to the state that contains this component? -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.6/428 - Release Date: 8/25/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.6/428 - Release Date: 8/25/2006 -- 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/
RE: [flexcoders] bind enabled to 2 conditions with a logical and
Lisa mxml files are made out of XML, so you have to obey XML rules, so using chars like and and confuse the XML parser. All you have to do is replace them with standard XML entity references... so becomes amp;amp; Darren From: Lisa Nelson [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] bind enabled to 2 conditions with a logical and Date: Fri, 25 Aug 2006 13:34:52 -0700 Dear All, I have some controls that I only want to be enabled if 2 conditions are true. I want to do something like this: mx:ComboBox id=blah dataProvider={someArrayCollection} labelField=someField change=someFunction(); enabled={condition1 !condition2} /mx:ComboBox This is the error I get when I try: The entity name must immediately follow the '' in the entity reference. I've tried putting parentheses around the !condition2, but I get the same error. Just for giggles I tried using one instead of two. Same error. Is what I want to do just illegal? I would much prefer to do this with bindings than to have to capture every place where condition1 and condition2 might change and explicitly set the enabled property. --L -- 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/
RE: [flexcoders] Re: Choice of backend systems - which provides best functionality
Franck, Makes sense to me. Do you (or does anyone) know of any open/standards based architecture for this SOAP token security? Any OOTB solutions out there, or do I need to redesign the wheel? Thanks! Darren From: Franck de Bruijn [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Choice of backend systems - which provides best functionality Date: Thu, 24 Aug 2006 07:33:13 +0200 Hi Darren, I developed my webservices such that you have to supply a security token in the header section of a SOAP operation. By using a security token you prevent needing to send the user credentials over the line every time for every request to the back-end. It's a mechanism used heavily in most web-based systems (including single sign-on). Maybe the difference is that often these security tokens are sent in by means of cookies. Webservices don't need cookies; they have a header section (something that simple HTTP requests/posts don't). After a successful login operation, a security token is generated and stored in the database together with the necessary user profile information. So, the user session information is actually stored in the database and not in the application server. Yes, you have to do an extra query to your database to get the session information back, but since it's a very simple and fast query on a primary key it will take be nearly costless. Databases are around now for more than 20 years. They have been totally optimized for data storage and data distribution (if you need a clustered database). It's my belief that databases can do this much better than application servers (or myself/yourself). I also try to rule out caching (of dynamic data) in my application servers. Each normal thinking human being understands that caching (and the distribution of the cache among your application server cluster) introduces many headaches. In my experience, when performance issues arise, most often these are solved by writing cleverer queries, rearchitecting your interface, and even maybe take some consequences in the UI (ok, we don't display that attribute directly, but behind a tab or something). In my opinion caching is rarely the best solution for performance increase, but probably the easiest to develop ... and the hardest to maintain. Cheers, Franck _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dave Wolf Sent: Wednesday, August 23, 2006 11:54 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Choice of backend systems - which provides best functionality Darren, Flex inherits the HTTP session that the page which contained the EMBED tag acquired. Dont forget that HTTP/HTML is entirely stateless and yet we can easily secure those. The theory is identical with Flex. -- Dave Wolf Cynergy Systems, Inc. Adobe Flex Alliance Partner http://www.cynergys http://www.cynergysystems.com ystems.com http://www.cynergys http://www.cynergysystems.com/blogs ystems.com/blogs Email: [EMAIL PROTECTED] mailto:dave.wolf%40cynergysystems.com stems.com Office: 866-CYNERGY --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com, Darren Houle [EMAIL PROTECTED] wrote: Franck, I agree with you, but... how do you handle security in a stateless back-end? I mean... how do you maintain logged-in / user session information? Or unauthorized access of the web services by others? If Flex is *completely* agnostic of the back-end technology then how do you securely link them together? Darren From: Franck de Bruijn [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com Subject: RE: [flexcoders] Re: Choice of backend systems - which provides best functionality Date: Tue, 22 Aug 2006 18:03:24 +0200 Hi Barry, I'm not sure if I can be of much help here. I'm not into PHP, I'm not into FDS and remoting and the AMF protocol that is related to it. For me, but that is totally a personal opinion, the only acceptable solution for communication with a back-end is webservices, and nothing else. Briefly here are my reasons: * The coolest thing about Flex is not the graphics ... but that you can make your server stateless, meaning that you obtain 100% fail-over characteristics including linear scalability. With FDS (or any other related solution) you highly likely lose this `feature' and my guess is that scalability will be tougher to achieve; for sure it is harder to guarantee ... with a stateless server solution you can. And we always want to grow with our applications, don't we??? * I like to keep my Flex layer totally independent of my back-end layer. My back-end layer should not be aware by any means of the client technology. With webservices you realize this. With FDS (or any other related solution) you get
RE: [flexcoders] Re: How to cast a WebService lastResult when CFC returnType=xml
Mike, Yes, I'm good with HTTPService, it was WebService that was causing me the grief, but I'm good now. Thanks, Darren From: Mike Collins [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: How to cast a WebService lastResult when CFC returnType=xml Date: Thu, 24 Aug 2006 12:39:29 - I did this with HTTPService with returning an xml as a string from a cfm. The HTTPService resultformat is object. A combo box would us it this way. mx:ComboBox width=140 toolTip=Product Filter id=productlist dataProvider={getSearchCombos.lastResult.searchcombos.product} / This example shows a piece of xml that has all my combo lists. This one is the product array. For your xml you would use .lastResult.people.person -- 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/
RE: [flexcoders] How to cast a WebService lastResult when CFC returnType=xml
Peter, Thanks! But I'm not using the results in a Tree or Grid, which seem to have some magical parsing happening inside for you. I just want to do something as simple as pulling a node value out of the incoming SOAP wrapped XML and using it in, say, a TextArea. But... the following doesn't work... mx:TextArea text={MyService.myOperation.lastResult.people.person.firstname} / nor does MyService.myOperation.lastResult.people.person[0].firstname MyService.myOperation.lastResult.person.firstname MyService.myOperation.lastResult.person[0].firstname or any other pattern I've tried. Amy suggested referencing the path all the way from the root node of the SOAP packet itself and treating the entire SOAP message as a bix XML result, instead of just the node path of the result. Something like... MyService.myOperation.lastResult.myOperationResult.people.person.firstname but I couldn't get that to work either. Darren From: Peter Watson [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How to cast a WebService lastResult when CFC returnType=xml Date: Wed, 23 Aug 2006 07:29:48 -0700 Darren, If your XML nodes have attributes (ie. node label=foo/node) - you can use the 'labelField' attribute to control the labels. mx:Tree id=myTree labelField=@label/ If they don't (ie. foobar/foo) - or if you want to do any sort of custom label logic, you need to use the 'labelFunction' attribute to set the values appropriately. mx:Tree id=myTree2 labelFunction=myLabelFunc/ public function myLabelFunc (item:XML):String{ //if node has children if(item.children().toString() != ''){ return item.name(); } //no children, it's a leaf so get the value else{ return item.toXMLString(); } } regards, peter From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darren Houle Sent: Monday, August 21, 2006 4:33 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How to cast a WebService lastResult when CFC returnType=xml Bump?? Darren From: Darren Houle [EMAIL PROTECTED] mailto:lokka_%40hotmail.com Reply-To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] How to cast a WebService lastResult when CFC returnType=xml Date: Fri, 18 Aug 2006 23:08:44 -0400 I have a ColdFusion Component (web service) that looks like... cffunction name=getEmployees access=remote output=false returntype=xml cfxml variable=myxml people person firstnameJohn/firstname lastnameSmith/lastname job titleDoctor/title descriptionblah blah blah/description /job /person person firstnameJane/firstname lastnameDoe/lastname job titleLawyer/title descriptionblah blah blah/description /job /person /people /cfxml cfreturn myxml /cffunction and some Flex code that looks like... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml creationComplete=TestService.getEmployees.send(); mx:WebService id=TestService wsdl=http://localhost/hr.cfc?wsdl http://localhost/hr.cfc?wsdl mx:operation name=getEmployees / /mx:WebService mx:Tree id=myTree width=50% height=50% showRoot=false dataProvider={TestService.getEmployees.lastResult}/ /mx:Application But what I get is a Tree that looks like: Flex doesn't seem to be able to extract the XML from the SOAP message, which is just SOAP XML wrapping my XML data. Changing the Operation's resultFormat from e4x to xml to object changes the amount of junk in the Tree, but doesn't fix the problem. As a matter of fact, it works best when I leave off this attribute and let the Operation decide what resultFormat to use. Casting lastResult as XML or XMLList doesn't seem to help either, and neither does ArrayUtil.toArray(TestService.getEmployee.lastResult) Is there something I need to do to the lastResult to get it to work in Trees, DataGrids, etc? Like cast it as some other data type? Why doesn't e4x parse the SOAP message properly and extract my XML? Just about every example I can find out there shows people using HTTPService to pull back just the XML data without the SOAP webservice stuff, or else shows how to create XML inside the mxml code itself using mx:XML but I can find nothing that shows how to return XML from a CFC web service and use/parse it in Flex properly (as easy as, say, a CFC that returns a Query object.) Darren
[flexcoders] Similar Node Access Question
Don't know if this is the same problem as my recent, previous post, or if it's different, but I basically have the same question... Now I'm calling a CF WebService that returns a Query object... it just contains one row, one column, called FULLNAME. Using the WebService lastResult in a DataGrid's dataprovider works fine, there's a million examples of that, but trying to pull out that FULLNAME cell's string value is proving to be a challenge for me... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=IACleanService.authenticateUser.send() mx:WebService id=IACleanService wsdl=http://localhost/ia_cleanup.cfc?wsdl; mx:operation name=authenticateUser mx:request xmlns= usernamejsmith/username passwordasdf1234/password /mx:request /mx:operation /mx:WebService mx:DataGrid height=400 width=400 dataProvider={IACleanService.authenticateUser.lastResult} / mx:TextArea width=400 height=400 text={IACleanService.authenticateUser.lastResult.fullname} / /mx:Application The DataGrid above displays the FULLNAME field just fine, but the TextArea displays nothing. Doesn't help to uppercase it to lastResult.FULLNAME either. I'm probably missing something really simple, but... just about all the examples in the Flex documentation either show how to pull out a single node value from an HTTPService... or show how to use a WebService in a DataGrid... but I can't find any examples where single values are pulled out of a WebService result. Something where the result node values are split up and used in different places, like one node value is used as a role variable, another is used to set a model state variable, another is used as a button label, etc. I need an example of calling a WebService and breaking the result into pieces for use in multiple places, not just sticking the whole lastResult into the dreaded DataGrid. Any help would be appreciated :-) Thanks! Darren -- 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/
RE: [flexcoders] Re: Choice of backend systems - which provides best functionality
Franck, I agree with you, but... how do you handle security in a stateless back-end? I mean... how do you maintain logged-in / user session information? Or unauthorized access of the web services by others? If Flex is *completely* agnostic of the back-end technology then how do you securely link them together? Darren From: Franck de Bruijn [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Choice of backend systems - which provides best functionality Date: Tue, 22 Aug 2006 18:03:24 +0200 Hi Barry, Im not sure if I can be of much help here. Im not into PHP, Im not into FDS and remoting and the AMF protocol that is related to it. For me, but that is totally a personal opinion, the only acceptable solution for communication with a back-end is webservices, and nothing else. Briefly here are my reasons: * The coolest thing about Flex is not the graphics ... but that you can make your server stateless, meaning that you obtain 100% fail-over characteristics including linear scalability. With FDS (or any other related solution) you highly likely lose this feature and my guess is that scalability will be tougher to achieve; for sure it is harder to guarantee ... with a stateless server solution you can. And we always want to grow with our applications, dont we??? * I like to keep my Flex layer totally independent of my back-end layer. My back-end layer should not be aware by any means of the client technology. With webservices you realize this. With FDS (or any other related solution) you get a vendor lock-in, which I consider undesirable. * The trend in my business is that more and more you get projects only for a front-end or back-end solution. In the past it occurred more that you had to build them together, but that is changing. Its very acceptable to request a back-end to expose its operations through webservices. Its not very accetable to request them to expose it via FDS or something like that. To be fair, there are some disadvantages using web services as well; among others: * No automatic conversion of the web service results into your custom action script classes. You have to make converters yourself to accomplish this. With FDS/AMF I understand you can have this conversion automatically done for you. * Performance. People tend to say that webservices are slow. Its true that the serialization/deserialization of the XML (both on client and server) side takes computing time. My experiences so far are that this extra computing time is not causing any serious damage in the user experience. * Flex has some trouble communicating with DOC/Literal encoded webservices. Especially in the .Net corner this is causing problems. But that should be temporarily ... The adobe guys are working on it and hopefully in a next release these issues will be fixed. For me the advantages of webservices by far outweigh the disadvantages. So if you ask me: use webservices! You keep your freedom ... Cheers, Franck _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of barry.beattie Sent: Tuesday, August 22, 2006 9:50 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Choice of backend systems - which provides best functionality Franck and Doug: may I be so bold as to include here some information I sent to our programming team for them to have some context? I offer it here as a talking point only - and would invite any comments or corrections to help me gain a better understanding myself ... this has just been gathered by my own ad-hoc investigations. the context of the email was a report that Adobe were seriously targeting PHP developers for Flex. regarding Flash remoting: some background to put it into context: there are three basic ways of getting communication happening between a SWF (now-a-days built with Flex) and server-side code: webservices XML HTTP requests Flash Remoting (using the Async Message Format - AMF) PHPAMF (Flash remoting with PHP) is not a Macromedia/Adobe product. It was reverse engineered by the PHP community to use Flash remoting. It's been around for a few years (that I know of) and may be even more popular than CF-AMF (don't know for sure) here's the important bit: PHPAMF, OpenAMF, the Adobe .NET/ Java remoting add-in and ColdFusion 6.1 remoting all use the AMF0 protocol. ColdFusion 7.02 and FlexDataServices (Java) all use AMF3 What's the diff? 2 things: Apart from some removal of dumb stuff-ups and a reduction of data packet size (thanx to new encoding), AMF3 is very strongly typed which allows a seamless (and easy) mapping/conversion between server side objects (eg: Java value objects and ColdFusion's CFC's). This is why FlexBuilder can have a simple wizard to take your CFC and create Actionscript classes from it (and/or visa-versa). Before it was all manual with a tonne of testing
RE: [flexcoders] Similar Node Access Question
Hey, answered my own quetion... figured I'd post it here in case it helped anyone else... So... you're using an mx:WebService to call a ColdFusion CFC. The ColdFusion query object returned in lastResult is an array inside an array, but, it's more than that too (the debugger is your friend) so... the easiest way to grab a specific value from specific row in a query is to refer to the query row by array notation and the column by name... so... to grab the FULLNAME column from row 1 of your query object's result set you'd use... var mystr : String = MyWebService.myOperation.lastResult[0].FULLNAME; and if you wanted to bind to that purely in mxml you could also use... mx:ArrayCollection id=ac source=MyWebService.myOperation.lastResult / mx:TextArea text={ac.getItemAt(0).FULLNAME} / Darren From: Darren Houle [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Similar Node Access Question Date: Wed, 23 Aug 2006 13:54:19 -0400 Don't know if this is the same problem as my recent, previous post, or if it's different, but I basically have the same question... Now I'm calling a CF WebService that returns a Query object... it just contains one row, one column, called FULLNAME. Using the WebService lastResult in a DataGrid's dataprovider works fine, there's a million examples of that, but trying to pull out that FULLNAME cell's string value is proving to be a challenge for me... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=IACleanService.authenticateUser.send() mx:WebService id=IACleanService wsdl=http://localhost/ia_cleanup.cfc?wsdl; mx:operation name=authenticateUser mx:request xmlns= usernamejsmith/username passwordasdf1234/password /mx:request /mx:operation /mx:WebService mx:DataGrid height=400 width=400 dataProvider={IACleanService.authenticateUser.lastResult} / mx:TextArea width=400 height=400 text={IACleanService.authenticateUser.lastResult.fullname} / /mx:Application The DataGrid above displays the FULLNAME field just fine, but the TextArea displays nothing. Doesn't help to uppercase it to lastResult.FULLNAME either. I'm probably missing something really simple, but... just about all the examples in the Flex documentation either show how to pull out a single node value from an HTTPService... or show how to use a WebService in a DataGrid... but I can't find any examples where single values are pulled out of a WebService result. Something where the result node values are split up and used in different places, like one node value is used as a role variable, another is used to set a model state variable, another is used as a button label, etc. I need an example of calling a WebService and breaking the result into pieces for use in multiple places, not just sticking the whole lastResult into the dreaded DataGrid. Any help would be appreciated :-) Thanks! Darren -- 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/
RE: [flexcoders] Re: Choice of backend systems - which provides best functionality
True, but then you're relying on server side sessions... that's stateless, but not independant of the back-end technology. Darren From: Dave Wolf [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Choice of backend systems - which provides best functionality Date: Wed, 23 Aug 2006 21:53:39 - Darren, Flex inherits the HTTP session that the page which contained the EMBED tag acquired. Dont forget that HTTP/HTML is entirely stateless and yet we can easily secure those. The theory is identical with Flex. -- Dave Wolf Cynergy Systems, Inc. Adobe Flex Alliance Partner http://www.cynergysystems.com http://www.cynergysystems.com/blogs Email: [EMAIL PROTECTED] Office: 866-CYNERGY --- In flexcoders@yahoogroups.com, Darren Houle [EMAIL PROTECTED] wrote: Franck, I agree with you, but... how do you handle security in a stateless back-end? I mean... how do you maintain logged-in / user session information? Or unauthorized access of the web services by others? If Flex is *completely* agnostic of the back-end technology then how do you securely link them together? Darren From: Franck de Bruijn [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Choice of backend systems - which provides best functionality Date: Tue, 22 Aug 2006 18:03:24 +0200 Hi Barry, I'm not sure if I can be of much help here. I'm not into PHP, I'm not into FDS and remoting and the AMF protocol that is related to it. For me, but that is totally a personal opinion, the only acceptable solution for communication with a back-end is webservices, and nothing else. Briefly here are my reasons: * The coolest thing about Flex is not the graphics ... but that you can make your server stateless, meaning that you obtain 100% fail-over characteristics including linear scalability. With FDS (or any other related solution) you highly likely lose this `feature' and my guess is that scalability will be tougher to achieve; for sure it is harder to guarantee ... with a stateless server solution you can. And we always want to grow with our applications, don't we??? * I like to keep my Flex layer totally independent of my back-end layer. My back-end layer should not be aware by any means of the client technology. With webservices you realize this. With FDS (or any other related solution) you get a vendor lock-in, which I consider undesirable. * The trend in my business is that more and more you get projects only for a front-end or back-end solution. In the past it occurred more that you had to build them together, but that is changing. It's very acceptable to request a back-end to expose its operations through webservices. It's not very accetable to request them to expose it via FDS or something like that. To be fair, there are some disadvantages using web services as well; among others: * No automatic conversion of the web service results into your custom action script classes. You have to make converters yourself to accomplish this. With FDS/AMF I understand you can have this conversion automatically done for you. * Performance. People tend to say that webservices are slow. It's true that the serialization/deserialization of the XML (both on client and server) side takes computing time. My experiences so far are that this extra computing time is not causing any serious damage in the user experience. * Flex has some trouble communicating with DOC/Literal encoded webservices. Especially in the .Net corner this is causing problems. But that should be temporarily ... The adobe guys are working on it and hopefully in a next release these issues will be fixed. For me the advantages of webservices by far outweigh the disadvantages. So if you ask me: use webservices! You keep your freedom ... Cheers, Franck _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of barry.beattie Sent: Tuesday, August 22, 2006 9:50 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Choice of backend systems - which provides best functionality Franck and Doug: may I be so bold as to include here some information I sent to our programming team for them to have some context? I offer it here as a talking point only - and would invite any comments or corrections to help me gain a better understanding myself ... this has just been gathered by my own ad-hoc investigations. the context of the email was a report that Adobe were seriously targeting PHP developers for Flex. regarding Flash remoting: some background to put it into context: there are three basic ways of getting communication happening between a SWF (now-a-days built with Flex
RE: [flexcoders] Variable Type for Web Service Result
Ethan, I don't think it's your typing, I think it's your timing. Looks like you're flipping your postTyper() when the combobox is changed, but that's not firing a new send() like the original blogger example did. Try changing your code so that changing the combobox triggers the send() and the send result= handler triggers the postTyper(). That way you'll have the correct data in lastResult when you change your blogResult variable. That change should then be noticed by the bindings. Darren From: Ethan Miller [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Variable Type for Web Service Result Date: Wed, 23 Aug 2006 16:13:19 -0700 Greetings - Expanding on the Connecting to Web Services tutorial, I added a combo box for switching between methods of the API to the Adobe blog aggregator, ie from getMostPopularPosts to search. As both methods return the same columns, the data grid displaying the result can stay the same, other than needing a different value for data provider, ie: myWebService.getMostPopularPosts.lastResult vs myWebService.search.lastResult I was hoping therefore to bind the dataGrid dataProvider value to a variable which I'd set when users change the value of the comboBox (which selects which method to use). However I think I'm typing the variable which stores the value of the service result wrong, as I get null whenever I try and set the value (blogResult), show below: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ [Bindable] public var blogResult:Object = null; public function postTyper(event:Event):void{ if (event.currentTarget.selectedItem.data == popular){ postTypeVS.selectedIndex=1; blogResult = blogAggrWS.getMostPopularPosts.lastResult; trace (blogResult); } else{ postTypeVS.selectedIndex=0; blogResult = blogAggrWS.search.lastResult; trace (blogResult); } } ]] /mx:Script mx:WebService id=blogAggrWS wsdl=http://weblogs.macromedia.com/mxna/webservices/mxna2.cfc? wsdl useProxy=false mx:operation name=getMostPopularPosts mx:request daysBack{daysBackCB.value}/daysBack limit{numPostsCB.value}/limit /mx:request /mx:operation mx:operation name=search mx:request offset0/offset limit50/limit searchTerms{postKeywords.text}/searchTerms sortByrelevance/sortBy languageIds1/languageIds /mx:request /mx:operation mx:operation name=getLanguages mx:request/ /mx:operation /mx:WebService mx:Panel width=850 height=400 layout=absolute horizontalCenter=0 verticalCenter=0 title=Adobe Blogs Post Finder mx:HBox horizontalCenter=0 top=20 verticalAlign=middle mx:Label text=Get:/ mx:ComboBox id=whatPostsCB change=postTyper(event) mx:Object label=Posts By Keyword data=search / mx:Object label=Most Popular Posts data=popular / /mx:ComboBox mx:ViewStack id=postTypeVS width=400 mx:HBox verticalAlign=middle mx:TextInput id=postKeywords text=/ mx:Button label=Search click=blogAggrWS.search.send()/ /mx:HBox mx:HBox verticalAlign=middle width=372 creationComplete=blogAggrWS.getMostPopularPosts.send() mx:Spacer width=10/ mx:Label text=Show:/ mx:ComboBox id=numPostsCB change=blogAggrWS.getMostPopularPosts.send() mx:Object label=Top 5 Posts data=5 / mx:Object label=Top 10 Posts data=10 / mx:Object label=Top 15 Posts data=15 / /mx:ComboBox
RE: [flexcoders] How to cast a WebService lastResult when CFC returnType=xml
Yes Tracy... I was working on two similar issues at the same time and one used Tree while the other didn't. The Tree question was answered a while back (using labelField) so I got confused... sorry :-) and thanks! Darren From: Tracy Spratt [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How to cast a WebService lastResult when CFC returnType=xml Date: Wed, 23 Aug 2006 21:06:57 -0400 Darren, You are using a tree according to the example in your post. Or have you changed your question? At any rate, binding is very difficult to debug. I advise using a handler function in which you can use toXMLString() on the event.result object. Then work your way down through the hierarchy a step at a time. When you get the expression that works you can put it in the binding expression. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darren Houle Sent: Wednesday, August 23, 2006 1:30 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] How to cast a WebService lastResult when CFC returnType=xml Peter, Thanks! But I'm not using the results in a Tree or Grid, which seem to have some magical parsing happening inside for you. I just want to do something as simple as pulling a node value out of the incoming SOAP wrapped XML and using it in, say, a TextArea. But... the following doesn't work... mx:TextArea text={MyService.myOperation.lastResult.people.person.firstname} / nor does MyService.myOperation.lastResult.people.person[0].firstname MyService.myOperation.lastResult.person.firstname MyService.myOperation.lastResult.person[0].firstname or any other pattern I've tried. Amy suggested referencing the path all the way from the root node of the SOAP packet itself and treating the entire SOAP message as a bix XML result, instead of just the node path of the result. Something like... MyService.myOperation.lastResult.myOperationResult.people.person.firstname but I couldn't get that to work either. Darren From: Peter Watson [EMAIL PROTECTED] mailto:pwatson%40adobe.com Reply-To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: RE: [flexcoders] How to cast a WebService lastResult when CFC returnType=xml Date: Wed, 23 Aug 2006 07:29:48 -0700 Darren, If your XML nodes have attributes (ie. node label=foo/node) - you can use the 'labelField' attribute to control the labels. mx:Tree id=myTree labelField=@label/ If they don't (ie. foobar/foo) - or if you want to do any sort of custom label logic, you need to use the 'labelFunction' attribute to set the values appropriately. mx:Tree id=myTree2 labelFunction=myLabelFunc/ public function myLabelFunc (item:XML):String{ //if node has children if(item.children().toString() != ''){ return item.name(); } //no children, it's a leaf so get the value else{ return item.toXMLString(); } } regards, peter From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Darren Houle Sent: Monday, August 21, 2006 4:33 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: RE: [flexcoders] How to cast a WebService lastResult when CFC returnType=xml Bump?? Darren From: Darren Houle [EMAIL PROTECTED] mailto:lokka_%40hotmail.com mailto:lokka_%40hotmail.com Reply-To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] How to cast a WebService lastResult when CFC returnType=xml Date: Fri, 18 Aug 2006 23:08:44 -0400 I have a ColdFusion Component (web service) that looks like... cffunction name=getEmployees access=remote output=false returntype=xml cfxml variable=myxml people person firstnameJohn/firstname lastnameSmith/lastname job titleDoctor/title descriptionblah blah blah/description /job /person person firstnameJane/firstname lastnameDoe/lastname job titleLawyer/title descriptionblah blah blah/description /job /person /people /cfxml cfreturn myxml /cffunction and some Flex code that looks like... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml creationComplete=TestService.getEmployees.send(); mx:WebService id=TestService wsdl=http://localhost/hr.cfc?wsdl http://localhost/hr.cfc?wsdl http://localhost/hr.cfc?wsdl http://localhost/hr.cfc?wsdl mx:operation name
RE: [flexcoders] Variable Type for Web Service Result
/mx:DataGridColumn mx:DataGridColumn headerText=Clicks dataField=clicks width=50 textAlign=right/ mx:DataGridColumn headerText=Post Excerpt dataField=postExcerpt wordWrap=true/ /mx:columns /mx:DataGrid /mx:Panel /mx:Application Darren From: Darren Houle [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Variable Type for Web Service Result Date: Wed, 23 Aug 2006 22:44:48 -0400 Ethan, I don't think it's your typing, I think it's your timing. Looks like you're flipping your postTyper() when the combobox is changed, but that's not firing a new send() like the original blogger example did. Try changing your code so that changing the combobox triggers the send() and the send result= handler triggers the postTyper(). That way you'll have the correct data in lastResult when you change your blogResult variable. That change should then be noticed by the bindings. Darren From: Ethan Miller [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Variable Type for Web Service Result Date: Wed, 23 Aug 2006 16:13:19 -0700 Greetings - Expanding on the Connecting to Web Services tutorial, I added a combo box for switching between methods of the API to the Adobe blog aggregator, ie from getMostPopularPosts to search. As both methods return the same columns, the data grid displaying the result can stay the same, other than needing a different value for data provider, ie: myWebService.getMostPopularPosts.lastResult vs myWebService.search.lastResult I was hoping therefore to bind the dataGrid dataProvider value to a variable which I'd set when users change the value of the comboBox (which selects which method to use). However I think I'm typing the variable which stores the value of the service result wrong, as I get null whenever I try and set the value (blogResult), show below: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ [Bindable] public var blogResult:Object = null; public function postTyper(event:Event):void{ if (event.currentTarget.selectedItem.data == popular){ postTypeVS.selectedIndex=1; blogResult = blogAggrWS.getMostPopularPosts.lastResult; trace (blogResult); } else{ postTypeVS.selectedIndex=0; blogResult = blogAggrWS.search.lastResult; trace (blogResult); } } ]] /mx:Script mx:WebService id=blogAggrWS wsdl=http://weblogs.macromedia.com/mxna/webservices/mxna2.cfc? wsdl useProxy=false mx:operation name=getMostPopularPosts mx:request daysBack{daysBackCB.value}/daysBack limit{numPostsCB.value}/limit /mx:request /mx:operation mx:operation name=search mx:request offset0/offset limit50/limit searchTerms{postKeywords.text}/searchTerms sortByrelevance/sortBy languageIds1/languageIds /mx:request /mx:operation mx:operation name=getLanguages mx:request/ /mx:operation /mx:WebService mx:Panel width=850 height=400 layout=absolute horizontalCenter=0 verticalCenter=0 title=Adobe Blogs Post Finder mx:HBox horizontalCenter=0 top=20 verticalAlign=middle mx:Label text=Get:/ mx:ComboBox id=whatPostsCB change=postTyper(event) mx:Object label=Posts By Keyword data=search / mx:Object label=Most Popular Posts data=popular / /mx:ComboBox mx:ViewStack id=postTypeVS width=400 mx:HBox verticalAlign=middle mx:TextInput id=postKeywords text=/ mx:Button label=Search click=blogAggrWS.search.send()/ /mx:HBox mx:HBox verticalAlign=middle width=372 creationComplete=blogAggrWS.getMostPopularPosts.send() mx:Spacer width=10
RE: [flexcoders] Cairngorm and MVC: Quickie
Start off with one model for your app and as your application grows, you will probably see the need to refactor. At that time, create a second model and so on and so forth. Just to give u a quick idea, I have 3 models in my current project: BizModel - hold main data that actually goes back and forth to the server CoreModel - holds static data bound to comboboxes and app state data IconModel - holds reference to several icons used throughout the app Very true. Alternatively you could create these three data structure within the one ModelLocator and refer to them like... model.biz.userRole = ... model.core.adminViewStackState = ... model.icon.deleteButton = ... Darren From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of lostinrecursion Sent: Monday, August 21, 2006 6:33 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm and MVC: Quickie Hi all. Just wondering if I have figured this out correctly. In an MVC/Cairngorm application, it is ok to have as many models as I determine based on my data needs. Then, I would have one ModelLocator class (which extends the core Cairngorm one) mapping to each model and instantiating variables for them. Then I reference the model locator in the views to which it is relavent. But all apps only possess one Controller. Is that right? So, simply, 1 Controller/1 Model Locator/1:N Models/1:N Views -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur. -- 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/
RE: [flexcoders] Re: Cairngorm2 SequenceCommand
Thanks Tim, that's very cool. Quick question though... it looks like all it's doing is broadcasting an event... is there any difference between... 1. Defining the nextEvent and calling executeNextCommand to broadcast it... and 2. Creating a new CairngormEvent and dispatching it from the CairngormEventDispatcher ??? Seems like it's the same thing. Is there some advantage to using SequenceCommand? Will the CairngormEventDispatcher not be heard from within a Command? It seems like a redundant class, or maybe just a utility class that does't really save you any lines of code, since you can create another CairngormEvent and dispatch from CairngormEventDispatcher in two lines of code just as easily...?? Thanks again for your help! Darren From: Tim Hoff [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Cairngorm2 SequenceCommand Date: Sat, 19 Aug 2006 05:24:02 - Hi Darren, I just added a simple example to learn it myself. See code.commands.ResizeViewStatesCommand. View Sample http://www.cflex.net/showFileDetails.cfm?ObjectID=422Object=FileChann\ elID=1 -TH --- In flexcoders@yahoogroups.com, Darren Houle [EMAIL PROTECTED] wrote: Does anyone know where I can find a working example of a SequenceCommand in a Cairngorm 2 app? Something I can import into Builder that will run? Thanks Darren -- 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/
RE: [flexcoders] weather web service
Don't know if they have *exactly* what you're looking for, but www.xmethods.net lists a bunch of web services. I quickly counted 9 different weather services (but didn't read them in any detail.) Darren From: Robin Burrer [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] weather web service Date: Mon, 21 Aug 2006 14:39:09 +1000 Hi there, Does anybody know if there is free weather forecast web-service? I went to the yahoo website but all I could find is an RSS feed, which seems to be a bit buggy. Plus it only gives you the forecast the next day. Thanks Robin -- 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/
RE: [flexcoders] Getting started with Cairngorm
Not sure if this is it, but when I create my ModelLocator I always rename like public class AppModelLocator implements ModelLocator { so that my class and the Cairngorm base class aren't both named ModelLocator Like I said, not sure that would cause a circular reference or if there's something else in your code somewhere. If that doesn't work you could try posting your ModelLocator code here. Darren From: julien castelain [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Getting started with Cairngorm Date: Sun, 20 Aug 2006 17:04:44 +0200 hi list, i'm trying to use Cairngorm in a flex project (1st attempt), i have a ModelLocator class that implements the com.adobe.cairngorm.model.ModelLocator interface, my ModelLocator class is in a package (org.something.myapp.model), each time i try to use it i get this error Circular type reference was detected in ModelLocator -- should i name it differently? thanks for the help -- 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/
RE: [flexcoders] How to cast a WebService lastResult when CFC returnType=xml
Bump?? Darren From: Darren Houle [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] How to cast a WebService lastResult when CFC returnType=xml Date: Fri, 18 Aug 2006 23:08:44 -0400 I have a ColdFusion Component (web service) that looks like... cffunction name=getEmployees access=remote output=false returntype=xml cfxml variable=myxml people person firstnameJohn/firstname lastnameSmith/lastname job titleDoctor/title descriptionblah blah blah/description /job /person person firstnameJane/firstname lastnameDoe/lastname job titleLawyer/title descriptionblah blah blah/description /job /person /people /cfxml cfreturn myxml /cffunction and some Flex code that looks like... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=TestService.getEmployees.send(); mx:WebService id=TestService wsdl=http://localhost/hr.cfc?wsdl; mx:operation name=getEmployees / /mx:WebService mx:Tree id=myTree width=50% height=50% showRoot=false dataProvider={TestService.getEmployees.lastResult}/ /mx:Application But what I get is a Tree that looks like: Flex doesn't seem to be able to extract the XML from the SOAP message, which is just SOAP XML wrapping my XML data. Changing the Operation's resultFormat from e4x to xml to object changes the amount of junk in the Tree, but doesn't fix the problem. As a matter of fact, it works best when I leave off this attribute and let the Operation decide what resultFormat to use. Casting lastResult as XML or XMLList doesn't seem to help either, and neither does ArrayUtil.toArray(TestService.getEmployee.lastResult) Is there something I need to do to the lastResult to get it to work in Trees, DataGrids, etc? Like cast it as some other data type? Why doesn't e4x parse the SOAP message properly and extract my XML? Just about every example I can find out there shows people using HTTPService to pull back just the XML data without the SOAP webservice stuff, or else shows how to create XML inside the mxml code itself using mx:XML but I can find nothing that shows how to return XML from a CFC web service and use/parse it in Flex properly (as easy as, say, a CFC that returns a Query object.) Darren -- 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/
RE: [flexcoders] Cairngorm and MVC: Quickie
Yup, you got it. To be even more specific... 1:N Views A) bind to data in the 1 ModelLocator (which contains 0:N Models/VO's) and B) broadcast 1:N Events to the 1 FrontController which maps Events to 1:N Commands which may create 0:N Delegates which trigger 0:N Services (using 1 ServiceLocator, if you have Services) the results are then passed from the Services back to the Delegates, which pass them back to the Commands, which then update the data (models/VO's) stored in the Model Locator. Darren From: lostinrecursion [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm and MVC: Quickie Date: Mon, 21 Aug 2006 22:32:30 - Hi all. Just wondering if I have figured this out correctly. In an MVC/Cairngorm application, it is ok to have as many models as I determine based on my data needs. Then, I would have one ModelLocator class (which extends the core Cairngorm one) mapping to each model and instantiating variables for them. Then I reference the model locator in the views to which it is relavent. But all apps only possess one Controller. Is that right? So, simply, 1 Controller/1 Model Locator/1:N Models/1:N Views -- 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/
RE: [flexcoders] Re: Some Cairngorm questions
Okay... well... that sounds nice, but... your subject for this thread was Some Cairngorm questions and what you're doing doesn't sound much like cairngorm, so... I guess a more approrpiate subject might have been Here's how we've changed Cairngorm into a different pattern, and why. Just kidding :-) :-) :-) Sounds like you've got something that works for you, and that's what counts! Darren From: jrjazzman23 [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Some Cairngorm questions Date: Sat, 19 Aug 2006 15:40:41 - Our VO classes are separate from the model. We found that the model needed stuff that didn't belong in the VOs, for example, fields that don't get persisted to the db, state variables, and various methods that the classes in the model need. When we do need a VO to pass to the data layer, we call toVO(), which, you guessed it, gives us a plain ol' VO. We didn't get too far into our project before we realized that model != VOs. The code that knows what parts of the model need to be persisted, and when and how to do it is in a separate utility class that we call a persistence manager. It has all the logic that was cluttering up the Commands. Now the command just uses the persistence manager in a very simple way, like pm.saveCar(car). So each command is back to fitting one screen, which I think is nice. Jeremy --- In flexcoders@yahoogroups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: I'm pretty sure they're called ValueObjects for a reason :) Ben --- In flexcoders@yahoogroups.com, Darren Houle lokka_@ wrote: As for reusing events and commands from different places, most of what I could find from the Cairngorm creators suggest that Commands be specific use cases and a Command should always know its context. I suppose if the event payload indicates the context, then you're not violating this rule. I hadn't thought about doing this. I take Steven literally when he says Cairngorm should be a lightweight framework :-) By something else I was referring to something other than a Command (say, a model object) consuming the Delegates. Anything wrong with this? So... you're saying that, for instance, a User vo stored in the Model Locator would not only describe User data fields, but also contain methods with business logic? Like methods that could create delegates and deal with the returned results? It's not OOTB, so I'm not sure it's Cairngorm but it's not against the laws of the universe either, it could work. There *are* examples of vo's out there that do things like track and increment a static emp_id, or populate new vo properties in the vo constructor with values based on some other value stored in the Model Locator, but I'm not sure I'd put alot of business logic in there for several reasons; other developers familiar with Cairngorm wouldn't think to look for that in there... you'd have to change the Front Controller, Commands, and Delegate around... and you'd also be storing business logic inside your data model, which to me would make me feel all itchy. I think limited logic in the vo's, used to intelligently construct that vo, would be cool, but I'm not sure I'd expect to see much else in there. Darren --- In flexcoders@yahoogroups.com, Darren Houle lokka_@ wrote: Jeremy... First. I don't see what value the FrontController adds in Flex apps. My initial thought was that it was important to prevent views from coupling to specific commands. Yes, if you subscribe to the idea of an MVC pattern then yes, you need to do this. And if you're not going to do this then you should either design a better pattern... or don't use one at all... but don't code something that's only half Cairngorm. Mostly because if I'm the developer who comes after you and has to reverse-engineer your code one day I'd like to know where things are and not have to quess or re-write it all from scratch :-) That really doesn't hold up though, because the views are coupled to specifc events Yes, Views generate events, but they don't have to be specific, like: AddPublicUserToManagerList(user) they can be generic, like: AddUserToList(user, public, manager) That way several different Views can re-use an Event and your Command can figure out what it should do based on the event args. There's pros and cons, but that's one way to reduce the number of pieces and parts. each of which results in a specific Command being executed. Since the FrontController maintains a 1-to-1 map of Cairngorm events to Commands Not necessarily. Yes, they are normally 1 to 1, but if you want an Event
RE: [flexcoders] Cairngorm eLearning Course and Quiz - who's in?
A: Worth Doing are interested in using the training for yourself and/or your team Definitely B: Would like to contribute in some way -Script writer -Storyboarder -Expert Review Panel -Quality Assurance I'd be happy to help. Send me an email off-list if you still need contributors. Darren -- 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/
RE: [flexcoders] Some Cairngorm questions
Jeremy... First. I don't see what value the FrontController adds in Flex apps. My initial thought was that it was important to prevent views from coupling to specific commands. Yes, if you subscribe to the idea of an MVC pattern then yes, you need to do this. And if you're not going to do this then you should either design a better pattern... or don't use one at all... but don't code something that's only half Cairngorm. Mostly because if I'm the developer who comes after you and has to reverse-engineer your code one day I'd like to know where things are and not have to quess or re-write it all from scratch :-) That really doesn't hold up though, because the views are coupled to specifc events Yes, Views generate events, but they don't have to be specific, like: AddPublicUserToManagerList(user) they can be generic, like: AddUserToList(user, public, manager) That way several different Views can re-use an Event and your Command can figure out what it should do based on the event args. There's pros and cons, but that's one way to reduce the number of pieces and parts. each of which results in a specific Command being executed. Since the FrontController maintains a 1-to-1 map of Cairngorm events to Commands Not necessarily. Yes, they are normally 1 to 1, but if you want an Event to trigger two Commands you can also do this in the Front Controller: addCommand(AppController.EVENT_ONE, SomeCommand); addCommand(AppController.EVENT_ONE, AnotherCommand); why don't views just run the commands directly? You could, and it's not a terrible thing to argue for fewer pieces, like for instance Delegates are actually optional, but they do help during testing and development because it's easier to point a simple Delegate at a test Service than to find and re-point all the occurances of a Service in your Commands. So, yes, you could do without the Front Controller but by gaining simplicity you'd lose some flexability (as well as confusing another Caringorm developer who's pulling their hair out trying to find where you put your Front Controller.) Next, we're moving most of our remote object calls into the model. The logic that controls what parts of the model get persisted, when, and in what order is complex, and our Commands had become huge and full of logic. As a reuslt of the changes, lots of the classes in the model now make remote calls and implement IResponder. I'm trying to get back to the model of Command kicks off the feature and then gets out of the way. Is there any rule with Cairngorm that says that Commands must do the remote calls? Is it common to use something other than a Command to make remote calls? Do you mean something else making the call to the Service as in a Delegate, or do you mean some other class (maybe a subclass of Command) handling that? As far as vanilla Cairngorm goes there's really just Command, SequenceCommand, and Delegate. I'm pretty sure, though, that Adobe/Steven feel Cairngorm is a starting point to be built on... so if you stick to the basic pattern but need to add to it then that's totally cool. I actually find that you almost *have* to expand on Cairngorm to get certain things done... like running a Command that's dependant on another Command that's dependant on the results of a WebService call that's dependant on the results of another WebService call. Complicated business logic may require custom pieces be added to the base, but that's an okay thing. Darren -- 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/
RE: [flexcoders] How to set up HTTPService calls in Cairngorm? (Flex 2)
I'm not sure how to set up an HTTPService call in Cairngorm. I'm trying to load an XML document from a server. I think I got the Event and Command classes right, so here a just code snippets from the Service Locator and the Delegate: this.service = ServiceLocator.getInstance().getService(loadConfig ); The ServiceLocator provides two different methods for the three different RPC Service types. For HTTPService you have to use: this.service = ServiceLocator.getInstance().getHTTPService(loadConfig); Darren -- 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/
RE: [flexcoders] Re: Some Cairngorm questions
As for reusing events and commands from different places, most of what I could find from the Cairngorm creators suggest that Commands be specific use cases and a Command should always know its context. I suppose if the event payload indicates the context, then you're not violating this rule. I hadn't thought about doing this. I take Steven literally when he says Cairngorm should be a lightweight framework :-) By something else I was referring to something other than a Command (say, a model object) consuming the Delegates. Anything wrong with this? So... you're saying that, for instance, a User vo stored in the Model Locator would not only describe User data fields, but also contain methods with business logic? Like methods that could create delegates and deal with the returned results? It's not OOTB, so I'm not sure it's Cairngorm but it's not against the laws of the universe either, it could work. There *are* examples of vo's out there that do things like track and increment a static emp_id, or populate new vo properties in the vo constructor with values based on some other value stored in the Model Locator, but I'm not sure I'd put alot of business logic in there for several reasons; other developers familiar with Cairngorm wouldn't think to look for that in there... you'd have to change the Front Controller, Commands, and Delegate around... and you'd also be storing business logic inside your data model, which to me would make me feel all itchy. I think limited logic in the vo's, used to intelligently construct that vo, would be cool, but I'm not sure I'd expect to see much else in there. Darren --- In flexcoders@yahoogroups.com, Darren Houle [EMAIL PROTECTED] wrote: Jeremy... First. I don't see what value the FrontController adds in Flex apps. My initial thought was that it was important to prevent views from coupling to specific commands. Yes, if you subscribe to the idea of an MVC pattern then yes, you need to do this. And if you're not going to do this then you should either design a better pattern... or don't use one at all... but don't code something that's only half Cairngorm. Mostly because if I'm the developer who comes after you and has to reverse-engineer your code one day I'd like to know where things are and not have to quess or re-write it all from scratch :-) That really doesn't hold up though, because the views are coupled to specifc events Yes, Views generate events, but they don't have to be specific, like: AddPublicUserToManagerList(user) they can be generic, like: AddUserToList(user, public, manager) That way several different Views can re-use an Event and your Command can figure out what it should do based on the event args. There's pros and cons, but that's one way to reduce the number of pieces and parts. each of which results in a specific Command being executed. Since the FrontController maintains a 1-to-1 map of Cairngorm events to Commands Not necessarily. Yes, they are normally 1 to 1, but if you want an Event to trigger two Commands you can also do this in the Front Controller: addCommand(AppController.EVENT_ONE, SomeCommand); addCommand(AppController.EVENT_ONE, AnotherCommand); why don't views just run the commands directly? You could, and it's not a terrible thing to argue for fewer pieces, like for instance Delegates are actually optional, but they do help during testing and development because it's easier to point a simple Delegate at a test Service than to find and re-point all the occurances of a Service in your Commands. So, yes, you could do without the Front Controller but by gaining simplicity you'd lose some flexability (as well as confusing another Caringorm developer who's pulling their hair out trying to find where you put your Front Controller.) Next, we're moving most of our remote object calls into the model. The logic that controls what parts of the model get persisted, when, and in what order is complex, and our Commands had become huge and full of logic. As a reuslt of the changes, lots of the classes in the model now make remote calls and implement IResponder. I'm trying to get back to the model of Command kicks off the feature and then gets out of the way. Is there any rule with Cairngorm that says that Commands must do the remote calls? Is it common to use something other than a Command to make remote calls? Do you mean something else making the call to the Service as in a Delegate, or do you mean some other class (maybe a subclass of Command) handling that? As far as vanilla Cairngorm goes there's really just Command, SequenceCommand, and Delegate. I'm pretty sure, though, that Adobe/Steven feel Cairngorm is a starting point to be built on... so if you stick to the basic pattern but need to add to it then that's totally cool. I actually find
[flexcoders] How to cast a WebService lastResult when CFC returnType=xml
Oops... I meant to include this attachment with my previous question. Darren -- 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/ Untitled.gif Description: JPEG image
[flexcoders] How to cast a WebService lastResult when CFC returnType=xml
I have a ColdFusion Component (web service) that looks like... cffunction name=getEmployees access=remote output=false returntype=xml cfxml variable=myxml people person firstnameJohn/firstname lastnameSmith/lastname job titleDoctor/title descriptionblah blah blah/description /job /person person firstnameJane/firstname lastnameDoe/lastname job titleLawyer/title descriptionblah blah blah/description /job /person /people /cfxml cfreturn myxml /cffunction and some Flex code that looks like... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=TestService.getEmployees.send(); mx:WebService id=TestService wsdl=http://localhost/hr.cfc?wsdl; mx:operation name=getEmployees / /mx:WebService mx:Tree id=myTree width=50% height=50% showRoot=false dataProvider={TestService.getEmployees.lastResult}/ /mx:Application But what I get is a Tree that looks like: Flex doesn't seem to be able to extract the XML from the SOAP message, which is just SOAP XML wrapping my XML data. Changing the Operation's resultFormat from e4x to xml to object changes the amount of junk in the Tree, but doesn't fix the problem. As a matter of fact, it works best when I leave off this attribute and let the Operation decide what resultFormat to use. Casting lastResult as XML or XMLList doesn't seem to help either, and neither does ArrayUtil.toArray(TestService.getEmployee.lastResult) Is there something I need to do to the lastResult to get it to work in Trees, DataGrids, etc? Like cast it as some other data type? Why doesn't e4x parse the SOAP message properly and extract my XML? Just about every example I can find out there shows people using HTTPService to pull back just the XML data without the SOAP webservice stuff, or else shows how to create XML inside the mxml code itself using mx:XML but I can find nothing that shows how to return XML from a CFC web service and use/parse it in Flex properly (as easy as, say, a CFC that returns a Query object.) Darren -- 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/
[flexcoders] Cairngorm2 SequenceCommand
Does anyone know where I can find a working example of a SequenceCommand in a Cairngorm 2 app? Something I can import into Builder that will run? Thanks Darren -- 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/
RE: [flexcoders] Cairngorm 2 - Event propagation problem
Have you inlcuded the front controller tag in your login.mxml? You should have a line in login.mxml that looks something like... control:ApplicationFrontController id=applicationFrontController / Without this line your program would still compile, but there wouldn't be a front controller to hear the cairngorm events. Other than that your code looks fine. Darren From: hemantkamatgi [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm 2 - Event propagation problem Date: Thu, 17 Aug 2006 05:20:25 - Hi, I am trying to use Cairngorm 2 framework with Flex 2. This issue is that the event (login) does not seem to reach the FrontController. I am listing my application files with the significant code snippets: I have been struggling with this for the past 2 days but aint seem to figure out the problem. 1) ApplicationFrontController.as // addCommand(login, LoginCommand); 2) LoginCommand.as //implements Command //public function execute(event:CairngormEvent):void 3) LoginEvent.as //extends CairngormEvent //public function LoginEvent() //{ //super(login); //} 4) Login.mxml // public function doLogin():void // { var eventObject : LoginEvent = new LoginEvent(); // CairngormEventDispatcher.getInstance().dispatchEvent(new LoginEvent()); // } -- 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/
RE: [flexcoders] Flex/Cairngorm Syntax
Graham I see someone else answered your question, but... you might also want to look at Darron's page which talks about the Cairngorm Responder vs the Flex IResponder: http://www.darronschall.com/weblog/archives/000234.cfm The onResult(event:* = null):void method you asked about tells me you're using/learning the pure Cairngorm architecture which employs a Cairngorm Responder to get the data from the Delegate/Service back to the initial Command. Darron's page explains an alternative, IResponder, that is already part of the Flex API. It does the same thing, but it's more flexible, simpler to use, and easier to understand (just my opinion). I'm using it in all my new Cairngorm apps. I have yet to find a reason not to. Darren From: grahampengelly [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex/Cairngorm Syntax Date: Tue, 15 Aug 2006 13:02:35 - Hi I am just embarking on my first Cairngorm based Flex app. In one of the sample apps there is the following syntax public function onResult(event:* = null):void { } Could somebody please explain exactly what the argument (event:* = null) is actually doing. Obviously the argument is called 'event', I have got that far. Is the asterisk a wildcard for the type, and if so why, and is the null a default value if the argument is not supplied? I have had a look around the web and the docs but can't find any explanation of this syntax. What is more, I am not getting it to work but as I don't understand what it is supposed to be I'm not sure where the problem lies. Thanks for your help in advance... Graham -- 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/
Re: [flexcoders] Flex/Cairngorm Syntax
Actually... in Cairngorm, if a Command implements Responder the Command *must* contain: public function onResult( event : * = null ) : void {} public function onFault( event : * = null ) : void {} ...and if a Command implements IResponder that changes to public function result( event : Object ) : void {} public function fault( event : Object ) : void {} So in Graham's case, if he's using vanilla Cairngorm 2.0 his Commands are implemeting Responder, so he can't use Event in place of *... if he goes to Cairngorm 2.01 (my numbering, not a real thing) and uses IResponder he can use an Object type for the arg... but to use any other arg type (like event : Event) the Command would need to implement some totally new Responder class. Darren From: Samuel D. Colak [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex/Cairngorm Syntax Date: Tue, 15 Aug 2006 18:52:07 +0200 The * is an approximation of the Object keyword. Can be any type. Im not sure whether the typing is preserved or not but im sure Matt can confirm this. In effect event is cast as any object rather than having a strongly typed function call. Be aware in doing this though as type coercion issues may occur later on when dealing with the result. Since all event classes usually subclass from Event, you might use Event rather than * for type safety. Regards Samuel On 15/8/06 15:02, grahampengelly [EMAIL PROTECTED] wrote: Hi I am just embarking on my first Cairngorm based Flex app. In one of the sample apps there is the following syntax public function onResult(event:* = null):void { } Could somebody please explain exactly what the argument (event:* = null) is actually doing. Obviously the argument is called 'event', I have got that far. Is the asterisk a wildcard for the type, and if so why, and is the null a default value if the argument is not supplied? I have had a look around the web and the docs but can't find any explanation of this syntax. What is more, I am not getting it to work but as I don't understand what it is supposed to be I'm not sure where the problem lies. Thanks for your help in advance... Graham -- 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/
RE: [flexcoders] Cairngorm:One controller, so many commands, so many delegates, so many events
Yes, however, I try to create files that can be reused... that way different save buttons can use the same save event, command and/or the same save service. Oversimplifying, I know, but that's the general idea. If you have an app that performs lots of CRUD then you can generalize your code and reuse alot of it in different places. One CreateEvent, CreateCommand, CreateService but they all accept a variety of arguments so you can reuse them in different situations. Darren From: flxcoder [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm:One controller, so many commands, so many delegates, so many events Date: Mon, 14 Aug 2006 18:01:21 - Now I have about 4-5 events that correspond with the app server and get data back. Each of these events get registered with the CairngormEvent. When the controller executes these events it needs a command associated with the event. Each such command needs a delegate. So for my one interaction with the server I have at least one Event class, one Command class and one delegate class and untold number of interests in the ModelLocator. This is leading to code cluge. Just wondering whether this is what the rest of the developers are doing or am I doing something wrong. In my app, I might end up having about 30-40 separate server calls at least. That will lead to 90-120 independant files. Is this what you are running into as well? Am I missing something? Thanks. -- 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/
RE: [flexcoders] Getting XML from server
Try requestSolicitante.lastResult.root.solicitante.nome Darren From: falecomozig [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Getting XML from server Date: Thu, 10 Aug 2006 15:03:14 - Hi fellows. I have a test application where I send two variables to the server, I get the two as POST vars and make a search in the db. As a result, I have an agent sending this XML: ?xml version=1.0? root solicitante nomeAAA/nome ramal/ramal departamentoBBB/departamento secaoCCC/secao emailHHH/email /solicitante /root I´m trying to put some of theresults into textInputs with this: private function onResult(oEvent:ResultEvent):void { txSolicitante.text = requestSolicitante.lastResult.solicitante.nome; } Well, it´s not working. How can I do this??? Thanks Zig -- 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/
RE: [flexcoders] Re: Array parameters fail with Webservices
Did you try creating and sending that XML I suggested? Darren From: kaleb_pederson [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Array parameters fail with Webservices Date: Thu, 03 Aug 2006 15:36:07 - Thanks for the suggestion. I tried: // variation five ws.sendStrings(One,Two,Three); // variation six ws.sendStrings(new Array(One,Two,Three)); Both of the above result in the exact same empty SOAP message being generated. Any other ideas? Given the number of variations that I have tried, I'm beginning to wonder if this is a bug? Thanks for the help. --Kaleb --- In flexcoders@yahoogroups.com, Renaun Erickson [EMAIL PROTECTED] wrote: Try: ws.sendStrings(One,Two,Three); Which should make the call with 3 distinct parameters. Renaun --- In flexcoders@yahoogroups.com, kaleb_pederson kibab@ wrote: I'm using a webservice that requires that an array of strings be passed to one function. Each method that I have tried to send array parameters fails. By fails, I mean the request is successfully sent to the server but the parameter list is empty and thus the response isn't valid for the request that I'm attempting to make. Here are the variations that I have tried: ws = new mx.rpc.soap.mxml.WebService(); ws.loadWSDL(http://192.168.1.108:8080/stockquotes/stock_quote?wsdl;); // waits for loadWSDL to finish // variation one var op:Object = ws.getOperation(sendStrings); op.arguments = new Array(One,Two,Three); op.send(); // variation two ws.sendStrings.arguments = new Array(One,Two,Three); ws.sendStrings.send(); // variation three ws.sendStrings.send(new Array(One,Two,Three)); // variation four ws.sendStrings.send(One,Two,Three); The request that's made looks like the following (less formatting): ?xml version=1.0 encoding=utf-8? SOAP-ENV:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; SOAP-ENV:Body ns1:sendStrings xmlns:ns1=http://server.webservices.tutorials.wakaleo.com/; / /SOAP-ENV:Body /SOAP-ENV:Envelope The response that comes back looks like the following: ?xml version=1.0 ? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:ns1=http://server.webservices.tutorials.wakaleo.com/; soapenv:Header xmlns:wsa=http://www.w3.org/2005/08/addressing; /soapenv:Header soapenv:Body ns1:sendStringsResponse/ns1:sendStringsResponse /soapenv:Body /soapenv:Envelope The XSD shows the following input specification: xs:complexType name=sendStrings xs:sequence xs:element name=arg0 type=xs:string maxOccurs=unbounded minOccurs=0/ /xs:sequence /xs:complexType I also tried using MXML without any success. See the following for details: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=585threadid=1176598#4215452 Any thoughts? Am I missing something obvious? I can give you more information, including the complete WSDL, so please let me know if there is anything else that would be useful. Thanks. --Kaleb -- 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/
RE: [flexcoders] Re: Newbie Help - simple login via CFC
Assuming this is Delegate code... Implementing the Caringorm Responder requires an onResult(event:*=null):void method, but implementing IResponder requires a result(data:Object):void method, so... this looks like something kinda the same as IResponder only different. It accepts the Object arg like IResponder but the method isn't named result(). Not sure, but if this is a Delegate but it's some kind of custom IResponder then that pattern would also probably accept an Object. The documentation for IResponder says While data is typed as Object, it is often (but not always) an mx.rpc.events.ResultEvent so... the code below also accepts Object for the same reason (I guess) except that they're letting coercion happen instead of accepting a ResultEvent as the arg or explicitly casting it as a ResultEvent. Darren From: João Fernandes [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Newbie Help - simple login via CFC Date: Thu, 3 Aug 2006 15:31:49 +0100 Put a breakpoint here private function login_result(event: Object):void And run your app in debug mode and check your event object. BTW, shouldn't be login_result(event:ResultEvent):void instead? João Fernandes Dep. Informática - Área de Desenvolvimento Cofina media Avenida João Crisóstomo, Nº 72 . 1069-043 Lisboa PORTUGAL Tel (+351) 213 185 200 . Fax (+351) 213 540 370 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of flycl65 Sent: quinta-feira, 3 de Agosto de 2006 15:25 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Newbie Help - simple login via CFC Wish it was that easy, changed the spelling and it still doesn't work but now a different error. TypeError: Error #1009: Cannot access a property or method of a null object reference. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Peter Watson [EMAIL PROTECTED] wrote: Property resut Typo here: event.resut.UserInfo.BrokerID resut -- result From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of flycl65 Sent: Thursday, August 03, 2006 1:13 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Newbie Help - simple login via CFC Trying to do a simple login via CFC. Query SQL db and return a field value (BrokerID). Returning the following error: ReferenceError: Error #1069: Property resut not found on mx.rpc.events.ResultEvent and there is no default value. I tried doing it by returning the query and couldn't get it to work, and now tried a structure. Help. ?? cffunction name=login access=remote !-- make sure we have username and password -- cfargument name=username required=true type=string / cfargument name=password required=true type=string / cfquery name=getUser datasource=dentalsales SELECT * FROM Users WHERE Logon = '#arguments.username#' AND password = '#arguments.password#' /cfquery !-- if username and password are correct -- cfif getUser.recordCount eq 1 cfset userInfo = structNew() cfset userInfo.isLoggedIn = true cfset userInfo.username = getUser.logon cfset userInfo.BrokerID = getUser.BrokerID cfreturn userInfo / /cfif -- private function login_result(event: Object):void { // login successful, remember the user. if( (event.result) ) { // assign BrokerID this.BrokerID = event.resut.UserInfo.BrokerID; trace(BrokerID); if( this.rememberLogin.selected ) { this.lso.data['username'] = this.username.text; this.lso.data['password'] = this.password.text; } else { this.lso.data['username'] = null; this.lso.data['password'] = null; } this.dispatchEvent( new Event('loginSuccessful') ); } else { // login didn't work. show message errorMessage(Login unsuccessful); } } -- 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/
RE: [flexcoders] Re: Error 1119
I believe the Operation.result property was changed to Operation.lastResult in Beta3 and has been there ever since. If you check the help (Language Reference) in Flex Builder and look up mx.rpc.soap.Operation you'll see where it lists... lastResult : Object The result of the last invocation. under public properties. As for updated documentation... to my knowledge everything that's packaged with Flex 2 final is up to date. Not sure where you found the old example code. According to this labs page: http://labs.adobe.com/wiki/index.php/Flex Flex content isn't hosted on Labs anymore since final shipped, except maybe for stuff like Cairngorm and the Ajax bridge. I'm sure if you posted the link to the old sample code, someone somewhere might do something about it :-) Darren From: Stefano [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Error 1119 Date: Wed, 02 Aug 2006 16:30:44 - Thank you for your help Darren, my problem has solved. I coded that application following instructions provided by Adobe labs and their tutorials... have any methods changed? Is there an updated manual I can reference to? Thank you again, cheers. -- 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/
RE: [flexcoders] Re: Array parameters fail with Webservices
Renaun, yes, that will send three distinct args, but I believe he needs to send one distinct arg that is an Array of three values. Kaleb, have you tried creating an XML object and passing that into your operation? var message:XML = arglist arg1Moe/arg1 arg2Curly/arg3 arg3Larry/arg4 /arglist; var op:Object = ws.getOperation(sendStrings); op.send(message); Or something along those lines? (Forgive me if this syntax is 100% correct, I just hacked it out real quick from memory) Darren From: Renaun Erickson [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Array parameters fail with Webservices Date: Wed, 02 Aug 2006 18:21:06 - Try: ws.sendStrings(One,Two,Three); Which should make the call with 3 distinct parameters. Renaun --- In flexcoders@yahoogroups.com, kaleb_pederson [EMAIL PROTECTED] wrote: I'm using a webservice that requires that an array of strings be passed to one function. Each method that I have tried to send array parameters fails. By fails, I mean the request is successfully sent to the server but the parameter list is empty and thus the response isn't valid for the request that I'm attempting to make. Here are the variations that I have tried: ws = new mx.rpc.soap.mxml.WebService(); ws.loadWSDL(http://192.168.1.108:8080/stockquotes/stock_quote?wsdl;); // waits for loadWSDL to finish // variation one var op:Object = ws.getOperation(sendStrings); op.arguments = new Array(One,Two,Three); op.send(); // variation two ws.sendStrings.arguments = new Array(One,Two,Three); ws.sendStrings.send(); // variation three ws.sendStrings.send(new Array(One,Two,Three)); // variation four ws.sendStrings.send(One,Two,Three); The request that's made looks like the following (less formatting): ?xml version=1.0 encoding=utf-8? SOAP-ENV:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; SOAP-ENV:Body ns1:sendStrings xmlns:ns1=http://server.webservices.tutorials.wakaleo.com/; / /SOAP-ENV:Body /SOAP-ENV:Envelope The response that comes back looks like the following: ?xml version=1.0 ? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:ns1=http://server.webservices.tutorials.wakaleo.com/; soapenv:Header xmlns:wsa=http://www.w3.org/2005/08/addressing; /soapenv:Header soapenv:Body ns1:sendStringsResponse/ns1:sendStringsResponse /soapenv:Body /soapenv:Envelope The XSD shows the following input specification: xs:complexType name=sendStrings xs:sequence xs:element name=arg0 type=xs:string maxOccurs=unbounded minOccurs=0/ /xs:sequence /xs:complexType I also tried using MXML without any success. See the following for details: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=585threadid=1176598#4215452 Any thoughts? Am I missing something obvious? I can give you more information, including the complete WSDL, so please let me know if there is anything else that would be useful. Thanks. --Kaleb -- 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/
[flexcoders] RPC Binding vs Explicit in Cairngorm
In Cairngorm a Command creates a Delegate which fires off (e.g.) a WebService operation. The way that's done in most Cairngorm examples is like this: service = ServiceLocator.getInstance().getService('someWebService'); token = service.someWSMethod(someData); This AS way of triggering the WebService passes an outgoing argument (someData) to the mx:operation, which sends it to the remote web service. Problem is that in the Flex documentation, there are way more examples of using data binding inside an mx:operation to send those outgoing arguments... mx:WebService id=employeeWS destination=wsDest showBusyCursor=true fault=Alert.show(event.fault.faultstring) mx:operation name=getList mx:request deptId{someDataProvider.data}/deptId /mx:request /mx:operation /mx:WebService In Cairngorm, to use the data binding method I'd have to bind to data in the ModelLocator, so even if the argument's data isn't something I'm tracking or storing in ModelLocator I'll have to store it in there for the WebService data binding to work. That sounds junky. That means when someone clicks on a selected person (or whatever) I'll have to first store them in ModelLocator, fire off the WebService operation, then in my result handler clean that temp selected person out of ModelLocator. But... If I use the AS method of firing off a WebService (which appears to be the proper way) and just do token = service.someWSMethod(someData) and pass in (someData) I don't have to worry about all that temp ModelLocator stuff... but... there's very little documentation on how to pass data into an mx:operation using AS. Actually I think there's only two, and they're very simplistic. I've gotten basic WebServices (with a single arg) to work the AS way, but what happens when I need to send multiple args to my remote web service? I know I can do token = service.someWSMethod(someData, otherData, evenMoreData) but how does the remote web service know which data maps to which args? Will the operation just process and send them in order, or are the variable names automatically changed into tags before calling the remote ws (e.g. someData is sent to the remote web service as someDatasomeData's value/someData)? Is there any documentation or examples out there that deal with this on a slightly more complex level? I just need to know how to call a WebService operation with multiple outgoing args, and to understand the rules behind passing args to WebService operations in AS. Anyone? Thanks! Darren -- 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/
[flexcoders] Calling DashboardIteration1 WebService - Explicit vs Binding
I've been messing with the DashboardIteration1 Cairngorm example from Alex Uhlmann's blog and I have a question about the delegate/webservice piece. The example's source code was missing any real web service code (and the delegate was missing the code that calls a web service) so I've added all that in myself. I wanted the example to actually call a remote service that generated a rand() instead of generating the rand() in the delegate. That works fine, however, while testing I hard-coded the symbol name into the mx:request but... when I changed: mx:operation name=getQuoteForSymbol resultFormat=object mx:request symbolADBE/symbol /mx:request /mx:operation to mx:operation name=getQuoteForSymbol resultFormat=object mx:request symbol{symbol}/symbol /mx:request /mx:operation it didn't work (but... I didn't really expect it to) The delegate is calling the service like this: var token : AsyncToken = service.getQuoteForSymbol(symbol); but how do I reference that symbol var in the mx:request? There are tons of examples in the documentation that show how to use binding in the request, but only one example of passing a var explicitly... but the code in that example is different enough from Cairngorm that I can't seem to figure out how to make it work. Any examples out there I missed? Or maybe a flexcoders thread that mentioned this? I've looked but can't find anything. Thanks!! Darren -- 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/
RE: [flexcoders] colorPicker, getting the colour out
Thought I posted this already, but I haven't seen it appear on the list yet... Is this what you're looking for? mx:Application mx:TextArea id=forChange width=150 text=0x{cp.selectedColor.toString(16)}/ mx:ColorPicker id=cp / /mx:Application Darren From: Sonja Duijvesteijn [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] colorPicker, getting the colour out Date: Tue, 13 Jun 2006 12:39:45 +0200 When I use custom objects or an array to fill the colorpicker everything works like a charm. But when I try to use the colorpicker as it is I can't seem to get the selected color out as an hexidecimal value. I've tried 'selectedColor', 'selectedItem', and have trying to get 'selectedIndex' to admit colour, but no luck there either. The documentation gives enough help for the advanced topics (putting in your own colours) but forgets the basics. How can I find out which colour is selected? (in hexidecimals) Thanks in advance, Sonja Yahoo! Groups Sponsor ~-- Great things are happening at Yahoo! Groups. See the new email design. http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
RE: [flexcoders] colorPicker, getting the colour out
Try this... mx:TextArea id=ta width=150 text=0x{cp.selectedColor.toString(16)}/ mx:ColorPicker id=cp / Darren From: Sonja Duijvesteijn [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] colorPicker, getting the colour out Date: Tue, 13 Jun 2006 12:39:45 +0200 When I use custom objects or an array to fill the colorpicker everything works like a charm. But when I try to use the colorpicker as it is I can't seem to get the selected color out as an hexidecimal value. I've tried 'selectedColor', 'selectedItem', and have trying to get 'selectedIndex' to admit colour, but no luck there either. The documentation gives enough help for the advanced topics (putting in your own colours) but forgets the basics. How can I find out which colour is selected? (in hexidecimals) Thanks in advance, Sonja Yahoo! Groups Sponsor ~-- Great things are happening at Yahoo! Groups. See the new email design. http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM ~- -- 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/
RE: [flexcoders] stop the help highlighting
I don't know of any make the highlighting go away button. I just click Next then Previous in the upper right corner to advance one page and then one back. Makes the highlighting go away. Two clicks instead of one, no biggie. Darren From: Jason [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] stop the help highlighting Date: Mon, 12 Jun 2006 15:35:00 - Okay, I've got to say something about this because it's really annoying. Click on the Help-Search and search on the word variable. Now click on the hit Variables (Programming ActionScript 3.0 - Beta 3). Now try to read the text of the topic. Every single match of the word variable is highlighted. It makes it VERY distracting to try to actually read the help. I've run into this over and over. My usual procedure is to click the topic, go up one level in the topic tree (the path at the top of the page with the between them), then find the topic I was on and click it again. This is just plain stupid. Why isn't there at least a button that says stop highlighting? Sorry for the ranting, very simple usability things like this tend to push me over the edge. -- 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 Yahoo! Groups Sponsor ~-- Everything you need is one click away. Make Yahoo! your home page now. http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/nhFolB/TM ~- -- 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/
RE: [flexcoders] Dumb Newbie Question - Underlined Hyperlinks
You can also do something like... a href=http://mysite.com/index.cfm;bu#name#/u/b/a It's really basic, but it works fine and the user gets the point. According to the docs... all that happens by default with links is that the mouse turns to a hand, there's no hover, underline, etc. to let you know it's a link. But you can use other tags to make it look like a link. My undertanding is that the Flash Player supports the following tags (and *only* the following tags) when embedding HTML in textareas, the htmlText property, etc: a b br font img i li p textformat u Darren From: swhitley02 [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Dumb Newbie Question - Underlined Hyperlinks Date: Wed, 07 Jun 2006 21:34:40 - Hello everyone. I'm hoping this is super easy, but I can't find any documentation on it. I'm working with Flex 2.0 Beta 3. While using the TextArea control, I'm posting an HTML hyperlink to the htmlText property. The link appears in the TextArea control and it works, but there's nothing to show the user that it's a link. Is there an easy way to force the display of hyperlinks to blue and underlined in the TextArea control? Is there another control that will display standard HTML? -- 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 Yahoo! Groups Sponsor ~-- You can search right from your browser? It's easy and it's free. See how. http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] Is this a bug?
Why does this... package org.mycomp.iaclean.vo { public class LoginVO implements org.nevis.cairngorm.ValueObject { public var uid : String; public var password : String; } } Return an Interface ValueObject was not found error, but if I import first like this... package org.mycomp.iaclean.vo { import org.nevis.cairngorm.ValueObject; public class LoginVO implements ValueObject { public var uid : String; public var password : String; } } It works fine? Maybe I'm just used to Java, but shouldn't you be able to specify the classpath after implements without using import or is it a requirement in AS 3 that you first import packages prior to referencing them? I'm usually in the habit of using just the classpath unless I have to specify it more than once, then I import it. I also specify the full path in case there's ever two class names that are the same and I need to differentiate. I guess I just need to know where and when I can use the path, and in what cases I must import first. Thanks, Darren Yahoo! Groups Sponsor ~-- Everything you need is one click away. Make Yahoo! your home page now. http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/nhFolB/TM ~- -- 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/
RE: [flexcoders] Re: Is this a bug?
Tracy and Ben, thank you :-) Darren From: ben.clinkinbeard [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Is this a bug? Date: Fri, 09 Jun 2006 19:44:33 - Yep, in AS3 everything must be imported no matter what. See #5 here: http://labs.adobe.com/wiki/index.php/ActionScript_3:Learning_Tips Ben Yahoo! Groups Sponsor ~-- Home is just a click away. Make Yahoo! your home page now. http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/nhFolB/TM ~- -- 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/
[flexcoders] MAX 2006
As a sequined friend of mine once said Viva Las Vegas... http://www.adobe.com/events/max/ Yahoo! Groups Sponsor ~-- Get to your groups with one click. Know instantly when new email arrives http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/nhFolB/TM ~- -- 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/
RE: [flexcoders] layout components from right in HBox
You can do this: mx:HBox width=400 mx:Spacer width=100%/ mx:Button label=MyButton/ /mx:HBox You'll see the button is pushed to the right side of the 400 px wide hbox Darren From: Husain Kitabi [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] layout components from right in HBox Date: Sat, 3 Jun 2006 04:16:26 -0700 (PDT) Hi How to layout components in HBox where if i want to add a button it should appear on the right end of the HBox. Thanks hussain - Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Re: Dispatching multiple events in order with cairngorm
I agree with Alex. Say you have a View with a button... you mutate that button's click= event into a CairngormEvent. Your custom Cg Event triggers a Cg Command, which sets state in the ModelLocator. New to Beta 3 is a utility called ChangeWatcher that allows you to watch a bindable value and define a handler to run when the value changes. In the original View (or any other View) you could simply watch that state var and have ChangeWatcher call yourMoveEffect.play(). You could mutate the standard effectEnd= event into a new CairngormEvent that triggered the Cg Command that needs to run at the end of the effect. Darren From: Alex Uhlmann [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Dispatching multiple events in order with cairngorm Date: Thu, 1 Jun 2006 06:46:57 -0700 Hi Guys, I'd probably suggest letting the view dispatch a Cairngorm event, having that following Command change a state in your model and have that view bind to that state change in the model. This view will trigger the effect and at effectEnd you will trigger another Command. IMHO, the Command should never invoke anything view related (like an effect) by himself. Note that your view (MXML) can bind to the model using the mx:Binding tag. BTW: check out Paul's little helper for that. ;) http://weblogs.macromedia.com/paulw/archives/2006/05/the_worlds_smal.cfm #more Best, Alex Alex Uhlmann Consultant (Rich Internet Applications) Adobe Consulting Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK p: +44 (0) 131 338 6969 m: +44 (0) 7917 428 951 [EMAIL PROTECTED] -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Luc ESSER Sent: 01 June 2006 10:35 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Dispatching multiple events in order with cairngorm Thanx Tim i'm gonna look into this, but i'm worried about one issue : In case of a command launching an effect in a component, when the effect starts, it means the command has executed, thus invocating the next command. What if i want to wait for effectEnd before invoking next command... I'll keep you posted. -JL, investigating. - Original Message - From: Tim Hoff [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, June 01, 2006 11:18 AM Subject: [flexcoders] Re: Dispatching multiple events in order with cairngorm Hi Jean-Luc, It looks like you might need to use the Cairngorm SequenceCommand class. I haven't used this yet but if you look at the source for the SequenceCommand class, it describes a possible solution for you. If you use this and get it to work, please post your findings here. Good Luck, Tim --- In flexcoders@yahoogroups.com, JL E. [EMAIL PROTECTED] wrote: Hi there ! I have a search pane. I open it (sliding to the right). Now, i want to go somewhere else in the application. In order to do that, when clicking on let's say 'contact', i dispatch an event which is gonna show page contact. The thing is that when clicking 'contact', before executing the command which is gonna build contact page, i want to check if the search pane is open, and if so, i want to dispatch event closeSearchPane, wait until it is fully closed, and only then execute my command showContactPage. I guess coding this logic in my command showContactPage won't scale as i may need this logic to work everywhere in the app, whichever event i am gonna dispatch. How would you do it ? What am i missing here ? Best, Jean-Luc PS: Thanx Alex for previous answers regarding getters setters ! Worked fine ! -- 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 -- 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 Yahoo! Groups Sponsor ~-- Home is just a click away. Make Yahoo! your home page now. http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/nhFolB/TM ~- -- 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
RE: [flexcoders] Cairngorm question
If I'm not mistaken I think this is the latest... http://weblogs.macromedia.com/swebster/archives/2006/05/cairngorm_2_for.cfm Darren From: Michael [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Cairngorm question Date: Thu, 1 Jun 2006 09:19:12 -0500 Where can I download cairngorm 2.0. I believe I have downloaded the .99 version, but I didn't get a chance to learn it before I got tasked with a Flex 2.0 project. _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steven Webster Sent: Thursday, June 01, 2006 8:15 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Cairngorm question Michael, I wrote a 6-part series of articles for Adobe Devnet that seem to be helping people to get started with Cairngorm, you'll find the first part here: http://www.adobe.com/devnet/flex/articles/cairngorm_pt1.html Hope that helps ! Steven Steven Webster Practice Director (Rich Internet Applications) Adobe Consulting Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK p: +44 (0) 131 338 6108 m: +44 (0) 7917 428 947 [EMAIL PROTECTED] _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Sent: 01 June 2006 02:51 To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm question Does anyone know some good resources for cairngorm, and what the best way to start learning it is. I have done a few large flex apps, and I would like to see what cairngorm can do for me. Thanks a lot for the help! Michael -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site +design+developmentw2=Computer+software+developmentw3=Software+design+and+ developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=1 66.sig=L-4QTvxB_quFDtMyhrQaHQ site design development Computer http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+si te+design+developmentw2=Computer+software+developmentw3=Software+design+an d+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s =166.sig=lvQjSRfQDfWudJSe1lLjHw software development Software http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+ site+design+developmentw2=Computer+software+developmentw3=Software+design+ and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5 s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ design and development Macromedia http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+deve lopmentw2=Computer+software+developmentw3=Software+design+and+development w4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6n PIrz7_EpZI36cYzBjw flex Software http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=W eb+site+design+developmentw2=Computer+software+developmentw3=Software+desi gn+and+developmentw4=Macromedia+flexw5=Software+development+best+practice c=5s=166.sig=f89quyyulIDsnABLD6IXIw development best practice _ YAHOO! GROUPS LINKS * Visit your group flexcoders http://groups.yahoo.com/group/flexcoders on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! http://docs.yahoo.com/info/terms/ Terms of Service. _ image001.gif -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Re: Multiple instances
Doug, I think maybe the lack of replies might be due to the fact you haven't asked a question yet. Need assistance is very vague. Specifically what do you need assistance with? Are you having trouble somewhere in your custom mxml components? Are you looking for a way to bind your interface to data? If I had to guess I'd say you're looking for a way to bind your interface to data, but also provide a way to offer those same pages blank, so a user can fill them out to create new records...? Darren From: Doug Arthur [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Multiple instances Date: Thu, 1 Jun 2006 08:42:58 -0500 Wow, it amazes me how active this group is, but I yet to get an answering from anyone on this problem. Does anyone have any suggestions for me at all? Thanks! - Doug On 5/31/06, Doug Arthur [EMAIL PROTECTED] wrote: I hope I form my question and problem adequate enough for everyone to understand. I'm still fairly new to flex and I'm trying to do something complicated, at least in my mind it is. What I'm trying to do is to have multiple instances of the below code with different data. I have pages broken out into multiple mxml components. Each components has data driven values on it, but what i need is to have multiple instances of data and to propagate the data through the pages to their respective components... The purpose of this is to use a Previous/Next Record process. This include non-existent records, what I mean by this is that a user can enter multiple records in a given time with a Add New Record action. And also a Delete Record action. I hope this all is clear, please, any assistance would be much appreciated. Thanks! Here's the code example (really high level): mx:HBox width=100% height=100% mx:TabNavigator height=100% width=100% recorddata:Overview / recorddata:Charges / recorddata:Dispositions / recorddata:Actions / recorddata:Fees / /mx:TabNavigator /mx:HBox - Doug -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Re: Dispatching multiple events in order with cairngorm
Tim, That's the one part of Cairngorm (for me) that's the tricksiest... how one might handle (as someone else recently put it) the sexy features of Flex in Cg. Transitions, states, effects, animations that may need to be syncronized with something else. Of course, you don't want to put too much control in the Cg framework since that might restrict you in some other way (I definitely agree that Cg needs to be lightweight as Steven's articles point out.) The ChangeWatcher is, however, very cool in that it allows you to watch not only one bound state value, but chains of them... so if you needed to trigger an event only after, say, four other events completed you could have those four events set flags in the ModelLocator on effectEnd and have your ChangeWatcher bound to all four flags, only calling it's handler after all four were completed. I think that the ChangeWatcher is a great addition to B3, and actually offers the same benefits, with more functionality, than Paul's helper class. As far as Cg goes, maybe we just need a Cg example out there that uses ChangeWatcher (or something like it) that shows a chain of events triggering a final command... take some of the mystery out of it. Darren From: Tim Hoff [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Dispatching multiple events in order with cairngorm Date: Thu, 01 Jun 2006 16:42:55 - I absolutely agree that a Command should never invoke anything view related, except for setting bound model values that update views automatically. For Jean-Luc's scenario, my thinking is that there may be several different views that require closure before the primary command is executed. To close any or all of the possible open views in a clean and synchronous manner, I would think that you could combine the SequenceCommand (is it ChainCommand now?) with the ChangeWatcher utility or a simple eventListener. The executeNextCommand function would be invoked only after the SequenceCommand receives notification of the effectEnd event. The question is, should you use the ChangeWatcher to listen for a model variable change, that would have to be updated by the view or a helper? Or, would an explicit eventListener for the views' effectEnd event be more suitable? This is a gray area in Cairngorm for me. It seems that there may be times when a complete round-trip of event communication, starting and ending at a view, may come in handy and/or be necessary. Well, maybe not necessary but certainly more convenient. For me, this fits in the same category as deciding whether to perform a simple view action with a ViewHelper/ViewLocator or with yet another Event/Control/Command/Model structure. I'm not sure if discussing theoretical framework implementation is germane to this list, but I'd be interested to hear further thoughts (best practices) concerning this topic. Thanks for your ideas Steven, Alex and Darren. Tim Hoff --- In flexcoders@yahoogroups.com, Jean-Luc ESSER [EMAIL PROTECTED] wrote: I do agree with you guys, that's the way to go ! Thanx ! BTW, loved Paul's little helper. This one is a sure hit ! -JL - Original Message - From: Darren Houle [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, June 01, 2006 4:49 PM Subject: RE: [flexcoders] Re: Dispatching multiple events in order with cairngorm I agree with Alex. Say you have a View with a button... you mutate that button's click= event into a CairngormEvent. Your custom Cg Event triggers a Cg Command, which sets state in the ModelLocator. New to Beta 3 is a utility called ChangeWatcher that allows you to watch a bindable value and define a handler to run when the value changes. In the original View (or any other View) you could simply watch that state var and have ChangeWatcher call yourMoveEffect.play(). You could mutate the standard effectEnd= event into a new CairngormEvent that triggered the Cg Command that needs to run at the end of the effect. Darren From: Alex Uhlmann [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Dispatching multiple events in order with cairngorm Date: Thu, 1 Jun 2006 06:46:57 -0700 Hi Guys, I'd probably suggest letting the view dispatch a Cairngorm event, having that following Command change a state in your model and have that view bind to that state change in the model. This view will trigger the effect and at effectEnd you will trigger another Command. IMHO, the Command should never invoke anything view related (like an effect) by himself. Note that your view (MXML) can bind to the model using the mx:Binding tag. BTW: check out Paul's little helper for that. ;) http://weblogs.macromedia.com/paulw/archives/2006/05/the_worlds_sma l.cfm #more Best, Alex Alex Uhlmann
RE: [flexcoders] Flex Noob Question(s)
Hey Cameron, That's one of the things the Cairngorm framework is good for... it uses a ModelLocator object to store all your other application data in one place. It's similar to the session object on an app server, except it's client side in the Flex app. All your Views can bind to the data in the ModelLocator. When your business logic needs to change data it does so in the ModelLocator, and those changes are then automagically reflected across all your Views. If you're new to Flex I'd suggest you start out learning how to code Cairngorm style. Learn that and alot of otherwise tricky things will be handled for you. After coding my first apps the normal way and then later figuring out how Caringorm worked I was really kicking myself. Darren From: Cameron Childress [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Noob Question(s) Date: Tue, 30 May 2006 13:31:18 -0700 So, I'm just getting into framing out my first serious Flex application and feel a little overwhelmed by the quantity of raw documentation and a little underwhelemed by the documentation path from noob to expert. After thrashing around a bit in the docs, I thought I would ask a couple of questions here. Please don't throw things at me if this was discussed last week. Trust me, I looked. I'm just lost. At this point I *think* understand the concept behind creating custom components, and using them to decouple different functional parts of your application. To this end, I am building three components for an interface. They are 1) Search inputs 2) Search result list 3) Item detail I'd like to use the same data retrieved in the Search Result (2), to populate the item detail screen. However, I am getting errors in the Flex builder when I try to refer to a dataset defined in one component (2) in another component (3). I have a feeling I can put the dataset in yet another component that I can just pass around the other components, but I am having difficulty finding a good example of this. -Cameron -- 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 Yahoo! Groups Sponsor ~-- Get to your groups with one click. Know instantly when new email arrives http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/nhFolB/TM ~- -- 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/
RE: [flexcoders] Re: Loading one cairngorm into another cairngorm
If that was the case then you'd have to worry about singletons and object names every time you used a SWFLoader to load any other SWF. Any SWF you load might have coincidentally used a duplicate variable, class, or package name. I'm not 100% sure, but I believe that SWFs loaded into other SWFs by default are scoped separately and self contained and you do not have to worry about the singleton classes or var names. If that wasn't the case then it would be incredibly simple to communicate between the mast SWF and the loaded SWF. It would be an easy enough experiment... just create a page that loaded the same Flex app twice on the page, right next to each other, and see if they continue to work properly. Then try it again with a simple app that, say, displayed a label and then SWFloaded a copy of itself. See if that collides. Darren in the case of Cairngorm, I think that I might run into problems with the fact that in Cairngorm, some things are singletons (AppController, Service, AppModel). If Both apps have the same names for these singletons, would these not conflict? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Max 2006
Slightly off [Flex] topic, but since Adobe people monitor this list I thought I'd ask... Does anyone have any new details on MAX '06? The Call for Topic deadline for MAX '05 was May 13th and we're already past that date for this year, so... is Adobe having a really hard time deciding what shape the MAX conference should take this year? Darren -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Max 2006
Thanks Joan and Ben, I appreciate the update! Darren From: Ben Forta [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Max 2006 Date: Fri, 26 May 2006 18:11:17 -0400 It'll be another week or so before much is posted publicly. It's taken a little longer to work things out this year with so many products and audiences, but we're getting there. Stay tuned. --- Ben _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Joan Tan Sent: Friday, May 26, 2006 5:48 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Max 2006 MAX will be the week of Oct 24th in Vegas. Other than that, I don't think they have announced dates for submitting topics yet. I've sent an inquiry about this and will pass on any information that I hear. Joan _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darren Houle Sent: Friday, May 26, 2006 2:00 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Max 2006 Slightly off [Flex] topic, but since Adobe people monitor this list I thought I'd ask... Does anyone have any new details on MAX '06? The Call for Topic deadline for MAX '05 was May 13th and we're already past that date for this year, so... is Adobe having a really hard time deciding what shape the MAX conference should take this year? Darren -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site +design+developmentw2=Computer+software+developmentw3=Software+design+and+ developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=1 66.sig=L-4QTvxB_quFDtMyhrQaHQ site design development Computer http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+si te+design+developmentw2=Computer+software+developmentw3=Software+design+an d+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s =166.sig=lvQjSRfQDfWudJSe1lLjHw software development Software http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+ site+design+developmentw2=Computer+software+developmentw3=Software+design+ and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5 s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ design and development Macromedia http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+deve lopmentw2=Computer+software+developmentw3=Software+design+and+development w4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6n PIrz7_EpZI36cYzBjw flex Software http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=W eb+site+design+developmentw2=Computer+software+developmentw3=Software+desi gn+and+developmentw4=Macromedia+flexw5=Software+development+best+practice c=5s=166.sig=f89quyyulIDsnABLD6IXIw development best practice _ YAHOO! GROUPS LINKS * Visit your group flexcoders http://groups.yahoo.com/group/flexcoders on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . _ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Loading one cairngorm into another cairngorm
If I'm understanding you right I'm not sure whether they're Cairngorm or not has anything to do with it... once they're compiled into SWFs it doesn't matter how you architected your original code. Not sure if this is what you mean, but... you could write Flex app A and make it similar to, say, a movie viewer that used SWFLoader to display other sub SWFs. Those sub SWFs could be compiled Flex apps B, C, and D. You could potentially build a portal that way. Only challenge I see is how much communication could happen between the master Flex app and the SWFLoaded Flex sub apps. I suppose you could use RPC services to pass data from the master to an intermediary to the sub apps, or possibly there are internal AS functions that would provide communication channels directly between master SWF and SWFLoaded SWF? Darren From: sufibaba [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Loading one cairngorm into another cairngorm Date: Fri, 26 May 2006 23:51:30 - Hello everyone, I have one cairngorm application that I would like to Dynamically Load into another cairngorm application. What would be the strategy and code to do this. Thanks. Tim -- 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 SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Bindable Error
I don't know if I'm tired, dumb, or just missing something obvious. Why does this... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml mx:Script![CDATA[ [bindable] public var myNum:uint = 0; ]]/mx:Script mx:Label text={myNum} / mx:Button label=Push Me click=myNum=10; mx.controls.Alert.show('myNum = '+myNum, 'myNum'); / /mx:Application ...return this error? Data binding will not be able to detect assignments to myNum. The Alert box shows the value is changed on click, but sure enough the label does not change. This seems like about the simplest example of Bindable I could possibly think of. Sorry to whine, but why is this so hard? And why can't I find the answer in the help files? I think Flex is amazingly cool, but dang it's hard to find the answers to some things that should be really basic. Like I said, maybe I'm just over-tired :-) Thanks! Darren -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Re: Bindable Error
Man, I picked the wrong week to stop sniffing glue Thanks :-) From: Tim Hoff [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Bindable Error Date: Thu, 18 May 2006 21:41:38 - Try changing [bindable] to [Bindable]. -TH --- In flexcoders@yahoogroups.com, Darren Houle [EMAIL PROTECTED] wrote: I don't know if I'm tired, dumb, or just missing something obvious. Why does this... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script![CDATA[ [bindable] public var myNum:uint = 0; ]]/mx:Script mx:Label text={myNum} / mx:Button label=Push Me click=myNum=10; mx.controls.Alert.show('myNum = '+myNum, 'myNum'); / /mx:Application ...return this error? Data binding will not be able to detect assignments to myNum. The Alert box shows the value is changed on click, but sure enough the label does not change. This seems like about the simplest example of Bindable I could possibly think of. Sorry to whine, but why is this so hard? And why can't I find the answer in the help files? I think Flex is amazingly cool, but dang it's hard to find the answers to some things that should be really basic. Like I said, maybe I'm just over-tired :-) Thanks! Darren -- 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 Yahoo! Groups Sponsor ~-- Everything you need is one click away. Make Yahoo! your home page now. http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/nhFolB/TM ~- -- 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/
RE: [flexcoders] Using a logical AND in property.
Jason, I know this doesn't actually answer your question, but I ran into the same thing recently and found that I was looking at the problem backward. I was trying to set enabled on a Panel based on whether one or more rows were selected in a DataGrid. I tried the same things you did, adding AS code to the Panel's enabled property. I had all kinds of trouble and nothing seemed to work right, until I decided to do things backwards. Instead of adding code to the enabled property that watched or was bound to other values or components, I added an itemClick=panelEnabler(); to the DataGrid. The panelEnabler() function just looks like: public function assignPanelEnabler():void { if(dgAccts.selectedItems.length = 1) { assign_panel.enabled=true; } else {assign_panel.enabled=false; } } Now, the DataGrid runs the function whenever items are clicked, and the function changes the enabled property for the Panel. Works perfectly, and you don't need to worry about using inside the enabled property field, you can put all your if...then logical operators in the function script. Darren From: Jason Hawryluk [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Using a logical AND in property. Date: Tue, 16 May 2006 15:46:27 +0200 I've tried about 10-20 different ways just can't seem to make it work. I suppose that a function is the only way, but it's unfortunate. Being able to compare 1 or more bound values in order to get the result would be very handy in my particular case. Below is the error I get. Error: The entity name must immediately follow the '' in the entity reference. On a good note I did get this to work {value1.selected==value2.selected} but that will only do in certain circumstances. Thanks for your help. I'm still trying to get Flex to do it, if anyone has any ideas... Jason -Message d'origine- De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] la part de Michael Schmalle Envoyé : mardi 16 mai 2006 15:24 À : flexcoders@yahoogroups.com Objet : Re: [flexcoders] Using a logical AND in property. Hi, I don't even know if you can do it but, did you try using parenthesis ? Peace, Mike On 5/16/06, sourcecoderia [EMAIL PROTECTED] wrote: I'm wanting to be able to do something like the below, where the operator is used for a locale compare on the Boolean values, however I keep getting errors with the various methods I've tried. mx:CheckBox enabled={value1.selected==true value2.selected==true } label=myitem id=chk_item / Where values(1 and 2) are other checkbox controls. Any ideas on a good way to do the above. I'm trying to stay away from script as much as possible for this type of stuff in order to keep it as simple as possible for the UI designer. Thanks Jason -- 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 Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- What goes up, does come down. -- 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 Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- 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 Yahoo! Groups Sponsor ~-- Protect your PC from spy ware with award winning anti spy technology. It's free. http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/nhFolB/TM ~- -- 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/
Re: [flexcoders] Flex Apps and Google/Search Engines
Amazon.com and eBay are (arguably) apps and it makes sense to crawl them. Depends on what data you have inside your app and whether you want to make sections of the app or products in the database public, available, and/or easily locatable. Darren From: Manish Jethani [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex Apps and Google/Search Engines Date: Tue, 16 May 2006 21:16:59 +0530 On 5/12/06, Simon Fifield [EMAIL PROTECTED] wrote: Does anyone have any information or links about how successful Google and other search engine bots are at crawling Flex Apps? Why would a search engine want to crawl an *app*? -- 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 Yahoo! Groups Sponsor ~-- Home is just a click away. Make Yahoo! your home page now. http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/nhFolB/TM ~- -- 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/
RE: [flexcoders] delete class instances
Is this what you mean...? ActionScript 3.0 does not support using the delete operator to remove an entire object. In ActionScript 2.0, you could use delete to remove an object or on an object property. In ActionScript 3.0, the delete operator is now ECMAScript compatible, meaning delete can only be used on a dynamic property of an object. From http://livedocs.macromedia.com/labs/1/flex20beta3/1662.html For more information on memory management and garbage collection see the bottom of this page: http://livedocs.macromedia.com/labs/1/flex20beta3/1584.html Darren From: Sonja Duijvesteijn [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] delete class instances Date: Tue, 16 May 2006 20:54:28 +0200 I've been working with Flex since last Februari, and since then I've been having a problem with classes. Since it's seemed foolish that I could not find the solution myself I've been hesitant to ask but here goes. How do you delete and instance of a class?! I've set up a small example with a class 'PingTime' which says 'ping' every second. And I'd like it to stop, but not just stop but completely remove the class out of memory. How do I do that? I'm sure there's a solution, and probably it's in the docs somewhere, but I just can't find it. How do I make the pinging stop? Kind regards, Sonja Duijvesteijn package sd.classes { import flash.utils.Timer; import flash.events.TimerEvent; import mx.core.Application; public class PingTime { private var timer:Timer; public function PingTime() { timer = new Timer(1000); timer.addEventListener(TimerEvent.TIMER, sayPing); timer.start(); } private function sayPing(event:TimerEvent):void { Application.application.pingTxt.text += ping timer.reset(); timer.start(); } } } ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml layout=absolute creationComplete=init() mx:Script ![CDATA[ import sd.classes.PingTime; private var ping:PingTime; private function init():void { ping = new PingTime(); } private function removePing():void { } ]] /mx:Script mx:Button x=10 y=10 label=stop Ping/ mx:TextArea x=10 y=56 width=445 height=143 click=removePing() id=pingTxt/ /mx:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Re: delete class instances
This may have already been answered somewhere, but I've searched and if it's out there it's not really obvious... I am pulling data from a CFC and displaying it in a DataGrid. When I click on a grid header to sort and there's a blank first row in that column I get: Error: Cannot determine comparator for SortField with name ''TELEPHONE''. I have two questions... First, is this a bug that will be fixed in a later release or is this by design and will remain this way? Seems like a bug to me. Seems like Flex should treat null / emptystring as for sorting purposes. Second, how can I correct this problem *without* altering the CFC that returns the data? I need to display the actual data from the query, not something I inserted. ie. if there's no data I need to display an empty cell, so... I'd can't insert n/a or some other value into the null/empty fields in the server side CFC query. Thanks! Darren -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Does anybody know where I can enroll in a Flex teacher lead class with hands-on exercises?
You might try http://www.mikekollen.com/blog/ If he can't help you he might be able to point you to another resource! Darren From: Mahmoud Elsayess [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Does anybody know where I can enroll in a Flex teacher lead class with hands-on exercises? Date: Mon, 15 May 2006 09:35:15 -0700 Greeting, Does anybody know where I can enroll in a Flex teacher lead class with hands-on exercises? Thank you. A new kid to Flex. Mahmoud Elsayess www.readverse.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Re: Problem with Clicks Changing View States
The mx:component tag creates a new scope block. You can use outerDocument to reference outer scoped variables. See http://livedocs.macromedia.com/labs/1/flex20beta3/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=0857.html Darren --- In flexcoders@yahoogroups.com, [EMAIL PROTECTED] wrote: Greetings - Here's an Item renderer that turns name into a link. That link should simply lead to a different view state (named 'edit'): mx:DataGridColumn headerText=Name dataField=Name mx:itemRenderer mx:Component mx:LinkButton label={data.Name} click=currentState='edit' enabled=true textAlign=left color=#2c6e9f /mx:LinkButton /mx:Component /mx:itemRenderer /mx:DataGridColumn (the 'edit' state exists further down in the mxml.) The link buttons render properly but clicking the links produces this error: ArgumentError: Undefined state 'edit'. at mx.core::UIComponent/::getState() at mx.core::UIComponent/::findCommonBaseState() at mx.core::UIComponent/::commitCurrentState() at mx.core::UIComponent/setCurrentState() at mx.core::UIComponent/set currentState() at ProspectStates_inlineComponent1/___LinkButton1_click() A button however (just below the data grid containing the itemRenderer above) does work. Here's the markup for the button: mx:Button label=Edit click=currentState='edit' id=button9/ How is it that the same click syntax works for the button but fails for the linkButton in the Item Renderer? (Note that all the markup above is within a custom component; these view states are not states of the application tag. cheers, ethan -- 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 Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Developers Derby - Question for Adobe
Does Flex require installing Flash Pro? No, but you might want to have Flash around for writing other SWFs that can be loaded into Flex Can Flex run on a machine that does not have Flash? Flash the player or Flash the development environment? Technically yes, you can install Flex and run Builder on a machine that does not have Flash player or IDE, but you won't be able to view your applications without the player. Flex 2 Beta 3 applications only run in the latest Flash 9 beta player. Flex does not require the Flash IDE be installed at all. Mahmoud Elsayess www.readverse.com - Original Message - From: Matt Chotin To: flexcoders@yahoogroups.com Sent: Saturday, May 13, 2006 12:05 AM Subject: RE: [flexcoders] Developers Derby - Question for Adobe Mail me the url of your submission and I'll see if we have it. I believe we do but you're using a different email address than the one I see so I want to confirm. Matt -- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Nikmd23 Sent: Friday, May 12, 2006 6:07 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Developers Derby - Question for Adobe Hey Adobe people, I submitted an application into the Derby a week ago. I still have not received the confirmation Email or any feedback. I was wondering if this was because you guys are so busy this week (Beta 3 Spry), or perhaps something went wrong when I filled out the form. I couldn't find a contact person to address this to on the labs, so I'm hoping this will get to the right person here. Thank You! -- 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 a.. Visit your group flexcoders on the web. b.. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Problem with Cairngorm 2 version of Phones app.
Alternatively you could unzip them anywhere and import the files into a new, empty F2B3 project. I had to do that with a bunch of Cg.99 and Cg2 samples to get them to work. Also, just about every sample Cg app I've run across has something in it somewhere that won't compile in F2B23... Link instead of LinkButton... coersion of UIComponent into possibly unrelated Container... the www.macromedia.com/2005/mxml and http://www.iterationtwo.com/cairngorm namespaces... can't find ServiceLocator the Cg.99 code not residing in packages (which AS 3 requires) stopping the IDE from being able to find them when I'm lookin right at 'em. There hasn't been a single Cg sample app that's worked OOTB for me without having to change something (even the Cg2 CairngormLogin example needs tweaking.) Beta is certainly fun, but it can be awfully frustrating at times too :-) Darren From: Benoit Hediard [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Problem with Cairngorm 2 version of Phones app. Date: Fri, 12 May 2006 15:57:44 +0200 You need to unzip all the files in the root folder of a new Flex Builder project and compile it. And it should work. Benoit Hediard _ De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] De la part de Kevin Roche Envoyé : vendredi 12 mai 2006 15:47 À : flexcoders@yahoogroups.com Objet : RE: [flexcoders] Problem with Cairngorm 2 version of Phones app. Yes, the file is there but I gues it may not be in the right place. I am assuming that placing the whole thing under the place where the mxml file is is correct or does it nee to be in some path so that flex can find it? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Niklas Richardson Sent: 12 May 2006 11:59 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Problem with Cairngorm 2 version of Phones app. Stupid question - the file exists? On 5/12/06, Kevin Roche [EMAIL PROTECTED] wrote: Hi Nik, I found the problem, needed to add all the mxml files to the application. Now I have another problem. Error message says: Unable to locate specified base class 'org.nevis.cairngorm.business.ServiceLocator' for component class 'ApplicationServices' I do have the cairngorm directory structure (org.. etc) in the same directory as main.mxml. Any ideas why its not found? Kevin -Original Message- From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Niklas Richardson Sent: 12 May 2006 11:09 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Problen with Cairngorm 2 version of Phones app. Hi Kevin, Good to see you on here. Could you post the line(s) in question? It might be that you need to do some Cheers Niklas On 5/12/06, Kevin Roche [EMAIL PROTECTED] wrote: Hi, I am having difficult getting the Flex 2 Phones application working with Flex2 Beta 2 (Did not want to try Beta3 until it works) When I try to save and compile I get the following error: Implicit coercion of a value with static type 'Object' to a possibly unrelated type 'Array' Line 33 PhoneListGetCommand.as Anyone know why or what went wrong? I am still learning ActionScript and cant see quite what is wrong here. Kevin Roche -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links http://groups.yahoo.com/group/flexcoders/ -- Niklas Richardson Prismix Ltd UK based Flex and ColdFusion Specialists -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site +design+developmentw2=Computer+software+developmentw3=Software+design+and+ developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=1 66.sig=L-4QTvxB_quFDtMyhrQaHQComputer software development http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+si te+design+developmentw2=Computer+software+developmentw3=Software+design+an d+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s =166.sig=lvQjSRfQDfWudJSe1lLjHw Software design and development http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+ site+design+developmentw2=Computer+software+developmentw3=Software+design+ and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5 s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ Macromedia flex http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+deve lopmentw2=Computer+software+developmentw3=Software+design+and+development
RE: [flexcoders] Problem with Cairngorm 2 version of Phones app.
You have the actual ServiceLocator file in your folders, so open it up and check and to see if the ServiceLocator code in the file is wrapped with an outer package {} definition. If not then the files trying to import that class won't find that class in the proper package. For instance... in the app your building (or in the phones example app) you might have a Services.mxml file in the business folder. The contents are: cairngorm:ServiceLocator xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:cairngorm=org.nevis.cairngorm.business.* mx:HTTPService id=dummyDelegate url=assets/dummy.xml result=event.call.resultHandler( event ) fault=event.call.faultHandler( event ) showBusyCursor=true useProxy=false / /cairngorm:ServiceLocator xmlns:cairngorm=org.nevis.cairngorm.business.* says look in org.nevis.cairngorm.business for the ServiceLocator package. Meanwhile, the beginning of you ServiceLocator.as file needs to read: - package org.nevis.cairngorm.business { import mx.core.UIComponent; import mx.rpc.AbstractService; import mx.rpc.http.HTTPService; public class ServiceLocator extends UIComponent { ... - so that the ServiceLocator class lives inside the org.nevis.cairngorm.business package. If your Services.mxml namespace is wrong it won't be able to find the business package, and if the namespace is correct but the ServiceLocator isn't IN the business package - wrapped with the package {} definition - then the compiler will tell you it can't locate the ServiceLocator. Make sense? Darren From: Kevin Roche [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Problem with Cairngorm 2 version of Phones app. Date: Fri, 12 May 2006 19:00:02 +0100 Benoit, That's what I did! I'm stuck now. Kevin -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Benoit Hediard Sent: 12 May 2006 14:58 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Problem with Cairngorm 2 version of Phones app. You need to unzip all the files in the root folder of a new Flex Builder project and compile it. And it should work. Benoit Hediard -- De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] De la part de Kevin Roche Envoyé : vendredi 12 mai 2006 15:47 À : flexcoders@yahoogroups.com Objet : RE: [flexcoders] Problem with Cairngorm 2 version of Phones app. Yes, the file is there but I gues it may not be in the right place. I am assuming that placing the whole thing under the place where the mxml file is is correct or does it nee to be in some path so that flex can find it? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Niklas Richardson Sent: 12 May 2006 11:59 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Problem with Cairngorm 2 version of Phones app. Stupid question - the file exists? On 5/12/06, Kevin Roche [EMAIL PROTECTED] wrote: Hi Nik, I found the problem, needed to add all the mxml files to the application. Now I have another problem. Error message says: Unable to locate specified base class 'org.nevis.cairngorm.business.ServiceLocator' for component class 'ApplicationServices' I do have the cairngorm directory structure (org.. etc) in the same directory as main.mxml. Any ideas why its not found? Kevin -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Niklas Richardson Sent: 12 May 2006 11:09 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Problen with Cairngorm 2 version of Phones app. Hi Kevin, Good to see you on here. Could you post the line(s) in question? It might be that you need to do some Cheers Niklas On 5/12/06, Kevin Roche [EMAIL PROTECTED] wrote: Hi, I am having difficult getting the Flex 2 Phones application working with Flex2 Beta 2 (Did not want to try Beta3 until it works) When I try to save and compile I get the following error: Implicit coercion of a value with static type 'Object' to a possibly unrelated type 'Array' Line 33 PhoneListGetCommand.as Anyone know why or what went wrong? I am still learning ActionScript and cant see quite what is wrong here. Kevin Roche Yahoo! Groups Sponsor
RE: [flexcoders] Overlap?
No replies on this... has no one else seen this happen? No one knows what this overlap is? Any help would be appreciated. Darren From: Darren Houle [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Overlap? Date: Tue, 09 May 2006 00:25:25 -0400 I just installed B3. Before installing I followed instructions like a good boy and deleted my project definitions (not the files) and uninstalled B2. That went fine, as did the the B3 install. Now I'm trying to recreate my B2 projects. B3 created a new \My Documents\Flex Builder 2.0\ folder at the same level as the previous \My Documents\Flex\ folder and wants to use that as the new default projects home. I moved my old project files under the new default home. Problem is that when I try to create any project and specify one of these folders I get something like C:\...\My Documents\Flex Builder 2.0\Cg2\Login overlaps the workspace location: C:\...\My Documents\Flex Builder 2.0 in the project wizard. Previously all my different projects lived underneath the one \Flex folder in separate folders of their own... is there a problem with that now in B3? Do I need to create separate project folders at the same level as the \Flex Builder 2.0\ folder? Thanks! Darren -- 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 SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Simple XML web service call
Yes, the CFC is running, it's Flex that's not dealing with the returned results properly. I finally gave up on doing it this way and now I'm just returning a datatype of query from the CFC which works fine. It just that it seems like the code should work (it's so basic) but yet it didn't. Maybe it's just me, but it seems like the Flex documentation was a little thin here. Darren Can you confirm the CFC is run (by adding some logging) or at least accessed (in the web server logs) ? Tom Chiverton -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Simple XML web service call
Yes, I'm loading the SWF from localhost, which is calling a web service on locahost. Darren How are you loading the SWF? Is the SWF hosted on the same machine as the CFC? Note that localhost and 127.0.0.1 are not the same string for purposes of domain name checking for security sandbox restrictions. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darren Houle Sent: Tuesday, May 09, 2006 2:51 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Simple XML web service call This is probably very simple and I'm just being stupid, but... why doesn't this work? I don't get any errors, just a blank swf w/o the Label. I'm in Beta 3. mxml file ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml creationComplete=wsTest.testFunction.send() mx:WebService id=wsTest useProxy=false wsdl=http://localhost/ia_cleanup.cfc?wsdl mx:operation name=testFunction resultFormat=xml / /mx:WebService mx:Label text={wsTest.testFunction.lastResult.msg} / /mx:Application ...and the accompanying CFC file - cfcomponent cffunction name=testFunction access=remote output=false returntype=xml cfxml variable=xmlResults msgHello World/msg /cfxml cfreturn xmlResults /cffunction /cfcomponent I've tried different resultFormats, different returnTypes... returning a string instead of the cfxml tag... building mystring and returning the result of parseXML(mystring). Nothing seems to work. Thanks, Darren -- 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 -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Article on Cairngorm for Fusion Authority
Wow! Seriously? That amazes me. We never would have adopted Flex 1.5 at it's current price model... and it is 1.5 - just slightly more mature than a version 1.0, and our company rarely ever adopts version 1 of anything for use at an enterprise level. I would think that the more mature, less expensive Flex 2.0 would be the most desirable path. I know that we'll be employing it all over the place once it's out of beta. My web team has no desire to even look at 1.5 now that 2.0 is on the way. Darren From: Tom Chiverton [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Article on Cairngorm for Fusion Authority Date: Thu, 11 May 2006 09:07:47 +0100 I can't see everyone on the released Flex 1.5 automatically upgrading to Flex 2 (even for new-start projects) when it comes out of alpha/beta. Tom Chiverton -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.