[flexcoders] Can i embed a Html table in the htmltext of a mx:Label?
hai, Is it possible to embed a html table in the htmltext field of a label control? if yes i'w like to have a sample pls. thanks, nithyaSend instant messages to your online friends http://uk.messenger.yahoo.com Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] RE: [flexcoders to Abdul] passing data from jsp page to flex app- not working. Pls help. urgent
yes exaclty. on click of an image in the tille list the popup opens. so how do i fix the problem? what has to be done? please help.. I have not used local connection previously so am not able to fix it. can u help me with the code? thanks, nithyaAbdul Qabiz [EMAIL PROTECTED] wrote: So your app.mxml loads first and on clicking some button popup.jsp is opened in a frame? It is not working, because app.mxml might be loading after popup.jsp? -abdul From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nithya karthikSent: Monday, June 13, 2005 11:29 AMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] RE: [flexcoders to Abdul] passing data from jsp page to flex app- not working. Pls help. urgent Yeah! Sure. I am posting the code now. app.mxml: ?xml version="1.0" encoding="utf-8"?mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*" initialize="onAppInit()" creationComplete="iFrame.visible=true" mx:Script ![CDATA[ var receiving_lc:LocalConnection; function onAppInit() { receiving_lc = new LocalConnection(); receiving_lc.addItemToCart = mx.utils.Delegate.create(this, addItemToCart); receiving_lc.connect("cartConnection"); } function addItemToCart(itemObj) { cart.addItem(itemObj); } ]]/mx:Script mx:Model id="catalog" source="catalog.xml"/ mx:HBox width="100%" height="100%" mx:Panel title="Tile" width="350" height="100%" panelBorderStyle="roundCorners" mx:TileList id="tile" dataProvider="{catalog.product}" width="100%" height="100%" cellRenderer="Thumbnail" itemWidth="120" itemHeight="108" change="iFrame.source=tile.selectedItem.path"/ mx:DataGrid id="cart" dataProvider="{catalog.product}" mx:columns mx:Array mx:DataGridColumn columnName="name" headerText="Name"/ mx:DataGridColumn columnName="price" headerText="Price"/ /mx:Array /mx:columns /mx:DataGrid /mx:Panel mx:Panel title="Content" width="400" height="100%" marginTop="1" marginBottom="1" marginLeft="1" marginRight="1"IFrame id="iFrame" width="100%" height="100%"/ mx:ControlBar mx:CheckBox id="cbVisible" label="IFrame Visible" selected="true" click="iFrame.visible=cbVisible.selected"/ /mx:ControlBar /mx:Panel /mx:HBox/mx:Application popup.jsp: %@ taglib uri="FlexTagLib" prefix="mm"%htmlheadmeta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"titleProduct Detail/title/headbodymm:mxml border="1"mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" initialize="onAppInit()" mx:Script var cart; var _lc:LocalConnection; function onAppInit() { _lc = new LocalConnection(); } function addRow() { //if (name.text != "") cart.addItem( {name: name.text, orderno: orderno.text} ); if(name.text != "") _lc.send("cartConnection", "addItemToCart", {name: name.text, orderno: orderno.text}); } /mx:Script mx:VBox mx:Text id="name" text="Prod 1" / mx:Text id="orderno" text="#0011"/ mx:Button label="Add" click="addRow()"//mx:VBox/mx:Application/mm:mxml/body/html IFrame.mxml: ?xml version="1.0" encoding="utf-8"? mx:Canvas xmlns:mx="http://www.macromedia.com/2003/mxml" resize="doLater(this, 'moveIFrame')" move="doLater(this, 'moveIFrame')" mx:Script private var __source: String; function moveIFrame(): Void { var pt={x:0, y:0}; this.localToGlobal(pt); getURL("_javascript_:moveIFrame("+pt.x+","+pt.y+","+this.width+","+this.height+")"); //fscommand("moveIFrame", pt.x+","+pt.y+","+this.width+","+this.height); } function set source(source: String): Void { if (source) { __source = source; getURL(source, "myFrame"); } } function get source(): String { return __source; } function set visible(visible: Boolean): Void { super.visible=visible; if (visible) getURL("_javascript_:showIFrame()"); //fscommand("showIFrame"); else getURL("_javascript_:hideIFrame()"); //fscommand("hideIFrame"); } /mx:Script /mx:Canvas I dont get any error but i dont undrstand y the item doesnt get added.. Pls tell me where i am going wrong and y it doesnt work..Abdul Qabiz [EMAIL PROTECTED] wrote: Nithya, It is tested code and it worked for me. I don't post code without testing, but I guess there might be some other problem. Can you please post your code again, I want to see how have you incorporated it? Also tell us the flow of application, how popup is opened etc. -abdul From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nithya karthikSent: Monday, June 13, 2005 10:44 AMTo: flexcoders@yahoogroups.comSubject: [flexcoders] RE: [flexcoders to Abdul] passing data from jsp page to flex app- not working. Pls help. urgent hai, Abdul, in tried running ur code. But item doesnt get added to the cart. I dont understand the reason. pls can u help? this is very urgent. Is there any other way of doing it? help me with the code.. Regards, nithyaAbdul Qabiz [EMAIL PROTECTED] wrote: Hi Nithya, Both of Flex applications can communicate using LocalConnection. See the modified code below: 1) ##app.mxml## ?xml version="1.0" encoding="utf-8"? mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
[flexcoders] opening a JSP page on click of an image
hai, How to open a JSP page on click of an image in the tile list? JSP page should open as a popup. HOw to do this? pls help with some code. thanks, nithyaSend instant messages to your online friends http://uk.messenger.yahoo.com Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] opening a JSP page on click of an image
On 6/13/05, nithya karthik [EMAIL PROTECTED] wrote: How to open a JSP page on click of an image in the tile list? JSP page should open as a popup. HOw to do this? pls help with some code. mx:TileList change=openJspPage() ... mx:Script function openJspPage():Void { getURL(http://foo.com/bar.jsp;, _blank); } /mx:Script HTH. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Can i embed a Html table in the htmltext of a mx:Label?
On 6/13/05, nithya karthik [EMAIL PROTECTED] wrote: Is it possible to embed a html table in the htmltext field of a label control? I guess so. Why don't you try it? Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] RE: [flexcoders to Abdul] passing data from jsp page to flex app- not working. Pls help. urgent
Hai, Thanks alot abdul.. It works well.. Thank u so much . ur code was very helpful. thanks and regards, nithyaAbdul Qabiz [EMAIL PROTECTED] wrote: Hi Nithya, Just checked and found that everything seems to be working fine. I am not sure, why it is not working on your machine. Run the attached example on your machine and see if it is working. I made slight changes like, removed cellRenderer="Thumbnail" from TileList attributes because I don't have Thumbnail renderer. But if it runs there then your code might have some problems... -abdul From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nithya karthikSent: Monday, June 13, 2005 11:49 AMTo: flexcoders@yahoogroups.comSubject: [flexcoders] RE: [flexcoders to Abdul] passing data from jsp page to flex app- not working. Pls help. urgent yes exaclty. on click of an image in the tille list the popup opens. so how do i fix the problem? what has to be done? please help.. I have not used local connection previously so am not able to fix it. can u help me with the code? thanks, nithyaAbdul Qabiz [EMAIL PROTECTED] wrote: So your app.mxml loads first and on clicking some button popup.jsp is opened in a frame? It is not working, because app.mxml might be loading after popup.jsp? -abdul From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nithya karthikSent: Monday, June 13, 2005 11:29 AMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] RE: [flexcoders to Abdul] passing data from jsp page to flex app- not working. Pls help. urgent Yeah! Sure. I am posting the code now. app.mxml: ?xml version="1.0" encoding="utf-8"?mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*" initialize="onAppInit()" creationComplete="iFrame.visible=true" mx:Script ![CDATA[ var receiving_lc:LocalConnection; function onAppInit() { receiving_lc = new LocalConnection(); receiving_lc.addItemToCart = mx.utils.Delegate.create(this, addItemToCart); receiving_lc.connect("cartConnection"); } function addItemToCart(itemObj) { cart.addItem(itemObj); } ]]/mx:Script mx:Model id="catalog" source="catalog.xml"/ mx:HBox width="100%" height="100%" mx:Panel title="Tile" width="350" height="100%" panelBorderStyle="roundCorners" mx:TileList id="tile" dataProvider="{catalog.product}" width="100%" height="100%" cellRenderer="Thumbnail" itemWidth="120" itemHeight="108" change="iFrame.source=tile.selectedItem.path"/ mx:DataGrid id="cart" dataProvider="{catalog.product}" mx:columns mx:Array mx:DataGridColumn columnName="name" headerText="Name"/ mx:DataGridColumn columnName="price" headerText="Price"/ /mx:Array /mx:columns /mx:DataGrid /mx:Panel mx:Panel title="Content" width="400" height="100%" marginTop="1" marginBottom="1" marginLeft="1" marginRight="1"IFrame id="iFrame" width="100%" height="100%"/ mx:ControlBar mx:CheckBox id="cbVisible" label="IFrame Visible" selected="true" click="iFrame.visible=cbVisible.selected"/ /mx:ControlBar /mx:Panel /mx:HBox/mx:Application popup.jsp: %@ taglib uri="FlexTagLib" prefix="mm"%htmlheadmeta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"titleProduct Detail/title/headbodymm:mxml border="1"mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" initialize="onAppInit()" mx:Script var cart; var _lc:LocalConnection; function onAppInit() { _lc = new LocalConnection(); } function addRow() { //if (name.text != "") cart.addItem( {name: name.text, orderno: orderno.text} ); if(name.text != "") _lc.send("cartConnection", "addItemToCart", {name: name.text, orderno: orderno.text}); } /mx:Script mx:VBox mx:Text id="name" text="Prod 1" / mx:Text id="orderno" text="#0011"/ mx:Button label="Add" click="addRow()"//mx:VBox/mx:Application/mm:mxml/body/html IFrame.mxml: ?xml version="1.0" encoding="utf-8"? mx:Canvas xmlns:mx="http://www.macromedia.com/2003/mxml" resize="doLater(this, 'moveIFrame')" move="doLater(this, 'moveIFrame')" mx:Script private var __source: String; function moveIFrame(): Void { var pt={x:0, y:0}; this.localToGlobal(pt); getURL("_javascript_:moveIFrame("+pt.x+","+pt.y+","+this.width+","+this.height+")"); //fscommand("moveIFrame", pt.x+","+pt.y+","+this.width+","+this.height); } function set source(source: String): Void { if (source) { __source = source; getURL(source, "myFrame"); } } function get source(): String { return __source; } function set visible(visible: Boolean): Void { super.visible=visible; if (visible) getURL("_javascript_:showIFrame()"); //fscommand("showIFrame"); else getURL("_javascript_:hideIFrame()"); //fscommand("hideIFrame"); } /mx:Script /mx:Canvas I dont get any error but i dont undrstand y the item doesnt get added.. Pls tell me where i am going wrong and y it doesnt work..Abdul Qabiz [EMAIL PROTECTED] wrote: Nithya, It is tested code and it worked for me. I don't post code without testing, but I guess there might be some other problem. Can you please post your code again, I want to see how have you incorporated it? Also
Re: [flexcoders] opening a JSP page on click of an image
thank u manish. Manish Jethani [EMAIL PROTECTED] wrote: On 6/13/05, nithya karthik [EMAIL PROTECTED] wrote: How to open a JSP page on click of an image in the tile list? JSP page should open as a popup. HOw to do this? pls help with some code. mx:TileList change="openJspPage()" ...mx:Script function openJspPage():Void { getURL("http://foo.com/bar.jsp", "_blank"); }/mx:ScriptHTH.Send instant messages to your online friends http://uk.messenger.yahoo.com Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Can i embed a Html table in the htmltext of a mx:Label?
Hi, Flex text area doesn't support table tag because Macromedia Flash Player textfields support limited tags. You would be required to write the parsing and rendering logic. -abdul -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Manish Jethani Sent: Monday, June 13, 2005 12:57 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Can i embed a Html table in the htmltext of a mx:Label? On 6/13/05, nithya karthik [EMAIL PROTECTED] wrote: Is it possible to embed a html table in the htmltext field of a label control? I guess so. Why don't you try it? Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] how to change UIObject._rotation legally?
On 6/11/05, Aldo Bucchi [EMAIL PROTECTED] wrote: Is there a way to rotate a component without bypassing the v2 architecture? The problem with rotating an object is that it can result in changing it's box dimensions, which would create layout problems if no notifications are triggered... Even if you trigger notifications, the preferred size (which is what determines the amound of space it takes) for the object is calculated only on the basis of the preferred sizes of its children -- not taking the rotation into account. If you want the parent container to size itself correcrtly, you'll have to override the child's getPreferredWidth() and getPreferredHeight() ?xml version=1.0? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns=* mx:Button click=innerBox._rotation = 45; / mx:Box id=outerBox backgroundColor=blue marginLeft=5 marginRight=5 mx:Box id=innerBox backgroundColor=red marginLeft=5 marginRight=5 mx:TextInput / /mx:Box /mx:Box /mx:Application Here the preferred width and height of 'innerBox' remains the same, even after rotating. You can override it to return new values after taking _rotation into account. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] [flexcoders- to abdul] image in swf. Problem again
On 6/11/05, nithya karthik [EMAIL PROTECTED] wrote: I tried removing the curly braces even then it didnt work.. pls help Oops, I'm sorry. I must be very sleepy when I wrote that. mx:Image id=prodThumbNail width=80 height=80 autoLoad=true source=@Embed('{dataObject.thumbNail}') when i run the application now again the image doesnt get displayed.. Assuming 'dataObject.thumbNail' refers to the path to the image (http://foo.com/bar.jpg;), just bind it like this: mx:Image id=prodThumbNail width=80 height=80 autoLoad=true source={dataObject.thumbNail} If you want to embed the image, you'll have to use Embed metadata with the variable declaration. Search the docs for Embed: http://livedocs.macromedia.com/flex/15/ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] printjob - dagatrid - Problem
Hi, my problem is that I want to print only a record set. here is my datagrid (myDataGrid) == From | subject| date | == pippo | ciao | 20.06.05| -- pluto | Hello| 12.04.05| -- paperino | Bonjour | 27.01.03| -- topolino | Ola | 22.06.05| -- I'd like to get only: myDataGrid.From myDataGrid.subject myDataGrid.Date The output (on the paper) should be like this: -- From:pluto subject: Hello date:12.04.05 -- But the printjob.addPage() seems not able to accept parameter like this printjob.addPage(myDataGrid.subject) Any suggestions? Thanks Francesco Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] printjob - dagatrid - Problem
Hi, You can create another .mxml file for print view. After firing print command, you can populate the printView.mxml from main DataGrid's dataProvider and send it to print job instead of main datagrid. I posted something similar, might help you... http://www.abdulqabiz.com/blog/archives/macromedia_flex/99.php -abdul -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of francescololit Sent: Monday, June 13, 2005 2:32 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] printjob - dagatrid - Problem Hi, my problem is that I want to print only a record set. here is my datagrid (myDataGrid) == From | subject| date | == pippo | ciao | 20.06.05| -- pluto | Hello| 12.04.05| -- paperino | Bonjour | 27.01.03| -- topolino | Ola | 22.06.05| -- I'd like to get only: myDataGrid.From myDataGrid.subject myDataGrid.Date The output (on the paper) should be like this: -- From:pluto subject: Hello date:12.04.05 -- But the printjob.addPage() seems not able to accept parameter like this printjob.addPage(myDataGrid.subject) Any suggestions? Thanks Francesco Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] [flexcoders to abdul] Passing data from one swf to another?
hai, I have an swf from which data has to be passed on to another swf. can this be accomplished using a local connection? say i have a datagrid and an image in one swf. on click of the image a seperate swf must popup. in that swf i have a button which on click must update the datagrid in the first swf.Send instant messages to your online friends http://uk.messenger.yahoo.com Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Skinning Mediaplayback?
Sorry if this is a repost,but. I want know if Mediaplayback or Mediacontroller is skinnable. First of all I want that ugly green glow removed an replace it with blue. Themecolor doesn't work. So anybody?? Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Inline editing on double click in datagrid
I want to implement cell editing in datagrid based upon mouse double click. I have already implemented logic to fire doubleClick event on either cellPress or mouseUp event. Only problem is that I'am not able to stop default cell editing on single mouse click. Can anybody please suggest as to how can i stop default cell editing. Also suggest which is a better place for dispatching doubleClick event, in cellPress or mouseUp ? Pradeep Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Model class or equivalent at runtime
Hi list, I understand that it is not possible to instantiate a Model class at runtime. Is there any other utility class in Flex that will convert Xml (nested nodes with attributes) to an object tree at runtime? Thanks, superabe Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Http Service -- urgent
From the faq: 5. Guidelines to effective question-asking Include a useful subject; this will help people find their own questions and answers later. Explain what you are trying to accomplish. Explain the error (include compilation errors or a description of the runtime behavior). Be prepared to break your problem down into a simpler scenario in case someone wants to try to debug the code themselves. Remember, private web services are inaccessible; you may need to create some dummy data to emulate problems. Phrases to avoid: URGENT (we all have deadlines, no one is intentionally delaying a response to you) Please send code (this is very frustrating to read as it implies you aren't interested in learning anything on your own. Where code is appropriate you can expect someone to provide it, but in many cases you will learn more by doing it on your own with appropriate guidance. It may be that you're on a deadline and just want to finish, but many of those who respond regularly would prefer to teach you to fish so that you can answer your own questions next time and even help out others). Greets, Sjors tony_lic wrote: Hi All, Can any one provide with an example coding or application for using a httpservice. I cannot find a suitable example in the view. this is very urgent. if i give a https url in the config file under the named service when i run it i get a strange error.probably i think i'm not aware of using a httpservice as i'm a novice to flex. with kind regards, tony. *Yahoo! Groups Links* * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Http Service -- urgent
There is an example on: Current page: http://livedocs.macromedia.com/flex/15/flex_docs_en/1175.htm But if you can please post the error you are getting, someone will be able to help you. Dimitrios "Jimmy" Gianninas RIADeveloper Optimal Payments Inc. From: tony_lic [mailto:[EMAIL PROTECTED] Sent: Monday, June 13, 2005 8:46 AMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Http Service -- urgent Hi All, Can any one provide with an example coding or application for using a httpservice. I cannot find a suitable example in the view. this is very urgent. if i give a https url in the config file under the named service when i run it i get a strange error.probably i think i'm not aware of using a httpservice as i'm a novice to flex.with kind regards,tony. Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Model class or equivalent at runtime
Hi, You can use HTTPService to load XML files, it would by default convert XML to Object structure. You can also speficy the other resultFormat. -abdul -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of superabe superabe Sent: Monday, June 13, 2005 5:31 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Model class or equivalent at runtime Hi list, I understand that it is not possible to instantiate a Model class at runtime. Is there any other utility class in Flex that will convert Xml (nested nodes with attributes) to an object tree at runtime? Thanks, superabe Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Web browser crashing on remote method call
I've searched previous postings and I cannot find the solution to this problem for the life of me. I am making a remote method call which retrieves an array of JavaObjects. Within each JavaObject, i have 5 string attributes, and 1 attribute that is an array of custom Java Objects. I have narrowed down the problem down to this array. Whenever I preview my mxml object, the web browser hangs and never gets past the initialize screen. I've included my mxml file below. I saw a posting that all the Java objects need to have empty construtors. I did that but the browser still hangs. I created AS classes and included the static var for Object.registerClass, but that did not work for me either. If I comment out my array of custom objects in my MainObject(and the getter and setters), the datagrid loads fine. Any ideas? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns=* pageTitle=Dispatcher initialize=startApp() mx:Script ![CDATA[ import com.myAsClasses.*; function startApp() { myobj.findJobs(null); //i can see in a java println data is returned } ]] /mx:Script mx:RemoteObject source=com.RemoteServiceImpl type=stateless- class id=myobj mx:method name=findJobs / /mx:RemoteObject mx:DataGrid id=dg dataProvider={myobj.findJobs.result} width=100% height=375 mx:columns mx:Array mx:DataGridColumn columnName=myattr headerText=Attr / /mx:Array /mx:columns /mx:DataGrid /mx:Application My findJobs method return an array...for example MainObject[]. My MainObject has the 5 String attributes and 1 attribute SiblingObject[]. In my datagrid I am not even referencing any of these attributes so it is failing trying to serialize them. My MainObject class in Java has: private SiblingObject[] = siblingObjects; My MainObject class is AS has: var siblingObjects: Array = new Array(); I created my AS classes (using FlexPojo2AS-- http://www.meagle.com/FlexPojo2AS/FlexPojo2AS.html), but that did not solve my problem. I know the AS classes are OK because I've used them before, just never with object graphs before. I'm sorry if this is a beat topic, but I haven't seen any posting on the client swf file hanging the browser. Thanks. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Job Opening in Brazil for Flex Engineers
Synex Technologies is hiring 02 (two) Flex engineers. * Technical requirements - Intermediate knowledge in Macromedia Flex - ActionScript 2.0 experience (desirable) - Software architecture experience (patterns, oo, etc) (desirable) - Experience in other programming languages (desirable) - Cairngorm experience (desirable, a plus) * Other requirements and skills - Intermediate knowledge of English - Advanced knowledge of portuguese (intermediate for foreign candidates) - College student OR already graduated - Team work - Responsibility * Opportunity - Work with one of the leader companies in B2B and business applications for industries in Brazil - Develop skills and learn new technologies - Location: São Paulo/SP, Brazil Please, send your resumes to [EMAIL PROTECTED] with Flex Engineer as subject. -- Fabio Terracini Synex Technologies Co. Fone/Fax: +55 (11) 3071-3363 [EMAIL PROTECTED] www.synex.com.br Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: [Ann] Sydney Developers Group Meeting
The next meeting is on (today) Tuesday 14th June at MLC Burwood 6pm for 6:30 start. Topic: Frameworks: What are they and why and how to use them. Includes demonstration of the use of a framework, specifically ARP, in Flash, Flex and maybe others. There will be pizza and drinks and lucky door prizes. Please RSVP (http://www.flashdev.org.au/program) to be in the running for the door prizes and catering numbers. Chris -- Chris Velevitch Manager - Sydney Flash Developers Group www.flashdev.org.au Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Web browser crashing on remote method call
It sounds like you might be in an infinite loop somewhere on the client... a common way to get into such a loop is when processing object graphs with circular references. From your MXML code listing below (i.e. it shows direct binding of the RO result as a data provider) I don't see that you're doing any recursive processing of the result so I'd propose that you've discovered a bug with DataGrid when bound to object graphs that have circular references. How, you might ask, would you have a circular reference in an object graph from a RemoteObject result? Without seeing any of the code for the object graph I can only guess that somewhere in your sibling instances you have a pointer to a parent main object (or perhaps some circular dependency between sibs, whatever). When serializing objects over AMF the client and server will attempt to restore references between complex objects, for example, Just say we have two objects, A and B where B has a reference back to its parent A: A - B - A RemoteObject will serialize the A property of B as a reference to the instance A, rather than reserialize A again. This allows the client and server to support circularly referenced object graphs and avoids infinite recursion on serialization/deserialization. To prove that this is indeed happening you can turn on Debug level logging for the RemoteObject gateway in the /WEB-INF/flex/gateway.config.xml file, restart the flex server, and then watch the server console for AMF traffic, you should be able to see the by-reference serializaiton entries in the log. Note that RemoteObject is doing the right thing here - it might just be that DataGrid can't handle the circularity of the object graph. Let me know what you find out. Pete Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] RadioButton in a DataGrid
Flexcoders, I am trying to put a single radio button on each row of a datagrid so that I can use it as a selection for the next piece of a workflow. So far I have it displaying correctly by using a cellRenderer that is below. The problem is that I can select more then one of the radio buttons at a time so they are not mutually exclusive. Has anybody done this sort of thing before? Is there a better way to do this or am I just missing some piece of magic to make it work? I did also try to put a RadioButtonGroup on the DataGrid but it seems to get ignored in the cellRenderer. My guess is that there is a namespacing issue. Thanks, -Kent ?xml version=1.0 encoding=utf-8? mx:HBox xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script var labelData:String; function setValue(str:String, item:Object) { if (item == undefined) { return; } labelData = String(item.Employee); } /mx:Script mx:RadioButton id=Flex groupName=itemPicker label={labelData}/ /mx:HBox smime.p7s Description: S/MIME cryptographic signature
[flexcoders] Fade effect just showing end state ?
Hi, I've coded a couple of AS functions which I intended to use to fade the component they're within, in and out. I've listed the functions below... However, when I actually run the code, there seems to be no actual fade effect taking place - the object just moves directly to Alpha 30 on fadeOutEffect and back to 100 on fadeInEffect. There's no actual gradual fading at all. I guess I'm doing something wrong! Any ideas ?! Thanks, Jamie. function fadeOutEffect(){ var fadeOut = new mx.effects.Fade(this); fadeOut.alphaFrom = 100; fadeOut.alphaTo = 30; //fadeOut.suspendBackgroundProcessing = true; fadeOut.duration = 1000; fadeOut.playEffect(); } function fadeInEffect(){ var fadeIn = new mx.effects.Fade(this); fadeIn.alphaFrom = 30; fadeIn.alphaTo = 100; //fadeOut.suspendBackgroundProcessing = true; fadeIn.duration = 1000; fadeIn.playEffect(); } Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] How do I show time zone with DateFormatter
I have used the DateFormatter, but unfortunately cannot seem to get it to work as I like. I have declared it in my action script as follows: dateTimeFormatter = new DateFormatter(DD MMM @ LL:NN ); My problem is, I would also like to show the time zone, for example, GMT or PST. I cannot seem to find the format string that would do this. Has anyone shown the timezone with a dateformatter? Thanks. My date is displayed as 01 Jun 2005 @ 10:05 I want it to be 01 Jun 2005 @ 10:05 AM EST Any tips ? Thanks! Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Http Service -- urgent
There is one located here. Let us know if that doesnt help. http://www.flexauthority.com/samplesIndex.cfm?sampleID=9 Jeff Founder Flex Authority http://www.flexauthority.com We are actively seeking contributors for the site. Have a sample that you want to share with the world? Send it to us! From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tony_lic Sent: Monday, June 13, 2005 5:46 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Http Service -- urgent Hi All, Can any one provide with an example coding or application for using a httpservice. I cannot find a suitable example in the view. this is very urgent. if i give a https url in the config file under the named service when i run it i get a strange error.probably i think i'm not aware of using a httpservice as i'm a novice to flex. with kind regards, tony. Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Model class or equivalent at runtime
ah..super... thanks...will give that a try - superabe - Original Message - From: Abdul Qabiz [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Monday, June 13, 2005 8:59 AM Subject: RE: [flexcoders] Model class or equivalent at runtime Hi, You can use HTTPService to load XML files, it would by default convert XML to Object structure. You can also speficy the other resultFormat. -abdul -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of superabe superabe Sent: Monday, June 13, 2005 5:31 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Model class or equivalent at runtime Hi list, I understand that it is not possible to instantiate a Model class at runtime. Is there any other utility class in Flex that will convert Xml (nested nodes with attributes) to an object tree at runtime? Thanks, superabe Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Parse Date/Time Value from XML (in ISO Format)
Given a date/time value obtained via HttpRequest or a web service in ISO format (-MM-ddTHH:mm:ss), what is the based technique for parsing this to a Date object in ActionScript? There do not seem to be any built-in date parsing functions Thanks for any suggestions! - Rick Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] TreeDataProvider implementation
I believe that I need to write my own class which implements TreeDataProvider, but am finding the task a bit daunting. Has anyone written their own TreeDataProvider that would be willing to share it with me or the list? Is anyone aware of any articles about implementing TreeDataProvider? I don't find much comfort in the liveDocs explanation at: http://livedocs.macromedia.com/flex/15/asdocs_en/mx/controls/ treeclasses/TreeDataProvider.html and Developing Flex Applications and the book don't really give many pointers either. If there was some sort of reference implementation I could peek at, I'd feel much better about heading down this path. It probably isn't all that difficult, but it is a big chunk of time to waste if I can't make it work... Thanks, Sean McKibben graphex at graphex com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Web browser crashing on remote method call
Pete- Thanks for your help...I've finally identified the problem (but still not the solution). Although I did have a reference of my siblingPojo back to my MainPojo, commenting out that code did not solve the problem. However, my SiblingObject has an attribute that is part of a class with static variables. So to give you an example, my SiblingPojo has an attribute like this: private Status status = null; When I construct my data objects in the back-end, I set this variable using it's own static data: siblingPojo.setStatus(Status.CONFIRMED); Here's the Java code of the class that the serialization is hanging up on. This is a pretty standard j2ee design pattern. You'll see that I only have a private constructor. This is what ensures that the variable data will be constant throughout the app. If I were to add a public constructor, the class would not compile (since my variable 'type' could technically never get instantiated)...I'm guessing the serialzation is hanging b/c there is no public empty constructor? have you ever come across a situation like this before? Thanks again for your help. public class Status{ private final String type; private Status(String type) { this.type = type; } public String toString() { return type.toString(); } public static final Status UNASSIGNED = new Status(UNA); public static final Status ASSIGNED = new Status(ASG); public static final Status ACKNOWLEDGED = new Status(ACK); } --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: It sounds like you might be in an infinite loop somewhere on the client... a common way to get into such a loop is when processing object graphs with circular references. From your MXML code listing below (i.e. it shows direct binding of the RO result as a data provider) I don't see that you're doing any recursive processing of the result so I'd propose that you've discovered a bug with DataGrid when bound to object graphs that have circular references. How, you might ask, would you have a circular reference in an object graph from a RemoteObject result? Without seeing any of the code for the object graph I can only guess that somewhere in your sibling instances you have a pointer to a parent main object (or perhaps some circular dependency between sibs, whatever). When serializing objects over AMF the client and server will attempt to restore references between complex objects, for example, Just say we have two objects, A and B where B has a reference back to its parent A: A - B - A RemoteObject will serialize the A property of B as a reference to the instance A, rather than reserialize A again. This allows the client and server to support circularly referenced object graphs and avoids infinite recursion on serialization/deserialization. To prove that this is indeed happening you can turn on Debug level logging for the RemoteObject gateway in the /WEB-INF/flex/gateway.config.xml file, restart the flex server, and then watch the server console for AMF traffic, you should be able to see the by-reference serializaiton entries in the log. Note that RemoteObject is doing the right thing here - it might just be that DataGrid can't handle the circularity of the object graph. Let me know what you find out. Pete Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] how to change UIObject._rotation legally?
Guys, thanks for the answers. I'm looking at overriding the methods. Best Regards, Aldo On 6/13/05, Manish Jethani [EMAIL PROTECTED] wrote: On 6/11/05, Aldo Bucchi [EMAIL PROTECTED] wrote: Is there a way to rotate a component without bypassing the v2 architecture? The problem with rotating an object is that it can result in changing it's box dimensions, which would create layout problems if no notifications are triggered... Even if you trigger notifications, the preferred size (which is what determines the amound of space it takes) for the object is calculated only on the basis of the preferred sizes of its children -- not taking the rotation into account. If you want the parent container to size itself correcrtly, you'll have to override the child's getPreferredWidth() and getPreferredHeight() ?xml version=1.0? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns=* mx:Button click=innerBox._rotation = 45; / mx:Box id=outerBox backgroundColor=blue marginLeft=5 marginRight=5 mx:Box id=innerBox backgroundColor=red marginLeft=5 marginRight=5 mx:TextInput / /mx:Box /mx:Box /mx:Application Here the preferred width and height of 'innerBox' remains the same, even after rotating. You can override it to return new values after taking _rotation into account. Yahoo! Groups Links -- : Aldo Bucchi : mobile (56) 8 429 8300 Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Cairngorm .99 ViewHelper Bug ?
Hi Rich, Has you debugging narrowed it down any? Does the unload handler get called? When the view is created for the second time, is an exception thrown? Do any errors appear in flashlog.txt? It's hard to know whats going on unless you post all your code or give us more info. Cheers, Ali -- Alistair McLeod Development Director iteration::two [EMAIL PROTECTED] Office: +44 (0)131 338 6108 This e-mail and any associated attachments transmitted with it may contain confidential information and must not be copied, or disclosed, or used by anyone other than the intended recipient(s). If you are not the intended recipient(s) please destroy this e-mail, and any copies of it, immediately. Please also note that while software systems have been used to try to ensure that this e-mail has been swept for viruses, iteration::two do not accept responsibility for any damage or loss caused in respect of any viruses transmitted by the e-mail. Please ensure your own checks are carried out before any attachments are opened. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rich Tretola Sent: 13 June 2005 16:35 To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm .99 ViewHelper Bug ? In my app I am creating and destroying a view using createChild and destroyChild. When I include a view helper within that view, it will only load once. My opinion is that the viewHelper attached in not being destroyed with the view which is causing the issue. When I comment out the viewHelper include in the view, all works well and the view can be created and destroyed over and over. Isn't the viewHelper supposed to be destroyed when its view is destroyed ? Is this a known issue of Cairngorm .99? Thanks, Rich Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: AutoTestFlash
Hi, Did you use file:/// sytax in Swf URL? Cheers, Tiago --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: It did work for me, pretty nice. Did you have to modify components to make it work or are you just listening to their major events? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Abdul Qabiz Sent: Friday, June 10, 2005 5:19 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] AutoTestFlash It is not working for me on Windows XP SP2 with IE and Firefox. It doesn't load swf on right side... BTW! Sounds like a nice tool... -abdul -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tiago_simoes Sent: Friday, June 10, 2005 5:10 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] AutoTestFlash Hi list, I've just released AutoTestFlash that can be used to record and play UI Tests for swf applications. Take a look in: http://www.geocities.com/tiago_simoes/flash/ Cheers, Tiago Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Http Service -- urgent
Also, here is an example that uses Actionscript to build the request parameters. http://www.cflex.net/showfiledetails.cfm?ChannelID=1Object=FileobjectID=18 Tracy From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Dimitrios Gianninas Sent: Monday, June 13, 2005 8:59 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Http Service -- urgent There is an example on: Current page: http://livedocs.macromedia.com/flex/15/flex_docs_en/1175.htm But if you can please post the error you are getting, someone will be able to help you. Dimitrios Jimmy Gianninas RIADeveloper Optimal Payments Inc. From: tony_lic [mailto:[EMAIL PROTECTED] Sent: Monday, June 13, 2005 8:46 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Http Service -- urgent Hi All, Can any one provide with an example coding or application for using a httpservice. I cannot find a suitable example in the view. this is very urgent. if i give a https url in the config file under the named service when i run it i get a strange error.probably i think i'm not aware of using a httpservice as i'm a novice to flex. with kind regards, tony. Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Re: Web browser crashing on remote method call
Unfortunately we did not remove statics from the Java Bean serialization rules of RemoteObject in Flex 1.5. It's a known issue and will be fixed going forward. As a work around for now would it be possible to move the static final to another context? Such as a class called StaticConstants? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 11:49 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call Pete- Thanks for your help...I've finally identified the problem (but still not the solution). Although I did have a reference of my siblingPojo back to my MainPojo, commenting out that code did not solve the problem. However, my SiblingObject has an attribute that is part of a class with static variables. So to give you an example, my SiblingPojo has an attribute like this: private Status status = null; When I construct my data objects in the back-end, I set this variable using it's own static data: siblingPojo.setStatus(Status.CONFIRMED); Here's the Java code of the class that the serialization is hanging up on. This is a pretty standard j2ee design pattern. You'll see that I only have a private constructor. This is what ensures that the variable data will be constant throughout the app. If I were to add a public constructor, the class would not compile (since my variable 'type' could technically never get instantiated)...I'm guessing the serialzation is hanging b/c there is no public empty constructor? have you ever come across a situation like this before? Thanks again for your help. public class Status{ private final String type; private Status(String type) { this.type = type; } public String toString() { return type.toString(); } public static final Status UNASSIGNED = new Status(UNA); public static final Status ASSIGNED = new Status(ASG); public static final Status ACKNOWLEDGED = new Status(ACK); } --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: It sounds like you might be in an infinite loop somewhere on the client... a common way to get into such a loop is when processing object graphs with circular references. From your MXML code listing below (i.e. it shows direct binding of the RO result as a data provider) I don't see that you're doing any recursive processing of the result so I'd propose that you've discovered a bug with DataGrid when bound to object graphs that have circular references. How, you might ask, would you have a circular reference in an object graph from a RemoteObject result? Without seeing any of the code for the object graph I can only guess that somewhere in your sibling instances you have a pointer to a parent main object (or perhaps some circular dependency between sibs, whatever). When serializing objects over AMF the client and server will attempt to restore references between complex objects, for example, Just say we have two objects, A and B where B has a reference back to its parent A: A - B - A RemoteObject will serialize the A property of B as a reference to the instance A, rather than reserialize A again. This allows the client and server to support circularly referenced object graphs and avoids infinite recursion on serialization/deserialization. To prove that this is indeed happening you can turn on Debug level logging for the RemoteObject gateway in the /WEB-INF/flex/gateway.config.xml file, restart the flex server, and then watch the server console for AMF traffic, you should be able to see the by-reference serializaiton entries in the log. Note that RemoteObject is doing the right thing here - it might just be that DataGrid can't handle the circularity of the object graph. Let me know what you find out. Pete Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Flash V2 Components and Flex Compatibility
You'll probably have to provide more details about how the List is being used, but in general, we don't promise that Flash V2 modules drop into Flex. One of the main issues is that Flex is entirely dynamic. It instantiates all of the components on-the-fly. In Flash one can easily place components on the stage or in other symbols. If you did that, it probably won't run in Flex as that is non-dynamic and the instantiation sequence in that case is not supported in Flex. Now, if you haven't done that, that implies that your app is pretty muc script-driven, in which case the best option is probably just to copy the script into .as files and compile them from MXML. --- In flexcoders@yahoogroups.com, Dennis Baldwin [EMAIL PROTECTED] wrote: We're in the process of porting some of our existing RIA functionality from Flash to Flex. In certain situations we'd like for pieces of our existing Flash RIA to live inside of Flex. We've had moderate success with this approach, but the biggest problem has been with the V2 components. I know there are interoperability issues when using these components with Flex so I've gone through the process of setting up the flexforflash file within the Flash IDE. It appears that Button, Radio, and Checkbox components work fine but whenever there's a component that utilizes the Listbox it doesn't work at all. In fact, the Listbox doesn't even display Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Inline editing on double click in datagrid
Unfortunately, I can't think of a documented way to do this. I will suggest looking in DataGridRow.as source in Flash MX 2004. It might give you a clue how to do it, but we can't officially support it from Macromedia. --- In flexcoders@yahoogroups.com, Pradeep Chaudhary [EMAIL PROTECTED] wrote: I want to implement cell editing in datagrid based upon mouse double click. I have already implemented logic to fire doubleClick event on either cellPress or mouseUp event. Only problem is that I'am not able to stop default cell editing on single mouse click. Can anybody please suggest as to how can i stop default cell editing. Also suggest which is a better place for dispatching doubleClick event, in cellPress or mouseUp ? Pradeep Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: RadioButton in a DataGrid
Awesome Alex That was the trick. Just a scoping problem but by tricking with the init I got the right behavior. -Kent -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of alex_harui Sent: Monday, June 13, 2005 10:02 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: RadioButton in a DataGrid It is more of a document-scope issue. Each MXML file is its own document and radio button groups are per-document so each row is a document with one radio button in the group. You might have better luck using an ASComponent subclass of RadioButton as the cellRenderer. Create a .as file that looks sort of like: class RadioButtonCellRenderer extends RadioButton { function setValue() { } function init() { groupName = DGRadioGroup } } --- In flexcoders@yahoogroups.com, Kent Henneuse [EMAIL PROTECTED] wrote: Nope. Bummer. I was hoping. I can still select multiple radio buttons even with the flag set to false. What I want is very similar to the checkbox cell renderer that comes with the Flex Samples Explorer but think of it as only one user can be active at a time. Hence the use of a radio button. I have thought of writing a bunch of ActionScript to make sure that only one radio button is selected and unselect the others but this seems like a hack for something that is probably common. Thanks, -Kent _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dave buhler Sent: Monday, June 13, 2005 8:01 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] RadioButton in a DataGrid Try setting multipleSelection to false. mx:DataGrid multipleSelection=false /mx:DataGrid On 6/13/05, Kent Henneuse [EMAIL PROTECTED] wrote: Flexcoders, I am trying to put a single radio button on each row of a datagrid so that I can use it as a selection for the next piece of a workflow. So far I have it displaying correctly by using a cellRenderer that is below. The problem is that I can select more then one of the radio buttons at a time so they are not mutually exclusive. Has anybody done this sort of thing before? Is there a better way to do this or am I just missing some piece of magic to make it work? I did also try to put a RadioButtonGroup on the DataGrid but it seems to get ignored in the cellRenderer. My guess is that there is a namespacing issue. Thanks, -Kent ?xml version=1.0 encoding=utf-8? mx:HBox xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script var labelData:String; function setValue(str:String, item:Object) { if (item == undefined) { return; } labelData = String(item.Employee ); } /mx:Script mx:RadioButton id=Flex groupName=itemPicker label={labelData}/ /mx:HBox _ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! http://docs.yahoo.com/info/terms/ Terms of Service. Yahoo! Groups Links smime.p7s Description: S/MIME cryptographic signature
RE: [flexcoders] Re: Flash V2 Components and Flex Compatibility
Alex, Thanks for your prompt reply. As it currently stands our components are instantiated non-dynamically (ie from within the Flash IDE). Since we basically design the view in the Flash IDE and register with our controller (AS 2.0 class) then it probably won't take much to refactor intothe Flex framework. Now that I have a definitive answer I can explore the option you suggest. Thanks again, Dennis From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of alex_haruiSent: Monday, June 13, 2005 11:55 AMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Re: Flash V2 Components and Flex Compatibility You'll probably have to provide more details about how the List is being used, but in general, we don't promise that Flash V2 modules drop into Flex.One of the main issues is that Flex is entirely dynamic. It instantiates all of the components on-the-fly. In Flash one can easily place components on the stage or in other symbols. If you did that, it probably won't run in Flex as that is non-dynamic and the instantiation sequence in that case is not supported in Flex.Now, if you haven't done that, that implies that your app is pretty muc script-driven, in which case the best option is probably just to copy the script into .as files and compile them from MXML.--- In flexcoders@yahoogroups.com, "Dennis Baldwin" [EMAIL PROTECTED] wrote: We're in the process of porting some of our existing RIA functionality from Flash to Flex. In certain situations we'd like for pieces of our existing Flash RIA to live inside of Flex. We've had moderate success with this approach, but the biggest problem has been with the V2 components. I know there are interoperability issues when using these components with Flex so I've gone through the process of setting up the flexforflash file within the Flash IDE. It appears that Button, Radio, and Checkbox components work fine but whenever there's a component that utilizes the Listbox it doesn't work at all. In fact, the Listbox doesn't even display Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Parse Date/Time Value from XML (in ISO Format)
On 6/13/05, Rick Bullotta [EMAIL PROTECTED] wrote: Given a date/time value obtained via HttpRequest or a web service in ISO format (-MM-ddTHH:mm:ss), what is the based technique for parsing this to a Date object in ActionScript? import mx.formatter.DateFormatter; var s:String = DateFormatter.parseDateString(1997-07-16T19:20:30.45+01:00); alert(s); Works like a charm. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Re: TreeDataProvider implementation
I think the main reason I think I need to make my own TreeDataProvider is that the CF object persistence backend I'm integrating with requires that I send back deleted objects with a property, deleted=true. So there will be a bunch of objects which I don't want to show in my tree data with deleted=true. In my last tree I also had trouble where date objects were being appended to the label property, and I couldn't 'hide' anything in the 'data' object. I ended up writing a separate object to store my complex data, then parsing it into a simple object which is assigned to the tree. Any commands from the tree then just referenced the 'bigger' object by id values in a hash table. I don't think I can really do that this time, since it is pretty important for the tree's data source to actually have a bunch more information than is shown in the tree.What other options do I have? I hate to say it, but I find the documentation very confusing on using the Tree to represent and modify complex nested data structures. My main goal is to have my main value object be the one assigned to the tree, but with the flexibility to manage which folders are opened, what labels are shown, and what sub-objects are hidden.Thanks,SeanOn Jun 13, 2005, at 11:05 AM, alex_harui wrote: TreeDataProvider is advanced stuff. Why do you think you need your own? Give a little context and we'll see. We currently handle XML and object graphs pretty well. Also the code for two TreeDataProviders in shipped in Flash MX 2004 in mx\controls\treeClasses --- In flexcoders@yahoogroups.com, Sean McKibben [EMAIL PROTECTED] wrote: I believe that I need to write my own class which implements TreeDataProvider, but am finding the task a bit daunting. Has anyone written their own TreeDataProvider that would be willing to share it with me or the list? Is anyone aware of any articles about implementing TreeDataProvider?I don't find much comfort in the liveDocs explanation at: http://livedocs.macromedia.com/flex/15/asdocs_en/mx/controls/ treeclasses/TreeDataProvider.html and Developing Flex Applications and "the book" don't really give many pointers either.If there was some sort of reference implementation I could peek at, I'd feel much better about heading down this path. It probably isn't all that difficult, but it is a big chunk of time to waste if I can't make it work...Thanks, Sean McKibben graphex at graphex com Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Fade effect just showing end state ?
On 6/13/05, jamiebadman [EMAIL PROTECTED] wrote: However, when I actually run the code, there seems to be no actual fade effect taking place - the object just moves directly to Alpha 30 on fadeOutEffect and back to 100 on fadeInEffect. There's no actual gradual fading at all. Try increasing the duration and see if that helps. Also, try removing those quotes around the values for alphaFrom and alphaTo (set them as numbers, not string). Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Popup windows behaving oddly
The parent of the popup is set to this. We pass no arguments to centerPopup. According to the docs this uses the parent specified in createPopup. (But I've also tried it with this to no avail.) Yes, I understand that it is hard to dig in without a test case. Sadly popups work well in some places in my app and not in others. I was hoping that someone out there had similar problems and had made sense out of this. --- In flexcoders@yahoogroups.com, Manish Jethani [EMAIL PROTECTED] wrote: On 6/11/05, Eric Raymond [EMAIL PROTECTED] wrote: We've been having a number of problems with popup windows doing strange things. As Alex said, it's hard to say without looking at your code. If you could create a simple test case that shows the problem, that'd be cool. 1) They popup behind the window which created them. Did you pass 'this' as the first argument to PopUpManager.createPopUp() from the window that created them? You need to specify the parent of the popup window. Make sure you got that right. 2) They pop up in the upper left even though we asked them to be centered over their parent via centerPopup(). Again, did you pass 'this' as the argument to centerPopUp() ? Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Cairngorm .99 ViewHelper Bug ?
The issue is a timing issue as in testing I was destroying and creating the same view on consecutive lines which didn't give the unload event a chance the unload the viewhelper. So it was an issue where it was trying to create the second view before the first's viewhelper was unregistered. How should I handle this? Should I not use view helpers for these types of files where I may need to have more than one instance ? Rich On 6/13/05, Alistair Mceod [EMAIL PROTECTED] wrote: Hi Rich, Has you debugging narrowed it down any? Does the unload handler get called? When the view is created for the second time, is an exception thrown? Do any errors appear in flashlog.txt? It's hard to know whats going on unless you post all your code or give us more info. Cheers, Ali -- Alistair McLeod Development Director iteration::two [EMAIL PROTECTED] Office: +44 (0)131 338 6108 This e-mail and any associated attachments transmitted with it may contain confidential information and must not be copied, or disclosed, or used by anyone other than the intended recipient(s). If you are not the intended recipient(s) please destroy this e-mail, and any copies of it, immediately. Please also note that while software systems have been used to try to ensure that this e-mail has been swept for viruses, iteration::two do not accept responsibility for any damage or loss caused in respect of any viruses transmitted by the e-mail. Please ensure your own checks are carried out before any attachments are opened. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rich Tretola Sent: 13 June 2005 16:35 To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm .99 ViewHelper Bug ? In my app I am creating and destroying a view using createChild and destroyChild. When I include a view helper within that view, it will only load once. My opinion is that the viewHelper attached in not being destroyed with the view which is causing the issue. When I comment out the viewHelper include in the view, all works well and the view can be created and destroyed over and over. Isn't the viewHelper supposed to be destroyed when its view is destroyed ? Is this a known issue of Cairngorm .99? Thanks, Rich Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Cairngorm .99 ViewHelper Bug ?
Rich, I'd be interested to know what it is you're doing in your view helpers, and whether you've considered the model locator strategy if you're using 0.99. We could certainly discuss how you alleviate your timing issues; however, perhaps a change of strategy will remove the problem entirely ? Thoughts ? Steven -- Steven Webster Technical Director iteration::two [EMAIL PROTECTED] Office: +44 (0)131 338 6108 Mobile: +44 (0)7977 216 223 This e-mail and any associated attachments transmitted with it may contain confidential information and must not be copied, or disclosed, or used by anyone other than the intended recipient(s). If you are not the intended recipient(s) please destroy this e-mail, and any copies of it, immediately. Please also note that while software systems have been used to try to ensure that this e-mail has been swept for viruses, iteration::two do not accept responsibility for any damage or loss caused in respect of any viruses transmitted by the e-mail. Please ensure your own checks are carried out before any attachments are opened. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rich Tretola Sent: 13 June 2005 20:42 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Cairngorm .99 ViewHelper Bug ? The issue is a timing issue as in testing I was destroying and creating the same view on consecutive lines which didn't give the unload event a chance the unload the viewhelper. So it was an issue where it was trying to create the second view before the first's viewhelper was unregistered. How should I handle this? Should I not use view helpers for these types of files where I may need to have more than one instance ? Rich On 6/13/05, Alistair Mceod [EMAIL PROTECTED] wrote: Hi Rich, Has you debugging narrowed it down any? Does the unload handler get called? When the view is created for the second time, is an exception thrown? Do any errors appear in flashlog.txt? It's hard to know whats going on unless you post all your code or give us more info. Cheers, Ali -- Alistair McLeod Development Director iteration::two [EMAIL PROTECTED] Office: +44 (0)131 338 6108 This e-mail and any associated attachments transmitted with it may contain confidential information and must not be copied, or disclosed, or used by anyone other than the intended recipient(s). If you are not the intended recipient(s) please destroy this e-mail, and any copies of it, immediately. Please also note that while software systems have been used to try to ensure that this e-mail has been swept for viruses, iteration::two do not accept responsibility for any damage or loss caused in respect of any viruses transmitted by the e-mail. Please ensure your own checks are carried out before any attachments are opened. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rich Tretola Sent: 13 June 2005 16:35 To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm .99 ViewHelper Bug ? In my app I am creating and destroying a view using createChild and destroyChild. When I include a view helper within that view, it will only load once. My opinion is that the viewHelper attached in not being destroyed with the view which is causing the issue. When I comment out the viewHelper include in the view, all works well and the view can be created and destroyed over and over. Isn't the viewHelper supposed to be destroyed when its view is destroyed ? Is this a known issue of Cairngorm .99? Thanks, Rich Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Web browser crashing on remote method call
yes. we're going to plan to stub it in as a constants until 2.0 is released. However, I'm still having display problems. From the gateway debug, I can see that my MainPOJO and all of it's nested objects have data, yet it displays nothing in it's cell when I try to access it directly or via the labelFunc. I can see in the debugger that the item has the data. Really weird why it will not display. I removed the registered AS classes to let Flex handle the serialization and instantion on it's own, but still no data. Both of these DG calls render an empty cell. mx:DataGridColumn columnName=siblingObject.myValue headerText=myV / -- mx:DataGridColumn headerText=C# labelFunction=myLabelFunc / which calls this method.. function myLabelFunc(item) : String { return item.getSiblingObject().getMyValue(); } --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Unfortunately we did not remove statics from the Java Bean serialization rules of RemoteObject in Flex 1.5. It's a known issue and will be fixed going forward. As a work around for now would it be possible to move the static final to another context? Such as a class called StaticConstants? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 11:49 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call Pete- Thanks for your help...I've finally identified the problem (but still not the solution). Although I did have a reference of my siblingPojo back to my MainPojo, commenting out that code did not solve the problem. However, my SiblingObject has an attribute that is part of a class with static variables. So to give you an example, my SiblingPojo has an attribute like this: private Status status = null; When I construct my data objects in the back-end, I set this variable using it's own static data: siblingPojo.setStatus(Status.CONFIRMED); Here's the Java code of the class that the serialization is hanging up on. This is a pretty standard j2ee design pattern. You'll see that I only have a private constructor. This is what ensures that the variable data will be constant throughout the app. If I were to add a public constructor, the class would not compile (since my variable 'type' could technically never get instantiated)...I'm guessing the serialzation is hanging b/c there is no public empty constructor? have you ever come across a situation like this before? Thanks again for your help. public class Status{ private final String type; private Status(String type) { this.type = type; } public String toString() { return type.toString(); } public static final Status UNASSIGNED = new Status(UNA); public static final Status ASSIGNED = new Status(ASG); public static final Status ACKNOWLEDGED = new Status(ACK); } --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: It sounds like you might be in an infinite loop somewhere on the client... a common way to get into such a loop is when processing object graphs with circular references. From your MXML code listing below (i.e. it shows direct binding of the RO result as a data provider) I don't see that you're doing any recursive processing of the result so I'd propose that you've discovered a bug with DataGrid when bound to object graphs that have circular references. How, you might ask, would you have a circular reference in an object graph from a RemoteObject result? Without seeing any of the code for the object graph I can only guess that somewhere in your sibling instances you have a pointer to a parent main object (or perhaps some circular dependency between sibs, whatever). When serializing objects over AMF the client and server will attempt to restore references between complex objects, for example, Just say we have two objects, A and B where B has a reference back to its parent A: A - B - A RemoteObject will serialize the A property of B as a reference to the instance A, rather than reserialize A again. This allows the client and server to support circularly referenced object graphs and avoids infinite recursion on serialization/deserialization. To prove that this is indeed happening you can turn on Debug level logging for the RemoteObject gateway in the /WEB-INF/flex/gateway.config.xml file, restart the flex server, and then watch the server console for AMF traffic, you should be able to see the by-reference serializaiton entries in the log. Note that RemoteObject is doing the right thing here - it might just be that DataGrid can't handle the circularity of the object graph. Let me know what you find out. Pete
RE: [flexcoders] Re: Web browser crashing on remote method call
Can you post the constructor code for the AS representation of the POJO classes? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 4:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call yes. we're going to plan to stub it in as a constants until 2.0 is released. However, I'm still having display problems. From the gateway debug, I can see that my MainPOJO and all of it's nested objects have data, yet it displays nothing in it's cell when I try to access it directly or via the labelFunc. I can see in the debugger that the item has the data. Really weird why it will not display. I removed the registered AS classes to let Flex handle the serialization and instantion on it's own, but still no data. Both of these DG calls render an empty cell. mx:DataGridColumn columnName=siblingObject.myValue headerText=myV / -- mx:DataGridColumn headerText=C# labelFunction=myLabelFunc / which calls this method.. function myLabelFunc(item) : String { return item.getSiblingObject().getMyValue(); } --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Unfortunately we did not remove statics from the Java Bean serialization rules of RemoteObject in Flex 1.5. It's a known issue and will be fixed going forward. As a work around for now would it be possible to move the static final to another context? Such as a class called StaticConstants? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 11:49 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call Pete- Thanks for your help...I've finally identified the problem (but still not the solution). Although I did have a reference of my siblingPojo back to my MainPojo, commenting out that code did not solve the problem. However, my SiblingObject has an attribute that is part of a class with static variables. So to give you an example, my SiblingPojo has an attribute like this: private Status status = null; When I construct my data objects in the back-end, I set this variable using it's own static data: siblingPojo.setStatus(Status.CONFIRMED); Here's the Java code of the class that the serialization is hanging up on. This is a pretty standard j2ee design pattern. You'll see that I only have a private constructor. This is what ensures that the variable data will be constant throughout the app. If I were to add a public constructor, the class would not compile (since my variable 'type' could technically never get instantiated)...I'm guessing the serialzation is hanging b/c there is no public empty constructor? have you ever come across a situation like this before? Thanks again for your help. public class Status{ private final String type; private Status(String type) { this.type = type; } public String toString() { return type.toString(); } public static final Status UNASSIGNED = new Status(UNA); public static final Status ASSIGNED = new Status(ASG); public static final Status ACKNOWLEDGED = new Status(ACK); } --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: It sounds like you might be in an infinite loop somewhere on the client... a common way to get into such a loop is when processing object graphs with circular references. From your MXML code listing below (i.e. it shows direct binding of the RO result as a data provider) I don't see that you're doing any recursive processing of the result so I'd propose that you've discovered a bug with DataGrid when bound to object graphs that have circular references. How, you might ask, would you have a circular reference in an object graph from a RemoteObject result? Without seeing any of the code for the object graph I can only guess that somewhere in your sibling instances you have a pointer to a parent main object (or perhaps some circular dependency between sibs, whatever). When serializing objects over AMF the client and server will attempt to restore references between complex objects, for example, Just say we have two objects, A and B where B has a reference back to its parent A: A - B - A RemoteObject will serialize the A property of B as a reference to the instance A, rather than reserialize A again. This allows the client and server to support circularly referenced object graphs and avoids infinite recursion on serialization/deserialization. To prove that this is indeed happening you can turn on Debug level logging for the RemoteObject gateway in the /WEB-INF/flex/gateway.config.xml file, restart the flex server, and
[flexcoders] odd behavior...
Hi- I have this odd behavior going on in my application that Im hoping someone can help me figure out. Basically heres what happens: 1) A component broadcasts an event containing a URL to an XML file when an item is clicked on in a datagrid. 2) The controller receives this event, then retrieves the XML file via an HTTPService tag. 3) A binding passes the result to another component, which displays the data. Heres the oddness: the component displays only the data from the PREVIOUSLY selected item that calls the event. So for example, if the user clicks a, the HTTPService is called, but no results are displayed in the display component. However, then the user clicks b, and the contents of a appear Ideas? Heres the controller code: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml pageTitle=fpodder PodCasting mx:Script ![CDATA[ var sendPodcast:Object; var podURL:String; var playerInfo:Object; function castThePod(event:Object):Void { podURL=event.link; podData.send(); playerInfo = podData.result.rss; } ]] /mx:Script mx:HTTPService id=podData url="" useProxy=true showBusyCursor=true / mx:Label text=Welcome to fPodder. fontWeight=bold fontFamily=Arial,Helvetica,Sans-serif fontSize=20 textAlign=center width=100% / mx:HBox Subscriptions playPodcast=castThePod(event) xmlns=* / mx:VBox Player playerInfo={playerInfo} xmlns=* / /mx:VBox /mx:HBox /mx:Application Thanks, Drew Falkman Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] NetConnection Debugger Fails w/ Named Remote Objects
As I posted previously, my NetConnection Debugger fails. After talking with another FlexCoder this weekend who had the same problem, it turns out that the NetConnection Debugger only shows service calls (I can't even get to results) for the first Named Remote Object it finds. It continues to make service calls and will return results to the player, but the netconnection debugger fails to show anything when a method call exists in a CFC that is not part of the first named object. Is there a resolution to this? Running: Flex 1.5 Jrun4 CF7 Dave Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Re: odd behavior...
Hi, this is because you are making the web service call and then setting the playerInfo instantly, without waiting for the result of the web serivce. The Flash player doesn't block (stop and wait) after you give the podData.send(), it simply starts the call then continues executing your code. And the result property of the service hasn't been set yet so you don't see it after the first call, and it hasn't been re-set so you see the result of the first call on the second try, etc etc. You have to use the result event of the service, something like this: mx:HTTPService id=podData url={podURL} useProxy=true showBusyCursor=true result=playerInfo=podData.result.rss / You should also handle the fault event so if it fails it does so nicely. And of course you should probably have the code in a method rather than right in the service declaration... Hope that helps. Jason --- In flexcoders@yahoogroups.com, Drew Falkman [EMAIL PROTECTED] wrote: Hi- I have this odd behavior going on in my application that I'm hoping someone can help me figure out. Basically here's what happens: 1) A component broadcasts an event containing a URL to an XML file when an item is clicked on in a datagrid. 2) The controller receives this event, then retrieves the XML file via an HTTPService tag. 3) A binding passes the result to another component, which displays the data. Here's the oddness: the component displays only the data from the PREVIOUSLY selected item that calls the event. So for example, if the user clicks a, the HTTPService is called, but no results are displayed in the display component. However, then the user clicks b, and the contents of a appear. Ideas? Drew Falkman Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Web browser crashing on remote method call
The 2 constructors for my MainPojo and SiblingPojo (for the Java classes and AS classes) both had only a single empty constructor like below. Again, thanks for your help. AS--- public function SiblingPojo(){} Java- public SiblingPojo(){} --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Can you post the constructor code for the AS representation of the POJO classes? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 4:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call yes. we're going to plan to stub it in as a constants until 2.0 is released. However, I'm still having display problems. From the gateway debug, I can see that my MainPOJO and all of it's nested objects have data, yet it displays nothing in it's cell when I try to access it directly or via the labelFunc. I can see in the debugger that the item has the data. Really weird why it will not display. I removed the registered AS classes to let Flex handle the serialization and instantion on it's own, but still no data. Both of these DG calls render an empty cell. mx:DataGridColumn columnName=siblingObject.myValue headerText=myV / -- mx:DataGridColumn headerText=C# labelFunction=myLabelFunc / which calls this method.. function myLabelFunc(item) : String { return item.getSiblingObject().getMyValue(); } --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Unfortunately we did not remove statics from the Java Bean serialization rules of RemoteObject in Flex 1.5. It's a known issue and will be fixed going forward. As a work around for now would it be possible to move the static final to another context? Such as a class called StaticConstants? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 11:49 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call Pete- Thanks for your help...I've finally identified the problem (but still not the solution). Although I did have a reference of my siblingPojo back to my MainPojo, commenting out that code did not solve the problem. However, my SiblingObject has an attribute that is part of a class with static variables. So to give you an example, my SiblingPojo has an attribute like this: private Status status = null; When I construct my data objects in the back-end, I set this variable using it's own static data: siblingPojo.setStatus(Status.CONFIRMED); Here's the Java code of the class that the serialization is hanging up on. This is a pretty standard j2ee design pattern. You'll see that I only have a private constructor. This is what ensures that the variable data will be constant throughout the app. If I were to add a public constructor, the class would not compile (since my variable 'type' could technically never get instantiated)...I'm guessing the serialzation is hanging b/c there is no public empty constructor? have you ever come across a situation like this before? Thanks again for your help. public class Status{ private final String type; private Status(String type) { this.type = type; } public String toString() { return type.toString(); } public static final Status UNASSIGNED = new Status(UNA); public static final Status ASSIGNED = new Status(ASG); public static final Status ACKNOWLEDGED = new Status(ACK); } --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: It sounds like you might be in an infinite loop somewhere on the client... a common way to get into such a loop is when processing object graphs with circular references. From your MXML code listing below (i.e. it shows direct binding of the RO result as a data provider) I don't see that you're doing any recursive processing of the result so I'd propose that you've discovered a bug with DataGrid when bound to object graphs that have circular references. How, you might ask, would you have a circular reference in an object graph from a RemoteObject result? Without seeing any of the code for the object graph I can only guess that somewhere in your sibling instances you have a pointer to a parent main object (or perhaps some circular dependency between sibs, whatever). When serializing objects over AMF the client and server will attempt to restore references between complex objects, for example, Just say we have two objects, A and B where B has a reference back to its parent A:
[flexcoders] Getting client's IP address
Weve got a Flex app that is calling a PHP script to retrieve the end-users IP address (for an authentication procedure), but the IP address that is returned is the address of the Flex server, not the client. Any thoughts on why this is happening? And, how do we work around it? /*** * Jeff Beeman * Digital Media Instructional Technologies * Arizona State University ***/ Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Re: Getting client's IP address
I assume it's a http service you're using that calls the PHP page to get the IP? I think the web service calls are proxied by default. Try adding the useProxy=false property in the http service, that should tell the app to go to the web service directly. Jason --- In flexcoders@yahoogroups.com, Jeff Beeman [EMAIL PROTECTED] wrote: We've got a Flex app that is calling a PHP script to retrieve the end-user's IP address (for an authentication procedure), but the IP address that is returned is the address of the Flex server, not the client. Any thoughts on why this is happening? And, how do we work around it? /*** * Jeff Beeman * Digital Media Instructional Technologies * Arizona State University ***/ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Web browser crashing on remote method call
Hmm, do you need to add curly braces as I have below? mx:DataGridColumn columnName={siblingObject.myValue} headerText=myV / -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 5:00 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call The 2 constructors for my MainPojo and SiblingPojo (for the Java classes and AS classes) both had only a single empty constructor like below. Again, thanks for your help. AS--- public function SiblingPojo(){} Java- public SiblingPojo(){} --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Can you post the constructor code for the AS representation of the POJO classes? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 4:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call yes. we're going to plan to stub it in as a constants until 2.0 is released. However, I'm still having display problems. From the gateway debug, I can see that my MainPOJO and all of it's nested objects have data, yet it displays nothing in it's cell when I try to access it directly or via the labelFunc. I can see in the debugger that the item has the data. Really weird why it will not display. I removed the registered AS classes to let Flex handle the serialization and instantion on it's own, but still no data. Both of these DG calls render an empty cell. mx:DataGridColumn columnName=siblingObject.myValue headerText=myV / -- mx:DataGridColumn headerText=C# labelFunction=myLabelFunc / which calls this method.. function myLabelFunc(item) : String { return item.getSiblingObject().getMyValue(); } --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Unfortunately we did not remove statics from the Java Bean serialization rules of RemoteObject in Flex 1.5. It's a known issue and will be fixed going forward. As a work around for now would it be possible to move the static final to another context? Such as a class called StaticConstants? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 11:49 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call Pete- Thanks for your help...I've finally identified the problem (but still not the solution). Although I did have a reference of my siblingPojo back to my MainPojo, commenting out that code did not solve the problem. However, my SiblingObject has an attribute that is part of a class with static variables. So to give you an example, my SiblingPojo has an attribute like this: private Status status = null; When I construct my data objects in the back-end, I set this variable using it's own static data: siblingPojo.setStatus(Status.CONFIRMED); Here's the Java code of the class that the serialization is hanging up on. This is a pretty standard j2ee design pattern. You'll see that I only have a private constructor. This is what ensures that the variable data will be constant throughout the app. If I were to add a public constructor, the class would not compile (since my variable 'type' could technically never get instantiated)...I'm guessing the serialzation is hanging b/c there is no public empty constructor? have you ever come across a situation like this before? Thanks again for your help. public class Status{ private final String type; private Status(String type) { this.type = type; } public String toString() { return type.toString(); } public static final Status UNASSIGNED = new Status(UNA); public static final Status ASSIGNED = new Status(ASG); public static final Status ACKNOWLEDGED = new Status(ACK); } --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: It sounds like you might be in an infinite loop somewhere on the client... a common way to get into such a loop is when processing object graphs with circular references. From your MXML code listing below (i.e. it shows direct binding of the RO result as a data provider) I don't see that you're doing any recursive processing of the result so I'd propose that you've discovered a bug with DataGrid when bound to object graphs that have circular references. How, you might ask, would you have a circular reference in an object graph from a RemoteObject result? Without seeing any of the code for the object graph I can only guess that somewhere in your
[flexcoders] Remoting peformance for large lists
Hi all, We're having some peformance problems on the client side when loading large lists of object graphs through our remoting inteface. I've written a simple test case to characterize the problem (the mxml file and remote object are attached), and I'm seeing some behavior I can't explain. I would appreciate any help anyone can provide understanding the problem or providing work-arounds. The time between the remote method call and the resultHandler of the call grows linearly with list size and/or object size as you'd expect. We're also seeing a period of time after the result handler where the application becomes unresponsive. This is what I can't explain. This mystery time increases non-linearly with item count and seems to increase greatly when items in the list reference other objects (even if they all reference the same instance). I've traced data from within the result in the resultHandler, so the action script objects seem to be fully serialized by the resultHandler, so the clients peformance after the resultHandler doesn't seem to be directly hampered by object loading or creation. The attached graphs show the results of my tests. In each graph the time until the result handler is in orange, the time after the result handler is green and the sum of the two is blue. TOP LEFT: Load time per item where each item contains a map with 5 entries. Note that the mystery time (green) increases non-linearly, and (excluding the spikes) the orange increase linearly. TOP RIGHT: Load time per item, 10 entries. The orange lines slope increases as you'd expect since the size of the objects have increased by ~80%. The green line is identical to the graph of items with 5 entries. MIDDLELEFT: Load time per item, 20 entries. Again the orange line's slope increases as expected. The mystery time remains the same. MIDDLE RIGHT: I modified the remoting code to create a single parent item and give each item in the list a reference to it. I then created a second parent object so that each object would have a reference to 2 parent objects (but only a single instance of each). I overlayed the graphs so that the scales matched (each item had 10 map entries and the bottom lines are test graphed in the TOP RIGHT). Note that adding the one reference increases the mystery time by nearly 100% and adding the second reference increases it by 150%. BOTTOM LEFT: Load time per map item, 1000 items. Holding the items constant, you can see that the mystery time holds constant after a certain point, and the load time (orange) increases linearly with object size as expected. BOTTOM RIGHT: Repeated calls for 0 items. This is a control to eliminate the possiblity that multiple calls or the graphing was responsible for the slowdown. Thanks, Alex Carbon Five Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ attachment: remote_performance.gif testRemoteObjectTiming.mxml Description: Binary data TestRemote.java Description: Binary data
[flexcoders] Re: Web browser crashing on remote method call
It doesn't compile if you do that! :-) Man this is frustrating. Even though it is a nested pojo, the attribute of the sibling object is a String. --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Hmm, do you need to add curly braces as I have below? mx:DataGridColumn columnName={siblingObject.myValue} headerText=myV / -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 5:00 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call The 2 constructors for my MainPojo and SiblingPojo (for the Java classes and AS classes) both had only a single empty constructor like below. Again, thanks for your help. AS--- public function SiblingPojo(){} Java- public SiblingPojo(){} --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Can you post the constructor code for the AS representation of the POJO classes? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 4:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call yes. we're going to plan to stub it in as a constants until 2.0 is released. However, I'm still having display problems. From the gateway debug, I can see that my MainPOJO and all of it's nested objects have data, yet it displays nothing in it's cell when I try to access it directly or via the labelFunc. I can see in the debugger that the item has the data. Really weird why it will not display. I removed the registered AS classes to let Flex handle the serialization and instantion on it's own, but still no data. Both of these DG calls render an empty cell. mx:DataGridColumn columnName=siblingObject.myValue headerText=myV / -- mx:DataGridColumn headerText=C# labelFunction=myLabelFunc / which calls this method.. function myLabelFunc(item) : String { return item.getSiblingObject().getMyValue(); } --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Unfortunately we did not remove statics from the Java Bean serialization rules of RemoteObject in Flex 1.5. It's a known issue and will be fixed going forward. As a work around for now would it be possible to move the static final to another context? Such as a class called StaticConstants? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 11:49 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call Pete- Thanks for your help...I've finally identified the problem (but still not the solution). Although I did have a reference of my siblingPojo back to my MainPojo, commenting out that code did not solve the problem. However, my SiblingObject has an attribute that is part of a class with static variables. So to give you an example, my SiblingPojo has an attribute like this: private Status status = null; When I construct my data objects in the back-end, I set this variable using it's own static data: siblingPojo.setStatus(Status.CONFIRMED); Here's the Java code of the class that the serialization is hanging up on. This is a pretty standard j2ee design pattern. You'll see that I only have a private constructor. This is what ensures that the variable data will be constant throughout the app. If I were to add a public constructor, the class would not compile (since my variable 'type' could technically never get instantiated)...I'm guessing the serialzation is hanging b/c there is no public empty constructor? have you ever come across a situation like this before? Thanks again for your help. public class Status{ private final String type; private Status(String type) { this.type = type; } public String toString() { return type.toString(); } public static final Status UNASSIGNED = new Status(UNA); public static final Status ASSIGNED = new Status(ASG); public static final Status ACKNOWLEDGED = new Status(ACK); } --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: It sounds like you might be in an infinite loop somewhere on the client... a common way to get into such a loop is when processing object graphs with circular references. From your MXML code listing below (i.e. it shows direct binding of the RO result as a data provider) I don't see that
[flexcoders] Re: Getting client's IP address
Hi, I do this with a simple .jsp script in the Flex app. You can include something like the following: getIPAddress.jsp: clientip valGet%=request.getRemoteAddr()%/valGet /clientip Then call that within Flex in an HTTPService and parse the return. HTTPService.result.clientip.valGet , etc Then you can store that in a sharedobject or whatever you want. Hope it helps. -Michael --- In flexcoders@yahoogroups.com, temporal_illusion [EMAIL PROTECTED] wrote: I assume it's a http service you're using that calls the PHP page to get the IP? I think the web service calls are proxied by default. Try adding the useProxy=false property in the http service, that should tell the app to go to the web service directly. Jason --- In flexcoders@yahoogroups.com, Jeff Beeman [EMAIL PROTECTED] wrote: We've got a Flex app that is calling a PHP script to retrieve the end-user's IP address (for an authentication procedure), but the IP address that is returned is the address of the Flex server, not the client. Any thoughts on why this is happening? And, how do we work around it? /*** * Jeff Beeman * Digital Media Instructional Technologies * Arizona State University ***/ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Getting client's IP address
You could also pass it to your mxml file as a flashvar, as long as you have the variable declared in your root application. I do something similar to the following from within a jsp page: !-- index.jsp -- html head titleflex/title %@ taglib uri=FlexTagLib prefix=mm / % String ipAddress = null; if( request.getHeader(X-Forwarded-For) == null ) { ipAddress = request.getRemoteAddr(); } else { ipAddress = request.getHeader(X-Forwarded-For); } % body mm:mxml source=myApp.mxml mm:flashvar name=IP_ADDRESS value=%= ipAddress % / /mm:mxml /body /html Be sure to have the variable IP_ADDRESS declared in the root of your mxml application. Hope this helps, Andrew www.flexdaddy.com --- In flexcoders@yahoogroups.com, heybluez [EMAIL PROTECTED] wrote: Hi, I do this with a simple .jsp script in the Flex app. You can include something like the following: getIPAddress.jsp: clientip valGet%=request.getRemoteAddr()%/valGet /clientip Then call that within Flex in an HTTPService and parse the return. HTTPService.result.clientip.valGet , etc Then you can store that in a sharedobject or whatever you want. Hope it helps. -Michael --- In flexcoders@yahoogroups.com, temporal_illusion [EMAIL PROTECTED] wrote: I assume it's a http service you're using that calls the PHP page to get the IP? I think the web service calls are proxied by default. Try adding the useProxy=false property in the http service, that should tell the app to go to the web service directly. Jason --- In flexcoders@yahoogroups.com, Jeff Beeman [EMAIL PROTECTED] wrote: We've got a Flex app that is calling a PHP script to retrieve the end-user's IP address (for an authentication procedure), but the IP address that is returned is the address of the Flex server, not the client. Any thoughts on why this is happening? And, how do we work around it? /*** * Jeff Beeman * Digital Media Instructional Technologies * Arizona State University ***/ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Remoting peformance for large lists
Have you ready my large data articles? Probably explains whats going on as far as deserialization and whatnot (and potential approaches that may or may not be applicable to charts). http://www.markme.com/mchotin/archives/cat_data_management.cfm down at the bottom. Matt From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Alex Cruikshank Sent: Monday, June 13, 2005 3:15 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Remoting peformance for large lists Hi all, We're having some peformance problems on the client side when loading large lists of object graphs through our remoting inteface. I've written a simple test case to characterize the problem (the mxml file and remote object are attached), and I'm seeing some behavior I can't explain. I would appreciate any help anyone can provide understanding the problem or providing work-arounds. The time between the remote method call and the resultHandler of the call grows linearly with list size and/or object size as you'd expect. We're also seeing a period of time after the result handler where the application becomes unresponsive. This is what I can't explain. This mystery time increases non-linearly with item count and seems to increase greatly when items in the list reference other objects (even if they all reference the same instance). I've traced data from within the result in the resultHandler, so the action script objects seem to be fully serialized by the resultHandler, so the clients peformance after the resultHandler doesn't seem to be directly hampered by object loading or creation. The attached graphs show the results of my tests. In each graph the time until the result handler is in orange, the time after the result handler is green and the sum of the two is blue. TOP LEFT: Load time per item where each item contains a map with 5 entries. Note that the mystery time (green) increases non-linearly, and (excluding the spikes) the orange increase linearly. TOP RIGHT: Load time per item, 10 entries. The orange lines slope increases as you'd expect since the size of the objects have increased by ~80%. The green line is identical to the graph of items with 5 entries. MIDDLELEFT: Load time per item, 20 entries. Again the orange line's slope increases as expected. The mystery time remains the same. MIDDLE RIGHT: I modified the remoting code to create a single parent item and give each item in the list a reference to it. I then created a second parent object so that each object would have a reference to 2 parent objects (but only a single instance of each). I overlayed the graphs so that the scales matched (each item had 10 map entries and the bottom lines are test graphed in the TOP RIGHT). Note that adding the one reference increases the mystery time by nearly 100% and adding the second reference increases it by 150%. BOTTOM LEFT: Load time per map item, 1000 items. Holding the items constant, you can see that the mystery time holds constant after a certain point, and the load time (orange) increases linearly with object size as expected. BOTTOM RIGHT: Repeated calls for 0 items. This is a control to eliminate the possiblity that multiple calls or the graphing was responsible for the slowdown. Thanks, Alex Carbon Five Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Re: Popup windows behaving oddly
I have had similar experiences where a popup appears to be shown behind the application, and by having modal transparency set, you can see that the popup method is called because the application dims out. I have also played with popups from an application loaded within mx:Loader and have also had weird behaviour. As a result of these my createPopUp method uses _root as the parent movie clip, and the reference movieclip for centrePopUp is mx.core.Application.application ... maybe try the following: import mx.managers.PopUpManager; public function showPopUp( window:Object, vars:Object, h:Number, w:Number ):Void { var popup = PopUpManager.createPopUp( _root, window, true, vars, true ); popup.width = w; popup.height = h; popup.centerPopUp( MovieClip(mx.core.Application.application) ); } In the above showPopUp method I pass it the popup window, an init object (if neccessary), and a height and width. Try it and see how it goes, Andrew Spaulding www.flexdaddy.com --- In flexcoders@yahoogroups.com, Eric Raymond [EMAIL PROTECTED] wrote: The parent of the popup is set to this. We pass no arguments to centerPopup. According to the docs this uses the parent specified in createPopup. (But I've also tried it with this to no avail.) Yes, I understand that it is hard to dig in without a test case. Sadly popups work well in some places in my app and not in others. I was hoping that someone out there had similar problems and had made sense out of this. --- In flexcoders@yahoogroups.com, Manish Jethani [EMAIL PROTECTED] wrote: On 6/11/05, Eric Raymond [EMAIL PROTECTED] wrote: We've been having a number of problems with popup windows doing strange things. As Alex said, it's hard to say without looking at your code. If you could create a simple test case that shows the problem, that'd be cool. 1) They popup behind the window which created them. Did you pass 'this' as the first argument to PopUpManager.createPopUp() from the window that created them? You need to specify the parent of the popup window. Make sure you got that right. 2) They pop up in the upper left even though we asked them to be centered over their parent via centerPopup(). Again, did you pass 'this' as the argument to centerPopUp() ? Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Popup windows behaving oddly
Thanks I will try that. I tend to not explicitly size my popups and let Flex determine the sizing. Is that necessary? --- In flexcoders@yahoogroups.com, Andrew Spaulding [EMAIL PROTECTED] wrote: I have had similar experiences where a popup appears to be shown behind the application, and by having modal transparency set, you can see that the popup method is called because the application dims out. I have also played with popups from an application loaded within mx:Loader and have also had weird behaviour. As a result of these my createPopUp method uses _root as the parent movie clip, and the reference movieclip for centrePopUp is mx.core.Application.application ... maybe try the following: import mx.managers.PopUpManager; public function showPopUp( window:Object, vars:Object, h:Number, w:Number ):Void { var popup = PopUpManager.createPopUp( _root, window, true, vars, true ); popup.width = w; popup.height = h; popup.centerPopUp( MovieClip(mx.core.Application.application) ); } In the above showPopUp method I pass it the popup window, an init object (if neccessary), and a height and width. Try it and see how it goes, Andrew Spaulding www.flexdaddy.com --- In flexcoders@yahoogroups.com, Eric Raymond [EMAIL PROTECTED] wrote: The parent of the popup is set to this. We pass no arguments to centerPopup. According to the docs this uses the parent specified in createPopup. (But I've also tried it with this to no avail.) Yes, I understand that it is hard to dig in without a test case. Sadly popups work well in some places in my app and not in others. I was hoping that someone out there had similar problems and had made sense out of this. --- In flexcoders@yahoogroups.com, Manish Jethani [EMAIL PROTECTED] wrote: On 6/11/05, Eric Raymond [EMAIL PROTECTED] wrote: We've been having a number of problems with popup windows doing strange things. As Alex said, it's hard to say without looking at your code. If you could create a simple test case that shows the problem, that'd be cool. 1) They popup behind the window which created them. Did you pass 'this' as the first argument to PopUpManager.createPopUp() from the window that created them? You need to specify the parent of the popup window. Make sure you got that right. 2) They pop up in the upper left even though we asked them to be centered over their parent via centerPopup(). Again, did you pass 'this' as the argument to centerPopUp() ? Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Popup windows behaving oddly
No it shouldn't be ncessary. I just like to have the little bit of extra control. Andrew. --- In flexcoders@yahoogroups.com, Eric Raymond [EMAIL PROTECTED] wrote: Thanks I will try that. I tend to not explicitly size my popups and let Flex determine the sizing. Is that necessary? --- In flexcoders@yahoogroups.com, Andrew Spaulding [EMAIL PROTECTED] wrote: I have had similar experiences where a popup appears to be shown behind the application, and by having modal transparency set, you can see that the popup method is called because the application dims out. I have also played with popups from an application loaded within mx:Loader and have also had weird behaviour. As a result of these my createPopUp method uses _root as the parent movie clip, and the reference movieclip for centrePopUp is mx.core.Application.application ... maybe try the following: import mx.managers.PopUpManager; public function showPopUp( window:Object, vars:Object, h:Number, w:Number ):Void { var popup = PopUpManager.createPopUp( _root, window, true, vars, true ); popup.width = w; popup.height = h; popup.centerPopUp( MovieClip(mx.core.Application.application) ); } In the above showPopUp method I pass it the popup window, an init object (if neccessary), and a height and width. Try it and see how it goes, Andrew Spaulding www.flexdaddy.com --- In flexcoders@yahoogroups.com, Eric Raymond [EMAIL PROTECTED] wrote: The parent of the popup is set to this. We pass no arguments to centerPopup. According to the docs this uses the parent specified in createPopup. (But I've also tried it with this to no avail.) Yes, I understand that it is hard to dig in without a test case. Sadly popups work well in some places in my app and not in others. I was hoping that someone out there had similar problems and had made sense out of this. --- In flexcoders@yahoogroups.com, Manish Jethani [EMAIL PROTECTED] wrote: On 6/11/05, Eric Raymond [EMAIL PROTECTED] wrote: We've been having a number of problems with popup windows doing strange things. As Alex said, it's hard to say without looking at your code. If you could create a simple test case that shows the problem, that'd be cool. 1) They popup behind the window which created them. Did you pass 'this' as the first argument to PopUpManager.createPopUp() from the window that created them? You need to specify the parent of the popup window. Make sure you got that right. 2) They pop up in the upper left even though we asked them to be centered over their parent via centerPopup(). Again, did you pass 'this' as the argument to centerPopUp() ? Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Getting client's IP address
Thanks, all! I will let you know if one of these works for us, but they all sound like reasonable solutions :-) /** * Jeff Beeman **/ -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Spaulding Sent: Monday, June 13, 2005 4:18 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Getting client's IP address You could also pass it to your mxml file as a flashvar, as long as you have the variable declared in your root application. I do something similar to the following from within a jsp page: !-- index.jsp -- html head titleflex/title %@ taglib uri=FlexTagLib prefix=mm / % String ipAddress = null; if( request.getHeader(X-Forwarded-For) == null ) { ipAddress = request.getRemoteAddr(); } else { ipAddress = request.getHeader(X-Forwarded-For); } % body mm:mxml source=myApp.mxml mm:flashvar name=IP_ADDRESS value=%= ipAddress % / /mm:mxml /body /html Be sure to have the variable IP_ADDRESS declared in the root of your mxml application. Hope this helps, Andrew www.flexdaddy.com --- In flexcoders@yahoogroups.com, heybluez [EMAIL PROTECTED] wrote: Hi, I do this with a simple .jsp script in the Flex app. You can include something like the following: getIPAddress.jsp: clientip valGet%=request.getRemoteAddr()%/valGet /clientip Then call that within Flex in an HTTPService and parse the return. HTTPService.result.clientip.valGet , etc Then you can store that in a sharedobject or whatever you want. Hope it helps. -Michael --- In flexcoders@yahoogroups.com, temporal_illusion [EMAIL PROTECTED] wrote: I assume it's a http service you're using that calls the PHP page to get the IP? I think the web service calls are proxied by default. Try adding the useProxy=false property in the http service, that should tell the app to go to the web service directly. Jason --- In flexcoders@yahoogroups.com, Jeff Beeman [EMAIL PROTECTED] wrote: We've got a Flex app that is calling a PHP script to retrieve the end-user's IP address (for an authentication procedure), but the IP address that is returned is the address of the Flex server, not the client. Any thoughts on why this is happening? And, how do we work around it? /*** * Jeff Beeman * Digital Media Instructional Technologies * Arizona State University ***/ Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Remoting peformance for large lists
Hi Matt, I have read (and now re-read) your excellent large data articles (which are now well established within the Flex literature's cannon). This exercise was an attempt to squeeze all the performance out of our requests before we implement paging and to try to establish an optimum page size. I wanted to try to make some addtional improvements because I was afraid that (assuming performance declined linearly) loading small chunks of data would still make that application to unresponsive. This seems to be a poor assumption in the case of our actual problem. I'm still curious as to why deserialization performance decreases non-linearly with item count (but not item size), why common object references affect the load time, or why there is a significant period *after* the resultHandler during which the client becomes unresponsive. Any help with these questions would help set my mind at ease. Thanks, Alex On 6/13/05, Matt Chotin [EMAIL PROTECTED] wrote: Have you ready my large data articles? Probably explains what's going on as far as deserialization and whatnot (and potential approaches that may or may not be applicable to charts). http://www.markme.com/mchotin/archives/cat_data_management.cfm down at the bottom. Matt From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Cruikshank Sent: Monday, June 13, 2005 3:15 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Remoting peformance for large lists Hi all, We're having some peformance problems on the client side when loading large lists of object graphs through our remoting inteface. I've written a simple test case to characterize the problem (the mxml file and remote object are attached), and I'm seeing some behavior I can't explain. I would appreciate any help anyone can provide understanding the problem or providing work-arounds. The time between the remote method call and the resultHandler of the call grows linearly with list size and/or object size as you'd expect. We're also seeing a period of time after the result handler where the application becomes unresponsive. This is what I can't explain. This mystery time increases non-linearly with item count and seems to increase greatly when items in the list reference other objects (even if they all reference the same instance). I've traced data from within the result in the resultHandler, so the action script objects seem to be fully serialized by the resultHandler, so the clients peformance after the resultHandler doesn't seem to be directly hampered by object loading or creation. The attached graphs show the results of my tests. In each graph the time until the result handler is in orange, the time after the result handler is green and the sum of the two is blue. TOP LEFT: Load time per item where each item contains a map with 5 entries. Note that the mystery time (green) increases non-linearly, and (excluding the spikes) the orange increase linearly. TOP RIGHT: Load time per item, 10 entries. The orange lines slope increases as you'd expect since the size of the objects have increased by ~80%. The green line is identical to the graph of items with 5 entries. MIDDLELEFT: Load time per item, 20 entries. Again the orange line's slope increases as expected. The mystery time remains the same. MIDDLE RIGHT: I modified the remoting code to create a single parent item and give each item in the list a reference to it. I then created a second parent object so that each object would have a reference to 2 parent objects (but only a single instance of each). I overlayed the graphs so that the scales matched (each item had 10 map entries and the bottom lines are test graphed in the TOP RIGHT). Note that adding the one reference increases the mystery time by nearly 100% and adding the second reference increases it by 150%. BOTTOM LEFT: Load time per map item, 1000 items. Holding the items constant, you can see that the mystery time holds constant after a certain point, and the load time (orange) increases linearly with object size as expected. BOTTOM RIGHT: Repeated calls for 0 items. This is a control to eliminate the possiblity that multiple calls or the graphing was responsible for the slowdown. Thanks, Alex Carbon Five Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to:
[flexcoders] Re: Popup windows behaving oddly (partial solution)
This solution combined with Andrew Spaulding's suggestion (user _root as the parent in createPopUp and MovieClip(mx.core.Application.application) in centerPopUp seemsto be working. But neither alone is enough. FYI, in the cause where height=0, the page contained a form (and I've seen forms do some pretty bizarre things wrt to layout). --- In flexcoders@yahoogroups.com, Eric Raymond [EMAIL PROTECTED] wrote: I can make the popup not appear behind the other windows if I get rid of any height=0 settings on Text fields on the page (that combined with visible=false allows me to hide various elements). Setting height=1 makes the problem go away! I'm not sure if this is a necessary or complete set of conditions. This appears to be a very strange Flex bug! The content of a window can cause a popup to be buried! Now onto a way to make the windows align and center! Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: odd behavior...
You rock. Thanks. From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of temporal_illusion Sent: Monday, June 13, 2005 1:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: odd behavior... Hi, this is because you are making the web service call and then setting the playerInfo instantly, without waiting for the result of the web serivce. The Flash player doesn't block (stop and wait) after you give the podData.send(), it simply starts the call then continues executing your code. And the result property of the service hasn't been set yet so you don't see it after the first call, and it hasn't been re-set so you see the result of the first call on the second try, etc etc. You have to use the result event of the service, something like this: mx:HTTPService id=podData url="" useProxy=true showBusyCursor=true result=playerInfo=podData.result.rss / You should also handle the fault event so if it fails it does so nicely. And of course you should probably have the code in a method rather than right in the service declaration... Hope that helps. Jason --- In flexcoders@yahoogroups.com, Drew Falkman [EMAIL PROTECTED] wrote: Hi- I have this odd behavior going on in my application that I'm hoping someone can help me figure out. Basically here's what happens: 1) A component broadcasts an event containing a URL to an XML file when an item is clicked on in a datagrid. 2) The controller receives this event, then retrieves the XML file via an HTTPService tag. 3) A binding passes the result to another component, which displays the data. Here's the oddness: the component displays only the data from the PREVIOUSLY selected item that calls the event. So for example, if the user clicks a, the HTTPService is called, but no results are displayed in the display component. However, then the user clicks b, and the contents of a appear. Ideas? Drew Falkman Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Re: Web browser crashing on remote method call
I got it to work (for now) by creating an additional getter on my mainPojo to return the attributes of the sibling Pojo...extra code though on our domain objects...grrr. thanks again though for your help. --- In flexcoders@yahoogroups.com, Kevin Ewok [EMAIL PROTECTED] wrote: It doesn't compile if you do that! :-) Man this is frustrating. Even though it is a nested pojo, the attribute of the sibling object is a String. --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Hmm, do you need to add curly braces as I have below? mx:DataGridColumn columnName={siblingObject.myValue} headerText=myV / -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 5:00 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call The 2 constructors for my MainPojo and SiblingPojo (for the Java classes and AS classes) both had only a single empty constructor like below. Again, thanks for your help. AS--- public function SiblingPojo(){} Java- public SiblingPojo(){} --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Can you post the constructor code for the AS representation of the POJO classes? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 4:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call yes. we're going to plan to stub it in as a constants until 2.0 is released. However, I'm still having display problems. From the gateway debug, I can see that my MainPOJO and all of it's nested objects have data, yet it displays nothing in it's cell when I try to access it directly or via the labelFunc. I can see in the debugger that the item has the data. Really weird why it will not display. I removed the registered AS classes to let Flex handle the serialization and instantion on it's own, but still no data. Both of these DG calls render an empty cell. mx:DataGridColumn columnName=siblingObject.myValue headerText=myV / -- mx:DataGridColumn headerText=C# labelFunction=myLabelFunc / which calls this method.. function myLabelFunc(item) : String { return item.getSiblingObject().getMyValue(); } --- In flexcoders@yahoogroups.com, Peter Farland [EMAIL PROTECTED] wrote: Unfortunately we did not remove statics from the Java Bean serialization rules of RemoteObject in Flex 1.5. It's a known issue and will be fixed going forward. As a work around for now would it be possible to move the static final to another context? Such as a class called StaticConstants? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Ewok Sent: Monday, June 13, 2005 11:49 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web browser crashing on remote method call Pete- Thanks for your help...I've finally identified the problem (but still not the solution). Although I did have a reference of my siblingPojo back to my MainPojo, commenting out that code did not solve the problem. However, my SiblingObject has an attribute that is part of a class with static variables. So to give you an example, my SiblingPojo has an attribute like this: private Status status = null; When I construct my data objects in the back-end, I set this variable using it's own static data: siblingPojo.setStatus(Status.CONFIRMED); Here's the Java code of the class that the serialization is hanging up on. This is a pretty standard j2ee design pattern. You'll see that I only have a private constructor. This is what ensures that the variable data will be constant throughout the app. If I were to add a public constructor, the class would not compile (since my variable 'type' could technically never get instantiated)...I'm guessing the serialzation is hanging b/c there is no public empty constructor? have you ever come across a situation like this before? Thanks again for your help. public class Status{ private final String type; private Status(String type) { this.type = type; } public String toString() { return type.toString(); } public static final Status UNASSIGNED = new Status(UNA); public static final Status ASSIGNED = new Status(ASG); public static final Status ACKNOWLEDGED
Re: [flexcoders] Re: Popup windows behaving oddly (partial solution)
centerPopUp makes them align and center. - Original Message - From: Eric Raymond [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Monday, June 13, 2005 7:49 PM Subject: [flexcoders] Re: Popup windows behaving oddly (partial solution) I can make the popup not appear behind the other windows if I get rid of any height=0 settings on Text fields on the page (that combined with visible=false allows me to hide various elements). Setting height=1 makes the problem go away! I'm not sure if this is a necessary or complete set of conditions. This appears to be a very strange Flex bug! The content of a window can cause a popup to be buried! Now onto a way to make the windows align and center! Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] iconFunction with List
Hello This should work..shouldn't? --- MXML mx:List id=subGroupList labelField=sub_desc iconFunction=subGroupsIcon width=100% height=100% fontWeight=bold fontSize=11 / --- AS // Embed icons. [Embed(images/groupFolderSmall.jpg)] var subGroupSymbol:String; function subGroupsIcon(item) { return subGroupSymbol; } --- It outputs the list but no icons! Any ideas? Thanks, Michael Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: iconFunction with List
it should work. I've got the same code :p Except where you are embedding the image my only difference is i have a leading ./ before images, so it would look like [Embed(./images/groupFolderSmall.jpg)] It shouldnt make any difference though. Andrew. --- In flexcoders@yahoogroups.com, heybluez [EMAIL PROTECTED] wrote: Hello This should work..shouldn't? --- MXML mx:List id=subGroupList labelField=sub_desc iconFunction=subGroupsIcon width=100% height=100% fontWeight=bold fontSize=11 / --- AS // Embed icons. [Embed(images/groupFolderSmall.jpg)] var subGroupSymbol:String; function subGroupsIcon(item) { return subGroupSymbol; } --- It outputs the list but no icons! Any ideas? Thanks, Michael Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Remoting peformance for large lists
Take a peek a http://www.tomlink.net and look for his WebService / AMF comparison. You feed it the details of the request and it times how long it takes to crunch through the data. It is a very cool application. BTW if anyone on this list knows Tom I would love to get an email for him. Thanks, Jeff Founder Flex Authority http://www.flexauthority.com We are actively seeking contributors for the site. Have a sample that you want to share with the world? Send it to us! From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin Sent: Monday, June 13, 2005 4:29 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Remoting peformance for large lists Have you ready my large data articles? Probably explains whats going on as far as deserialization and whatnot (and potential approaches that may or may not be applicable to charts). http://www.markme.com/mchotin/archives/cat_data_management.cfm down at the bottom. Matt From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Alex Cruikshank Sent: Monday, June 13, 2005 3:15 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Remoting peformance for large lists Hi all, We're having some peformance problems on the client side when loading large lists of object graphs through our remoting inteface. I've written a simple test case to characterize the problem (the mxml file and remote object are attached), and I'm seeing some behavior I can't explain. I would appreciate any help anyone can provide understanding the problem or providing work-arounds. The time between the remote method call and the resultHandler of the call grows linearly with list size and/or object size as you'd expect. We're also seeing a period of time after the result handler where the application becomes unresponsive. This is what I can't explain. This mystery time increases non-linearly with item count and seems to increase greatly when items in the list reference other objects (even if they all reference the same instance). I've traced data from within the result in the resultHandler, so the action script objects seem to be fully serialized by the resultHandler, so the clients peformance after the resultHandler doesn't seem to be directly hampered by object loading or creation. The attached graphs show the results of my tests. In each graph the time until the result handler is in orange, the time after the result handler is green and the sum of the two is blue. TOP LEFT: Load time per item where each item contains a map with 5 entries. Note that the mystery time (green) increases non-linearly, and (excluding the spikes) the orange increase linearly. TOP RIGHT: Load time per item, 10 entries. The orange lines slope increases as you'd expect since the size of the objects have increased by ~80%. The green line is identical to the graph of items with 5 entries. MIDDLELEFT: Load time per item, 20 entries. Again the orange line's slope increases as expected. The mystery time remains the same. MIDDLE RIGHT: I modified the remoting code to create a single parent item and give each item in the list a reference to it. I then created a second parent object so that each object would have a reference to 2 parent objects (but only a single instance of each). I overlayed the graphs so that the scales matched (each item had 10 map entries and the bottom lines are test graphed in the TOP RIGHT). Note that adding the one reference increases the mystery time by nearly 100% and adding the second reference increases it by 150%. BOTTOM LEFT: Load time per map item, 1000 items. Holding the items constant, you can see that the mystery time holds constant after a certain point, and the load time (orange) increases linearly with object size as expected. BOTTOM RIGHT: Repeated calls for 0 items. This is a control to eliminate the possiblity that multiple calls or the graphing was responsible for the slowdown. Thanks, Alex Carbon Five Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Re: Inline editing on double click in datagrid
I was not able to find source for DataGridRow.as. It will be great if you can attach a copy of source code. Pradeep On 6/13/05, alex_harui [EMAIL PROTECTED] wrote: Unfortunately, I can't think of a documented way to do this. I will suggest looking in DataGridRow.as source in Flash MX 2004. It might give you a clue how to do it, but we can't officially support it from Macromedia. --- In flexcoders@yahoogroups.com, Pradeep Chaudhary [EMAIL PROTECTED] wrote: I want to implement cell editing in datagrid based upon mouse double click. I have already implemented logic to fire doubleClick event on either cellPress or mouseUp event. Only problem is that I'am not able to stop default cell editing on single mouse click. Can anybody please suggest as to how can i stop default cell editing. Also suggest which is a better place for dispatching doubleClick event, in cellPress or mouseUp ? Pradeep Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Getting client's IP address
FYI: Someone contributed an example of this to the site this morning. I just posted it and you can find it: http://www.flexauthority.com/samplesIndex.cfm?sampleID=39 Let me know if that helps. Jeff Founder Flex Authority http://www.flexauthority.com We are actively seeking contributors for the site. Have a sample that you want to share with the world? Send it to us! From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jeff Beeman Sent: Monday, June 13, 2005 4:42 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Getting client's IP address Thanks, all! I will let you know if one of these works for us, but they all sound like reasonable solutions :-) /** * Jeff Beeman **/ -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Andrew Spaulding Sent: Monday, June 13, 2005 4:18 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Getting client's IP address You could also pass it to your mxml file as a flashvar, as long as you have the variable declared in your root application. I do something similar to the following from within a jsp page: !-- index.jsp -- html head titleflex/title %@ taglib uri=FlexTagLib prefix=mm / % String ipAddress = null; if( request.getHeader(X-Forwarded-For) == null ) { ipAddress = request.getRemoteAddr(); } else { ipAddress = request.getHeader(X-Forwarded-For); } % body mm:mxml source=myApp.mxml mm:flashvar name=IP_ADDRESS value=%= ipAddress % / /mm:mxml /body /html Be sure to have the variable IP_ADDRESS declared in the root of your mxml application. Hope this helps, Andrew www.flexdaddy.com --- In flexcoders@yahoogroups.com, heybluez [EMAIL PROTECTED] wrote: Hi, I do this with a simple .jsp script in the Flex app. You can include something like the following: getIPAddress.jsp: clientip valGet%=request.getRemoteAddr()%/valGet /clientip Then call that within Flex in an HTTPService and parse the return. HTTPService.result.clientip.valGet , etc Then you can store that in a sharedobject or whatever you want. Hope it helps. -Michael --- In flexcoders@yahoogroups.com, temporal_illusion [EMAIL PROTECTED] wrote: I assume it's a http service you're using that calls the PHP page to get the IP? I think the web service calls are proxied by default. Try adding the useProxy=false property in the http service, that should tell the app to go to the web service directly. Jason --- In flexcoders@yahoogroups.com, Jeff Beeman [EMAIL PROTECTED] wrote: We've got a Flex app that is calling a PHP script to retrieve the end-user's IP address (for an authentication procedure), but the IP address that is returned is the address of the Flex server, not the client. Any thoughts on why this is happening? And, how do we work around it? /*** * Jeff Beeman * Digital Media Instructional Technologies * Arizona State University ***/ Yahoo! Groups Links Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.