[flexcoders] Flex 1.5 to 2.0 Migration
I am having problems migrating code from flex 1.5 to flex 2.0 beta 3. I get the following errors when I try to compile my new code. Any ideas? Thanks Josh Error _com_project1_view_entity_EntityGenInfoWatcherSetupUtil.as:182 Syntax Error: dot is unexpected. Expected a primary _expression_. Error _com_project1_view_entity_EntityGenInfoWatcherSetupUtil.as:182 Expecting rightbracket before semicolon. Error _com_project1_salessystem_view_entity_EntityLinksWatcherSetupUtil.as:103 Syntax Error: dot is unexpected. Expected a primary _expression_. Error _com_project1_salessystem_view_entity_EntityLinksWatcherSetupUtil.as:103 Expecting rightbracket before semicolon.Express yourself instantly with MSN Messenger! MSN Messenger -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Re: Flex 2b3 - Tree Problems
Michael, thanks for the tree suggestions. To resolve the issue I had to add the @label along withthe showRoot = falseattribute on the tree control. I have included example code for others that may be experiencing tree problems. Josh mx:Tree id="menuItemsTree" labelField="@label" showRoot="false"/ //Note menu is a ArrayColleciton from a remoteObject that returns the XML as a single stringcalled menu_xml_string public static function formatMenuXmlForTree(menu:ArrayCollection):XMLDocument{ var menuXMLDocument:XMLDocument = new XMLDocument();menuXMLDocument.parseXML(menu.getItemAt(0).menu_xml_string);menuItemsTree.dataProvider = menuXMLDocument;} Sample XML?xml version="1.0" encoding="utf-8"?menuitems menuitem menuID="70" label="Letters" menuitem menuID="71" label="A" / menuitem menuID="72" label="B" / menuitem menuID="73" label="C" / /menuitem menuitem menuID="74" label="Numbers" menuitem menuID="75" label="1"/ menuitem menuID="75" label="2"/ menuitem menuID="75" label="3"//menuitem/enuitems To: flexcoders@yahoogroups.comFrom: [EMAIL PROTECTED]Date: Thu, 18 May 2006 22:10:16 +Subject: [flexcoders] Re: Flex 2b3 - Tree Problems--- In flexcoders@yahoogroups.com, "porsoc" [EMAIL PROTECTED] wrote: I have a string of valid XML that I want to show in a tree control. I can not get the tree to render my XML. All it will show me is one node with the entire XML string as the label. Isn't a control is supposed to be able to render an XMLDocument correctly. Anybody see what I am doing wrong below? public function setMenuInTree(menu:ArrayCollection):XMLDocument{ var menuXml:XMLDocument = new XMLDocument(menu.getItemAt (0).menu_xml_string);menuItemsTree.dataProvider = menuXml; }Make sure that you've set a labelField on the Tree in the form of'@attributeName', for example labelField="@label". Also verify that your data confirms to the requirements of theDefaultDataDescriptor or else you'll need your own impl ofITreeDataDescriptor. You might also verify that your XML string can be parsed into XML bytrying something like:myXMLTest:XML = new XML("myXMLString/");HTH,Michael--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Express yourself instantly with MSN Messenger! MSN Messenger -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Cairngorm 2.0 Alpha
I was reading the article whats new and changed in cairngorm 2.0 alpha http://www.richinternetapps.com/archives/000144.html and have a question about the following paragraph at the end of the document. In Cairngorm 0.95, for historical reasons we have to scratch the insides of our heads to remember, Commands are stateful. We don't like this, we've had to work around it on projects of our own, BUT, we have a responsibility to not make changes to Cairngorm that could impact upon all your developments. So if you're relying upon the statefulness as a side-effect, then be warned that in a future Cairngorm 2.0 alpha we're going to make Commands truly stateless - as they should be - so that they don't persist data between invocations. If you require state to be maintained between executions, you'll have to manage that explicitly - as you should have been doing anyway ! Does anybody have any ideas if can we expect the commands to not be stateful in Cairngorm 2.0. I have recently run into problems with the stateful commands in .99 that I am trying to solve. Also any thoughts on possible solutions would be much appreciated. Josh -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Moving Cursor inside textArea
Does anybody know how to move the cursor inside a textArea? I am implementing a system that allows a user to use shortcut phrases that are exploded into text. For instance when the user types hz it is exploaded to horizontal. The problem I am having is that when I add the additional characters the cursor is still in the middle of the word so I need to move it to the end of the entered text. Josh Yahoo! Groups Sponsor ~-- font face=arial size=-1a href=http://us.ard.yahoo.com/SIG=12hfbke37/M=362131.6882499.7825260.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123815192/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life - brought to you by One Economy/a./font ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Remote Object Errors
Christoph, No luck. I am still getting the Error: org/apache/commons/collections/FastHashMap. When I check the network monitor in Flex Builder it is making the request as expected but I am not seeing it catch the result object. Do you have any other ideas? Josh From: Christoph Guse [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Remote Object Errors Date: Mon, 08 Aug 2005 11:41:31 +0200 Hi Josh, you should use the automatic mapping between Java ValueObjects and ActionScript ValueObjects. For that your ActionScript VO should look like this: /*** AS class ***/ // ActionScript Document class Person { var name:String; var birthdate:String; public static var registeredClass:Boolean = Object.registerClass([full path in WEB-INF / java class name],Person); } Don't use a constructor in the AS VO, the constructor is called AFTER FLEX filled the attributes from the Java VO. Your MXML file could look like this: /*** MXML File ***/ mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:RemoteObject id=peopleObject source=People mx:method name=getPerson result=handleResults(event.result)/ /mx:RemoteObject mx:Script ![CDATA[ import Person; var my_person:Person; function handleResults(event){ my_person = event.result; } ]] /mx:Script mx:Panel width=800 height=600 mx:HBox mx:Form mx:FormItem label=Person name mx:Label text={my_person.name} / /mx:FormItem mx:FormItem label=birthday mx:Label text={my_person.birthdate} / /mx:FormItem /mx:Form mx:Button label=Get Person click={peopleObject.getPerson()} / /mx:HBox /mx:Panel /mx:Application I coded everything in my mail app, so I'm not totally shure if the code runs at once. Greetings Christoph Josh Noland wrote: I am having trouble accessing any Java objects that return something other than the Java types flex will implicitly convert. I am using the RemoteObject tag. The first time I try to access the result from the pojo function call I get Error: org/apache/commons/collections/FastHashMap in the JRun console. Each successive call will throw Error: null. I am using JRun4. The code is below. I have stripped all of the functionality to try and get rid of the error and to try to get Flex to recognize my remote object returned. For now all I want to do is successfully call the function that returns my person and display one of the fields from the object. Has anybody else experienced this type of problem? Josh / Java Class I am trying to use in Flex / public class Person implements Serializable { private String name; private String birthdate; public Person (){ } public Person (String name, String birthdate) { this.name = name; this.birthdate = birthdate; } public void setName(String name) { this.name = name; } public String getName() { return name; } public void setBirthdate(String birthdate) { this.birthdate = birthdate; } public String getBirthdate() { return birthdate; } } /* Java Function Call that returns an Object to Flex and resides in People Object */ public Person getPerson(){ return new Person(Josh, 8/8/2005); } /*** MXML File ***/ mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:RemoteObject id=peopleObject source=People mx:method name=getPerson result=handleResults(event.result)/ /mx:RemoteObject mx:Script ![CDATA[ function handleResults(eventResult){ var p1:Person = new Person(eventResult.getProperty('name'), eventResult.getProperty('birthdate')); } ]] /mx:Script mx:Panel width=800 height=600 mx:HBox mx:Button label=Get Person click={peopleObject.getPerson()} / /mx:HBox /mx:Panel /mx:Application /*** AS class ***/ // ActionScript Document class Person implements DataProvider{ var name:String; var birthdate:String; function Horse(myName:String, myBirthdate:String){ this.name = myName; this.birthdate = myBirthdate; } function getName(){ return(name); } function getBirthdate(){ return(birthdate); } } -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http