[flexcoders] AIR - SQL lite Question
Hi there, I get a strange error in one of my sql queries. Here is the code: sqlQuery += "SELECT DISTINCT tLibs.libID, tLibs.libName FROM tLibs"; sqlQuery += " LEFT JOIN tFilecards ON tLibs.libID=tFilecards.libID WHERE"; sqlQuery += " tLibs.userID="+selectedUserId+" AND tFilecards.question LIKE '%"+ mySearchString +"%' OR"; sqlQuery += " tLibs.userID="+selectedUserId+" AND tFilecards.answer LIKE '%"+ mySearchString +"%'"; mySqlStatement.itemClass = LibVO; and I get the following error: ReferenceError: Error #1056: Cannot create property tLibs_libID on de.brainStar.vo.LibVO. Where does the "_" come from? The property is called libID in my value object. the strange thing is that everything works fine when I get rid of the "DISTINCT". But I obviously need the "DISTINCT" though. Please help this is killing me :-( Cheers Robin
[flexcoders] adobe air and flex 3.3 - Invoke Event
Hi there, I found this article on the adobe site: http://www.adobe.com/devnet/air/flex/quickstart/startup_options.html The download links don't really work though and it says that you need the version 3.3 of flex sdk to get the example to work. I installed a pre release 3.3 but there's still no"reason" property in the InvokeEvent. Basically all I need to do is to determine if the Air app was launched at login or manually by the user. In 3.2 the (and 3.3) the arguments array of the InvokeEvent does not give me this information. Any ideas? Thank you! Robin
Re: [flexcoders] alert control - blurry rect
Hi Anirudh! Setting the modalTransparency to 0.01 works perfectly for my purposes. Nice and QUICK solution :-). Thanks a lot! Cheers Robin On 28/01/2009, at 2:10 PM, Anirudh Sasikumar wrote: Hi Robin, The background overlay part is done by PopupManager (PopupManagerImpl) rather than Alert. There is an mx_internal property called modalWindowClass in PopupManagerImpl which you can set to change the default FlexSprite that is used. But its graphics object is cleared and drawRect is called in showModalWindow. You'd have to hack past that to draw your own shape. Check out the modalTransparency, modalTransparencyBlur, modalTransparencyColor and modalTransparencyDuration styles for Alert. To make the overlay almost invisible, put this in your CSS: Alert { /* it can be set to 0 for no effect at all on the parent * window. But setting it to 0.1 retains the nice blur effect * without having the rectangular overlay visible */ modalTransparency: 0.1; } Q & A saved to: http://sandboxviolation.appspot.com/#questions/2605 Cheers, -- Anirudh Sasikumar http://anirudhs.chaosnet.org/
[flexcoders] alert control - blurry rect
Hi there, I'm building an Air App with a custom Chrome. The canvas that holds all UI components has rounded corners and a drop shadow effect. As a result the root Application (stage) has transparent areas (e.g. in the corners of application). I like the effect of the Alert control when it puts a shape above the rest of the application and makes it look blurry. My problem: this shape is a rectangle. This looks kind of odd because the visible part of my application is a smaller rectangle with rounded corners. The blurry alert rectangle overlaps the canvas that holds all visible UI components of my app. My Question: Is there a way to mask that alert box (the actual blurry shape which is created by it)? Btw. how do I change the color of the blurry shape? Any ideas? Thanks! Robin
[flexcoders] fullscreen mode in AIR
Hi all, I working on an air app with a fixed size if 1024*768. The minimum system requirements for the app include a screen resolution of at least 1024*768 pixels. The problem that a resolution of 1024*768 is actually not big enough because of the system task bars. stage.displayState = StageDisplayState.FULL_SCREEN; is not an option because then the user can type text into text fields. fscommand("fullscreen", "true"); does not seem to work in Air either. Is there a workaround? Thanks for any input! Cheers Robin
[flexcoders] Re: drawing image from jpeg-encoded byte array
As usual - after asking the list I found the solution myself :-) The Loader class + the loadBytes method. Cheers Robin On 10/12/2008, at 12:22 PM, Robin Burrer wrote: Hi there, This must be really simple but I just can't find the solution... How do I decode a jpeg-encoded byte array so that I can draw/display an image from it? The set pixels method obviously only works for raw image byte arrays. private function doEncodingAndDecoding():void { var originalBitMap:Bitmap = Bitmap(image1.content); var encoder:JPEGEncoder = new JPEGEncoder(); var myCompressedByteArray:ByteArray = encoder.encode(originalBitMap.bitmapData); myCompressedByteArray.position = 0; var newBitmapData:BitmapData = new BitmapData(image1.content.width, image1.content.height); var myRect:Rectangle = newBitmapData.rect; // :-( newBitmapData.setPixels(myRect,myCompressedByteArray); // var newBitmap:Bitmap = new Bitmap(newBitmapData); image2.source = newBitmap; } Thanks for any input! Robin
[flexcoders] drawing image from jpeg-encoded byte array
Hi there, This must be really simple but I just can't find the solution... How do I decode a jpeg-encoded byte array so that I can draw/display an image from it? The set pixels method obviously only works for raw image byte arrays. private function doEncodingAndDecoding():void { var originalBitMap:Bitmap = Bitmap(image1.content); var encoder:JPEGEncoder = new JPEGEncoder(); var myCompressedByteArray:ByteArray = encoder.encode(originalBitMap.bitmapData); myCompressedByteArray.position = 0; var newBitmapData:BitmapData = new BitmapData(image1.content.width, image1.content.height); var myRect:Rectangle = newBitmapData.rect; // :-( newBitmapData.setPixels(myRect,myCompressedByteArray); // var newBitmap:Bitmap = new Bitmap(newBitmapData); image2.source = newBitmap; } Thanks for any input! Robin
Re: [flexcoders] huge AMF messages
Thanks for your reply Seth! On 09/12/2008, at 8:19 PM, Seth Hodgson wrote: If you sent these in a RemoteObject call, that 10MB worth of data would go to the server in the body of a single HTTP POST. No progress events, and depending on the receiving server it may enforce size limits on body content of HTTP requests but they'd likely be higher than 10MB. Best, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robin Burrer Sent: Tuesday, December 09, 2008 4:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] huge AMF messages Hi all, I planning to build an AIR application. In this application the user can create libraries that consist of multiple value Entry objects. Each EntryVO should look like this (there will be more properties of course) : package vo { [RemoteClass(alias="vo.EntryVO")] import flash.net.registerClassAlias; import flash.utils.ByteArray; public class EntryVO { [Bindable] public var image_data:ByteArray; [Bindable] public var image_name:String; public static function register():void { registerClassAlias("vo.EntryVO", EntryVO); } } } To simplify the uploading and downloading process I want to transfer images as ByteArrays to a .NetBackend. My question: What are my limitations here file size wise? Let's say I have 10 EntryVO. An each of these has an 1 MB byte array embedded. That means that my libraryVO (10 x 1 MB EntryVO) would have a file size of 10 MB. Will this work at all? Is there a progress event for remote operations? I guess it will take a while to transfer a 10 MB AMF message. Thanks for any input! Cheers Robin
[flexcoders] huge AMF messages
Hi all, I planning to build an AIR application. In this application the user can create libraries that consist of multiple value Entry objects. Each EntryVO should look like this (there will be more properties of course) : package vo { [RemoteClass(alias="vo.EntryVO")] import flash.net.registerClassAlias; import flash.utils.ByteArray; public class EntryVO { [Bindable] public var image_data:ByteArray; [Bindable] public var image_name:String; public static function register():void { registerClassAlias("vo.EntryVO", EntryVO); } } } To simplify the uploading and downloading process I want to transfer images as ByteArrays to a .NetBackend. My question: What are my limitations here file size wise? Let's say I have 10 EntryVO. An each of these has an 1 MB byte array embedded. That means that my libraryVO (10 x 1 MB EntryVO) would have a file size of 10 MB. Will this work at all? Is there a progress event for remote operations? I guess it will take a while to transfer a 10 MB AMF message. Thanks for any input! Cheers Robin
[flexcoders] Cairngorm - reload wsdl file
Hi all, I'm creating an app using Cairngorm and Swf Studio. (The app runs form CD) While the application initializes i need to talk to a webservice. The problem is that the service locator class loads the wsdl file automatically. If the user is not online the wsdl can obviously not be loaded. In this case I want to display an error message (e.g. please check your connection...) If the user presses ok I want to reload the wsdl before I attempt to make another service call. Is there any way I can reload the wsdl file or re-initialize the service locator? Thanks Robin
[flexcoders] How do I prevent the user from selecting text in a text area component?
Hi there, How do I prevent the user from selecting text in a text area component? I noticed that it does not have a "selectable" property and does not derive from the Text object either. Robin
RE: [flexcoders] should cairngorm commands call other commands.
Great, thanks everybody for their replies! Robin From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Grant Davies Sent: Monday, 15 January 2007 11:09 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] should cairngorm commands call other commands. This looks like a command sequencer function: http://www.cairngormdocs.org/docs/cairngorm_2_1/com/adobe/cairngorm/comm ands/SequenceCommand.html <http://www.cairngormdocs.org/docs/cairngorm_2_1/com/adobe/cairngorm/com mands/SequenceCommand.html> not sure if that's available in the version you are using. ... > b l u e t u b e i n t e r a c t i v e. .: grant davies .: 404.428.6839 (c) .: 708-983-1577 (F) > [EMAIL PROTECTED] > http://www.bluetube.com/bti <http://www.bluetube.com/bti> > A Tribal Chicken Designs Affiliate <http://www.tribalchicken.com/> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robin Burrer Sent: Sunday, January 14, 2007 7:05 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] should cairngorm commands call other commands. Hi all, I'm working on flex application using the cairngorm framework and I ask myself if commands should call other commands. E.g. another event is triggered in the result method of the command. Note that I actually run in this problem when I try to handle my client application logic, not for server requests. I started sending new cairngorm events in the on result method of my commands but actually I find this approach rather messy. Should I dispatch all events in my views? That however means that my views are handling some of my application logic. I think they are not supposed to do that... Or should I create a new form commands that only manage other commands? That would add another level of complexity though ... Robin <>
RE: [flexcoders] should cairngorm commands call other commands.
Thanks Bjorn I'll check out the sequence command and your utility as well. Cheers Robin From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Bjorn Schultheiss Sent: Monday, 15 January 2007 1:32 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] should cairngorm commands call other commands. Hey Robin, Check out com.adobe.cairngorm.command.SequenceCommand The standard way is to define the nextEvent in the command and then call executeNextCommand. If you need to define your events in your view i have a utility for it and i posted the info here http://cairngormdocs.org/blog/?p=27 <http://cairngormdocs.org/blog/?p=27> Regards, Bjorn On 15/01/2007, at 11:05 AM, Robin Burrer wrote: Hi all, I'm working on flex application using the cairngorm framework and I ask myself if commands should call other commands. E.g. another event is triggered in the result method of the command. Note that I actually run in this problem when I try to handle my client application logic, not for server requests. I started sending new cairngorm events in the on result method of my commands but actually I find this approach rather messy. Should I dispatch all events in my views? That however means that my views are handling some of my application logic. I think they are not supposed to do that... Or should I create a new form commands that only manage other commands? That would add another level of complexity though ... Robin
[flexcoders] should cairngorm commands call other commands.
Hi all, I'm working on flex application using the cairngorm framework and I ask myself if commands should call other commands. E.g. another event is triggered in the result method of the command. Note that I actually run in this problem when I try to handle my client application logic, not for server requests. I started sending new cairngorm events in the on result method of my commands but actually I find this approach rather messy. Should I dispatch all events in my views? That however means that my views are handling some of my application logic. I think they are not supposed to do that... Or should I create a new form commands that only manage other commands? That would add another level of complexity though ... Robin
[flexcoders] cairngorm flash lite/AS2 version
Hi there, I read that cairngorm has been back-ported for flash lite. Does anyone know if there is a downloadable version available yet? I guess that version could be used for any flash 8 - AS2 projects. Cheers Robin
RE: [flexcoders] Re: Flex and .net webservices
Thanks Ben, Changing the data type to Number didn't help either. I'll have a look at Darron's solution ... Cheers Robin From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: Tuesday, 12 December 2006 4:56 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flex and .net webservices Might want to try making employeeID a Number instead of an int. If that doesn't work use this: http://www.darronschall.com/weblog/archives/000247.cfm <http://www.darronschall.com/weblog/archives/000247.cfm> HTH, Ben --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Robin Burrer" <[EMAIL PROTECTED]> wrote: > > Thanks Ben, > > > > I tried that. It still does not work ..:-(. I got rid of everything > which could cause errors. ... > > Here's the code. I reckon this is as basic as it gets ... > > > > > > > > public function onMyResult(event:ResultEvent):void > > > > { > > // this works fine > > var myObject:Object = > Object(event.result); > > > > > > // this causes an error > (Error #1034: Type Coercion failed: cannot convert [EMAIL PROTECTED] to > webserviceClasses.Employee.) > > var myEmployee:Employee > = Employee(event.result); > > > > > > // does not work > > trace > (myEmployee.employeeName); > > > > // does work > > trace > (myObject.employeeName); > > > > > > > > } > > > > > > ]]> > > > > > > > > /// the web service object > > > > > > wsdl="http://localhost/ComplexDataTypeService/Service1.asmx?WSDL <http://localhost/ComplexDataTypeService/Service1.asmx?WSDL> " > id="myWebservice" makeObjectsBindable="false"> > > > > > > > > > > // the Employee object: > > > > > > public class Employee (AS) > > { > > public var employeeName:String; > > public var employeeID:int; > > > > } > > > > (c#) > > public class Employee > > { > > public string employeeName; > > public int employeeID; > > > > } > > > > > > > > > > > > Any ideas? > > > > Robin > > > > > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of ben.clinkinbeard > Sent: Tuesday, 12 December 2006 2:02 PM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] Re: Flex and .net webservices > > > > Hi Robin, > > I have good news :), both of these issues should go away by setting a > single attribute on your WebService object. Try setting > makeObjectsBindable = false. This will cause Flex to deserialize your > ws responses into regular Object and Array instances instead of > ObjectProxy and ArrayCollection instances. > > HTH, > Ben > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > , "Robin Burrer" wrote: > > > > Hi there, > > > > > > > > I have been playing around .net and flex for a while. Primarily I want > > to send value objects (consisting of strings, intergers and arrays of > > VOs) back and forth. > > > > > > > > I could not figure out how to do the following things though: > > > > > > > > > > > > 1. Sending arrays to a webservice works fine. However when I > > receive an array of the .net data type "array" flex creates and Array > > Collection data type. Sending arrays as "array collections" to a web > > service causes an error. That's really annoying when you try to keep > > the VOs consitent on both ends. What's the solution for this? > > > > > > > > > > > > 2. When I receive a complex data type from a .net web service flex > > creates an Object but when I try to cast this object to the dataType > it > > represents I get a complier error, even though the received object has > > exactly the same properties as underlying VO. > > > > > > > > E.g. I get the following error code if I try to cast the result of a > > webservice call to my custom data Type "TelephoneNumber". Note casting > > to an "Object" works fine. > > > > > > > > > > > > TypeError: Error #1034: Type Coercion failed: cannot convert > > mx.utils::[EMAIL PROTECTED] to webserviceClasses.TelephoneNumber. > > > > > > > > > > > > Any help is highly appreciated. > > > > > > > > > > > > Robin > > >
RE: [flexcoders] Cairngorm 2.1 - calling a webservive more than once
Hi Dirk, That might be the reason indeed. I had the loadWSDL in my delegate just before I call the method of the webservive. I guess I should be in the Services.mxml. I can't really figure out where to put it though Robin From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dirk Eismann Sent: Thursday, 21 December 2006 6:30 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Cairngorm 2.1 - calling a webservive more than once Any change you're calling loadWSDL() more than once on your WebService instance? This could be the reason. Dirk. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robin Burrer Sent: Thursday, December 21, 2006 6:54 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Cairngorm 2.1 - calling a webservive more than once I switched back to v 2.0 and all works fine now. I don't really have the time to debug this. I'm quite happy with version 2.0 and don't really see a reason to "upgrade" Thanks for your reply anyway! Robin From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Clint Modien Sent: Thursday, 21 December 2006 4:37 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Cairngorm 2.1 - calling a webservive more than once Add this to your Application mxml file. 2 If you can paste the soap going back and forth to the list it would help to diagnose your problem. You could also grab a program called ServiceCapture to grab the soap messages. http://kevinlangdon.com/serviceCapture/ <http://kevinlangdon.com/serviceCapture/> On 12/20/06, Robin Burrer < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: Hi there, This is driving me mad When I try to call a webservice more than once the webservice object returns an empty object. The "result" method still gets triggered but the returned data object has no properties... Everything works fine for the first time though. The same service works fine in a Cairngorm 2.0 app. Any ideas? Regards Robin
RE: [flexcoders] Cairngorm 2.1 - calling a webservive more than once
I switched back to v 2.0 and all works fine now. I don't really have the time to debug this. I'm quite happy with version 2.0 and don't really see a reason to "upgrade" Thanks for your reply anyway! Robin From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Clint Modien Sent: Thursday, 21 December 2006 4:37 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Cairngorm 2.1 - calling a webservive more than once Add this to your Application mxml file. 2 If you can paste the soap going back and forth to the list it would help to diagnose your problem. You could also grab a program called ServiceCapture to grab the soap messages. http://kevinlangdon.com/serviceCapture/ <http://kevinlangdon.com/serviceCapture/> On 12/20/06, Robin Burrer < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: Hi there, This is driving me mad When I try to call a webservice more than once the webservice object returns an empty object. The "result" method still gets triggered but the returned data object has no properties... Everything works fine for the first time though. The same service works fine in a Cairngorm 2.0 app. Any ideas? Regards Robin
[flexcoders] Cairngorm 2.1 - calling a webservive more than once
Hi there, This is driving me mad When I try to call a webservice more than once the webservice object returns an empty object. The "result" method still gets triggered but the returned data object has no properties... Everything works fine for the first time though. The same service works fine in a Cairngorm 2.0 app. Any ideas? Regards Robin
RE: [flexcoders] Re: Flex and .net webservices
Hi Sam, Remoting is definitely a good alternative and would probably make things a bit easier. I'm not programming the .net side of things though and the guys who are working on the backend are not too keen on using a technology which is not established standards yet. I had a look at Fluorine earlier this year and it looks very good though Cheers Robin From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sam Shrefler Sent: Wednesday, 13 December 2006 12:08 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Flex and .net webservices Robin: It sounds like you may be looking for a Remoting Gateway which uses AMF rather than Web Services and has the ability to translate .NET <-> AS Objects. I've got articles written on two different options, Fluorine and WebOrb. http://blog.shrefler.net/?p=6 <http://blog.shrefler.net/?p=6> http://blog.shrefler.net/?p=10 <http://blog.shrefler.net/?p=10> Hope that helps Sam On 12/12/06, Robin Burrer <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: Darron's ObjectTranslator works perfectly - thanks for the tip! I still have to do some manual work though since I'm going to have nested VOs R From: flexcoders@yahoogroups.com [mailto: flexcoders@ <mailto:flexcoders@> yahoogroups.com <http://yahoogroups.com> ] On Behalf Of Robin Burrer Sent: Tuesday, 12 December 2006 3:32 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Flex and .net webservices Thanks Ben, I tried that. It still does not work ..:-(. I got rid of everything which could cause errors. ... Here's the code. I reckon this is as basic as it gets ... public function onMyResult(event:ResultEvent):void { // this works fine var myObject:Object = Object(event.result); // this causes an error ( Error #1034: Type Coercion failed: cannot convert [EMAIL PROTECTED] to webserviceClasses.Employee.) var myEmployee:Employee = Employee(event.result); // does not work trace (myEmployee.employeeName); // does work trace (myObject.employeeName); } ]]> /// the web service object http://localhost/ComplexDataTypeService/Service1.asmx?WSDL"; id="myWebservice" makeObjectsBindable="false"> // the Employee object: public class Employee (AS) { public var employeeName:String; public var employeeID:int; } (c#) public class Employee { public string employeeName; public int employeeID; } Any ideas? Robin From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups.com <http://yahoogroups.com> ] On Behalf Of ben.clinkinbeard Sent: Tuesday, 12 December 2006 2:02 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flex and .net webservices Hi Robin, I have good news :), both of these issues should go away by setting a single attribute on your WebService object. Try setting makeObjectsBindable = false. This will cause Flex to deserialize your ws responses into regular Object and Array instances instead of ObjectProxy and ArrayCollection instances. HTH, Ben --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Robin Burrer" <[EMAIL PROTECTED]> wrote: > > Hi there, > > > > I have been playing around .net and flex for a while. Primarily I want > to send value objects (consisting of strings, intergers and arrays of > VOs) back and forth. > > > > I could not figure out how to do the following things though: > > > > > > 1. Sending arrays to a webservice works fine. However when I >
RE: [flexcoders] Re: Flex and .net webservices
Darron's ObjectTranslator works perfectly - thanks for the tip! I still have to do some manual work though since I'm going to have nested VOs R From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robin Burrer Sent: Tuesday, 12 December 2006 3:32 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Flex and .net webservices Thanks Ben, I tried that. It still does not work ..:-(. I got rid of everything which could cause errors. ... Here's the code. I reckon this is as basic as it gets ... public function onMyResult(event:ResultEvent):void { // this works fine var myObject:Object = Object(event.result); // this causes an error (Error #1034: Type Coercion failed: cannot convert [EMAIL PROTECTED] to webserviceClasses.Employee.) var myEmployee:Employee = Employee(event.result); // does not work trace (myEmployee.employeeName); // does work trace (myObject.employeeName); } ]]> /// the web service object http://localhost/ComplexDataTypeService/Service1.asmx?WSDL"; id="myWebservice" makeObjectsBindable="false"> // the Employee object: public class Employee (AS) { public var employeeName:String; public var employeeID:int; } (c#) public class Employee { public string employeeName; public int employeeID; } Any ideas? Robin From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: Tuesday, 12 December 2006 2:02 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flex and .net webservices Hi Robin, I have good news :), both of these issues should go away by setting a single attribute on your WebService object. Try setting makeObjectsBindable = false. This will cause Flex to deserialize your ws responses into regular Object and Array instances instead of ObjectProxy and ArrayCollection instances. HTH, Ben --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Robin Burrer" <[EMAIL PROTECTED]> wrote: > > Hi there, > > > > I have been playing around .net and flex for a while. Primarily I want > to send value objects (consisting of strings, intergers and arrays of > VOs) back and forth. > > > > I could not figure out how to do the following things though: > > > > > > 1. Sending arrays to a webservice works fine. However when I > receive an array of the .net data type "array" flex creates and Array > Collection data type. Sending arrays as "array collections" to a web > service causes an error. That's really annoying when you try to keep > the VOs consitent on both ends. What's the solution for this? > > > > > > 2. When I receive a complex data type from a .net web service flex > creates an Object but when I try to cast this object to the dataType it > represents I get a complier error, even though the received object has > exactly the same properties as underlying VO. > > > > E.g. I get the following error code if I try to cast the result of a > webservice call to my custom data Type "TelephoneNumber". Note casting > to an "Object" works fine. > > > > > > TypeError: Error #1034: Type Coercion failed: cannot convert > mx.utils::[EMAIL PROTECTED] to webserviceClasses.TelephoneNumber. > > > > > > Any help is highly appreciated. > > > > > > Robin >
RE: [flexcoders] Re: Flex and .net webservices
Thanks Ben, I tried that. It still does not work ..:-(. I got rid of everything which could cause errors. ... Here's the code. I reckon this is as basic as it gets ... public function onMyResult(event:ResultEvent):void { // this works fine var myObject:Object = Object(event.result); // this causes an error (Error #1034: Type Coercion failed: cannot convert [EMAIL PROTECTED] to webserviceClasses.Employee.) var myEmployee:Employee = Employee(event.result); // does not work trace (myEmployee.employeeName); // does work trace (myObject.employeeName); } ]]> /// the web service object http://localhost/ComplexDataTypeService/Service1.asmx?WSDL"; id="myWebservice" makeObjectsBindable="false"> // the Employee object: public class Employee (AS) { public var employeeName:String; public var employeeID:int; } (c#) public class Employee { public string employeeName; public int employeeID; } Any ideas? Robin From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: Tuesday, 12 December 2006 2:02 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flex and .net webservices Hi Robin, I have good news :), both of these issues should go away by setting a single attribute on your WebService object. Try setting makeObjectsBindable = false. This will cause Flex to deserialize your ws responses into regular Object and Array instances instead of ObjectProxy and ArrayCollection instances. HTH, Ben --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Robin Burrer" <[EMAIL PROTECTED]> wrote: > > Hi there, > > > > I have been playing around .net and flex for a while. Primarily I want > to send value objects (consisting of strings, intergers and arrays of > VOs) back and forth. > > > > I could not figure out how to do the following things though: > > > > > > 1. Sending arrays to a webservice works fine. However when I > receive an array of the .net data type "array" flex creates and Array > Collection data type. Sending arrays as "array collections" to a web > service causes an error. That's really annoying when you try to keep > the VOs consitent on both ends. What's the solution for this? > > > > > > 2. When I receive a complex data type from a .net web service flex > creates an Object but when I try to cast this object to the dataType it > represents I get a complier error, even though the received object has > exactly the same properties as underlying VO. > > > > E.g. I get the following error code if I try to cast the result of a > webservice call to my custom data Type "TelephoneNumber". Note casting > to an "Object" works fine. > > > > > > TypeError: Error #1034: Type Coercion failed: cannot convert > mx.utils::[EMAIL PROTECTED] to webserviceClasses.TelephoneNumber. > > > > > > Any help is highly appreciated. > > > > > > Robin >
[flexcoders] Flex and .net webservices
Hi there, I have been playing around .net and flex for a while. Primarily I want to send value objects (consisting of strings, intergers and arrays of VOs) back and forth. I could not figure out how to do the following things though: 1. Sending arrays to a webservice works fine. However when I receive an array of the .net data type "array" flex creates and Array Collection data type. Sending arrays as "array collections" to a web service causes an error. That's really annoying when you try to keep the VOs consitent on both ends. What's the solution for this? 2. When I receive a complex data type from a .net web service flex creates an Object but when I try to cast this object to the dataType it represents I get a complier error, even though the received object has exactly the same properties as underlying VO. E.g. I get the following error code if I try to cast the result of a webservice call to my custom data Type "TelephoneNumber". Note casting to an "Object" works fine. TypeError: Error #1034: Type Coercion failed: cannot convert mx.utils::[EMAIL PROTECTED] to webserviceClasses.TelephoneNumber. Any help is highly appreciated. Robin
RE: [flexcoders] webservices and Flex 2
What about the other way round? Can I convert an xml formatted object as an AS object as well without having to manually deserialize it? Robin From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robin Burrer Sent: Friday, 8 December 2006 12:25 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] webservices and Flex 2 Too easy - that works great - thanks! From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Carson Hager Sent: Friday, 8 December 2006 12:10 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] webservices and Flex 2 You definitely do not have to do that. You simply pass AS objects that matches the arguments to the web service method and Flex handles serializing them. Carson Carson Hager Cynergy Systems, Inc. http://www.cynergysystems.com <http://www.cynergysystems.com/> Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Office: 866-CYNERGY Mobile: 1.703.489.6466 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robin Burrer Sent: Thursday, December 07, 2006 4:58 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] webservices and Flex 2 Hi there, Is there any way to do the "AS Object" to XML serialization automatically? What do you do when you want to send complex data types to a SOAP webservice? Converting AS objects to XML manually somehow seems to be a bit clumsy. I noticed the http service has a property contentType which can be set to "application/xml". Is there anything similar for the webservice component? Robin
RE: [flexcoders] webservices and Flex 2
Too easy - that works great - thanks! From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Carson Hager Sent: Friday, 8 December 2006 12:10 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] webservices and Flex 2 You definitely do not have to do that. You simply pass AS objects that matches the arguments to the web service method and Flex handles serializing them. Carson Carson Hager Cynergy Systems, Inc. http://www.cynergysystems.com <http://www.cynergysystems.com/> Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Office: 866-CYNERGY Mobile: 1.703.489.6466 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robin Burrer Sent: Thursday, December 07, 2006 4:58 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] webservices and Flex 2 Hi there, Is there any way to do the "AS Object" to XML serialization automatically? What do you do when you want to send complex data types to a SOAP webservice? Converting AS objects to XML manually somehow seems to be a bit clumsy. I noticed the http service has a property contentType which can be set to "application/xml". Is there anything similar for the webservice component? Robin
[flexcoders] webservices and Flex 2
Hi there, Is there any way to do the "AS Object" to XML serialization automatically? What do you do when you want to send complex data types to a SOAP webservice? Converting AS objects to XML manually somehow seems to be a bit clumsy. I noticed the http service has a property contentType which can be set to "application/xml". Is there anything similar for the webservice component? Robin
RE: [flexcoders] Cairngorm commands - best practise
Thanks for your answer Bjorn. I don’t really worry about the delegate for now. Maybe I was not clear enough. My question is: should a command get all it’s parameters through the event object or is it ok to refer to the model to get them? Of course you can pass value objects to the command via the event object (as Bjorn suggested) but that’s basically the same as passing single variables - probably a bit neater though. Can’t the command just refer to the model as shown below? public class LoginCommand implements Command, Responder { private var model:Model = Model.getInstance(); public function execute(event:CairngormEvent):void { var delegate:LoginDelegate = new LoginDelegate(this); var loginEvt:LoginEvent = LoginEvent( event ); // // this line has changed! ///delegate.login(loginEvt.userVO); delegate.login(model.userVO); } public function onResult(event:*=null):void { var submitVO:UserVO = UserVO(event.token.user); } From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of hank williams Sent: Wednesday, 11 October 2006 12:36 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Cairngorm commands - best practise Hmm... I'm not sure, but I dont think you understood the question. Your answer, as far as I can tell, does not seem responsive. But I'm not sure that I could repeat it and make it any clearer than robin's initial question. Perhaps you could re-read it. Regards, Hank On 10/10/06, Bjorn Schultheiss <bjorn.schultheiss@qdc.net.au> wrote: Not really necessary On your delegate you can attached the userID to the call object and then access through your command.onResult param.token object public class LoginCommand implements Command, Responder { public function execute(event:CairngormEvent):void { var delegate:LoginDelegate = new LoginDelegate(this); var loginEvt:LoginEvent = LoginEvent( event ); delegate.login(loginEvt.userVO); } public function onResult(event:*=null):void { var submitVO:UserVO = UserVO(event.token.user); } public class LoginDelegate { public function LoginDelegate(responder:Responder) { service = ServiceLocator.getInstance().getService('userGateway'); this.responder = responder; } public function login(user:UserVO):void { var call:AsyncToken = service.validate(user); call.user = user; call.resultHandler = responder.onResult; call.faultHandler = responder.onFault; } private var service:AbstractService; private var responder:Responder } Regards, Bjorn Schultheiss Senior Flash Developer QDC Technologies From: [EMAIL PROTECTED]ups.com [mailto:[EMAIL PROTECTED]ups.com] On Behalf Of Robin Burrer Sent: Wednesday, 11 October 2006 11:12 AM To: [EMAIL PROTECTED]ups.com Subject: [flexcoders] Cairngorm commands - best practise Hi there Let's say I want to do a server request. I want to search my database for a particular keyword and return a record set. The user would type in the keyword in a text area and I would then create a SearchDatabaseEvent which then would trigger a SearchDatabaseEventCommand and so on … However I also want to send the userID when I do my server request. Should the SearchDatabaseCommand get the userID from the model or from the SearchDatabaseEvent (so I would have two properties in my event "keywords" and "userId")? The SearchDatabaseCommand obviously knows about the model because it has to populate the model with the result record set. So I could just get the user ID from the model when the "execute method" is triggered. This approach seems a bit wired though because it seems that couples my command to strongly to the model. On the other hand it seems strange to query the model from my view to populate the SearchDatabaseEvent with userId property as well. Any thoughts? Cheers Robin __._,_.___ -- 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 Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
[flexcoders] Cairngorm commands - best practise
Hi there Let’s say I want to do a server request. I want to search my database for a particular keyword and return a record set. The user would type in the keyword in a text area and I would then create a SearchDatabaseEvent which then would trigger a SearchDatabaseEventCommand and so on … However I also want to send the userID when I do my server request. Should the SearchDatabaseCommand get the userID from the model or from the SearchDatabaseEvent (so I would have two properties in my event “keywords” and “userId”)? The SearchDatabaseCommand obviously knows about the model because it has to populate the model with the result record set. So I could just get the user ID from the model when the “execute method” is triggered. This approach seems a bit wired though because it seems that couples my command to strongly to the model. On the other hand it seems strange to query the model from my view to populate the SearchDatabaseEvent with userId property as well. Any thoughts? Cheers Robin __._,_.___ -- 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 Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___
RE: [flexcoders] display images in a horizontal list component
Thanks Bjorn Too easy, {data.propertyName} did the trick. I just figured it out myself. MXML is pretty straight forward after allJ. Cheers Robin From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Bjorn Schultheiss Sent: Thursday, 21 September 2006 1:17 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] display images in a horizontal list component Hey Robin, i'm pretty sure you need to use an itemRenderer. like // on your view itemRenderer="com.xxx.view.ItemView" // item Renderer xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" > id = "itemBox" width="100%" height="100%" clipContent="false"> id="image" source="{ data.image }" width="75" height="70" complete="itemBox.visible = true;" /> text="{ data.name }" height="20" /> Regards, Bjorn Schultheiss From: [EMAIL PROTECTED]ups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Robin Burrer Sent: Thursday, 21 September 2006 11:06 AM To: [EMAIL PROTECTED]ups.com Subject: [flexcoders] display images in a horizontal list component Hi there, How do I display images in a horizontal list component? Each object of my data provider has a label and an image property. The image property is an absolute url to an png image. How do I display this image in my horizontal list? All list component examples I could find just show you how to display an embedded image using the “icon function” property. Cheers Robin __._,_.___ -- 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 Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___
[flexcoders] display images in a horizontal list component
Hi there, How do I display images in a horizontal list component? Each object of my data provider has a label and an image property. The image property is an absolute url to an png image. How do I display this image in my horizontal list? All list component examples I could find just show you how to display an embedded image using the “icon function” property. Cheers Robin __._,_.___ -- 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 Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___
[flexcoders] weather web service
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 SPONSORED LINKS Software development tool Software development Software development services Home design software Software development company 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] newbie question - HTTP servive
Hi there, I started playing around with the HTTP service. However I can’t figure out how to access the actual “result” (in my case an xml string) If I set up a listener it just returns me an object in the “onResult” event. Why can’t I access my xml string through “event.result”? How do I access it? public function onResult(event:ResultEvent):void { // why doesn’t this work? trace (event.result.toString()); // this works but it’s very ugly //trace(event.message.body.toString()); } Thanks Robin // the code of my sample application creationComplete="go();"> id="feedRequest" url="" useProxy="false" /> __._,_.___ -- 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 Software development tool Software development Software development services Home design software Software development company 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] test
__._,_.___ -- 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] test mail
__._,_.___ -- 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] test
Please ignore __._,_.___ -- 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. __,_._,___