[flexcoders] Re: Accessing TextInput via Panel and getChildByName
enabled is not a method, its a getter/setter property. so you have to do ti.enabled = false; --- In flexcoders@yahoogroups.com, pdenys [EMAIL PROTECTED] wrote: I am accessing a TextInput object by invoking myPanel.getChildByName (myTextInput); Then I try to disable the TextInput and get an error. Why oh why? The TextInput.enabled property is public, I believe. Thanks for your help, Paul Code follows: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ public function shouldWork(event:Event):void { var ti:TextInput = (TextInput)(myPanel.getChildByName(myTextInput)); var t:DisplayObject=myPanel.getChildByName(myTextInput); // The following gives error 1195: // Attempted access of inaccessible method enabled through a // reference with static type mx.controls.TextInput ti.enabled(false); // Error 1195 here ti.setStyle(backgroundColor, 0xFF); // no compile error } ]] /mx:Script mx:Panel x=10 y=10 width=250 height=200 layout=absolute id=myPanel mx:TextInput x=10 y=10 id=myTextInput name=myTextInput/ /mx:Panel /mx:Application
AW: [flexcoders] About File Uploading !!
The Problem is in your PHP code. Simple guess without looking at it thoroughly: you should be using fileField instead of Filedata; Markus Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von jammilk01 Gesendet: Freitag, 01. Dezember 2006 15:59 An: flexcoders@yahoogroups.com Betreff: [flexcoders] About File Uploading !! Hi all Now I`m trying to make file upload process. This is my code (down below) -- Flex Code - mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml mx:Script ![CDATA[ import flash.net.FileFilter; import flash.net.FileReference; import flash.net.URLRequest; public var imageTypes:FileFilter = new FileFilter(Images (*.jpg, *jpeg, *.gif, *.png),*.jpg; *jpeg; *.gif; *.png); public var textTypes:FileFilter = new FileFilter(Text Files (*.txt, *rtf),*.txt; *.rtf); public var allTypes:Array = new Array(imageTypes, textTypes); public var myFileRef:FileReference = new FileReference(); public function initApplication(): void { myFileRef.addEventListener(Event.SELECT, selectHandler); myFileRef.addEventListener(Event.COMPLETE, completeHandler); myFileRef.browse(allTypes); try { var success:Boolean = myFileRef.browse(); } catch (error:Error) { trace(unable to browse for files); } function selectHandler (even:Event):void { try { var params:URLVariables = new URLVariables(); params.date = new Date(); var request:URLRequest = new URLRequest (http://myserver/upload.php http://myserver/upload.php ); request.method = URLRequestMethod.POST; request.data = params; myFileRef.upload(request, fileField); } catch (error:Error) { trace(Unable to upload file); } } function completeHandler(event:Event):void { trace(Uploaded); } } ]] /mx:Script mx:Button label=Local File click=initApplication();/ /mx:Application - upload.php (I just copy from Adobe example)--- ?php $MAXIMUM_FILESIZE = 1024 * 200; // 200KB $MAXIMUM_FILE_COUNT = 10; // keep maximum 10 files on server echo exif_imagetype($_FILES['Filedata']); if ($_FILES['Filedata']['size'] = $MAXIMUM_FILESIZE) { move_uploaded_file($_FILES['Filedata'] ['tmp_name'], ./temporary/.$_FILES['Filedata']['name']); $type = exif_imagetype(./temporary/.$_FILES['Filedata']['name']); if ($type == 1 || $type == 2 || $type == 3) { rename(./temporary/.$_FILES['Filedata'] ['name'], ./images/.$_FILES['Filedata']['name']); } else { unlink(./temporary/.$_FILES['Filedata']['name']); } } $directory = opendir('./images/'); $files = array(); while ($file = readdir($directory)) { array_push($files, array('./images/'.$file, filectime ('./images/'.$file))); } usort($files, sorter); if (count($files) $MAXIMUM_FILE_COUNT) { $files_to_delete = array_splice($files, 0, count($files) - $MAXIMUM_FILE_COUNT); for ($i = 0; $i count($files_to_delete); $i++) { unlink($files_to_delete[$i][0]); } } print_r($files); closedir($directory); function sorter($a, $b) { if ($a[1] == $b[1]) { return 0; } else { return ($a[1] $b[1]) ? -1 : 1; } } ? Apache Log--- PHP Notice: Undefined index: Filedata in /usr/local/apache-tomcat- 5.5.17/webapps/ROOT/upload.php on line 4 PHP Notice: Undefined index: Filedata in /usr/local/apache-tomcat- 5.5.17/webapps/ROOT/upload.php on line 5 PHP Notice: Undefined index: Filedata in /usr/local/apache-tomcat- 5.5.17/webapps/ROOT/upload.php on line 6 PHP Notice: Undefined index: Filedata in /usr/local/apache-tomcat- 5.5.17/webapps/ROOT/upload.php on line 6 PHP Notice: Undefined index: Filedata in /usr/local/apache-tomcat- 5.5.17/webapps/ROOT/upload.php on line 7 PHP Warning: exif_imagetype(): Read error! in /usr/local/apache- tomcat-5.5.17/webapps/ROOT/upload.php on line 7 PHP Notice: Undefined index: Filedata in /usr/local/apache-tomcat- 5.5.17/webapps/ROOT/upload.php on line 11 PHP Warning: unlink(./temporary/): Is a directory in
Re: [flexcoders] TitleWindow Component...help!
Hi. Why don't your pop up dispatch some event (e.g. submitData) and you listen to it? R. On 12/5/06, qnotemedia [EMAIL PROTECTED] wrote: OK - so I'm using the generic TileWindow example found on the Component Explorer. It basically shows you how to build something where: 1) User clicks a button, Window pops up. 2) User types into a text box in the window, clicks Submit. 3) Text typed in appears in the main app. http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html But, I'm having a little difficulty understanding the assignment of the returned data. i.e.: login.loginName=returnedName; ...where login is the instance of the TitleWindow, loginName is a public Text variable inside the component, and returnedName is a text box in the main app. My confusion comes up when I try to edit this so that: 1) App has a combobox. Dataprovider for the combobox is an ArrayCollection of data: data and label. User clicks a button, TitleWindow pops up. 2) User types into a text box in the window, clicks Submit. 3) The text is a passed as a label, along with a generated ID (generated in the component) and is added to the combobox's dataprovider. The problem appears to be that there is no handler of the Submit button click on the main application. Obviously, I would add to a datasource and return an ID from that, but I can't even get this to work manually (i.e. for testing purposes, setting a static data and label). Just trying to keep this as simple as possible. Seems to me that if I can pass a string of text, I should also be able to pass an Object that is added to a dataProvider in the main app? Right? Help! - Chris
Re: [flexcoders] Cairngorm’s Anaemic Domain Model
On Monday 04 December 2006 04:36, Lachlan Cotter wrote: First, I have never seen examples or discussion of Cairngorm that deals with this issue. In most cases the 'model' isn't much more than a collection of dumb value objects without complex relationships. I'm not sure you'd want your model to be very more complex. Second, and more importantly, pretty much all the logic of Cairngorm apps seems to reside in the Command and Delegate classes with not much to speak about in the actual model. It seems to be the Commands that end up manipulating the application data directly, and I'm a little uncomfortable with this. I think it's a good idea to stick all the logic in once obvious place, and then have that change the model, which uses data binding to make things change in the view. I'm not sure about how well it does encapsulation and MVC. I got the opposite impression :-) -- Tom Chiverton Helping to appropriately harvest fine-grained interfaces This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com. -- 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] ListBase.as getting called after Drop to Datagrid--Preventing the Drop???
Hi Wayne, By any chance did you forget to register your event handler with the DataGrid? Just a thought. Cheers, Lach On 30/11/2006, at 1:07 AM, wayneposner wrote: I'm trying to drag-and-drop from a tree to a datagrid. I've followed the examples to try to achieve this, but whenever I drag over the datagrid, it refuses to accept the drop. The datagrid acts like the dropEnabled flag is set to false. I've traced the code and despite the fact that I have a custom dragEnter handler, it still executes the handler found in ListBase.as which cancels out my handler. Does anyone know what would cause this? Thanks! My Handler is as follows: private function onDragEnter( event:DragEvent ) : void { DragManager.acceptDragDrop(UIComponent(event.currentTarget)); }
[flexcoders] Re: Cairngorms Anaemic Domain Model
It doesn't matter if it's a collection of dumb value objects, a component, a state variable, or just a common effect. If an object is used more than a couple of times in the app, put it in the ModelLocator. Remember, everything is an object; instantiated and destroyed like the rest of them (GC?:)). The key is; does the object need to be reusable? If so, make it central. -TH p.s. right on Tom. --- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: On Monday 04 December 2006 04:36, Lachlan Cotter wrote: First, I have never seen examples or discussion of Cairngorm that deals with this issue. In most cases the 'model' isn't much more than a collection of dumb value objects without complex relationships. I'm not sure you'd want your model to be very more complex. Second, and more importantly, pretty much all the logic of Cairngorm apps seems to reside in the Command and Delegate classes with not much to speak about in the actual model. It seems to be the Commands that end up manipulating the application data directly, and I'm a little uncomfortable with this. I think it's a good idea to stick all the logic in once obvious place, and then have that change the model, which uses data binding to make things change in the view. I'm not sure about how well it does encapsulation and MVC. I got the opposite impression :-) -- Tom Chiverton Helping to appropriately harvest fine-grained interfaces This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] drag n drop manager
Hi Rajesh, When you say that the object is moved or disappears when you drop it on the application, is that because you haven't set up event handlers to receive the dropped data? There are at least two methods you could use to remove the drag operation. 1. Do a test in the method that initiates the drag to see if the target is 'eligible' to be dragged. 2. Remove the event handler from the object when it is dropped on the canvas. Cheers, Lach On 05/12/2006, at 12:34 AM, raju_bb wrote: Hi people, I am using flex 2..i m creating an application using Drag n Drop Manager.I have a main Application which has a small library kind of module similar to Flash Library.This library will contain all the images in it..Now what i want is to drag images from that library and place it on the stage or my canvas of my application.This part is working well but once i drop it on the main application(canvas) the object from the library gets moved/disappear.After i have dropped the target application is there any way to remove the drag operation on that dropped object. How to go for this..Can anyone help me out with this.. Regards, Rajesh Bhadra
Re: [flexcoders] Re: Styling in Flex is officially ridiculous
I can be wrong, but prototype is still functional, am I wrong? More information on this can be found in prog_actionscript30.pdf, in the chapter Object-Proented Programming in Actionscript under Advanced topics. Greetz Erik
Re: [flexcoders] Re: Cairngorms Anaemic Domain Model
My question isn't about the model locator. It's about logic, or lack thereof encapsulated within the domain objects. On 05/12/2006, at 9:59 PM, Tim Hoff wrote: It doesn't matter if it's a collection of dumb value objects, a component, a state variable, or just a common effect. If an object is used more than a couple of times in the app, put it in the ModelLocator. Remember, everything is an object; instantiated and destroyed like the rest of them (GC?:)). The key is; does the object need to be reusable? If so, make it central. -TH p.s. right on Tom.
Re: [flexcoders] Returning values from objects on another canvas
Hi, There are a couple of different issues here. First, why do you need to get a reference to the other view? If it is in order to access or manipulate the data therein, the better approach is to bind both views into some dataProvider and manipulate the data through that. Second, the reason you can't address the sub-components at compile time is that they are not part of the canvas class (they are children of your instance). Notwithstanding the above paragraph, if you still need to access them this way, you might want to define your own subclass component with these child properties, so Flex Builder can find them at compile time. Finally, just a guess but perhaps dgselectedOptions is null at runtime because at the time your function is executing, that component has not yet been initialised. Check the creationPolicy of the tab navigator. Cheers, Lach On 05/12/2006, at 5:19 PM, michrx7 wrote: How does one go about referencing objects on another canvas? For example I have a tab navigator with 4 tabs: Register Attendees Membership Payment Options Inside the attendees tab I have a canvas: csAttendee with a datagrid: dgselectedOptions When the user submits the pay button on the payment options tab I call a function to validate their input and try and reference the columns array for the datagrid dgselectedOptions. Using csAttendee.dgselectedOptions gives me an error when I try to compile of Access of possibly undefined property dgselectedOptions through a reference with static type mx.containers:Canvas. If I try Attendees.csAttendee.dgselectedOptions gives me Access of possibly undefined property csAttendee through a reference with static type mx.containers:Canvas. If I try just dgselectedOptions it compiles, but when I click my payment button it gives: Cannot access a property or method of a null object reference. Even though I can click on the Attendees tab and the datagrid is there and populated.
[flexcoders] Images and tooltips
I've been having a look at the ImageToolTip component from everythingflex.com I've implemented it in my own flex site but I would like to make the tooltip appear at a different position. As at the moment it appears below the mousepointer when you hover the mouse. I would like it to appear above the mouse pointer. So that the bottom left corner of the image is where the pointer is. Is this possible and how. Thanks.
RE: [flexcoders] Re: Cairngorm's Anaemic Domain Model
Hi Lach, there many ways to use Cairngorm. I agree with you completly, it's of vital importance to refactor the right functionality from both, views and commands into model objects that mean something to your use case. Then, this functionality can also be easier unit tested. Just lets keep in mind that there's also view functionality like effects code etc, which wouldn't make too much sense in a model, instead they can often be refactored into utility classes ( which you might want to call view helpers ;) ) However how your model is going to look like depends on your specific needs. Cairngorm doesn't tell you how to design your custom model or your custom view. It's the infractucture around that. My blog entries around that, which Douglas pointed out, have the indent to show one possible route to go towards this direction. Nevertheless, it's difficult to show that in examples, since there's a tradeoff in completeness and complexity vs. easy to understand examples and most importantly...time. ;) 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] http://weblogs.macromedia.com/auhlmann From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Lachlan Cotter Sent: 05 December 2006 11:30 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Cairngorm's Anaemic Domain Model My question isn't about the model locator. It's about logic, or lack thereof encapsulated within the domain objects. On 05/12/2006, at 9:59 PM, Tim Hoff wrote: It doesn't matter if it's a collection of dumb value objects, a component, a state variable, or just a common effect. If an object is used more than a couple of times in the app, put it in the ModelLocator. Remember, everything is an object; instantiated and destroyed like the rest of them (GC?:)). The key is; does the object need to be reusable? If so, make it central. -TH p.s. right on Tom. att8d3e9.gif Description: att8d3e9.gif
[flexcoders] Re: Cairngorm's Anaemic Domain Model
I'm with you Alex. The gripe seems to be duplication and object graphing. With client/server architecture, this is common place and often unavoidable. Usually though, this has to do with mapping data classes, but business logic always seems to fall into this category as well. My take is that it's all about organization. Cairngorm is not a savior, but rather a sheperd. -TH --- In flexcoders@yahoogroups.com, Alex Uhlmann [EMAIL PROTECTED] wrote: Hi Lach, there many ways to use Cairngorm. I agree with you completly, it's of vital importance to refactor the right functionality from both, views and commands into model objects that mean something to your use case. Then, this functionality can also be easier unit tested. Just lets keep in mind that there's also view functionality like effects code etc, which wouldn't make too much sense in a model, instead they can often be refactored into utility classes ( which you might want to call view helpers ;) ) However how your model is going to look like depends on your specific needs. Cairngorm doesn't tell you how to design your custom model or your custom view. It's the infractucture around that. My blog entries around that, which Douglas pointed out, have the indent to show one possible route to go towards this direction. Nevertheless, it's difficult to show that in examples, since there's a tradeoff in completeness and complexity vs. easy to understand examples and most importantly...time. ;) 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] http://weblogs.macromedia.com/auhlmann From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Lachlan Cotter Sent: 05 December 2006 11:30 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Cairngorm's Anaemic Domain Model My question isn't about the model locator. It's about logic, or lack thereof encapsulated within the domain objects. On 05/12/2006, at 9:59 PM, Tim Hoff wrote: It doesn't matter if it's a collection of dumb value objects, a component, a state variable, or just a common effect. If an object is used more than a couple of times in the app, put it in the ModelLocator. Remember, everything is an object; instantiated and destroyed like the rest of them (GC?:)). The key is; does the object need to be reusable? If so, make it central. -TH p.s. right on Tom.
[flexcoders] how to stop tab from changing
i have an accordion, in which when the user clicks sth inside the first tab; the second tab is loaded. the problem is that; i have to prevent user from opening the second tab. i need to show an error and reselect the 1st tab. to make this; i have added an event listener for the change event of the accordion but; i can give the error, but can not reselect tab 0. my code is below, can anyone help me please? thanks.. --- private function tabChangeControl(e:Event):void{ if(accordi.selectedIndex == 1 bilgiler.enabled==false){ e.preventDefault(); Alert.show('Önce görev seçmelisiniz','Hata'); //error message accordi.selectedIndex=0; //THIS DOES NOT WORK!!! } } Yahoo! Music Unlimited Access over 1 million songs. http://music.yahoo.com/unlimited
[flexcoders] Cairngorm Newbie Question - Please set me straight
I have a command that I would like to have pull lookup data from 6 different BusinessDelegates. Should that one command call all 6 delegates or should it fire 6 new events that call 6 new commands? If the one command should call all 6 delegates in its execute function, how do you handle 6 different results since there is only 1 onResult function. I am using Cairngorm 2.1. Thanks in advance, Steve
[flexcoders] help in database access
Hai everybody, i am new to flex environment and i am struck up with a prob i am trying to access Databse using flex and java. in this situation i am trying to retrieve two of the values from the DB based on the primary key and view a column chart based on the two values retieved. i am unable to get the required result. Pl help me. here is my mxml file ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ var userList=0; function initApp() { //alert(Hello World!!); } function log() { users.getValid(userid.text); } ]] /mx:Script mx:Canvas width=236 height=400 mx:Button x=80 y=203 id=Register label=Get Result click=log() textAlign=center / mx:TextInput id=userid x=31 y=142/ mx:Label x=81 y=102 text=Enter User-Id height=20 width=88 / /mx:Canvas mx:Model id=results source=users.getValid.result/ mx:ColumnChart width=100% height=100% dataProvider={userlist} showDataTips=true mx:horizontalAxis mx:CategoryAxis dataProvider={results} categoryField=results.examid/ /mx:horizontalAxis mx:series mx:Array mx:ColumnSeries yField=results.score/ /mx:Array /mx:series /mx:ColumnChart !--Login checking remote object-- mx:RemoteObject id=users source=report result=userList=event.result fault=alert (event.fault.faultstring, 'Error') mx:method name=getValid/mx:method /mx:RemoteObject /mx:Application here is my java file import java.sql.*; import java.util.ArrayList; public class report { Connect q=new Connect(); public report(){ } public ArrayList getValid(int num){ ArrayList list1 = new ArrayList(); try{ Connection Conn=q.establish_Connection(); Statement s = Conn.createStatement(); ResultSet rs=s.executeQuery(select examid,score from report where userid=+num); while (rs.next()) { list1.add(new getreportlistVO ( rs.getInt(1),rs.getInt(2))); } s.close(); Conn.close(); } catch(Exception e) { System.out.println(TechRP Error : +e); } return list1; } public static void main(String Args[]) { report q=new report(); } } here is my VO file pich up the values import java.util.Random; import java.io.*; import java.sql.*; public class getreportlistVO implements java.io.Serializable { int examid,score; public void setexamid(int eid) { this.examid = eid; } public int getscore() { return score; } public void setscore(int score) { this.score = score; } public getreportlistVO(int examid, int score) { this.examid=examid; this.score=score; } public void printval() { System.out.println(examid); System.out.println(score); } } Regards.. Deepa
RE: [flexcoders] Flex 2 Charting align Axis
Anyone knows about ..any Dail ..or gauge Charts in FLEX ??? Regards Jolly Life Fitness - A Division of Brunswick Corporation #09-02, The Signature, Changi Business Park Central 2, Singapore-486066 (Cell) 65 -96216408 (Tel) 65-62606409 (Fax) 65-62605150 http://www.lifefitness.com http://www.lifefitness.com | http://www.brunswick.com http://www.brunswick.com From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ely Greenfield Sent: Tuesday, December 05, 2006 1:26 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Flex 2 Charting align Axis The AxisRenderer class has a 'placement' property. If you explicitly supply your own AxisRenderer, you can set the placement appropriately: LineChart horizontalAxisRenderer AxisRenderer placement=top / ... Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sönke Rohde Sent: Saturday, December 02, 2006 6:24 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex 2 Charting align Axis Hi, How do I align my Axis e.g. I'd like to have to horizontal axis on the top instead on the bottom and the vertical axis on the right instead of left. Thanks and Cheers, Sönke
[flexcoders] Re: Some Thoughts and examples on making Custom Flex Charts simpler.
Nice examples Ely. You are a charting magician. A couple of small comments: 1. In the Basic Drawing API. If I move the right slider and then increment the Top spin edit box, it pops an error. 2. The comment screen is great but there is no close box. While I think it is great that you are providing these examples, I can see it generating even more questions (what I think your trying to slow down). Just the comment stuff alone, I can think of 10+ variations on what someone would want. Great work. --- In flexcoders@yahoogroups.com, Ely Greenfield [EMAIL PROTECTED] wrote: Someone pointed out to me that I stupidly had left the post password protected. The password has been removed, so if you tried to view it and weren't able, you should try again now. Ely. Hello exciting world of Flex Developers. I spend a lot of time on this list answering questions on the flex charts, and amidst an explosion of people asking about custom charting work last week, had some thoughts on how customizing charts might be made easier. Since the ideas (and prototype code) was driven by a number of questions that have been asked on this list over the past few weeks, I thought I'd post directly to flex coders and invite everyone to check it out. Interested? Read more about it here: http://www.quietlyscheming.com/blog/2006/12/04/some-thoughts-and-example s-on-making-custom-flex-charts-simpler/ http://www.quietlyscheming.com/blog/2006/12/04/some-thoughts-and-exampl es-on-making-custom-flex-charts-simpler/ Ely.
Re: [flexcoders] Function Error
You forgot new ArrayCollection somewhere. Patrick jmfillman a écrit : When I click on the Submit button, I get the following error: TypeError: Error #1009: Cannot acces a property or method of a null object reference. at main/validateForm( ) at main/__btnFormSign_ click() What am I doing wrong? mx: State name=Forms mx:AddChild position=lastChild mx:Canvas width=200 height=31 right=10 top=39 mx:Button label=Submit id=btnFormSign click=validateForm (); mx:Script ![CDATA[ [Bindable] public var validationAC: ArrayCollection; public function validateForm( ) :void { if (text1.text. length 3) { validationAC. addItem({ label:Text1 , data:false}) ; } } /mx:Script /mx:Button /mx:Canvas
[flexcoders] Re: Best practices for displaying large texts [SOLVED]
Gordon, thanks a lot! It fits perfectly to my requirement. -Pablo Apanasionek --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: I don't know of a way to do justified text in Flex textAlign=justify works on mx:Text and mx:TextArea, although it isn't mentioned in the ASDoc for the textAlign style or in FlexBuilder's codehints for this style. See the flash.text.TextFormatAlign class in the ASDoc. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Lachlan Cotter Sent: Friday, December 01, 2006 9:27 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Best practices for displaying large texts Hi Pablo, I'm not sure this is the best answer to your question but as far as I know the Text component is the right choice for displaying multi-line, non-editable text. If you want your users to be able to edit the text, you can use a TextArea instead. I'm don't know of a way to do justified text in Flex. Sorry. Lach On 30/11/2006, at 12:15 AM, Pablo Apanasionek wrote: Hey, I'm trying to figure out the best (or at least optimal) way to display a large text (e.g. a news article) with several paragraphs using Flex 2. Would a Text control be the right one to use? Or is there another technique that would render better? Is there any way to justify text on -both- sides? Thanks in advance, Pablo Gustavo Apanasionek
[flexcoders] Re: FLV Duration
How does this tool work, I was looking at it yesterday and couldn't really figure it out. I ran an flv through it and couldn't see how to get the duration out of it.It looked to me like all you could do was add stuff to the flv, not get information out of it. If I am wrong (and I hope so) please let me know how I could use this to figure out the duration of an flv -John --- In flexcoders@yahoogroups.com, The Morans [EMAIL PROTECTED] wrote: You could pass everything through FLVTool2 on the server to inject metadata...problem solved! This is something we do with flvs made from ffmpeg. sean http://inlet-media.de/flvtool2 On Dec 4, 2006, at 2:45 PM, Stacy Young wrote: I'm curious to know myself, I will poke around. In the meantime I'd also post this to flashcoders. Since we're talking Actionscript specifically, there's a much higher percentage of folks on there that work with video. http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Cheers, Stace From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of john_69_11 Sent: Monday, December 04, 2006 4:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] FLV Duration Is there an easy way to figure out the duration of an FLV thati s being played? I have been looking at the NetStream object and the onMetaData event, but it seems like the FLV does not always have the metadata set. The FLVs I want to play are created my other people, so there is no way to force them to add the metadata. is there any way to easily get around this?
[flexcoders] Getting active styles from StylesheetManager
Is there a way to get the ENTIRE list of css entries? Rather than having to getStyle(Name), but just the individual entry list. This is extremely simple in as2.0, but with flex 2 I cant figure it out. I just want to get the entire list of css style names when the app is binded to a mx:Style source=styles.css / entry. Any ideas? - Need a quick answer? Get one in minutes from people who know. Ask your question on Yahoo! Answers.
[flexcoders] Need Help...Passing data from datagrid to database
Hi, Can anyone help me in solving this problem. My basic need is to pass the data from a datagrid to the database. I want to read the data in datagrid row by row. Consider i have a datagrid with two colums and five rows. In a for loop i want to get the data in each row one by one so that i can pass this value to an HTTPService one by one so that i can store it in the database. If anyone of you have any other suggestion you are welcomed. I would really appreciate you effort in solving this problem. Thanks Regards, Vinod M Jacob - Everyone is raving about the all-new Yahoo! Mail beta.
[flexcoders] Re: Cartesian Charts colum styling different from other chart types
Thanks Ely and Tom, Assigning a DropShadowFilter to the 'filters' property solved my problem. In the case anyone is interested in the syntax, here is an example on the livedocs on how to use DropShadowFilter: http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhe lp.htm?href=0776.html --- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote: True story. :) --- In flexcoders@yahoogroups.com, Ely Greenfield egreenfi@ wrote: That approach will assign a drop shadow filter to each item renderer. Sometimes that's the effect you want, and sometimes you want a drop shadow assigned to _all_ the renderers at once. In that case, you can assign a dropShadow to the 'filters' property of the columnSeries. Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tim Hoff Sent: Monday, December 04, 2006 2:54 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Cartesian Charts colum styling different from other chart types Hi Oscar, For Cartesian Charts, you have to specify the itemRenderer for dropShadow: import mx.charts.renderers.ShadowBoxItemRenderer; mx:ColumnSeries itemRenderer=mx.charts.renderers.ShadowBoxItemRenderer/ -TH __ Tim Hoff Cynergy Systems, Inc. http://www.cynergysystems.com http://www.cynergysystems.comoffice/ Office: 866-CYNERGY --- In flexcoders@yahoogroups.com, Oscar ocortess@ wrote: I am using different chart types on my app. Some are column charts, some are bar charts and I have one cartesian -column chart. By default all chart types -except the cartesian chart! s I think, display columns with shadow. How can I add that shadow to cartesian charts? Thanks,
Re: [flexcoders] Cairngorm Newbie Question - Please set me straight
On 12/5/06, stevehousefl [EMAIL PROTECTED] wrote: I have a command that I would like to have pull lookup data from 6 different BusinessDelegates. Should that one command call all 6 delegates or should it fire 6 new events that call 6 new commands? If the one command should call all 6 delegates in its execute function, how do you handle 6 different results since there is only 1 onResult function. The command should fire six new events for the reason you specified. The result of each lookup should go into a class in your model. When all the results are done, the class in the model then calculates the final result. The class has fields for all the intermediate results, and every time that a new result is recieved, the class checks to see if all the results are there. If they are, it calculates the new public result. Note that the intermediate results should not be public, and should be set using a setter or by function in order to maximize encapsulation. Of course this is just one way to do it, but I think it is at least and example of a clean way to handle something like this. Regards, Hank I am using Cairngorm 2.1. Thanks in advance, Steve -- 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
Re: [flexcoders] Cairngorm Newbie Question - Please set me straight
Hi Steve, I'm going to take a stab at this as I've been studying the Command pattern (as defined in GoF) and Cairngorm lately. In fact I'll be presenting on the subject here in Boston tomorrow evening, so this is right up my alley. (www.bfpug.us) :-) how do you handle 6 different results since there is only 1 onResult function. I think that the answer here is you don't. :-) Cairngorm has a SequenceCommand which has: public var nextEvent : CairngormEvent; You can then call its executeNextCommand() from your result() method which launches that event. This will work well enough if you need results from command_1 before you make the service call in command_2, which you need before command_3, etc. On the other hand, if that's not the case, what to do? The Gang Of Four chapter on the Command pattern describes a MacroCommand that executes a number of (Simple)Commands. As described it seems to simply fire them off, one after another. Wouldn't be hard to roll your own, extending ICommand, with an array property, and passing in Command objects. I could even see creating an MacroEvent class that kept track of whether its Commands had finished and that then did something when all were finished. Other Cairngorm programmers, wiser than I, will probably ask you wise questions about why you wish to pull data from six different data sources... :-) Douglas - Douglas McCarroll CairngormDocs.org Webmaster http://www.CairngormDocs.org Flex Developer http://www.brightworks.com 617.459.3840 - stevehousefl wrote: I have a command that I would like to have pull lookup data from 6 different BusinessDelegates. Should that one command call all 6 delegates or should it fire 6 new events that call 6 new commands? If the one command should call all 6 delegates in its execute function, how do you handle 6 different results since there is only 1 onResult function. I am using Cairngorm 2.1. Thanks in advance, Steve
[flexcoders] SWF Meta Data
Hey guys, I really like the idea of defining my SWF parameters for AS projects right at the main script file for actionscript files, but I have two problems: 1, wish it worked, my source: package { [SWF(width=500, height=500, backgroundColor=#ff, frameRate=40)] That's it, just defining the SWF parameters at the package level. 2, wish I knew where to look for the available parameters, does anyone know where it's documented? Sincerely, Elibol
[flexcoders] Web Services authentication
Hi. I just need a flex app to access a web service and pass in the uid and pwd. Im trying with this: MyService.setUsernamePassword(username, password); But i am still getting prompted for user/password when I make the WebService call Does anyone have a solution for this? Thanks, Ronan
Re: [flexcoders] FDS number NaN
Anyone else have this problem or am I just doing something wrong. Thanks Jeff Jeff Krueger [EMAIL PROTECTED] wrote: I have considered coming up with a number like -99 and then assume that to be null and initialize all my Number variables to it and then translate that in java to null. But that is a hack at best. Anyone else?? Jeff Douglas McCarroll [EMAIL PROTECTED] wrote: Okay. So this is normal FDS behavior, as explained in the docs. The question becomes How can we deal with this limitation of FDS? I don't know an answer but perhaps others on the list do. Has anyone else wished that they could pass NaN or null into Java? How did you deal with this FDS limitation? And perhaps Adobe could comment on whether there's any chance that this behavior will change in the future. Douglas Jeff Krueger wrote: This is correct. My Number in my as class isn't really null it is NaN. But I believe that to be the actionscript equivalent to null for a number. And yes when I pass that to java function that function recieves the class with a 0 for the Long instead of null. Here is the output from the console of the app server. Notice the variable XPos, YPos and deployed. See how what I send in is NaN (or null) and it is converted to a 0. [Flex] Deserializing AMF/HTTP request Version: 3 (Message #0 targetURI=null, responseURI=/2) (Array #0) [0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage') operation = findStoryByExample source = null body = (Array #1) [0] = 2 [1] = (Typed Object #2 'com.routeto1.flex.media.vo.StoryVO') headline = c XPos = NaN validToDate = null pageDef = null deployedPath = validFromDate = null subHeadline = storyGraphic = null YPos = NaN keywords = body = source = bylineOccupation = publishedDate = null otherReferences = referenceId = deployed = NaN byline = pk = updatedByUser = null selected = false dateUpdated = null copyForSearch = false createdByUser = null createdByUserName = dateCreated = null clientId = null timeToLive = 0 messageId = A5C134A1-DC44-4514-6B85-43FE21B96CB1 headers = (Object #3) DSEndpoint = my-amf destination = mediaDelegate timestamp = 0 [Flex] Adapter 'java-object' called 'com.routeto1.flex.media.MediaDelegate.findS toryByExample(java.util.Arrays$ArrayList (Collection size:2) [0] = 2 [1] = com.routeto1.flex.media.vo.StoryVO YPos = 0 dateUpdated = null XPos = 0 byline = publishedDate = null dateCreated = null pageDef = null copyForSearch = true validFromDate = null validToDate = null deployedPath = createdByUser = null bylineOccupation = body = headline = c keywords = subHeadline = deployed = 0 referenceId = pk = updatedByUser = null otherReferences = storyGraphic = null createdByUserName = source = )' Thanks Jeff */Douglas McCarroll [EMAIL PROTECTED]/* wrote: Jeff, Let me get this clear. If I understand correctly you're passing an AS number hoping that it will convert to a Java Long. But your number is set to null, and you'd like it to convert to null on the Java type. Is this correct? Douglas Jeff Krueger wrote: Thanks. I am not using a primitive, I am using Long. I wonder what it does for those. Jeff */Douglas McCarroll [EMAIL PROTECTED] mailto:org.yahoo_primary.001%40douglasmccarroll.com/* wrote: Jeff, I'm not sure that this will help you find a solution, but it confirms that this is a known issue: http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part1_GetStarted.html http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part1_GetStarted.html http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part1_GetStarted.html http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part1_GetStarted.html Primitive values cannot be set to null in Java. When passing Boolean and Number values from the client to a Java object, Flex interprets null values as the default for primitive types; for example, 0 for double, float, long, int, short, byte, \u for char, and false for Boolean. Only primitive Java types get default values. Douglas - Douglas McCarroll CairngormDocs.org Webmaster http://www.CairngormDocs.org http://www.cairngormdocs.org/ http://www.cairngormdocs.org/ http://www.cairngormdocs.org/ Flex Developer http://www.brightworks.com http://www.brightworks.com/ http://www.brightworks.com/ http://www.brightworks.com/ 617.459.3840 - Jeff Krueger wrote: All, I am finding that when I pass a actionscript class to a remote java object and a number variable type in the actionscript class is set to NaN (Null), that the java class gets set to a 0, instead of a null. Is there
[flexcoders] Could not resolve mx:Effect to a component implementation.
Hi everybody, I'm new to Flex and i have some code having mx:Effects in it. I get error as Could not resolve mx:Effect to a component implementation. I've imported import mx.effects.Effect; but still having the problem. Could anyone help me with this? Thanks in advance.
Re: [flexcoders] Cairngorm’s Anaemic Domain M odel
On 05/12/2006, at 8:47 PM, Tom Chiverton wrote: First, I have never seen examples or discussion of Cairngorm that deals with this issue. In most cases the 'model' isn't much more than a collection of dumb value objects without complex relationships. I'm not sure you'd want your model to be very more complex. Really? Maybe it's my upbringing but I seem to want this a lot. In particular, when you want to model relationships and connections between objects other than a simple containment type relationship. Or when you want to describe objects with behaviour rather than only data. Second, and more importantly, pretty much all the logic of Cairngorm apps seems to reside in the Command and Delegate classes with not much to speak about in the actual model. It seems to be the Commands that end up manipulating the application data directly, and I'm a little uncomfortable with this. I think it's a good idea to stick all the logic in once obvious place, and then have that change the model, which uses data binding to make things change in the view. Seems to me that the one obvious place for logic related to the business domain is in the model. Not that commands aren't a good idea; and I have no problem with using binding to update the view. That's not really the issue. The issue is encapsulation of business logic and guidelines for architecting the distributed domain model. Cheers, Lach
[flexcoders] Re: How to make ViewStack Item Invisible
It is already a separate component so take advantage of that and don't even add it to the view stack unless the user has access. This will also prevent the button form showing unless they have access. private function CallMeAfterUserValidation():void { if(UserCredentials.AllowedToAccesCustomers) { var temp:CustSearchForm = new CustSearchForm; myViewStack.addChild(temp); } } --- In flexcoders@yahoogroups.com, boy_trike [EMAIL PROTECTED] wrote: Following is a sample of my code: mx:ViewStack id=myViewStack width=100% height=100% y=15 mx:Canvas id=displayOrders label=My Orders comp:DisplayOrders id=myOrders / /mx:Canvas mx:Canvas id=displayItemSearch label=Item Search comp:SearchForm id=searchForm / mx:Canvas id=custSearchForm label=Customer Search comp:CustSearchForm id=custSearchForm / /mx:Canvas /mx:ViewStack The problem is that I want the CUSTOMER SEARCH (last canvas) to be invisible to certain people. I have tried visible = false and includeinlayout = false but neither works --- In flexcoders@yahoogroups.com, Dimitrios Gianninas dimitrios.gianninas@ wrote: Well a Viewstack by default only shows only one view at a time, so... perhaps you can post a sample of your code? But simply, use the visible property: myBox.visible = false; Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of boy_trike Sent: Monday, December 04, 2006 1:29 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] How to make ViewStack Item Invisible I have a viewstack with multiple canvas's below. Depending on a users credentials, I want some of the options to NOT be visible. I can set enabled to false and they are greyed out but I am not smart enough to figure out how to make them disappear (Out of sight, out of mind) thanks Bruce -- 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] Video still playing in background
Hello i have a little problem and hope somebody could help me i'm trying to load diferent video files (made with swishvideo)with a Datagrid and a SWFLoader the first one plays ok but if i select another one before the first one finishes the sound keeps playing i tried SoundMixer.stopAll(); but i also have a background song and it stops to Q. Is there any way to just stop whats playing in the SWFLoader?
[flexcoders] WPF/E CTP Released
I don't know if anyone posted this or not but WPF/E CTP was released. Here's my take: http://blogs.katapultmedia.com/jb2/2006/12/wpfe_ctp_is_availableheres_my.html . Excerpt: Other than the no-autoinstall, I looked over the examples and have nothing bad to say. For a first shot at this market AND for a CTP release, cudos Microsoft. I didn't expect to see a page flip effect, hover thumbnails, VIDEO (!!), etc. I'm impressed. -- John C. Bland II Chief Geek Katapult Media, Inc. - www.katapultmedia.com --- Biz Blog - http://blogs.katapultmedia.com/jb2 Personal Blog - http://blog.blandfamilyonline.com http://www.lifthimhigh.com - Christian Products for Those Bold Enough to Wear Them Home of FMUG.az - http://www.gotoandstop.org Home of AZCFUG - http://www.azcfug.org
[flexcoders] Re: FDS - class cast exception - lazy loading relationship
I have tried to submit this as a defect, because as far as I can tell, it is. The bug report form is very lacking though! It said my description had to be less than 2000 characters, which isn't enough to provide the trace information, or the Hibernate/FDMS mappings, and then I trimmed and trimmed my bug report to 1931 characters and it STILL wouldn't let me submit it... (last time I checked, 1931 was less than 2000)... so I yanked out MORE useful information until I could get it to submit. Does anyone at Adobe want to get the full scoop on this issue? Here it is! Please let me know if this has been captured, and if it is a known defect. thanks, Thunder --- In flexcoders@yahoogroups.com, thunderstumpgesatwork [EMAIL PROTECTED] wrote: Guys, I'm having more troubles with FDS... seems like there's some internal exception lurking around every corner... Here's a simple managed relationship between an applicationConfig and a Set of dashboards. The relationship is lazy, and when a dashboard is accessed I get the expected ItemPendingError but then immediately afterwards I get this java class-cast-exception on the server. I can load the dashboards separately, but when accessed across the relationship I get this error. Below is the relationship from the data-management-config, and my Hibernate relationship mapping, and the exception and debug trace follow that. Thanks for any help you can provide. Is this a defect? Thunder exception: java.lang.ClassCastException: org.hibernate.collection.PersistentSet at flex.data.SequenceManager.getPageFromSequence(SequenceManager.java:694) at flex.data.DataService.serviceMessage(DataService.java:234) at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:548) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:302) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPServer.java:682) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668) at java.lang.Thread.run(Thread.java:595) ___ set name=dashboards inverse=true lazy=true key column name=APPLICATIONID length=22 not-null=true / /key one-to-many class=Dashboard / /set ___ destination id=Applicationconfig adapter ref=java-dao / properties sourceflex.data.assemblers.HibernateAssembler/source scopeapplication/scope metadata identity property=id/ one-to-many property=dashboards destination=Dashboard lazy=true/ /metadata network paging enabled=true pageSize=10 / throttle-inbound policy=ERROR max-frequency=500/ throttle-outbound policy=REPLACE max-frequency=500/ /network server hibernate-entitycom.company.config.presentation.Applicationconfig/hibernate-entity !-- NOTE: conflict mode set to NONE to solve incorrect conflict detection when saving dashboards. -- update-conflict-modeNONE/update-conflict-mode delete-conflict-modeOBJECT/delete-conflict-mode fill-configuration use-query-cachefalse/use-query-cache allow-hql-queriestrue/allow-hql-queries /fill-configuration /server /properties /destination ___ 12/01 14:39:24 user [Flex] 14:39:24.507 [DEBUG] [Endpoint.RTMP] Deserializing AMF/RTMP request Version: 3 (Command method=null (0) trxId=3.0) null (Typed Object #0 'flex.messaging.messages.CommandMessage') messageRefType = flex.data.messages.DataMessage operation = 0 correlationId = messageId = 29A272A1-A246-13E8-5532-402C036BE987 destination = Dashboard timestamp = 0 body = (Object #1) clientId = 611A30D3-2D63-0B48-2E83-402C034C71AD timeToLive = 0 headers = (Object #2) DSEndpoint = my-rtmp 12/01 14:39:24 user [Flex] 14:39:24.522 [DEBUG] [Message.Command.subscribe] Executed command: service=data-service commandMessage: Flex Message (flex.messaging.messages.CommandMessage) operation = subscribe selector = null messageRefType = flex.data.messages.DataMessage clientId = 611A30D3-2D63-0B48-2E83-402C034C71AD correlationId = destination = Dashboard messageId = 29A272A1-A246-13E8-5532-402C036BE987 timestamp = 1165012764522 timeToLive = 0 body = {} hdr(DSEndpoint) = my-rtmp replyMessage: Flex Message (flex.messaging.messages.AcknowledgeMessage) clientId = 611A30D3-2D63-0B48-2E83-402C034C71AD correlationId = 29A272A1-A246-13E8-5532-402C036BE987 destination = null messageId =
[flexcoders] Re: Web Services authentication
What you're doing is calling a webservice method called setUsernamePassword, and passing that method 2 parameters, so unless you have a method called setUsernamePassword on your webservice, nothing will happen, however, you aren't even able to access the webservice because I don't think you've defined the username and password in either the http header or the uri. To keep it simple, try something like this with your wsdl definition: myService.wsdl = 'http://username:[EMAIL PROTECTED]/service/?wdsl'; myService.load(); if you're using NetConnection, then just try the same URI for the connect() function. I think there is a class that would secure identification through http headers, Flex is vast... Check out the docs. elibol --- In flexcoders@yahoogroups.com, Ronan Bottini [EMAIL PROTECTED] wrote: Hi. I just need a flex app to access a web service and pass in the uid and pwd. Im trying with this: MyService.setUsernamePassword(username, password); But i am still getting prompted for user/password when I make the WebService call Does anyone have a solution for this? Thanks, Ronan
[flexcoders] Re: FDS number NaN
I would suggest sending the value as a string instead of a long, and do a type conversion from the string to long afterwards and just place logic to check if the string is NaN before you convert it taking the appropriate actions. --- In flexcoders@yahoogroups.com, Jeff Krueger [EMAIL PROTECTED] wrote: Anyone else have this problem or am I just doing something wrong. Thanks Jeff Jeff Krueger [EMAIL PROTECTED] wrote: I have considered coming up with a number like -99 and then assume that to be null and initialize all my Number variables to it and then translate that in java to null. But that is a hack at best. Anyone else?? Jeff Douglas McCarroll [EMAIL PROTECTED] wrote: Okay. So this is normal FDS behavior, as explained in the docs. The question becomes How can we deal with this limitation of FDS? I don't know an answer but perhaps others on the list do. Has anyone else wished that they could pass NaN or null into Java? How did you deal with this FDS limitation? And perhaps Adobe could comment on whether there's any chance that this behavior will change in the future. Douglas Jeff Krueger wrote: This is correct. My Number in my as class isn't really null it is NaN. But I believe that to be the actionscript equivalent to null for a number. And yes when I pass that to java function that function recieves the class with a 0 for the Long instead of null. Here is the output from the console of the app server. Notice the variable XPos, YPos and deployed. See how what I send in is NaN (or null) and it is converted to a 0. [Flex] Deserializing AMF/HTTP request Version: 3 (Message #0 targetURI=null, responseURI=/2) (Array #0) [0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage') operation = findStoryByExample source = null body = (Array #1) [0] = 2 [1] = (Typed Object #2 'com.routeto1.flex.media.vo.StoryVO') headline = c XPos = NaN validToDate = null pageDef = null deployedPath = validFromDate = null subHeadline = storyGraphic = null YPos = NaN keywords = body = source = bylineOccupation = publishedDate = null otherReferences = referenceId = deployed = NaN byline = pk = updatedByUser = null selected = false dateUpdated = null copyForSearch = false createdByUser = null createdByUserName = dateCreated = null clientId = null timeToLive = 0 messageId = A5C134A1-DC44-4514-6B85-43FE21B96CB1 headers = (Object #3) DSEndpoint = my-amf destination = mediaDelegate timestamp = 0 [Flex] Adapter 'java-object' called 'com.routeto1.flex.media.MediaDelegate.findS toryByExample(java.util.Arrays$ArrayList (Collection size:2) [0] = 2 [1] = com.routeto1.flex.media.vo.StoryVO YPos = 0 dateUpdated = null XPos = 0 byline = publishedDate = null dateCreated = null pageDef = null copyForSearch = true validFromDate = null validToDate = null deployedPath = createdByUser = null bylineOccupation = body = headline = c keywords = subHeadline = deployed = 0 referenceId = pk = updatedByUser = null otherReferences = storyGraphic = null createdByUserName = source = )' Thanks Jeff */Douglas McCarroll [EMAIL PROTECTED]/* wrote: Jeff, Let me get this clear. If I understand correctly you're passing an AS number hoping that it will convert to a Java Long. But your number is set to null, and you'd like it to convert to null on the Java type. Is this correct? Douglas Jeff Krueger wrote: Thanks. I am not using a primitive, I am using Long. I wonder what it does for those. Jeff */Douglas McCarroll [EMAIL PROTECTED] mailto:org.yahoo_primary.001%40douglasmccarroll.com/* wrote: Jeff, I'm not sure that this will help you find a solution, but it confirms that this is a known issue: http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part1_GetStarted.html http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part1_GetStarted.html http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part1_GetStarted.html http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part1_GetStarted.html Primitive values cannot be set to null in Java. When passing Boolean and Number values from the client to a Java object, Flex interprets null values as the default for primitive types; for example, 0 for double, float, long, int, short, byte, \u for char, and false for Boolean. Only primitive Java types get default values. Douglas - Douglas McCarroll CairngormDocs.org Webmaster http://www.CairngormDocs.org http://www.cairngormdocs.org/ http://www.cairngormdocs.org/
RE: [flexcoders] FLV Duration
If you're using the VideoDisplay component, you can get the length of the FLV file using the totalTime property. hth, matt horn flex docs -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of john_69_11 Sent: Monday, December 04, 2006 4:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] FLV Duration Is there an easy way to figure out the duration of an FLV thati s being played? I have been looking at the NetStream object and the onMetaData event, but it seems like the FLV does not always have the metadata set. The FLVs I want to play are created my other people, so there is no way to force them to add the metadata. is there any way to easily get around this?
RE: [flexcoders] SWF Meta Data
Because Flex always creates a root class for the SWF, the [SWF] metadata must be attached to (i.e. immediately before) the root class definition. The parameters may not be documented, as they're pretty much intended for code generated by the compiler from MXML source. End users are encouraged to use the compiler flags (i.e. on the command line) to set the values for AS, or to use root tag attributes from MXML. (For what its worth, I think you have the entire set we support at the moment.) -rg From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of h8me4everplus1 Sent: Tuesday, December 05, 2006 6:49 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] SWF Meta Data Hey guys, I really like the idea of defining my SWF parameters for AS projects right at the main script file for actionscript files, but I have two problems: 1, wish it worked, my source: package { [SWF(width=500, height=500, backgroundColor=#ff, frameRate=40)] That's it, just defining the SWF parameters at the package level. 2, wish I knew where to look for the available parameters, does anyone know where it's documented? Sincerely, Elibol
RE: [flexcoders] removeNamespace() and the default namespace in XML
I've found that removeNamespace() doesn't work if there are existing attributes or elements using that namespace... have you tried first deleting any of these and then tried to remove the namespace? Also, when you're calling removeNamespace, how are you constructing the Namespace instance to pass in to the function? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of shagenlo Sent: Monday, December 04, 2006 9:12 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] removeNamespace() and the default namespace in XML Hello, I realize this topic was covered a bit in a thread titled Namespace hell, however I didn't see a resolution to a lingering question. Is there any way to use the removeNamespace() method of the XML class to remove the default namespace (the namespace without a prefix)? I would like to do this, because i have an object heirarchy which represents an unstructured XML document (not a recordset). In serializing the object structure, the new XML can get littered with namespace declares, it would be easier to simply remove the original default namespace and be done with it. Name collisions are not a concern for me, but the fact that removeNamespace() doesn't work with the default namespace is. Is there an answer other than RegEx on the xml string? Cheers, Steve
[flexcoders] Re: Need Help...Passing data from datagrid to database
I think in most cases, reading from a DataGrid is unnecessary and I would recommend against it. Instead, you should iterate over the DataGrid's dataProvider to access the data. The exact syntax for that will depend on what you're using as your dataProvider, but assuming its an ArrayCollection or XMLListCollection you should be able to just use a for each loop and make your HTTPService calls from there. HTH, Ben --- In flexcoders@yahoogroups.com, Vinod M Jacob [EMAIL PROTECTED] wrote: Hi, Can anyone help me in solving this problem. My basic need is to pass the data from a datagrid to the database. I want to read the data in datagrid row by row. Consider i have a datagrid with two colums and five rows. In a for loop i want to get the data in each row one by one so that i can pass this value to an HTTPService one by one so that i can store it in the database. If anyone of you have any other suggestion you are welcomed. I would really appreciate you effort in solving this problem. Thanks Regards, Vinod M Jacob - Everyone is raving about the all-new Yahoo! Mail beta.
RE: [flexcoders] Function Error
Or you forgot text1 Anyway, I think it's better to keep your mx:Script - tag in the root node, here it's in the mx:Button - node -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Mineault Sent: dinsdag 5 december 2006 6:33 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Function Error You forgot new ArrayCollection somewhere. Patrick jmfillman a écrit : When I click on the Submit button, I get the following error: TypeError: Error #1009: Cannot acces a property or method of a null object reference. at main/validateForm( ) at main/__btnFormSign_ click() What am I doing wrong? mx: State name=Forms mx:AddChild position=lastChild mx:Canvas width=200 height=31 right=10 top=39 mx:Button label=Submit id=btnFormSign click=validateForm (); mx:Script ![CDATA[ [Bindable] public var validationAC: ArrayCollection; public function validateForm( ) :void { if (text1.text. length 3) { validationAC. addItem({ label:Text1 , data:false}) ; } } /mx:Script /mx:Button /mx:Canvas
Re: [flexcoders] Re: need strategy for filtering ArrayCollections in a Cairngorm app
To dig up an old thread... How would you go about this if you had a component that you wanted to reuse for different views of the data that could be filtered additionally by that view? I've run into a similar problem Tom had where the filterFunction is passed along or overwritten. It seems my only choice (good or bad?) is to have all possible filtering functions in the component and pass the component some logic on which to use for its 'base' data in addition to any user filter applied on the already filtered 'base' data set Perhaps I'm going about it the wrong way. I've modified Paul's example below: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=initialise() xmlns:local=* mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.collections.ListCollectionView; import flash.utils.Timer; [Bindable] public var master : ArrayCollection = new ArrayCollection(); [Bindable] public var slave1 : ListCollectionView = new ListCollectionView(master); [Bindable] public var slave2 : ListCollectionView = new ListCollectionView(master); [Bindable] public var slave3 : ListCollectionView = new ListCollectionView(master); public var value : int = 0; public function initialise() : void { slave1.filterFunction = filterOdd; slave1.refresh(); slave2.filterFunction = filterEven; slave2.refresh(); slave3.filterFunction = filterDivBy10; slave3.refresh(); var timer : Timer = new Timer( 10, 50); timer.addEventListener( timer, addValue); timer.start(); } public function addValue( event : Event ) : void { master.addItem( ++value ); } public function filterOdd( item : Object ) : Boolean { var value : int = int(item); return value % 2 == 1 } public function filterEven( item : Object ) : Boolean { var value : int = int(item); return value % 2 == 0 } public function filterDivBy10( item : Object ) : Boolean { var value : int = int(item); return value % 10 == 0 } ]] /mx:Script mx:HBox width=100% mx:VBox mx:Label text=Master List/ mx:List editable=true dataProvider={ master } height=400/ /mx:VBox local:slave slaveData={slave1} label=odd/ local:slave slaveData={slave2} label=even/ local:slave slaveData={slave3} label=divisible by 10/ /mx:HBox /mx:Application ** slave.mxml ** ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:ac=com.adobe.ac.util.* creationComplete=complete() initialize=init() mx:Script ![CDATA[ import mx.collections.ListCollectionView; [Bindable] public var slaveData:ListCollectionView; public function filterDivBy5(item:Object):Boolean { var value : int = int(item); if (filterOn.selected) return value % 5 == 0 else return true; } private function init():void { trace(init); debug(); trace(); } private function complete():void { trace(complete); slaveData.filterFunction=filterDivBy5; debug(); trace(); } private function filter():void { trace(filter); debug(); slaveData.refresh(); trace(); } private function debug():void { if (slaveData == null) { trace(slaveData
[flexcoders] Re: FLV Duration
onMetaData only works if the flv has been encoded with the metadata, there is no way to garuntee that this has happened though -John --- In flexcoders@yahoogroups.com, John Kirby [EMAIL PROTECTED] wrote: Via onMetaData you should be able to get duration. Have you tried something like this? private function playStream():void { stream = new NetStream(nc); stopTimer(); videoHolder = new UIComponent(); videoHolder.setActualSize(defaultWidth, defaultHeight); video = new Video(defaultWidth, defaultHeight); video.attachNetStream(stream); stream.play(streamVideoURL); stream.addEventListener(NetStatusEvent.NET_STATUS, streamStatusHandler); var client:Object = new Object(); client.onMetaData = onMetaData; stream.client = client } public function onMetaData(info:Object):void { duration = info.duration; fRate = info.framerate; totalBytes = info.bytesTotal; metaWidth = info.width; metaHeight = info.height; } john_69_11 said the following: Is there an easy way to figure out the duration of an FLV thati s being played? I have been looking at the NetStream object and the onMetaData event, but it seems like the FLV does not always have the metadata set. The FLVs I want to play are created my other people, so there is no way to force them to add the metadata. is there any way to easily get around this? -- /Whether you think that you can, or that you can't, you are usually right./ - Henry Ford
Re: [flexcoders] WPF/E CTP Released
Nice, looks like the page at Microsoft about WPF/E finally work! Great. Yours, Weyert
Re: [flexcoders] Re: FLV Duration
On Tuesday 05 December 2006 13:58, john_69_11 wrote: really figure it out. I ran an flv through it and couldn't see how to get the duration out of it.It looked to me like all you could do was add stuff to the flv, not get information out of it. If I am wrong Looks like it adds the missing meta data. You run all your video through the tool as it's uploaded, and then it's available when you load the video into your app. -- Tom Chiverton Helping to quickly disintermediate corporate ROI This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com. -- 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] Re: TitleWindow Component...help!
Well - what I've done, after finding a titlewindow example on cflex, is create a public variable in the titlewindow component of the same name as one in the application, and I send it to the component from the main app AND back via the title window's instance variable. i.e.: TitleWindow Component: [Bindable] public var aListOfData:ArrayCollection; private function sendData():void { - runs when you click submit in titlewindow var compilation:Obect = new Object; compilation.setting1 = something in component; aListOfData.addItem(compilation); (or setItemAt, etc) } Main Application looks like this: [Bindable] private var aListofData:ArrayCollection; private function openComponent():void { - runs when you click open window in the main app var openingWindowblah blah, opening the TitleWindow; openingWindow.aListOfData = aListOfData; } OK - so those variable names are random thoughts off the top of my head, bu you get the picture. From what I understand, this doesn't follow the idea behind loosely coupled components, but is there anything really wrong with this methodology? It seems to work very well in my case. I can even have a window within a window, all passing variables between windows, all the way down to the main app quite easily, and so far its been a breeze to setup. Thoughts anyone? If I continue down this path, where will I start to run into problems? - Chris --- In flexcoders@yahoogroups.com, Roman Protsiuk [EMAIL PROTECTED] wrote: Hi. Why don't your pop up dispatch some event (e.g. submitData) and you listen to it? R. On 12/5/06, qnotemedia [EMAIL PROTECTED] wrote: OK - so I'm using the generic TileWindow example found on the Component Explorer. It basically shows you how to build something where: 1) User clicks a button, Window pops up. 2) User types into a text box in the window, clicks Submit. 3) Text typed in appears in the main app. http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html But, I'm having a little difficulty understanding the assignment of the returned data. i.e.: login.loginName=returnedName; ...where login is the instance of the TitleWindow, loginName is a public Text variable inside the component, and returnedName is a text box in the main app. My confusion comes up when I try to edit this so that: 1) App has a combobox. Dataprovider for the combobox is an ArrayCollection of data: data and label. User clicks a button, TitleWindow pops up. 2) User types into a text box in the window, clicks Submit. 3) The text is a passed as a label, along with a generated ID (generated in the component) and is added to the combobox's dataprovider. The problem appears to be that there is no handler of the Submit button click on the main application. Obviously, I would add to a datasource and return an ID from that, but I can't even get this to work manually (i.e. for testing purposes, setting a static data and label). Just trying to keep this as simple as possible. Seems to me that if I can pass a string of text, I should also be able to pass an Object that is added to a dataProvider in the main app? Right? Help! - Chris
RE: [flexcoders] TitleWindow Component...help!
Here is a simple example: http://www.cflex.net/showfiledetails.cfm?ChannelID=1Object=FileobjectI D=558 Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of qnotemedia Sent: Monday, December 04, 2006 5:46 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] TitleWindow Component...help! OK - so I'm using the generic TileWindow example found on the Component Explorer. It basically shows you how to build something where: 1) User clicks a button, Window pops up. 2) User types into a text box in the window, clicks Submit. 3) Text typed in appears in the main app. http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html But, I'm having a little difficulty understanding the assignment of the returned data. i.e.: login.loginName=returnedName; ...where login is the instance of the TitleWindow, loginName is a public Text variable inside the component, and returnedName is a text box in the main app. My confusion comes up when I try to edit this so that: 1) App has a combobox. Dataprovider for the combobox is an ArrayCollection of data: data and label. User clicks a button, TitleWindow pops up. 2) User types into a text box in the window, clicks Submit. 3) The text is a passed as a label, along with a generated ID (generated in the component) and is added to the combobox's dataprovider. The problem appears to be that there is no handler of the Submit button click on the main application. Obviously, I would add to a datasource and return an ID from that, but I can't even get this to work manually (i.e. for testing purposes, setting a static data and label). Just trying to keep this as simple as possible. Seems to me that if I can pass a string of text, I should also be able to pass an Object that is added to a dataProvider in the main app? Right? Help! - Chris
RE: [flexcoders] Returning values from objects on another canvas
And to beat a horse that might not be quite dead yet, if the problem IS with the deferred instantiation of the container, then the best solution is as Lach outlines in the first paragraph: update a data model somewhere accessible, then bind the viewstack children's components to that model. Avoid solving the problem using creationPolicy. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Lachlan Cotter Sent: Tuesday, December 05, 2006 6:17 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Returning values from objects on another canvas Hi, There are a couple of different issues here. First, why do you need to get a reference to the other view? If it is in order to access or manipulate the data therein, the better approach is to bind both views into some dataProvider and manipulate the data through that. Second, the reason you can't address the sub-components at compile time is that they are not part of the canvas class (they are children of your instance). Notwithstanding the above paragraph, if you still need to access them this way, you might want to define your own subclass component with these child properties, so Flex Builder can find them at compile time. Finally, just a guess but perhaps dgselectedOptions is null at runtime because at the time your function is executing, that component has not yet been initialised. Check the creationPolicy of the tab navigator. Cheers, Lach On 05/12/2006, at 5:19 PM, michrx7 wrote: How does one go about referencing objects on another canvas? For example I have a tab navigator with 4 tabs: Register Attendees Membership Payment Options Inside the attendees tab I have a canvas: csAttendee with a datagrid: dgselectedOptions When the user submits the pay button on the payment options tab I call a function to validate their input and try and reference the columns array for the datagrid dgselectedOptions. Using csAttendee.dgselectedOptions gives me an error when I try to compile of Access of possibly undefined property dgselectedOptions through a reference with static type mx.containers:Canvas. If I try Attendees.csAttendee.dgselectedOptions gives me Access of possibly undefined property csAttendee through a reference with static type mx.containers:Canvas. If I try just dgselectedOptions it compiles, but when I click my payment button it gives: Cannot access a property or method of a null object reference. Even though I can click on the Attendees tab and the datagrid is there and populated.
RE: [flexcoders] TitleWindow Component...help!
Yes, actually, using events is more portable than the example I posted. I'll try to do an example of that as well. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Roman Protsiuk Sent: Tuesday, December 05, 2006 4:36 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] TitleWindow Component...help! Hi. Why don't your pop up dispatch some event (e.g. submitData) and you listen to it? R. On 12/5/06, qnotemedia [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: OK - so I'm using the generic TileWindow example found on the Component Explorer. It basically shows you how to build something where: 1) User clicks a button, Window pops up. 2) User types into a text box in the window, clicks Submit. 3) Text typed in appears in the main app. http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html But, I'm having a little difficulty understanding the assignment of the returned data. i.e.: login.loginName=returnedName; ...where login is the instance of the TitleWindow, loginName is a public Text variable inside the component, and returnedName is a text box in the main app. My confusion comes up when I try to edit this so that: 1) App has a combobox. Dataprovider for the combobox is an ArrayCollection of data: data and label. User clicks a button, TitleWindow pops up. 2) User types into a text box in the window, clicks Submit. 3) The text is a passed as a label, along with a generated ID (generated in the component) and is added to the combobox's dataprovider. The problem appears to be that there is no handler of the Submit button click on the main application. Obviously, I would add to a datasource and return an ID from that, but I can't even get this to work manually (i.e. for testing purposes, setting a static data and label). Just trying to keep this as simple as possible. Seems to me that if I can pass a string of text, I should also be able to pass an Object that is added to a dataProvider in the main app? Right? Help! - Chris
[flexcoders] RadioButtons in DataGrid
Hi. I'm trying to use RadioButtons in DataGrid to select some row. One of data entries that populate DataGrid is already selected. Say we've got dataProvider of entries {someData : Object, selected : Boolean}. One of entries has selected == true others are false. The DataGrid itself is in ViewStack. When I switch selectedChild the DataGrid is created and populated with data. One of columns is RadioButton (item renderer derived from RadioButton). I override data setter and in it set selected property for this RadioButton depending on data set. The problem is -- RadioButtons are always DEselected after creation. Is there any way to make one of those RadioButtons selected? Below is simple example that demonstrates the problem. RadioButtonItemRenderer.as: package { import mx.controls.RadioButton; public class RadioButtonItemRenderer extends RadioButton { public override function set data(value : Object) : void { selected = Boolean(value); super.data = value; } } } RadioButtonsInDataGrid.mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:ViewStack id=viewStack width=100% height=100% mx:Canvas mx:Button width=100 label=go to DataGrid click={viewStack.selectedIndex = 1;} / /mx:Canvas mx:VBox width=100% height=100% mx:Button width=100 label=go back click={viewStack.selectedIndex = 0;} / mx:DataGrid dataProvider={dataProvider} mx:columns mx:Array mx:DataGridColumn headerText=radio dataField=selected itemRenderer=RadioButtonItemRenderer / /mx:Array /mx:columns /mx:DataGrid /mx:VBox /mx:ViewStack mx:Script ![CDATA[ [Bindable] private var dataProvider : Array = [{selected : true}, {selected : false}, {selected : false}]; ]] /mx:Script /mx:Application Any help appreciated. R.
[flexcoders] Re: ListBase.as getting called after Drop to Datagrid--Preventing the Drop???
Hi Lach, Nope...My component code looked liked: mx:DataGrid id=cart dragEnabled=true dropEnabled=true dragEnter=onDragEnter(event)/ Still haven't figured out what caused the problem. Wayne --- In flexcoders@yahoogroups.com, Lachlan Cotter [EMAIL PROTECTED] wrote: Hi Wayne, By any chance did you forget to register your event handler with the DataGrid? Just a thought. Cheers, Lach On 30/11/2006, at 1:07 AM, wayneposner wrote: I'm trying to drag-and-drop from a tree to a datagrid. I've followed the examples to try to achieve this, but whenever I drag over the datagrid, it refuses to accept the drop. The datagrid acts like the dropEnabled flag is set to false. I've traced the code and despite the fact that I have a custom dragEnter handler, it still executes the handler found in ListBase.as which cancels out my handler. Does anyone know what would cause this? Thanks! My Handler is as follows: private function onDragEnter( event:DragEvent ) : void { DragManager.acceptDragDrop(UIComponent(event.currentTarget)); }
RE: [flexcoders] Images and tooltips
I have tried changing the baselinePosition, various X and Y cords, and even tried to change the mouse position to make the tooltip start higher up, but none of these things worked. There doesn't seem to be a property that I can change that will allow you to move the tooltip to start somewhere other than the default position. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth Sutherland Sent: 05 December 2006 11:55 To: flexcoders@yahoogroups.com Subject: [flexcoders] Images and tooltips I've been having a look at the ImageToolTip component from everythingflex.com I've implemented it in my own flex site but I would like to make the tooltip appear at a different position. As at the moment it appears below the mousepointer when you hover the mouse. I would like it to appear above the mouse pointer. So that the bottom left corner of the image is where the pointer is. Is this possible and how. Thanks.
RE: [flexcoders] help in database access
This is a duplicate post of one I responded to on 12/4. Have you done what I suggested? What was the result? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of deepa_golamudi Sent: Tuesday, December 05, 2006 1:47 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] help in database access Hai everybody, i am new to flex environment and i am struck up with a prob i am trying to access Databse using flex and java. in this situation i am trying to retrieve two of the values from the DB based on the primary key and view a column chart based on the two values retieved. i am unable to get the required result. Pl help me. here is my mxml file ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml http://www.macromedia.com/2003/mxml mx:Script ![CDATA[ var userList=0; function initApp() { //alert(Hello World!!); } function log() { users.getValid(userid.text); } ]] /mx:Script mx:Canvas width=236 height=400 mx:Button x=80 y=203 id=Register label=Get Result click=log() textAlign=center / mx:TextInput id=userid x=31 y=142/ mx:Label x=81 y=102 text=Enter User-Id height=20 width=88 / /mx:Canvas mx:Model id=results source=users.getValid.result/ mx:ColumnChart width=100% height=100% dataProvider={userlist} showDataTips=true mx:horizontalAxis mx:CategoryAxis dataProvider={results} categoryField=results.examid/ /mx:horizontalAxis mx:series mx:Array mx:ColumnSeries yField=results.score/ /mx:Array /mx:series /mx:ColumnChart !--Login checking remote object-- mx:RemoteObject id=users source=report result=userList=event.result fault=alert (event.fault.faultstring, 'Error') mx:method name=getValid/mx:method /mx:RemoteObject /mx:Application here is my java file import java.sql.*; import java.util.ArrayList; public class report { Connect q=new Connect(); public report(){ } public ArrayList getValid(int num){ ArrayList list1 = new ArrayList(); try{ Connection Conn=q.establish_Connection(); Statement s = Conn.createStatement(); ResultSet rs=s.executeQuery(select examid,score from report where userid=+num); while (rs.next()) { list1.add(new getreportlistVO ( rs.getInt(1),rs.getInt(2))); } s.close(); Conn.close(); } catch(Exception e) { System.out.println(TechRP Error : +e); } return list1; } public static void main(String Args[]) { report q=new report(); } } here is my VO file pich up the values import java.util.Random; import java.io.*; import java.sql.*; public class getreportlistVO implements java.io.Serializable { int examid,score; public void setexamid(int eid) { this.examid = eid; } public int getscore() { return score; } public void setscore(int score) { this.score = score; } public getreportlistVO(int examid, int score) { this.examid=examid; this.score=score; } public void printval() { System.out.println(examid); System.out.println(score); } } Regards.. Deepa
RE: [flexcoders] how to stop tab from changing
Hmm, that looks ok. Maybe a timing issue with the rendering? Try setting the selectedIndex using callLater. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Yiðit Boyar Sent: Tuesday, December 05, 2006 7:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] how to stop tab from changing i have an accordion, in which when the user clicks sth inside the first tab; the second tab is loaded. the problem is that; i have to prevent user from opening the second tab. i need to show an error and reselect the 1st tab. to make this; i have added an event listener for the change event of the accordion but; i can give the error, but can not reselect tab 0. my code is below, can anyone help me please? thanks.. --- private function tabChangeControl(e:Event):void{ if(accordi.selectedIndex == 1 bilgiler.enabled==false){ e.preventDefault(); Alert.show('Önce görev seçmelisiniz','Hata'); //error message accordi.selectedIndex=0; //THIS DOES NOT WORK!!! } } Need a quick answer? Get one in minutes from people who know. Ask your question on Yahoo! Answers http://answers.yahoo.com/;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx .
RE: [flexcoders] Re: Need Help...Passing data from datagrid to database
Yes, and I'll go a step further. Reading from a DataGrid directly is practically impossible. What is your back-end platform, the target of your HTTPService call? I think I would not advise a separate call for each row, though HTTPService seems very fast and this will probably work ok. But it just feels wrong to torture the internet connection like that. Instead, build an xml string that has the necessary information to build the (SQL?) insert or update queries fo all the rows, post that to the HTTPService, and on the server, either build that SQL query or even call parameterized stored procedures. I have even built the SQL itself in Flex and just passed it through the business tier to the database. This method has potential performance and security issues however. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: Tuesday, December 05, 2006 11:34 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Need Help...Passing data from datagrid to database I think in most cases, reading from a DataGrid is unnecessary and I would recommend against it. Instead, you should iterate over the DataGrid's dataProvider to access the data. The exact syntax for that will depend on what you're using as your dataProvider, but assuming its an ArrayCollection or XMLListCollection you should be able to just use a for each loop and make your HTTPService calls from there. HTH, Ben --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Vinod M Jacob [EMAIL PROTECTED] wrote: Hi, Can anyone help me in solving this problem. My basic need is to pass the data from a datagrid to the database. I want to read the data in datagrid row by row. Consider i have a datagrid with two colums and five rows. In a for loop i want to get the data in each row one by one so that i can pass this value to an HTTPService one by one so that i can store it in the database. If anyone of you have any other suggestion you are welcomed. I would really appreciate you effort in solving this problem. Thanks Regards, Vinod M Jacob - Everyone is raving about the all-new Yahoo! Mail beta.
[flexcoders] FlexTagLib Issue
Hi All, I have deployed Flex2 on JBOSS and created a JSP file with the following code: %@ taglib uri=FlexTagLib prefix=mm % mm:mxml source=AccountSetup.mxml / But, It is showing an error: FlexTagLib Not Found. Please help me to resolve this issue. Regards, Sanjay
RE: [flexcoders] Re: TitleWindow Component...help!
I am slowly becoming comfortable with using event driven functionality, so this opinion is only that. However, the primary benefit of loose coupling is re-usability, and maybe maintainability, in the sense that it will be easier to drop-in replacement parts. (any others, anyone?). But event code is a little harder to write read and debug than straight calls to directly referenced members. If you are reasonably sure what you are building will not need to be re-used, then there may be little benefit in the effort to gain loose coupling. So wrong? No. Best practice? It depends. Think ahead. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of qnotemedia Sent: Tuesday, December 05, 2006 12:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: TitleWindow Component...help! Well - what I've done, after finding a titlewindow example on cflex, is create a public variable in the titlewindow component of the same name as one in the application, and I send it to the component from the main app AND back via the title window's instance variable. i.e.: TitleWindow Component: [Bindable] public var aListOfData:ArrayCollection; private function sendData():void { - runs when you click submit in titlewindow var compilation:Obect = new Object; compilation.setting1 = something in component; aListOfData.addItem(compilation); (or setItemAt, etc) } Main Application looks like this: [Bindable] private var aListofData:ArrayCollection; private function openComponent():void { - runs when you click open window in the main app var openingWindowblah blah, opening the TitleWindow; openingWindow.aListOfData = aListOfData; } OK - so those variable names are random thoughts off the top of my head, bu you get the picture. From what I understand, this doesn't follow the idea behind loosely coupled components, but is there anything really wrong with this methodology? It seems to work very well in my case. I can even have a window within a window, all passing variables between windows, all the way down to the main app quite easily, and so far its been a breeze to setup. Thoughts anyone? If I continue down this path, where will I start to run into problems? - Chris --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Roman Protsiuk [EMAIL PROTECTED] wrote: Hi. Why don't your pop up dispatch some event (e.g. submitData) and you listen to it? R. On 12/5/06, qnotemedia [EMAIL PROTECTED] wrote: OK - so I'm using the generic TileWindow example found on the Component Explorer. It basically shows you how to build something where: 1) User clicks a button, Window pops up. 2) User types into a text box in the window, clicks Submit. 3) Text typed in appears in the main app. http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html But, I'm having a little difficulty understanding the assignment of the returned data. i.e.: login.loginName=returnedName; ...where login is the instance of the TitleWindow, loginName is a public Text variable inside the component, and returnedName is a text box in the main app. My confusion comes up when I try to edit this so that: 1) App has a combobox. Dataprovider for the combobox is an ArrayCollection of data: data and label. User clicks a button, TitleWindow pops up. 2) User types into a text box in the window, clicks Submit. 3) The text is a passed as a label, along with a generated ID (generated in the component) and is added to the combobox's dataprovider. The problem appears to be that there is no handler of the Submit button click on the main application. Obviously, I would add to a datasource and return an ID from that, but I can't even get this to work manually (i.e. for testing purposes, setting a static data and label). Just trying to keep this as simple as possible. Seems to me that if I can pass a string of text, I should also be able to pass an Object that is added to a dataProvider in the main app? Right? Help! - Chris
[flexcoders] Re: SWF Meta Data
Hi rg, Thanks. Here is a description of my process: Step 1: I created a new Actionscript project. Step 2: I wrote the meta data into the as file designated as the Default Application. This has no effect, and as you've outlined, the tag must be defined before the root class definition. I've deduced from this that the Default Application is not the root class. Could you guide me further? Sincerely, Elibol --- In flexcoders@yahoogroups.com, Roger Gonzalez [EMAIL PROTECTED] wrote: Because Flex always creates a root class for the SWF, the [SWF] metadata must be attached to (i.e. immediately before) the root class definition. The parameters may not be documented, as they're pretty much intended for code generated by the compiler from MXML source. End users are encouraged to use the compiler flags (i.e. on the command line) to set the values for AS, or to use root tag attributes from MXML. (For what its worth, I think you have the entire set we support at the moment.) -rg From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of h8me4everplus1 Sent: Tuesday, December 05, 2006 6:49 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] SWF Meta Data Hey guys, I really like the idea of defining my SWF parameters for AS projects right at the main script file for actionscript files, but I have two problems: 1, wish it worked, my source: package { [SWF(width=500, height=500, backgroundColor=#ff, frameRate=40)] That's it, just defining the SWF parameters at the package level. 2, wish I knew where to look for the available parameters, does anyone know where it's documented? Sincerely, Elibol
RE: [flexcoders] Re: need strategy for filtering ArrayCollections in a Cairngorm app
Hi Rick, I havn't read the complete thread below, but since you're saying you're working in a Cairngorm app, to me this looks like functionality that should live in either one or multiple model object(s), instead of the view. The view could just bind to a property (some collection) of that model and update it via encapuslated API requests aka commands. Would that work for you? 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] http://weblogs.macromedia.com/auhlmann From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rick Schmitty Sent: 05 December 2006 17:01 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: need strategy for filtering ArrayCollections in a Cairngorm app To dig up an old thread... How would you go about this if you had a component that you wanted to reuse for different views of the data that could be filtered additionally by that view? I've run into a similar problem Tom had where the filterFunction is passed along or overwritten. It seems my only choice (good or bad?) is to have all possible filtering functions in the component and pass the component some logic on which to use for its 'base' data in addition to any user filter applied on the already filtered 'base' data set Perhaps I'm going about it the wrong way. I've modified Paul's example below: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml creationComplete=initialise() xmlns:local=* mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.collections.ListCollectionView; import flash.utils.Timer; [Bindable] public var master : ArrayCollection = new ArrayCollection(); [Bindable] public var slave1 : ListCollectionView = new ListCollectionView(master); [Bindable] public var slave2 : ListCollectionView = new ListCollectionView(master); [Bindable] public var slave3 : ListCollectionView = new ListCollectionView(master); public var value : int = 0; public function initialise() : void { slave1.filterFunction = filterOdd; slave1.refresh(); slave2.filterFunction = filterEven; slave2.refresh(); slave3.filterFunction = filterDivBy10; slave3.refresh(); var timer : Timer = new Timer( 10, 50); timer.addEventListener( timer, addValue); timer.start(); } public function addValue( event : Event ) : void { master.addItem( ++value ); } public function filterOdd( item : Object ) : Boolean { var value : int = int(item); return value % 2 == 1 } public function filterEven( item : Object ) : Boolean { var value : int = int(item); return value % 2 == 0 } public function filterDivBy10( item : Object ) : Boolean { var value : int = int(item); return value % 10 == 0 } ]] /mx:Script mx:HBox width=100% mx:VBox mx:Label text=Master List/ mx:List editable=true dataProvider={ master } height=400/ /mx:VBox local:slave slaveData={slave1} label=odd/ local:slave slaveData={slave2} label=even/ local:slave slaveData={slave3} label=divisible by 10/ /mx:HBox /mx:Application ** slave.mxml ** ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml xmlns:ac=com.adobe.ac.util.* creationComplete=complete() initialize=init() mx:Script ![CDATA[ import mx.collections.ListCollectionView; [Bindable] public var slaveData:ListCollectionView; public function filterDivBy5(item:Object):Boolean { var value : int = int(item); if (filterOn.selected) return value % 5 == 0 else return true; } private function init():void { trace(init); debug(); trace(); } private function complete():void { trace(complete); slaveData.filterFunction=filterDivBy5; debug(); trace(); } private function filter():void { trace(filter); debug(); slaveData.refresh(); trace(); } private function debug():void { if (slaveData == null) { trace(slaveData object is null); return; } trace(length: +slaveData.length); if (slaveData.filterFunction==null) trace(filter function: null); else if (slaveData.filterFunction==filterDivBy5) trace(filter function: DivBy5); else trace(filter function: parent filter); } ]] /mx:Script mx:Label id=slaveLabel text={this.label}/ mx:List dataProvider={slaveData} height=400 editable=true/ mx:CheckBox id=filterOn label=Filter by Div5 change=filter()/ mx:Button click=debug()/ /mx:VBox On 6/10/06, Paul Williams [EMAIL PROTECTED] mailto:paulw%40adobe.com wrote: Hi Tom, A nice way to do this is to create a master that is an ArrayCollection, and then for each of your filtered lists you use a ListCollectionView. When you create your ListCollectionView you pass your master list in as a constructor parameter (because ArrayCollection implements Ilist). You can then add a filter function to each of your filtered lists without affecting the master. Each ListCollectionView will listen to the
RE: [flexcoders] Re: SWF Meta Data
Is it on the line directly before public class whatever extends Sprite? Metadata modifies the thing directly below it. If you had (for example) an import, then it modifies the import. Can't provide further guidance without seeing your code. -rg From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of h8me4everplus1 Sent: Tuesday, December 05, 2006 9:17 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: SWF Meta Data Hi rg, Thanks. Here is a description of my process: Step 1: I created a new Actionscript project. Step 2: I wrote the meta data into the as file designated as the Default Application. This has no effect, and as you've outlined, the tag must be defined before the root class definition. I've deduced from this that the Default Application is not the root class. Could you guide me further? Sincerely, Elibol --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Roger Gonzalez [EMAIL PROTECTED] wrote: Because Flex always creates a root class for the SWF, the [SWF] metadata must be attached to (i.e. immediately before) the root class definition. The parameters may not be documented, as they're pretty much intended for code generated by the compiler from MXML source. End users are encouraged to use the compiler flags (i.e. on the command line) to set the values for AS, or to use root tag attributes from MXML. (For what its worth, I think you have the entire set we support at the moment.) -rg From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of h8me4everplus1 Sent: Tuesday, December 05, 2006 6:49 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] SWF Meta Data Hey guys, I really like the idea of defining my SWF parameters for AS projects right at the main script file for actionscript files, but I have two problems: 1, wish it worked, my source: package { [SWF(width=500, height=500, backgroundColor=#ff, frameRate=40)] That's it, just defining the SWF parameters at the package level. 2, wish I knew where to look for the available parameters, does anyone know where it's documented? Sincerely, Elibol
RE: [flexcoders] Re: ListBase.as getting called after Drop to Datagrid--Preventing the Drop???
A few things: first, you'll have to call preventDefault() on your DragEvent object to cancel the default behavior so that only your custom event handler runs. Second, you'll have to add a custom dragOver event handler so that the DataGrid shows the correct feedback allowing items to be dropped from the Tree. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wayneposner Sent: Tuesday, December 05, 2006 9:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ListBase.as getting called after Drop to Datagrid--Preventing the Drop??? Hi Lach, Nope...My component code looked liked: mx:DataGrid id=cart dragEnabled=true dropEnabled=true dragEnter=onDragEnter(event)/ Still haven't figured out what caused the problem. Wayne --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Lachlan Cotter [EMAIL PROTECTED] wrote: Hi Wayne, By any chance did you forget to register your event handler with the DataGrid? Just a thought. Cheers, Lach On 30/11/2006, at 1:07 AM, wayneposner wrote: I'm trying to drag-and-drop from a tree to a datagrid. I've followed the examples to try to achieve this, but whenever I drag over the datagrid, it refuses to accept the drop. The datagrid acts like the dropEnabled flag is set to false. I've traced the code and despite the fact that I have a custom dragEnter handler, it still executes the handler found in ListBase.as which cancels out my handler. Does anyone know what would cause this? Thanks! My Handler is as follows: private function onDragEnter( event:DragEvent ) : void { DragManager.acceptDragDrop(UIComponent(event.currentTarget)); }
[flexcoders] Design Pattern/Best Practices for generic record 'list' and 'detail' view Component
Hi All, I'm trying to create a component to use as an example or 'template' of how to achieve a record list and detail view in flex. I'm starting with a simple 'contact' record (model) that has name, address, phone, email, etc. The list of records is held in _dataProvider, and the specific record to be displayed in the detail view is held in _model. My goal is to have a nice clean skeleton of how to handle this sort of display. My component is a viewstack with 2 views: View 0: a datagrid displaying summary info of a list of records (title, first, last). Double click on an entry should open it in the 'detail' view. dataProvider is bound to _dataProvider, an arrayCollection. View 1: a custom component that displays all my model fields. It has a 'model' property that is used to set the record to be displayed. model is a single static instance of my record type, and all fields in the view are bound to it ( eg text='{_model.last_name}' ) The logic for the component is pretty simple: 1. Initial view is determined by _dataProvider.length 2. if _dataProvider.length = 1, default to 'detail' view of that record 3. if _dataProvider.length 2, default to 'list' view 4. if _dataProvider.length = 0, add a new empty record and default to 'detail' view to allow data entry. This mostly works - however, I run into 'odd' problems with dataBinding and Initialization, etc. As my script gets cruftier with all sorts of special case logic, and manually poking stuff to get dataBindings updated, I wonder if perhaps others have a better Design Pattern or template for this ?? I'd appreciate any feedback...
[flexcoders] Re: FLV Duration
again, only works if the flv was encoded correctly with the metadata --- In flexcoders@yahoogroups.com, Matt Horn [EMAIL PROTECTED] wrote: If you're using the VideoDisplay component, you can get the length of the FLV file using the totalTime property. hth, matt horn flex docs -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of john_69_11 Sent: Monday, December 04, 2006 4:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] FLV Duration Is there an easy way to figure out the duration of an FLV thati s being played? I have been looking at the NetStream object and the onMetaData event, but it seems like the FLV does not always have the metadata set. The FLVs I want to play are created my other people, so there is no way to force them to add the metadata. is there any way to easily get around this?
RE: [flexcoders] Re: FDS - class cast exception - lazy loading relationship
This does look like a bug that will occur when you have autoSyncEnabled=false and you use a Set either with lazy loading or as a return value from a fill. It is an easy fix - we are just casting to a List in a couple of places instead of to a Collection. For now, maybe you can workaround the problem by turning autoSyncEnabled=true? Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of thunderstumpgesatwork Sent: Tuesday, December 05, 2006 8:20 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: FDS - class cast exception - lazy loading relationship I have tried to submit this as a defect, because as far as I can tell, it is. The bug report form is very lacking though! It said my description had to be less than 2000 characters, which isn't enough to provide the trace information, or the Hibernate/FDMS mappings, and then I trimmed and trimmed my bug report to 1931 characters and it STILL wouldn't let me submit it... (last time I checked, 1931 was less than 2000)... so I yanked out MORE useful information until I could get it to submit. Does anyone at Adobe want to get the full scoop on this issue? Here it is! Please let me know if this has been captured, and if it is a known defect. thanks, Thunder --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , thunderstumpgesatwork [EMAIL PROTECTED] wrote: Guys, I'm having more troubles with FDS... seems like there's some internal exception lurking around every corner... Here's a simple managed relationship between an applicationConfig and a Set of dashboards. The relationship is lazy, and when a dashboard is accessed I get the expected ItemPendingError but then immediately afterwards I get this java class-cast-exception on the server. I can load the dashboards separately, but when accessed across the relationship I get this error. Below is the relationship from the data-management-config, and my Hibernate relationship mapping, and the exception and debug trace follow that. Thanks for any help you can provide. Is this a defect? Thunder exception: java.lang.ClassCastException: org.hibernate.collection.PersistentSet at flex.data.SequenceManager.getPageFromSequence(SequenceManager.java:694) at flex.data.DataService.serviceMessage(DataService.java:234) at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:54 8) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoin t.java:302) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(Abstrac tRTMPServer.java:682) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPCo nnection.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker .runTask(ThreadPoolExecutor.java:643) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker .run(ThreadPoolExecutor.java:668) at java.lang.Thread.run(Thread.java:595) ___ set name=dashboards inverse=true lazy=true key column name=APPLICATIONID length=22 not-null=true / /key one-to-many class=Dashboard / /set ___ destination id=Applicationconfig adapter ref=java-dao / properties sourceflex.data.assemblers.HibernateAssembler/source scopeapplication/scope metadata identity property=id/ one-to-many property=dashboards destination=Dashboard lazy=true/ /metadata network paging enabled=true pageSize=10 / throttle-inbound policy=ERROR max-frequency=500/ throttle-outbound policy=REPLACE max-frequency=500/ /network server hibernate-entitycom.company.config.presentation.Applicationconfig/hib ernate-entity !-- NOTE: conflict mode set to NONE to solve incorrect conflict detection when saving dashboards. -- update-conflict-modeNONE/update-conflict-mode delete-conflict-modeOBJECT/delete-conflict-mode fill-configuration use-query-cachefalse/use-query-cache allow-hql-queriestrue/allow-hql-queries /fill-configuration /server /properties /destination ___ 12/01 14:39:24 user [Flex] 14:39:24.507 [DEBUG] [Endpoint.RTMP] Deserializing AMF/RTMP request Version: 3 (Command method=null (0) trxId=3.0) null (Typed Object #0 'flex.messaging.messages.CommandMessage') messageRefType = flex.data.messages.DataMessage operation = 0 correlationId = messageId = 29A272A1-A246-13E8-5532-402C036BE987 destination = Dashboard timestamp = 0 body = (Object #1) clientId = 611A30D3-2D63-0B48-2E83-402C034C71AD timeToLive = 0 headers = (Object #2) DSEndpoint = my-rtmp 12/01 14:39:24 user [Flex] 14:39:24.522 [DEBUG] [Message.Command.subscribe] Executed command: service=data-service commandMessage: Flex Message (flex.messaging.messages.CommandMessage) operation = subscribe selector = null messageRefType = flex.data.messages.DataMessage clientId = 611A30D3-2D63-0B48-2E83-402C034C71AD correlationId = destination
[flexcoders] URGENT HELP NEEDED: BindingUtils and Number Formatter
I've got this bug here I need to fix quickly, and I hope you guys can help. I've got a textbox that I'm binding to the .client2SurvivorLevelAnnualIncomeAfterTax property of the value object asset. I'm using the following line to do it: BindingUtils.bindProperty(txtLevelAnnualIncomeAfterTax , 'text', asset, 'client2SurvivorLevelAnnualIncomeAfterTax'); What I need to do is to format the text property with a number formatter toNumber. I tried to do this with a getter: [Bindable(client2SurvivorLevelAnnualIncomeAfterTaxChanged)] public function get client2SurvivorLevelAnnualIncomeAfterTax(): String { return toNumber.format(asset.client2SurvivorLevelAnnualIncomeAfterTax); } but it's not working. Anyone know how I might be able to do this? Thanks much in advance.
[flexcoders] Re: FlexTagLib Issue
It looks to me like you need flex-bootstrap.jar from Flex 1.5 in order to use the tag library: http://livedocs.macromedia.com/flex/15/flex_docs_en/0848.htm#wp15028\ 3 http://livedocs.macromedia.com/flex/15/flex_docs_en/0848.htm#wp1502\ 83 I haven't seen or heard anything specific about using the Flex tag library with Flex 2. -Doug --- In flexcoders@yahoogroups.com, sanjaypmg [EMAIL PROTECTED] wrote: Hi All, I have deployed Flex2 on JBOSS and created a JSP file with the following code: %@ taglib uri=FlexTagLib prefix=mm % mm:mxml source=AccountSetup.mxml / But, It is showing an error: FlexTagLib Not Found. Please help me to resolve this issue. Regards, Sanjay
[flexcoders] AMFPHP / databinding nested arrays
Hi there, I guess this is a typical newbie question, maybe someone could kindly direct me to a tutorial or sample: I try to bind e.g. using a charts control to a nested array I receive from an AMFPHP service. On the php side I have as an example: $outputArr[] = array('day' = 'Mon', array('start' = '100', 'end' = '300')); $outputArr[] = array('day' = 'Tue', array('start' = '250', 'end' = '600')); $outputArr[] = array('day' = 'Wed', array('start' = '500', 'end' = '600')); return $outputArr; ..which will deliver the data correctly as I can see from the flex debugger. In flex I have eg.: mx:series mx:ColumnSeries xField=day yField=??? / /mx:series Now, how do I access e.g. the value 'start' to use it for databinding? Well, 'day.start' does not do the trick : ) I had similar probs using XML for binding, where I wouldnt be able to access sub-children? Do I have to somehow wrap the server response into an actionscript object which I'd have to manually add properties to? Any hint greatly appreciated!! carsten
[flexcoders] Re: URGENT HELP NEEDED: BindingUtils and Number Formatter
Try public function get client2SurvivorLevelAnnualIncomeAfterTax(): String { var numFormat:NumberFormatter = new NumberFormatter(); return numFormat.format(asset.client2SurvivorLevelAnnualIncomeAfterTax); }
[flexcoders] Extending Flex Web Services with WS-Security (WSS4J)
WS-Security is not supported by Flex out of the box. Has anyone tackled this, or if not could someone give a high-level view of how they might accomplish this? I can't seem to create a user in the Adobe forums to post it to find out if this might be added in upcoming support point release??? My thoughts on topic: 1) Manual creation of the SOAP Headers will not work because the token has a set expiration time based on timestamp, username, password. Building that logic up in the client app would expose the credentials in the .swf. 2) Using Axis to create a proxy of the true WS-Secure web service might be viable, but seems dumb to create a web service wrapper for an already exposed web service. Plus, my knowledge on the java side is limited and the googles on Eclipse WTP and doing this haven't yielded much more than a headache. 3) With the FDS Plugin facet for Eclipse WTP in theory I can code both java and mxml / as3 into one. If that is the case could I write a component (SecureWS) to extend mx.rpc.soap.WebService to add the WSS4J functionality I'm after. The user / pass parameters would then be stored as part of the named proxy service on FDS. Everything secure and connective. Also something I'd happily share back to the community if I can get some help on how I'd tackle #3. Thx, Jamie [Thread History] In a previous thread that was in danger of being fragmented, Seth Hodgson wrote, WSSAddUsernameToken is part of the WSS4J API that implements the OASIS WS-Security spec. The Flex web service stack on the client doesn't currently support WS-Security out of the box, but WS-Security is based on SOAP headers and you could probably build these manually. Perhaps someone on the list has tackled this and has code to share? It was in response to my question, One of the next web services I'm looking to integrate uses a username / password to create token via WSSAddUsernameToken. Its package is org.apache.ws.security.message. Or so the co-worker who has built connectivity to that out through J2EE tells me. Each client system connects with it's own user / pass combo. So I believe I should be able to write these into the named proxy web service connection (having issue with that also, put a separate post out for it) on FDS to be secure.
[flexcoders] Re: Cairngorm Newbie Question - Please set me straight
Douglas (and all), Since they are not dependent on each other, I went with just having a single command fire 6 new events. I will look into the MacroCommand though. As far as the 6 different datasources, it is not. Perhaps this is incorrect, but I have a business delegate for each lookup table and a service (remote object) for each Coldfusion component that I am talking to. For example: My EVENT_LOAD_CONTROL_PANEL executes the LoadControlPanelDataCommand The LoadControlPanelDataCommand fires the EVENT_READ_ALL_QUEUES (and 5 other events) The EVENT_READ_ALL_QUEUES executes the ReadAllQueuesCommand The ReadAllQueuesCommand creates a QueueDelegate and executes QueueDelegate.readAllQueues() The QueueDelegate creates an instance of the ServiceLocator and executes .getRemoteObject(queueService) The queueService is configures in Services.mxml as mx:RemoteObject id=queueService destination=ColdFusion source=CF.queueHandler showBusyCursor=true result=event.token.resultHandler( event ); fault=event.token.faultHandler( event );/ Does this make sense Thanks, Steve --- In flexcoders@yahoogroups.com, Douglas McCarroll [EMAIL PROTECTED] wrote: Hi Steve, I'm going to take a stab at this as I've been studying the Command pattern (as defined in GoF) and Cairngorm lately. In fact I'll be presenting on the subject here in Boston tomorrow evening, so this is right up my alley. (www.bfpug.us) :-) how do you handle 6 different results since there is only 1 onResult function. I think that the answer here is you don't. :-) Cairngorm has a SequenceCommand which has: public var nextEvent : CairngormEvent; You can then call its executeNextCommand() from your result() method which launches that event. This will work well enough if you need results from command_1 before you make the service call in command_2, which you need before command_3, etc. On the other hand, if that's not the case, what to do? The Gang Of Four chapter on the Command pattern describes a MacroCommand that executes a number of (Simple)Commands. As described it seems to simply fire them off, one after another. Wouldn't be hard to roll your own, extending ICommand, with an array property, and passing in Command objects. I could even see creating an MacroEvent class that kept track of whether its Commands had finished and that then did something when all were finished. Other Cairngorm programmers, wiser than I, will probably ask you wise questions about why you wish to pull data from six different data sources... :-) Douglas - Douglas McCarroll CairngormDocs.org Webmaster http://www.CairngormDocs.org Flex Developer http://www.brightworks.com 617.459.3840 - stevehousefl wrote: I have a command that I would like to have pull lookup data from 6 different BusinessDelegates. Should that one command call all 6 delegates or should it fire 6 new events that call 6 new commands? If the one command should call all 6 delegates in its execute function, how do you handle 6 different results since there is only 1 onResult function. I am using Cairngorm 2.1. Thanks in advance, Steve
[flexcoders] Re: Cairngorm Newbie Question - Please set me straight
Douglas (and all), Since they are not dependent on each other, I went with just having a single command fire 6 new events. I will look into the MacroCommand though. As far as the 6 different datasources, it is not. Perhaps this is incorrect, but I have a business delegate for each lookup table and a service (remote object) for each Coldfusion component that I am talking to. For example: My EVENT_LOAD_CONTROL_PANEL executes the LoadControlPanelDataCommand The LoadControlPanelDataCommand fires the EVENT_READ_ALL_QUEUES (and 5 other events) The EVENT_READ_ALL_QUEUES executes the ReadAllQueuesCommand The ReadAllQueuesCommand creates a QueueDelegate and executes QueueDelegate.readAllQueues() The QueueDelegate creates an instance of the ServiceLocator and executes .getRemoteObject(queueService) The queueService is configures in Services.mxml as mx:RemoteObject id=queueService destination=ColdFusion source=CF.queueHandler showBusyCursor=true result=event.token.resultHandler( event ); fault=event.token.faultHandler( event );/ Does this make sense Thanks, Steve --- In flexcoders@yahoogroups.com, Douglas McCarroll [EMAIL PROTECTED] wrote: Hi Steve, I'm going to take a stab at this as I've been studying the Command pattern (as defined in GoF) and Cairngorm lately. In fact I'll be presenting on the subject here in Boston tomorrow evening, so this is right up my alley. (www.bfpug.us) :-) how do you handle 6 different results since there is only 1 onResult function. I think that the answer here is you don't. :-) Cairngorm has a SequenceCommand which has: public var nextEvent : CairngormEvent; You can then call its executeNextCommand() from your result() method which launches that event. This will work well enough if you need results from command_1 before you make the service call in command_2, which you need before command_3, etc. On the other hand, if that's not the case, what to do? The Gang Of Four chapter on the Command pattern describes a MacroCommand that executes a number of (Simple)Commands. As described it seems to simply fire them off, one after another. Wouldn't be hard to roll your own, extending ICommand, with an array property, and passing in Command objects. I could even see creating an MacroEvent class that kept track of whether its Commands had finished and that then did something when all were finished. Other Cairngorm programmers, wiser than I, will probably ask you wise questions about why you wish to pull data from six different data sources... :-) Douglas - Douglas McCarroll CairngormDocs.org Webmaster http://www.CairngormDocs.org Flex Developer http://www.brightworks.com 617.459.3840 - stevehousefl wrote: I have a command that I would like to have pull lookup data from 6 different BusinessDelegates. Should that one command call all 6 delegates or should it fire 6 new events that call 6 new commands? If the one command should call all 6 delegates in its execute function, how do you handle 6 different results since there is only 1 onResult function. I am using Cairngorm 2.1. Thanks in advance, Steve
Re: [flexcoders] removeNamespace() and the default namespace in XML
Hi Peter, Peter wrote: I've found that removeNamespace() doesn't work if there are existing attributes or elements using that namespace I suppose that every element in the file uses the namespace, since it is the default namespace, ie: xmlns=http://path.to.com/someplace; Here's how I'm removing the namespace, rather, trying to: where myXML:XML is a parsed XML document for (var i:uint = 0; i myXML.namespaceDeclarations().length; i++) { var ns:Namespace = myXML.namespaceDeclarations()[i]; var prefix:String = ns.prefix; myXML.removeNamespace(ns); } As an example, I have two namespaces at the root of my document declared. One is a custom namespace with a prefix (and no elements use it) - this one is removed. The other is the default namespace, without a prefix, this one sticks around. -Steve Peter Farland wrote: I've found that removeNamespace() doesn't work if there are existing attributes or elements using that namespace... have you tried first deleting any of these and then tried to remove the namespace? Also, when you're calling removeNamespace, how are you constructing the Namespace instance to pass in to the function? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of shagenlo Sent: Monday, December 04, 2006 9:12 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] removeNamespace() and the default namespace in XML Hello, I realize this topic was covered a bit in a thread titled Namespace hell, however I didn't see a resolution to a lingering question. Is there any way to use the removeNamespace() method of the XML class to remove the default namespace (the namespace without a prefix)? I would like to do this, because i have an object heirarchy which represents an unstructured XML document (not a recordset). In serializing the object structure, the new XML can get littered with namespace declares, it would be easier to simply remove the original default namespace and be done with it. Name collisions are not a concern for me, but the fact that removeNamespace() doesn't work with the default namespace is. Is there an answer other than RegEx on the xml string? Cheers, Steve
[flexcoders] Swapping components but keeping a single ID
I notice that Flex won't allow me to identify multiple components with the same ID, even if those components are in different view states. I had hoped to reference a single ID no matter which component was there (all the components implement a single interface.) So, how can I maintain a single component reference for my AS to work with, no matter which of these components are on stage? Is it possible in MXML, or do I need to come up with an AS-only solution? -- Troy RPSystems, Ltd. www.rpsystems.net
[flexcoders] Example in Adobe® Flex 2 Language Reference doesn't compile....
In Adobe® Flex 2 Language Reference, the entry for Class DateField, this example is at the bottom (click on Examples). It won't compile, giving an error on the line where DateField is being cast in the change event. The error is 1119: Access of possibly undefined property selectedDate through a reference with static type DateField. I have tried unsuccessfully to understand what is wrong here - could someone tell me how Adobe expected this example to work? (I get this error all the time when casting stuff). Here's the code, ver batim: ?xml version=1.0 encoding=utf-8? !-- Simple example to demonstrate the DateField control. -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ // Event handler for the DateField change event. private function dateChanged(date:Date):void { if (date == null) selection.text = Date selected: ; else selection.text = Date selected: + date.getFullYear().toString() + '/' + (date.getMonth()+1).toString() + '/' + date.getDate(); } ]] /mx:Script mx:DateFormatter id=df/ mx:Panel title=DateField Control Example height=75% width=75% paddingTop=10 paddingLeft=10 paddingRight=10 mx:Label width=100% color=blue text=Select a date in the DateField control. Select it again to clear it./ mx:Label text=Basic DateField:/ mx:DateField id=dateField1 yearNavigationEnabled=true change=dateChanged(DateField(event.target).selectedDate) / mx:Label id=selection color=blue text=Date selected: / mx:Label text=Disable dates before June 1, 2006./ mx:DateField id=dateField2 yearNavigationEnabled=true disabledRanges={[ {rangeEnd: new Date(2006, 5, 1)} ]} / mx:Label color=blue text=Date selected: {df.format(dateField2.selectedDate)}/ /mx:Panel /mx:Application
[flexcoders] Never Mind! Re: Example in Adobe® Flex 2 Language Reference doesn't compile....
I will repost my _real_ problem shortly --- In flexcoders@yahoogroups.com, Libby [EMAIL PROTECTED] wrote: In Adobe® Flex 2 Language Reference, the entry for Class DateField, this example is at the bottom (click on Examples). It won't compile, giving an error on the line where DateField is being cast in the change event. The error is 1119: Access of possibly undefined property selectedDate through a reference with static type DateField. I have tried unsuccessfully to understand what is wrong here - could someone tell me how Adobe expected this example to work? (I get this error all the time when casting stuff). Here's the code, ver batim: ?xml version=1.0 encoding=utf-8? !-- Simple example to demonstrate the DateField control. -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ // Event handler for the DateField change event. private function dateChanged(date:Date):void { if (date == null) selection.text = Date selected: ; else selection.text = Date selected: + date.getFullYear().toString() + '/' + (date.getMonth()+1).toString() + '/' + date.getDate(); } ]] /mx:Script mx:DateFormatter id=df/ mx:Panel title=DateField Control Example height=75% width=75% paddingTop=10 paddingLeft=10 paddingRight=10 mx:Label width=100% color=blue text=Select a date in the DateField control. Select it again to clear it./ mx:Label text=Basic DateField:/ mx:DateField id=dateField1 yearNavigationEnabled=true change=dateChanged(DateField(event.target).selectedDate) / mx:Label id=selection color=blue text=Date selected: / mx:Label text=Disable dates before June 1, 2006./ mx:DateField id=dateField2 yearNavigationEnabled=true disabledRanges={[ {rangeEnd: new Date(2006, 5, 1)} ]} / mx:Label color=blue text=Date selected: {df.format(dateField2.selectedDate)}/ /mx:Panel /mx:Application
RE: [flexcoders] Re: ActiveX with Flex
Wow, that is weird - When I replied to this thread, I could have sworn that I saw the other Mike's e-mail addy embedded in the original post. It's probably because I had another e-mail that I was in the process of composing, right next to this one - and subconsciously, filled in his information. Also, I did check out the other link you referred to - and YES it is in fact a different grid altogether. I just visited the link, and it does look quite interesting. It's just odd to find another grid control out there, and have the company take the same name of an already established control. Anyway - sorry about the confusion - I have a lot on my mind these days :( Take care everybody, Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Shaw Sent: Thursday, November 30, 2006 4:10 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: ActiveX with Flex Mike, perhaps you should take a look at the link. You may have a case of mistaken identity. Mike. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Friday, 1 December 2006 2:17 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: ActiveX with Flex You probably never heard of Janus, because it's created for .NET or the Visual Studio suite of products from Microsoft - which has nothing to do with Flex or Adobe. If you are looking for a nice Grid component for .NET then YES Janus makes the best one in my opinion. I've been using the Janus Grid for about 8 years now - and would put it up against the Farpoint one as well as the Sheridan Controls one. It's been a while since I looked at the 2 alternate Grids I just mentioned, so they may not even go under that name any longer. One cool thing about Janus too, is that ONE developer created it, and also supports his product. I really love it when a single person has so much talent, that they can make a living off of 1 or 2 well written components (just like Michael Schmalle, who created the Flex Sizing component). Anyway, I think the Janus guy resides in Australia, or some other country other than the USA - but he's very easy to contact, and very nice to work with. Just my 2 cents... Mike -Original Message- From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of boy_trike Sent: Thursday, November 30, 2006 8:36 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: ActiveX with Flex Thanks Mike. I never heard of Janus. I will certainly check it out. (Where did you find it? Am I just a little slow in finding flex web sites) Is there a central flex search site? Maybe Adobe should have a section to list all 3rd party flex addons bruce --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Mike Shaw [EMAIL PROTECTED] wrote: Have you tried Janus. It is targeted at .NET integration with flash/flex. http://www.spaghettisort.com/janus/ http://www.spaghettisort.com/janus/ Mike. -- 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 http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Re: SWF Meta Data
You got it man, I had the imports written between the meta data and the class definition. Thanks man I appreciate it, Elibol --- In flexcoders@yahoogroups.com, Roger Gonzalez [EMAIL PROTECTED] wrote: Is it on the line directly before public class whatever extends Sprite? Metadata modifies the thing directly below it. If you had (for example) an import, then it modifies the import. Can't provide further guidance without seeing your code. -rg From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of h8me4everplus1 Sent: Tuesday, December 05, 2006 9:17 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: SWF Meta Data Hi rg, Thanks. Here is a description of my process: Step 1: I created a new Actionscript project. Step 2: I wrote the meta data into the as file designated as the Default Application. This has no effect, and as you've outlined, the tag must be defined before the root class definition. I've deduced from this that the Default Application is not the root class. Could you guide me further? Sincerely, Elibol --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Roger Gonzalez rgonzale@ wrote: Because Flex always creates a root class for the SWF, the [SWF] metadata must be attached to (i.e. immediately before) the root class definition. The parameters may not be documented, as they're pretty much intended for code generated by the compiler from MXML source. End users are encouraged to use the compiler flags (i.e. on the command line) to set the values for AS, or to use root tag attributes from MXML. (For what its worth, I think you have the entire set we support at the moment.) -rg From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of h8me4everplus1 Sent: Tuesday, December 05, 2006 6:49 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] SWF Meta Data Hey guys, I really like the idea of defining my SWF parameters for AS projects right at the main script file for actionscript files, but I have two problems: 1, wish it worked, my source: package { [SWF(width=500, height=500, backgroundColor=#ff, frameRate=40)] That's it, just defining the SWF parameters at the package level. 2, wish I knew where to look for the available parameters, does anyone know where it's documented? Sincerely, Elibol
Re: [flexcoders] Re: Cairngorm Newbie Question - Please set me straight
Steve, You definitely shoud not have a business delegate for every lookup table. I dont really understand the detail of what you explained in your email, but communications between a client and a server should never be as granular as mapping just directly to a table. Think of communications with a server as asking high level questions like, who are my top spending customers this month. This might require access to several tables. This calculation work should be done on the server and the results should then be delivered from the server to the client. The client should generally not be taking the results of several table searches and intersecting, joining, merging or anything of the sort. That is really server side work. Regards, Hank On 12/5/06, stevehousefl [EMAIL PROTECTED] wrote: Douglas (and all), Since they are not dependent on each other, I went with just having a single command fire 6 new events. I will look into the MacroCommand though. As far as the 6 different datasources, it is not. Perhaps this is incorrect, but I have a business delegate for each lookup table and a service (remote object) for each Coldfusion component that I am talking to. For example: My EVENT_LOAD_CONTROL_PANEL executes the LoadControlPanelDataCommand The LoadControlPanelDataCommand fires the EVENT_READ_ALL_QUEUES (and 5 other events) The EVENT_READ_ALL_QUEUES executes the ReadAllQueuesCommand The ReadAllQueuesCommand creates a QueueDelegate and executes QueueDelegate.readAllQueues() The QueueDelegate creates an instance of the ServiceLocator and executes .getRemoteObject(queueService) The queueService is configures in Services.mxml as mx:RemoteObject id=queueService destination=ColdFusion source=CF.queueHandler showBusyCursor=true result=event.token.resultHandler( event ); fault=event.token.faultHandler( event );/ Does this make sense Thanks, Steve --- In flexcoders@yahoogroups.com, Douglas McCarroll [EMAIL PROTECTED] wrote: Hi Steve, I'm going to take a stab at this as I've been studying the Command pattern (as defined in GoF) and Cairngorm lately. In fact I'll be presenting on the subject here in Boston tomorrow evening, so this is right up my alley. (www.bfpug.us) :-) how do you handle 6 different results since there is only 1 onResult function. I think that the answer here is you don't. :-) Cairngorm has a SequenceCommand which has: public var nextEvent : CairngormEvent; You can then call its executeNextCommand() from your result() method which launches that event. This will work well enough if you need results from command_1 before you make the service call in command_2, which you need before command_3, etc. On the other hand, if that's not the case, what to do? The Gang Of Four chapter on the Command pattern describes a MacroCommand that executes a number of (Simple)Commands. As described it seems to simply fire them off, one after another. Wouldn't be hard to roll your own, extending ICommand, with an array property, and passing in Command objects. I could even see creating an MacroEvent class that kept track of whether its Commands had finished and that then did something when all were finished. Other Cairngorm programmers, wiser than I, will probably ask you wise questions about why you wish to pull data from six different data sources... :-) Douglas - Douglas McCarroll CairngormDocs.org Webmaster http://www.CairngormDocs.org Flex Developer http://www.brightworks.com 617.459.3840 - stevehousefl wrote: I have a command that I would like to have pull lookup data from 6 different BusinessDelegates. Should that one command call all 6 delegates or should it fire 6 new events that call 6 new commands? If the one command should call all 6 delegates in its execute function, how do you handle 6 different results since there is only 1 onResult function. I am using Cairngorm 2.1. Thanks in advance, Steve -- 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] webservice wsdl parsing error? help?
Hi, I haven't worked with webservices much, but am needing to test out a service that was produced by a software package my company is evaluating. I'm building the flex front end to show the results. When I run what I have, I get errors when the application launches: === TypeError: Error #1034: Type Coercion failed: cannot convert to flash.xml.XMLNode. at mx.rpc.xml::SchemaContext/::httpResultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler() at mx.rpc::Responder/result() at mx.rpc::AsyncRequest/acknowledge() at ::DirectHTTPMessageResponder/completeHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/flash.net:URLLoader::onComplete() === My application is relatively simple: === ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; public function handleResult(e:ResultEvent):void { trace( Result: + e.result ); } public function handleFault(e:FaultEvent):void { trace( Error: + e.fault.faultString ); } ]] /mx:Script mx:WebService id=mmWebService wsdl=http://quest3:8000/NasaVDBjoin/servlet/ArtifactDocumentService/MetaMatrixDataServices.wsdl; result=handleResult(event) fault=handleFault(event) /mx:WebService mx:Button id=getDataButton click=mmWebService.getVmdbHrrsJoin(63458); / /mx:Application === and I suspect I'm not doing something right with setting up the webservice, as the error occurs after the app starts, before I push the button. Here's the WSDL of the web service (I suspect my answer is here, but again, I'm dumb): === definitions name=MetaMatrixDataServices targetNamespace=http://com.metamatrix/NasaVDBjoin; #8722; types #8722; xsd:schema targetNamespace=http://com.metamatrix/NasaVDBjoin; xsd:import namespace=http://www.metamatrix.com/VmdbHrrsIntegration_Input; schemaLocation=http://quest3:8000/NasaVDBjoin/servlet/ArtifactDocumentService/NasaDemo/DataIntegrationPOC/HrrsVmdbIntegration/VmdbHrrsIntegration_Input.xsd/ xsd:import namespace=http://www.metamatrix.com/VmdbHrrsIntegration_Output; schemaLocation=http://quest3:8000/NasaVDBjoin/servlet/ArtifactDocumentService/NasaDemo/DataIntegrationPOC/HrrsVmdbIntegration/VmdbHrrsIntegration_Output.xsd/ /xsd:schema /types #8722; message name=VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_InputMsg #8722; documentation Input message for operation VmdbHrrsIntegration_VmdbHrrsJoin/getVmdbHrrsJoin. /documentation part name=VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_InputMsg element=schema1:VmdbHrrsJoin_Input/ /message #8722; message name=VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_OutputMsg #8722; documentation Output message for operation VmdbHrrsIntegration_VmdbHrrsJoin/getVmdbHrrsJoin. /documentation part name=VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_OutputMsg element=schema2:VmdbHrrsJoin_Output/ /message #8722; portType name=VmdbHrrsIntegration_VmdbHrrsJoin #8722; operation name=getVmdbHrrsJoin input message=tns:VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_InputMsg/ output message=tns:VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_OutputMsg/ /operation /portType #8722; binding name=VmdbHrrsIntegration_VmdbHrrsJoin type=tns:VmdbHrrsIntegration_VmdbHrrsJoin soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ #8722; operation name=getVmdbHrrsJoin soap:operation style=document soapAction=VmdbHrrsIntegration_WS.VmdbHrrsIntegration_VmdbHrrsJoin.getVmdbHrrsJoin/ #8722; input soap:body use=literal/ /input #8722; output soap:body use=literal/ /output /operation /binding #8722; service name=MetaMatrixDataServices #8722; port name=VmdbHrrsIntegration_VmdbHrrsJoin binding=tns:VmdbHrrsIntegration_VmdbHrrsJoin soap:address location=http://quest3:8000/NasaVDBjoin/services/service/ /port
[flexcoders] HTTPService POST with request parameters
I am trying to post an XML payload to an HTTPService that has additional request parameters (e.g. http://www.mysite.com/get?o=sponsora=save). I created my HTTPService as such: mx:HTTPService id=getSponsor method=POST resultFormat=e4x result=getResultOK(event) fault=getResultFault(event) url=http://www.mysite.com/get mx:request osponsor/o aput/a /mx:request /mx:HTTPService And call it like this: private function addSponsor():void { getSponsor.send(sponsorModel); } With sponsorModel: mx:Model id=sponsorModel sponsor id{txtId}/id name{tiName}/name imageUrl{tiImageUrl}/imageUrl linkUrl{tiLinkUrl}/linkUrl /sponsor /mx:Model It looks like the request parameters are not being sent (I am not seeing them on the server). Is this supported in Flex 2? Thanks Todd
[flexcoders] Re: ListBase.as getting called after Drop to Datagrid--Preventing the Drop???
Thanks so much!!! It was the lack of event.preventDefault() that was causing the problems. Once I added that into all my handlers the drag-and-drop worked like a charm!!! Wayne --- In flexcoders@yahoogroups.com, Deepa Subramaniam [EMAIL PROTECTED] wrote: A few things: first, you'll have to call preventDefault() on your DragEvent object to cancel the default behavior so that only your custom event handler runs. Second, you'll have to add a custom dragOver event handler so that the DataGrid shows the correct feedback allowing items to be dropped from the Tree. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wayneposner Sent: Tuesday, December 05, 2006 9:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ListBase.as getting called after Drop to Datagrid--Preventing the Drop??? Hi Lach, Nope...My component code looked liked: mx:DataGrid id=cart dragEnabled=true dropEnabled=true dragEnter=onDragEnter(event)/ Still haven't figured out what caused the problem. Wayne --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Lachlan Cotter lach@ wrote: Hi Wayne, By any chance did you forget to register your event handler with the DataGrid? Just a thought. Cheers, Lach On 30/11/2006, at 1:07 AM, wayneposner wrote: I'm trying to drag-and-drop from a tree to a datagrid. I've followed the examples to try to achieve this, but whenever I drag over the datagrid, it refuses to accept the drop. The datagrid acts like the dropEnabled flag is set to false. I've traced the code and despite the fact that I have a custom dragEnter handler, it still executes the handler found in ListBase.as which cancels out my handler. Does anyone know what would cause this? Thanks! My Handler is as follows: private function onDragEnter( event:DragEvent ) : void { DragManager.acceptDragDrop(UIComponent(event.currentTarget)); }
[flexcoders] Flex 2: FDS Freezes Flash player before responders get called
I am calling dataService.createItem() a very large Object graph. After I call commit, and my responder is called. the client flash player freezes (browser stops responding, cpu utiliziaiton at 100%) for about 8-10 seconds. I am releasing the itemReference from the createItem() call in the responder. Does anybody have any idea how to debug this problem or figure out what is causing it. thanks, JB
[flexcoders] is there a sample to update/delete records in a database server through webservice?
Hi Folks, There are many samples showing how to get/download the records/XML from a webservice , however none of them talking about how to change the server data while user modify the Datagrid / List in the flash application through webservice. Is the webservice way to update server data is too slow, more complex, hardly implement? I am new to flex. Flex application does so exciting interface, but how can I get my data saved in server database through webservice. Thanks for guiding me to the right direction, any sample will be appreciated. Steve Any questions? Get answers on any topic at www.Answers.yahoo.com. Try it now.
Re: [flexcoders] Extending Flex Web Services with WS-Security (WSS4J)
WS-Security is not supported by Flex out of the box. Has anyone tackled this, or if not could someone give a high-level view of how they might accomplish this? I can't seem to create a user in the Adobe forums to post it to find out if this might be added in upcoming support point release??? I was asking about the same not so long ago, as I think this is very important issue to resolve - sooner or later in *real* app, you will face authorization problem with webservices. My thoughts on topic: 1) Manual creation of the SOAP Headers will not work because the token has a set expiration time based on timestamp, username, password. Building that logic up in the client app would expose the credentials in the .swf. I don't know if I understood you correctly - are you sure about the exposure? If the user and password credentials are put by user dynamically at runtime, are credentials unsafe then? They are dynamically stored, so you cannot decompile it? Or can you? We're currently exploring this way, trying to add custom headers to webservice.. 2) Using Axis to create a proxy of the true WS-Secure web service might be viable, but seems dumb to create a web service wrapper for an already exposed web service. Plus, my knowledge on the java side is limited and the googles on Eclipse WTP and doing this haven't yielded much more than a headache. I agree, this solution looks bad to me also. Webservices shouldn't be hidden. I don't want to promote anything, but ... just don't use Axis for webservices on java serverside. :) Try xfire. We are using it in our third project now, and I enjoy the performance and elegance of this solution. If you want WTP-like support for Eclipse, try MyEclipseIDE, as it has newest xfire support bundled and working very well. 3) With the FDS Plugin facet for Eclipse WTP in theory I can code both java and mxml / as3 into one. If that is the case could I write a component (SecureWS) to extend mx.rpc.soap. WebService to add the WSS4J functionality I'm after. The user / pass parameters would then be stored as part of the named proxy service on FDS. Everything secure and connective. Also something I'd happily share back to the community if I can get some help on how I'd tackle #3. We're not using Flex Data Services, just plain WS, but I'd love to help with mxml/as3 implementation (extending soap) or testing on clientside, as this is top priority for my current project right now. -- | Sebastian Zarzycki Microplan Polska
Re: [flexcoders] Re: Cairngorm's Anaemic Domain Model
Thanks Alex, One thing I'm looking for is validation that there is a need in some applications to construct an object graph of sorts to describe the model beyond an array of records to be CRUDed. Surely I'm not alone here? If that's the case, is there a best practice for going from value objects delivered from a service, to first class, intelligent model citizens in the domain? One thing I've found confusing about the Cairngorm approach is that models and value objects seem to be synonymous. You thoughts? Cheers, Lach On 05/12/2006, at 11:13 PM, Alex Uhlmann wrote: there many ways to use Cairngorm. I agree with you completly, it's of vital importance to refactor the right functionality from both, views and commands into model objects that mean something to your use case. Then, this functionality can also be easier unit tested. … However how your model is going to look like depends on your specific needs. Cairngorm doesn't tell you how to design your custom model or your custom view. It's the infractucture around that. My blog entries around that, which Douglas pointed out, have the indent to show one possible route to go towards this direction. Nevertheless, it's difficult to show that in examples, since there's a tradeoff in completeness and complexity vs. easy to understand examples and most importantly...time. ;)
RE: [flexcoders] is there a sample to update/delete records in a database server through webservice?
The way to get data into the server is the same as the way to get it out: Call a web service operation/method and pass the data to it. How that is handled on the server depends on the implementation of the web service. It is easy to sample get data from a server, but to have an example of saving data on a server, you would need to own the server. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steven Xu Sent: Tuesday, December 05, 2006 4:51 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] is there a sample to update/delete records in a database server through webservice? Hi Folks, There are many samples showing how to get/download the records/XML from a webservice , however none of them talking about how to change the server data while user modify the Datagrid / List in the flash application through webservice. Is the webservice way to update server data is too slow, more complex, hardly implement? I am new to flex. Flex application does so exciting interface, but how can I get my data saved in server database through webservice. Thanks for guiding me to the right direction, any sample will be appreciated. Steve Have a burning question? Go to Yahoo! Answers http://answers.yahoo.com/;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMz OTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx and get answers from real people who know.
[flexcoders] Re: many-to-many managed association in Hibernate destination
I haven't been really involved in this thread directly but Doug's kept me in the loop. I did some playing around today and I've posted my findings here: http://viconflex.blogspot.com/2006/12/many-to-many-using-fds-hibernate.html Hope it helps. Vic
RE: [flexcoders] HTTPService POST with request parameters
So the model data is getting into the server, but the url querystring parameters are not? Also, you are passing an mx:Object in the post body to the server. Is that working? What does it look like on the server? What is the server platform? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Todd Breiholz Sent: Tuesday, December 05, 2006 3:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] HTTPService POST with request parameters I am trying to post an XML payload to an HTTPService that has additional request parameters (e.g. http://www.mysite.com/get?o=sponsora=save http://www.mysite.com/get?o=sponsora=save ). I created my HTTPService as such: mx:HTTPService id=getSponsor method=POST resultFormat=e4x result=getResultOK(event) fault=getResultFault(event) url=http://www.mysite.com/get http://www.mysite.com/get mx:request osponsor/o aput/a /mx:request /mx:HTTPService And call it like this: private function addSponsor():void { getSponsor.send(sponsorModel); } With sponsorModel: mx:Model id=sponsorModel sponsor id{txtId}/id name{tiName}/name imageUrl{tiImageUrl}/imageUrl linkUrl{tiLinkUrl}/linkUrl /sponsor /mx:Model It looks like the request parameters are not being sent (I am not seeing them on the server). Is this supported in Flex 2? Thanks Todd
[flexcoders] Scrolling without a scrollbar
We have a requirement for a scrollable container that displays right and left arrows (when necessary) but not the track and the thumb. To be more exact something similar to when you open up a bunch of tabs in Firefox and at the point that it can't make the tabs any smaller it displays the right and left icons. Anyone have anything that might be a head-start? Don't really want to get into measuring individual components (mostly buttons), etc. to write it myself. TIA.
[flexcoders] itemrenderer trying to access variables in main application
can someone point me in the right direction of retrieving a binded vriable created in the main application from a itemrenderer located in a datagrid? i have a datagrid that contains an itemrender, the itemrender file contains 2 buttons. based on the user id which is established in the main application, one of these buttons may or may not be enabled i have tried outerdocument and various iterations of parent application and mx.core with no success thanks in advance for any leads
[flexcoders] AS 3 performance articles?
Hi, I need some whitepapers/articles/blog posts/whatever, on AS3 display performance vs AS2 (for a client) and especially, if possible, info on why you should use AS3 event handling or info on event handling in as3. I've been googling around and have found some stuff, but not everything. Anyone know where more stuff is? In particular, what happened to that PDF on as3 performance tuning from Gary Grossman (the one that his talk at Max was based on)?
Re: [flexcoders] HTTPService POST with request parameters
Tracy Correct, the model data is getting there, but not the querystring parameters. I also noticed about the mx:objects in the post. It was an error and I was getting really screwy data on the server. I've since changed the bindings to point to the text property of the objects and the post body is being sent correctly (I also had to add contentType=application/xml to my HTTPService. After making those changes, I am still seeing the same behavior as before (with a valid post body, now). The server platform is ATG (Java servlet based). When I try to extract the 2 request parameters, I get null for both of them. Thanks! Todd On 12/5/06, Tracy Spratt [EMAIL PROTECTED] wrote: So the model data is getting into the server, but the url querystring parameters are not? Also, you are passing an mx:Object in the post body to the server. Is that working? What does it look like on the server? What is the server platform? Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Todd Breiholz *Sent:* Tuesday, December 05, 2006 3:43 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] HTTPService POST with request parameters I am trying to post an XML payload to an HTTPService that has additional request parameters (e.g. http://www.mysite.com/get?o=sponsora=save). I created my HTTPService as such: mx:HTTPService id=getSponsor method=POST resultFormat=e4x result=getResultOK(event) fault=getResultFault(event) url=http://www.mysite.com/get mx:request osponsor/o aput/a /mx:request /mx:HTTPService And call it like this: private function addSponsor():void { getSponsor.send(sponsorModel); } With sponsorModel: mx:Model id=sponsorModel sponsor id{txtId}/id name{tiName}/name imageUrl{tiImageUrl}/imageUrl linkUrl{tiLinkUrl}/linkUrl /sponsor /mx:Model It looks like the request parameters are not being sent (I am not seeing them on the server). Is this supported in Flex 2? Thanks Todd
RE: [flexcoders] HTTPService POST with request parameters
Then this syntax: mx:request osponsor/o aput/a /mx:request Attempts to put those two name-value parameters in the request object, which is now application/xml, which, well, isn't what you want. Instead, try concatenating the querystring directly on the url before you send(). Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Todd Breiholz Sent: Tuesday, December 05, 2006 5:57 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] HTTPService POST with request parameters Tracy Correct, the model data is getting there, but not the querystring parameters. I also noticed about the mx:objects in the post. It was an error and I was getting really screwy data on the server. I've since changed the bindings to point to the text property of the objects and the post body is being sent correctly (I also had to add contentType=application/xml to my HTTPService. After making those changes, I am still seeing the same behavior as before (with a valid post body, now). The server platform is ATG (Java servlet based). When I try to extract the 2 request parameters, I get null for both of them. Thanks! Todd On 12/5/06, Tracy Spratt [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: So the model data is getting into the server, but the url querystring parameters are not? Also, you are passing an mx:Object in the post body to the server. Is that working? What does it look like on the server? What is the server platform? Tracy From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com http://ups.com ] On Behalf Of Todd Breiholz Sent: Tuesday, December 05, 2006 3:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] HTTPService POST with request parameters I am trying to post an XML payload to an HTTPService that has additional request parameters (e.g. http://www.mysite.com/get?o=sponsora=save http://www.mysite.com/get?o=sponsora=save ). I created my HTTPService as such: mx:HTTPService id=getSponsor method=POST resultFormat=e4x result=getResultOK(event) fault=getResultFault(event) url=http://www.mysite.com/get http://www.mysite.com/get mx:request osponsor/o aput/a /mx:request /mx:HTTPService And call it like this: private function addSponsor():void { getSponsor.send(sponsorModel); } With sponsorModel: mx:Model id=sponsorModel sponsor id{txtId}/id name{tiName}/name imageUrl{tiImageUrl}/imageUrl linkUrl{tiLinkUrl}/linkUrl /sponsor /mx:Model It looks like the request parameters are not being sent (I am not seeing them on the server). Is this supported in Flex 2? Thanks Todd
RE: [flexcoders] HTTPService POST with request parameters
Possibly the issue is due to the fact that you have both query string parameters and POST data parameters in the same request. I think that ATG used to have a bug where the query parameters are not returned by the getParameter method if the request has method=POST. They expose another method on the DynamoHttpServletRequest called getQueryParameter which will always return the query parameters. I vaguely recall that bug got fixed at some point but it has been a long time since I worked for ATG. One nice thing about ATG is that if you do a toString on the request object, it dumps out all of the state of the request. That might be a way to ensure that the query parameters are at least making it to the server in the URL. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Todd Breiholz Sent: Tuesday, December 05, 2006 2:57 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] HTTPService POST with request parameters Tracy Correct, the model data is getting there, but not the querystring parameters. I also noticed about the mx:objects in the post. It was an error and I was getting really screwy data on the server. I've since changed the bindings to point to the text property of the objects and the post body is being sent correctly (I also had to add contentType=application/xml to my HTTPService. After making those changes, I am still seeing the same behavior as before (with a valid post body, now). The server platform is ATG (Java servlet based). When I try to extract the 2 request parameters, I get null for both of them. Thanks! Todd On 12/5/06, Tracy Spratt [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: So the model data is getting into the server, but the url querystring parameters are not? Also, you are passing an mx:Object in the post body to the server. Is that working? What does it look like on the server? What is the server platform? Tracy From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com http://ups.com ] On Behalf Of Todd Breiholz Sent: Tuesday, December 05, 2006 3:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] HTTPService POST with request parameters I am trying to post an XML payload to an HTTPService that has additional request parameters (e.g. http://www.mysite.com/get?o=sponsora=save http://www.mysite.com/get?o=sponsora=save ). I created my HTTPService as such: mx:HTTPService id=getSponsor method=POST resultFormat=e4x result=getResultOK(event) fault=getResultFault(event) url=http://www.mysite.com/get http://www.mysite.com/get mx:request osponsor/o aput/a /mx:request /mx:HTTPService And call it like this: private function addSponsor():void { getSponsor.send(sponsorModel); } With sponsorModel: mx:Model id=sponsorModel sponsor id{txtId}/id name{tiName}/name imageUrl{tiImageUrl}/imageUrl linkUrl{tiLinkUrl}/linkUrl /sponsor /mx:Model It looks like the request parameters are not being sent (I am not seeing them on the server). Is this supported in Flex 2? Thanks Todd
Re: [flexcoders] AMFPHP / databinding nested arrays
Hmmm, why exactly are you sending nested arrays from amfphp? Why can't you just send a flat array? Patrick carkraus a écrit : Hi there, I guess this is a typical newbie question, maybe someone could kindly direct me to a tutorial or sample: I try to bind e.g. using a charts control to a nested array I receive from an AMFPHP service. On the php side I have as an example: $outputArr[] = array('day' = 'Mon', array('start' = '100', 'end' = '300')); $outputArr[] = array('day' = 'Tue', array('start' = '250', 'end' = '600')); $outputArr[] = array('day' = 'Wed', array('start' = '500', 'end' = '600')); return $outputArr; ..which will deliver the data correctly as I can see from the flex debugger. In flex I have eg.: mx:series mx:ColumnSeries xField=day yField=??? / /mx:series Now, how do I access e.g. the value 'start' to use it for databinding? Well, 'day.start' does not do the trick : ) I had similar probs using XML for binding, where I wouldnt be able to access sub-children? Do I have to somehow wrap the server response into an actionscript object which I'd have to manually add properties to? Any hint greatly appreciated! ! carsten
Re: [flexcoders] Re: Cairngorm's Anaemic Domain Model
Though Cairngorm doesn't prevent you from creating rich models, i think it fits better for this kind of crud application with a rather flat model. In fact the model is little more than a cache of serverside objects. User gesture, update cached objects, update view. If i was to implement a rich model, i would let the model handle the backend directly and make the controller a real frontcontroller, which maps usergestures to model method calls. You could still use cairngorm framework, it's just a slight shift of responsibilities. Cheers, Ralf. On 12/5/06, Lachlan Cotter [EMAIL PROTECTED] wrote: Thanks Alex, One thing I'm looking for is validation that there is a need in some applications to construct an object graph of sorts to describe the model beyond an array of records to be CRUDed. Surely I'm not alone here? If that's the case, is there a best practice for going from value objects delivered from a service, to first class, intelligent model citizens in the domain? One thing I've found confusing about the Cairngorm approach is that models and value objects seem to be synonymous. You thoughts? Cheers, Lach On 05/12/2006, at 11:13 PM, Alex Uhlmann wrote: there many ways to use Cairngorm. I agree with you completly, it's of vital importance to refactor the right functionality from both, views and commands into model objects that mean something to your use case. Then, this functionality can also be easier unit tested. … However how your model is going to look like depends on your specific needs. Cairngorm doesn't tell you how to design your custom model or your custom view. It's the infractucture around that. My blog entries around that, which Douglas pointed out, have the indent to show one possible route to go towards this direction. Nevertheless, it's difficult to show that in examples, since there's a tradeoff in completeness and complexity vs. easy to understand examples and most importantly...time. ;) -- Ralf Bokelberg [EMAIL PROTECTED] Flex Flash Consultant based in Cologne/Germany
Re: [flexcoders] is there a sample to update/delete records in a database server through webservice?
Steven, Could you let us know what you use on your back end? e.g. Java, ColdFusion, PHP, .NET, etc? And also what database you use? If we know what you use for backend logic we can better suggest samples that include update/delete logic. btw ... for ColdFusion, Flex Builder 2 includes wizards that can read your SQL database's schema and automatically generate the necessary Flex and ColdFusion code to the SQL DML (Data Modification Language, i.e. INSERT, UPDATE and DELETE). btw #2 ... as Tracy suggested, there is no problem doing update or delete through a webservice. Personally, I prefer mx:RemoteObject, but mx:WebService should work just as good. Best regards, g On 12/5/06, Steven Xu [EMAIL PROTECTED] wrote: Hi Folks, There are many samples showing how to get/download the records/XML from a webservice , however none of them talking about how to change the server data while user modify the Datagrid / List in the flash application through webservice. Is the webservice way to update server data is too slow, more complex, hardly implement? I am new to flex. Flex application does so exciting interface, but how can I get my data saved in server database through webservice. Thanks for guiding me to the right direction, any sample will be appreciated. Steve --
RE: [flexcoders] Flex 2: FDS Freezes Flash player before responders get called
I'm not sure how large very large is but it is certainly possible to give the client too much work to cause this type of problem. The createItem call will end up serializing the object which makes a complete copy of it. If you have managed associations, there could be additional work as it has to create the child objects as well. One way to get an idea of what is going on is to enable the debug logging on the client side: mx:TraceTarget/, use the debug player, and look in flashlog.txt in your home directory for the output. That hopefully will make things even slower, but hopefully the trace log will show some evidence of what is taking so long. If that does not show anything, if you can get us a test case I'd be interested to take a look ([EMAIL PROTECTED]). Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of box110a Sent: Tuesday, December 05, 2006 1:16 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex 2: FDS Freezes Flash player before responders get called I am calling dataService.createItem() a very large Object graph. After I call commit, and my responder is called. the client flash player freezes (browser stops responding, cpu utiliziaiton at 100%) for about 8-10 seconds. I am releasing the itemReference from the createItem() call in the responder. Does anybody have any idea how to debug this problem or figure out what is causing it. thanks, JB
RE: [flexcoders] Re: FLV Duration
Hi, If it was not encoded with metadata why not inject that metadata with FLVTool2? If there is no metadata you will not be able to get the duration. Another possibility would be to use the print command of FLVTool2 to determine the duration instead of injecting it. Cheers, Sönke -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of john_69_11 Sent: Tuesday, December 05, 2006 6:32 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: FLV Duration again, only works if the flv was encoded correctly with the metadata --- In flexcoders@yahoogroups.com, Matt Horn [EMAIL PROTECTED] wrote: If you're using the VideoDisplay component, you can get the length of the FLV file using the totalTime property. hth, matt horn flex docs -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of john_69_11 Sent: Monday, December 04, 2006 4:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] FLV Duration Is there an easy way to figure out the duration of an FLV thati s being played? I have been looking at the NetStream object and the onMetaData event, but it seems like the FLV does not always have the metadata set. The FLVs I want to play are created my other people, so there is no way to force them to add the metadata. is there any way to easily get around this? -- 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