Re: [flexcoders] Re: Flex alternatives
Hi I have been working with Flex and related technologies for last 7 -10 yrs. Recently, in my project I came across this technology http://eclipse.org/rap/ and it converts all your SWT Java components into Qooxdoo Javascript which finally runs on the browser. But here everything is Java. No action script. This is also browser independent and it also works well on mobile devices. It is becoming more and more popular nowdays. Everything displayed is widget and everything is on the server side behind the scenes it uses Ajax. Thanks Rajan From: Rogerio Gonzalez rogerio.gonza...@gmail.com To: flexcoders@yahoogroups.com Sent: Monday, January 16, 2012 11:04 AM Subject: Re: [flexcoders] Re: Flex alternatives It is not just that... I remember in the 90's there was IE and Netscape... then came Opera... and then Gekko/Firefox replaced Netscape... now, there is Chrome. There are so many browsers, because each one of then thinks that he is the best for some kind of need of the user. that means: each one of then implements things as pleases then. the beautiful of the FP is that you (theoretical) don´t need to concern about browsers. I work with flash since 99 and that is true until now, even with iPad discussion (air rules!). Tell me one technology that accomplished that for 10 years. regards! Rogério Gonzalez On Mon, Jan 16, 2012 at 12:20 PM, valdhor valdhorli...@embarqmail.com wrote: Good luck on convincing IT departments in large corporations who are generally Microsoft shops. --- In flexcoders@yahoogroups.com, Guy Morton guy@... wrote: A thought on cross-browser hell… If every web developer in the world today decided to drop support for IE, everyone would go get Chrome or Firefox. This would be a win-win, as they would get a better browser, and we would get a better development environment. Who's with me? Guy On 16/01/2012, at 6:31 AM, Ron G wrote: Valdhor: You are right about that. That is precisely why we went with Flex originally (it insulated us from X-Browser issues). But, since we can't count on that lasting, and even Adobe is telling developers to plan on moving to HTML5, it seems like they're pushing us back into x-browser hell. I didn't want to go there, which is why we chose ZKoss. Yes, there is still going to be HTML/JS/CSS ultimately used, but it's how much. Even Flex SWFs are wrapped in HTML and JS when deployed. So, it's not that I'm against using any amount of HTML/JS; it's how little can I get away with to avoid these issues. Even with HTML5 libraries, such as the much touted jQuery, is, to a large degree, an insulator against x-browser issues. If you read the actual jQuery code, it deals with those issues for you. Now, ZK has a ZK Client JS library, which includes jQuery, that is designed to be a communicator mechanism between the client and the bulk of app logic that resides on the server. So, your normal editing and data manipulation that you might write in JS in a full blown HTML5 app is actually stored as Java on the server, and executed as needed per the EDA (event driven architecture). This type of JS is typically what breaks the page on different browsers and versions thereof. By limiting the amount of client-side JS, as does a jQuery type library, yes, you have some exposure to potential x-browser issues, but not as much as a HTML5 app that does everything on the client. And, when there are issues, they can be resolved in the ZK Client library as a patch/fix. So, now it seems to me that developers have several choices. Stick with Flex and you won't break the browser; you just won't be able to have your app viewed by millions on iOS products. If that seems like a better solution that minimal exposure to x-browser issues by using ZK or some other technology, well, that's certainly a choice each company has to make. Ron --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: On a side note, I like the look of ZKoss. I don't know if there are cross browser issues with it seeing as we use older versions of browsers. One of the great features of Flex is we don't have to bother coding for compatibility between different browsers and versions. When IT deployed IE7, Flex applications worked just as they had before. Anyway, just my 2c from the enterprise perspective.
Re: [flexcoders] Reflection does not provide information of Array Objects
Hi Oleg Thanks for the pointers. Regards Rajan From: Oleg Sivokon olegsivo...@gmail.com To: flexcoders@yahoogroups.com Sent: Tue, May 4, 2010 2:31:04 PM Subject: Re: [flexcoders] Reflection does not provide information of Array Objects That's just a tag to tell the compiler about how it should treat the array in MXML layout. At runtime this information doesn't persist and it has no effect on how Array behaves. It will still be the same ECMAArray... Vectors do have the type information at runtime, however not after they are serialized. One more thing though. You may add custom meta tags if you need and store the RTTI there. If that's not good enough, I know there are an initiative to let compiler execute custom code during compilation. .. It's not yet there, but well may be that it is already workable enough to provide some sort of preprocessing / postlinking etc stuff, so you could inject the meta for example during compilation. .. (search JIRA for that, I cannot find the link atm.) Best. Oleg
Re: [flexcoders] Parser Error | Itemrender
Hi Alex Thanks ilikeflex From: Alex Harui aha...@adobe.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Sent: Thursday, August 20, 2009 1:44:50 AM Subject: RE: [flexcoders] Parser Error | Itemrender mx:Component defines a sub-document within an MXML file. You don’t need it in the component file, just ?xml version=1.0 encoding=utf-8? mx:CheckBox label={data.label} selected={data.selected}/ Alex Harui Flex SDK Developer Adobe Systems Inc. Blog: http://blogs. adobe.com/ aharui From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of ilikeflex Sent: Wednesday, August 19, 2009 7:56 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Parser Error | Itemrender Hi ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml layout=absolute creationComplete=onCreationcomplete( ) mx:Script ![CDATA[ import mx.collections. ArrayCollection; import com.DateUtils; private var stateList:Array = [ { label: Alaska, selected: false }, { label: Arkansas, selected: false }, { label: California, selected: false }, { label: Delaware, selected: false }, { label: Florida, selected: false }, { label: Georgia, selected: false }, { label: Hawaii, selected: false }, { label: Massachusetts, selected: false }, { label: Nevada, selected: false }, { label: Pennsylvania, selected: false }, { label: South Dakota, selected: false }, { label: Tennessee, selected: false }, { label: Utah, selected: false }, { label: Virginia, selected: false }, { label: Washington, selected: false } ]; public function onCreationcomplete( ):void { test.dataProvider = new ArrayCollection( stateList) ; } ]] /mx:Script mx:ComboBox id=test width=300 mx:itemRenderer mx:Component mx:CheckBox selectedField=selected change=data.selected = selected / /mx:Component /mx:itemRenderer /mx:ComboBox /mx:Application The above file works fine and it show check box as itemrender. Now if i want to create same itemrender in different file like ?xml version=1.0 encoding=utf-8? mx:Component xmlns:mx=http://www.adobe. com/2006/ mxml width=100% height=100% mx:CheckBox label={data.label} selected={data.selected}/ /mx:Component it gives me parser error. Can somebody throw some light?? Thanks ilikeflex
Re: [flexcoders] Re: Java/Flex questions answered by James Ward
Hi Mete You are 100% correct that i am using AMF Channel. I do not want to use HTTP Channel because then data has to be in XML format and it will make the request/response slow. At the same time i am using Remote Binding which will not be possible if i use HTTP Channel. But i put some time lag between the request then i am delaying the request. How much must be the time gap between the requests. Is anything recommended by flex experts??? Thanks for the response. -ilikeflex From: meteatamel meteata...@yahoo.com To: flexcoders@yahoogroups.com Sent: Saturday, August 15, 2009 5:13:29 PM Subject: [flexcoders] Re: Java/Flex questions answered by James Ward Are you using AMFChannel? AMFChannel uses NetConnection and NetConnection, by default, batches request that are close in a single POST. You can try to increase the time between requests or you can wait for a result/fault before sending the next request. If I remember correctly, HTTPChannel does not do this (it uses URLLoader), so you can try using HTTPChannel as well. -Mete --- In flexcod...@yahoogro ups.com, ilikeflex ilikef...@. .. wrote: Hi James I asked the question in StackOverflow. com but by mistake i tagged httprequest . Please answer this time and i will tag properly next time. Thanks ilikelfex --- In flexcod...@yahoogro ups.com, James Ward jaward@ wrote: This would be a great question to ask on StackOverflow. com. :) -James From: flexcod...@yahoogro ups.com [mailto:flexcod...@yahoogro ups.com] On Behalf Of ilikeflex Sent: Friday, August 14, 2009 1:59 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Re: Java/Flex questions answered by James Ward HI I am using Blazeds. At the start of my application i am making couple of request to get the data from the backend. I am tracking my request through Charles Debugger. I see that all my initial request are put together in one POST request. I want that each service call to backend be a different POST request. So that i can get the data fast. Please have a look at the screen shot.(http://4.bp. blogspot. com/_v7fXKpvsYl0 /SoW5_0lZl6I/ APg/ caJ1-RzjZAE/ s1600-h/Query. png) How can i achieve this? I am using the Remote Objec to make the calls indexProfileListRem oteObject = new RemoteObject( indexMasterDAO ); indexProfileListRem oteObject. addEventListener ( ResultEvent. RESULT, indexProfileListHan dler ); indexListRemoteObje ct = new RemoteObject( indexMasterDAO ); indexListRemoteObje ct.addEventListe ner( ResultEvent. RESULT, indexListHandler ); Thanks ilikeflex --- In flexcod...@yahoogro ups.commailto:flexcoders% 40yahoogroups. com, James Ward jaward@ wrote: Thanks for the plug. I'm using StackOverflow. com to manage the questions. Just tag them with riacowboy so that I can find them. I'm seeing a big shift from the Adobe forums, flexcoders, etc to Stack Overflow - so hopefully many here will start getting more involved in Stack Overflow. BTW: Here is the Ask The RIA Cowboy post: http://www.jamesward.com/blog/ask-the-ria-cowboy/ -James From: flexcod...@yahoogro ups.commailto:flexcoders% 40yahoogroups. com [mailto:flexcod...@yahoogro ups.commailto:flexcoders% 40yahoogroups. com] On Behalf Of hworke Sent: Friday, August 14, 2009 11:17 AM To: flexcod...@yahoogro ups.commailto:flexcoders% 40yahoogroups. com Subject: [flexcoders] Java/Flex questions answered by James Ward Hello Devs, James Ward the Technical Evangelist for Flex at Adobe encourages all to post RIA related questions in his blog. I asked him JAVA/LCDS questions before and got instant answer from him. If you have JAVA/BlazeDS/ LCDS related questions then you can post it here: http://www.jamesward.com/blog/
Re: [flexcoders] Getting session in Flex
Use FlexContext.getHttpRequest or something is above lines. thanks ilikeflex From: nhid nhi...@gmail.com To: flexcoders@yahoogroups.com Sent: Monday, June 8, 2009 5:07:33 PM Subject: [flexcoders] Getting session in Flex Hello, How do I get an HttpSession from Flex to pass to the java backend? Thank you for your help.
Re: [flexcoders] Label is npt displayed for LinButton as Itemrenderer
Hi Jeff You are right. I worked for me after your pointer. Thanks ilikeflex From: Jeffry Houser j...@farcryfly.com To: flexcoders@yahoogroups.com Sent: Monday, May 25, 2009 8:30:22 AM Subject: Re: [flexcoders] Label is npt displayed for LinButton as Itemrenderer It doesn't work like that. You're going to need to create your own class that extends the link button, and responds to the dataChange event to set the LinkButton's text as the label from your data Object. Code like this, basically, exists in the default itemRenderer. ilikeflex wrote: Hi I am using mx.controls. LinkButton as itemrenderer in datagrid. But the label is not displayed of the LinkButton. I am using the below sample code. I know it is very simple. I am missing something... Please help. Thanks ilikeflex ?xml version=1.0 encoding=utf- 8? mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml layout=vertical verticalAlign= top creationComplete= init() horizontalAlign= center backgroundGradientC olors=[0x00 ,0x323232] paddingTop= 0 viewSourceURL= srcview/ index.html mx:Script ![CDATA[ import mx.collections. ArrayCollection; [Bindable] public var collection:ArrayCol lection = new ArrayCollection( ); var processObject: Object = { label:Process1 , code1:1, code2:0}; var processObject2: Object = { label:Process2 , code1:0, code2:1}; public function init():void { collection.addItem( processObject) ; collection.addItem( processObject2) ; } ]] /mx:Script mx:DataGrid dataProvider= {collection} width=100% height=100% mx:columns mx:DataGridColumn dataField=label headerText= Process itemRenderer= mx.controls. LinkButton / /mx:columns /mx:DataGrid /mx:Application - - -- -- Flexcoders Mailing List FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder sFAQ.txt Alternative FAQ location: https://share. acrobat.com/ adc/document. do?docid= 942dbdc8- e469-446f- b4cf-1e62079f684 7 Search Archives: http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo! Groups Links -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl. com/684b5h http://www.twitter. com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras.com?c=104 -- http://www.theflexshow.com http://www.jeffryhouser.com -- Part of the DotComIt Brain Trust
Re: [flexcoders] BindingUtils question.
Try using BindingUtils.bindSetter and create function. From: markflex2007 markflex2...@yahoo.com To: flexcoders@yahoogroups.com Sent: Friday, May 22, 2009 5:07:21 PM Subject: [flexcoders] BindingUtils question. I read a demo BindingUtils. bindProperty( dogNameText, text, myDog, name) dogNameText is textInput and myDog is a object how to I bind dogNameText' s Texr property to one variable like myString BindingUtils. bindProperty( dogNameText, text, myString) give me error. Please give me a idea how to do this.Thanks Mark
Re: [flexcoders] Adobe Bug | http://bugs.adobe.com/jira/browse/SDK-17299
Hi Igor Thanks for your help. Actually i have a pop up in which i am using lot of components like Checkbox,Tree control, couple of text controls and few others. Everytime i create popup the new instance of the components are created. I wanted that if i can remove these components from memory then i would be great. Hope the statement below helps. PopUpManager. removePopUp( e.currentTarget. document as IFlexDisplayObject) ; thanks Rajan From: Igor Costa igorco...@gmail.com To: flexcoders@yahoogroups.com Sent: Tuesday, April 14, 2009 7:54:51 PM Subject: Re: [flexcoders] Adobe Bug | http://bugs.adobe.com/jira/browse/SDK-17299 Rajan Isn't a bug, Not a Bug the problem is the way of your code implementation works. The PopUpManager doesn't work to cast itself. Due to the dependecy of IFlexDisplayObject. Instead of current code example. NOT Right way //action1 if (myPopUp == null) { myPopUp = PopUpManager. createPopUp( this, MyMxmlComponent, false) as MyMxmlComponent; } else { PopUpManager. addPopUp( myPopUp, this, false); } //action1 if (!myPopUp.isPopUp) { myPopUp = PopUpManager. createPopUp( this, MyMxmlComponent, false) as MyMxmlComponent; } else { PopUpManager. addPopUp( myPopUp, this, false); } Remove you should do like PopUpManager. removePopUp( e.currentTarget. document as IFlexDisplayObject) ; regards Igor Costa On Tue, Apr 14, 2009 at 6:24 PM, ilikeflex ilikef...@yahoo. com wrote: Hi Adobe bug http://bugs.. adobe.com/ jira/browse/ SDK-17299 Does anybody has idea when Adobe is going to fix the above bug ot there is any workaround. Thanks Rajan -- - --- Igor Costa www.igorcosta. com www.igorcosta. org
Re: [flexcoders] ModuleLoader does not load module when instance is created as ModuleLoader()
Hi Alex It worked . Thanks Rajan From: Alex Harui [EMAIL PROTECTED] To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Sent: Saturday, November 8, 2008 11:59:22 PM Subject: RE: [flexcoders] ModuleLoader does not load module when instance is created as ModuleLoader() I would try Panel.addChild( mod2) From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of ilikeflex Sent: Friday, November 07, 2008 3:12 PM To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] ModuleLoader does not load module when instance is created as ModuleLoader( ) Hi I am trying to load module as show below. I am using panel.addChild( mod2.child) ; but i never see module loaded in the panel. It is very simple app.I do not know why the module is not being loaded . Any pointer is highly appreciated. I have been putting my head for last 4 hours. Thanks ilikeflex ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml layout=absolute mx:Script ![CDATA[ import mx.events.ModuleEve nt; import mx.modules.ModuleLo ader; import mx.events.ItemClick Event; public var mod2:ModuleLoader = new ModuleLoader( ); public function onNavBarClicked( event:ItemClickE vent):void { trace(function executed); var item:Object = event.item; mod2.url = String(item. module); mod2.loadModule( ); mod2.percentWidth = 100; mod2.percentHeight = 100; mod2.addEventListen er(ready, onReady); } public function onReady(event: ModuleEvent) :void { panel.addChild( mod2.child) ; } ]] /mx:Script mx:Array id=arr mx:Object label=Select Coverage/ mx:Object label=Life Insurance module=insurancemodules/ LifeInsurance. swf / mx:Object label=Auto Insurance module=insurancemodules/ AutoInsurance. swf / mx:Object label=Home Insurance module=insurancemodules/ HomeInsurance. swf / /mx:Array mx:LinkBar itemClick=onNavBarClicked( event) dataProvider={arr} / mx:Panel width=100% height=100% top=50 id=panel title=MainPanel/ /mx:Application
Re: [flexcoders] Icons are not displayed in menuItem
Hi Alex Thank you very much. It worked for both cases TestComponent.as and TestComponent.mxml. I added statement myMenu.document = this refers to TestComponent in which icons class are declared Thanks Rajan this; - Original Message From: Alex Harui [EMAIL PROTECTED] To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Sent: Monday, September 15, 2008 8:03:38 PM Subject: RE: [flexcoders] Icons are not displayed in menuItem I’m surprised it picked up the icon in systemManager. getDefinitionByN ame. It should have picked it up from document[icon] , which is what I mentioned several replies ago. If you used TestComponent. mxml instead of TestComponent. as, the document pointer would be correct. You can try setting the menu’s document to your TestComponent instance. From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Rajan Jain Sent: Monday, September 15, 2008 1:49 PM To: [EMAIL PROTECTED] ups.com Subject: Re: [flexcoders] Icons are not displayed in menuItem I looked into function itemToIcon in ListBase.as if(data is XML) { try { if(data[iconField] .length() != 0) { icon = String(data[ iconField] ); if(icon != null) { iconClass = Class(systemManager .getDefinitionBy Name(icon) ); if(iconClass) returniconClass; returndocument[icon] ; } } } catch(e:Error) { } } In this systemManager points to TestCodeBehind. mxml. If i declare variables in TestCodeBehind. mxml it works. mx:Script ![CDATA[ [Embed(source=assets/icon_ help.gif)] publicvar imgdeleteClass: Class; [Embed(source=assets/button_ edit.gif)] publicvar imgeditClass: Class; ]] /mx:Script but i cannot do this as these varibles need to be defined in TestComponent. as but i can change icon attribute in xml. So if reference can be made to TestComponent from systemManager then it will work. Please help me out. Thanks Rajan - Original Message From: Alex Harui [EMAIL PROTECTED] com To: [EMAIL PROTECTED] ups.com [EMAIL PROTECTED] ups..com Sent: Monday, September 15, 2008 2:06:26 PM Subject: RE: [flexcoders] Icons are not displayed in menuItem Object is a different code path. In XML, everything is strings and we have to convert them to classes. The key function is probably itemToIcon in ListBase.as From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Haykel BEN JEMIA Sent: Monday, September 15, 2008 2:06 AM To: [EMAIL PROTECTED] ups.com Subject: Re: [flexcoders] Icons are not displayed in menuItem I think the problem is else where, because when I use an array of objects to define the menu, the icons get displayed. I also displayed both menus at the same time and only the one defined from the array of objects shows the icons, so the icons are definitely in the document. Here is the code I used: public var myMenu2:Menu; public var myMD:Array = [ {label: Edit, eventName: copy, icon: imgeditClass} , {label: Delete, eventName: delete, icon: imgdeleteClass} ]; and in showMenufunction( ) : myMenu2=Menu. createMenu( this, myMD,false); myMenu2.show( 400, 200); Haykel On Mon, Sep 15, 2008 at 7:34 AM, Alex Harui [EMAIL PROTECTED] com wrote: I think the icons are not on the document. Try defining TestComponent in mxml and see if that makes a differenc.e From:[EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] On Behalf Of Rajan Jain Sent: Sunday, September 14, 2008 9:52 PM To: [EMAIL PROTECTED] ups.com Subject: Re: [flexcoders] Icons are not displayed in menuItem Hi All I am made custom component(TestComponent) which extends Panel and shown menu at start up. Code is very very simple but i do not know why the menu icons are not displayed. Any pointers are highly appreciated. See the code below and i have also attached code files as attachement. Thanks Rajan - - - - - - - - - - - - - - - - ?xml version=1.0 encoding=utf-8? mx:Applicationxmlns:mx=http://www.adobe. com/2006/ mxml layout=absolute xmlns:local=* local:TestComponentwidth=100% height=100% /local:TestComponen t /mx:Application - - - - - - - - - - - - - - - - package { importflash.events. Event; importmx.containers. Panel; importmx.controls. Menu; importmx.events.FlexEvent ; publicclass TestComponent extends Panel { publicvar myMenu:Menu; [Embed(source=assets/icon_ help.gif)] publicvar imgdeleteClass: Class; [Embed(source=assets/button_ edit.gif)] publicvar imgeditClass: Class; publicvar myMenuData:XML=menu menuitem label=Edit eventName=copy icon=imgdeleteClass / menuitem label=Delete eventName=paste icon=imgdeleteClass/ /menu; publicfunction TestComponent( ) { super(); addEventListener( FlexEvent. CREATION_ COMPLETE, showMenufunction
[flexcoders] UI Prototype Tool
Hi All I just wanted to know which tool do you use to prototyping the application before actually start coding in flex? Thanks Rajan
Re: [flexcoders] Icons are not displayed in menuItem
I looked into function itemToIcon in ListBase.as if { }(data isXML)try{ { icon = String(data[iconField]); { iconClass = Class(systemManager.getDefinitionByName(icon)); if(iconClass)returniconClass; returndocument[icon];catch(e:Error) In this systemManager points to TestCodeBehind.mxml. If i declare variables in TestCodeBehind.mxml it works. mx:Script![CDATA[ [ [ ]]Embed(source=assets/icon_help..gif)]publicvarimgdeleteClass:Class;Embed(source=assets/button_edit.gif)]publicvarimgeditClass:Class;/mx:Script but i cannot do this as these varibles need to be defined in TestComponent.as but i can change icon attribute in xml. So if reference can be made to TestComponent from systemManager then it will work. Please help me out. Thanks Rajan - Original Message From: Alex Harui [EMAIL PROTECTED] To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Sent: Monday, September 15, 2008 2:06:26 PM Subject: RE: [flexcoders] Icons are not displayed in menuItem Object is a different code path. In XML, everything is strings and we have to convert them to classes.. The key function is probably itemToIcon in ListBase.as From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Haykel BEN JEMIA Sent: Monday, September 15, 2008 2:06 AM To: [EMAIL PROTECTED] ups.com Subject: Re: [flexcoders] Icons are not displayed in menuItem I think the problem is else where, because when I use an array of objects to define the menu, the icons get displayed. I also displayed both menus at the same time and only the one defined from the array of objects shows the icons, so the icons are definitely in the document. Here is the code I used: public var myMenu2:Menu; public var myMD:Array = [ {label: Edit, eventName: copy, icon: imgeditClass} , {label: Delete, eventName: delete, icon: imgdeleteClass} ]; and in showMenufunction( ) : myMenu2=Menu. createMenu( this, myMD,false); myMenu2.show( 400, 200); Haykel On Mon, Sep 15, 2008 at 7:34 AM, Alex Harui [EMAIL PROTECTED] com wrote: I think the icons are not on the document. Try defining TestComponent in mxml and see if that makes a differenc.e From:[EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] On Behalf Of Rajan Jain Sent: Sunday, September 14, 2008 9:52 PM To: [EMAIL PROTECTED] ups.com Subject: Re: [flexcoders] Icons are not displayed in menuItem Hi All I am made custom component(TestComponent) which extends Panel and shown menu at start up. Code is very very simple but i do not know why the menu icons are not displayed. Any pointers are highly appreciated. See the code below and i have also attached code files as attachement. Thanks Rajan - - - - - - - - - - - - - - - - ?xml version=1.0 encoding=utf-8? mx:Applicationxmlns:mx=http://www.adobe. com/2006/ mxml layout=absolute xmlns:local=* local:TestComponentwidth=100% height=100% /local:TestComponen t /mx:Application - - - - - - - - - - - - - - - - package { importflash.events. Event; importmx.containers. Panel; importmx.controls. Menu; importmx.events.FlexEvent ; publicclass TestComponent extends Panel { publicvar myMenu:Menu; [Embed(source=assets/icon_ help.gif)] publicvar imgdeleteClass: Class; [Embed(source=assets/button_ edit.gif)] publicvar imgeditClass: Class; publicvar myMenuData:XML=menu menuitem label=Edit eventName=copy icon=imgdeleteClass / menuitem label=Delete eventName=paste icon=imgdeleteClass/ /menu; publicfunction TestComponent( ) { super(); addEventListener( FlexEvent. CREATION_ COMPLETE, showMenufunction ); } publicfunction showMenufunction( event:Event=null):void { if(myMenu == null) { myMenu=Menu. createMenu(this, myMenuData,false); myMenu.iconField=@icon; myMenu.labelField=@eventName; myMenu.show( 200,200); } } } } - Original Message From: Alex Harui [EMAIL PROTECTED] com To: [EMAIL PROTECTED] ups.com [EMAIL PROTECTED] ups.com Sent: Sunday, September 14, 2008 1:09:59 AM Subject: RE: [flexcoders] Icons are not displayed in menuItem I think it should just be ( no curlys ): mx:XML id=myMenuData root menuitem label=MenuItem 1 eventName=copy icon=imgdeleteClass/ menuitem label=MenuItem 2 eventName=paste icon=imgeditClass/ /root /mx:XML From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Rajan Jain Sent: Saturday, September 13, 2008 8:55 PM To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] Icons are not displayed in menuItem Hi All I am trying to display icon in the menu. I am using example from livedocs language reference. I have added icon attribute to dataprovider myMenu.iconField=@icon but icons
Re: [flexcoders] Icons are not displayed in menuItem
Hi All I am made custom component(TestComponent) which extends Panel and shown menu at start up. Code is very very simple but i do not know why the menu icons are not displayed. Any pointers are highly appreciated. See the code below and i have also attached code files as attachement. Thanks Rajan ?xml version=1.0 encoding=utf-8?mx:Applicationxmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute xmlns:local=*local:TestComponentwidth=100% height=100%/mx:Application/local:TestComponent package{ { [ [ menuitem label=Edit eventName=copy icon=imgdeleteClass / menuitem label=Delete eventName=paste icon=imgdeleteClass/ /menu; { addEventListener(FlexEvent.CREATION_COMPLETE,showMenufunction); }importflash.events.Event;importmx.containers.Panel;importmx.controls.Menu;importmx.events.FlexEvent;publicclassTestComponent extendsPanelpublicvarmyMenu:Menu;Embed(source=assets/icon_help.gif)]publicvarimgdeleteClass:Class;Embed(source=assets/button_edit.gif)]publicvarimgeditClass:Class;publicvarmyMenuData:XML=menupublicfunctionTestComponent() super();publicfunctionshowMenufunction(event:Event=null):void{ { myMenu=Menu..createMenu( myMenu.iconField= myMenu.labelField= myMenu.show(200,200); } } } }if(myMenu == null)this, myMenuData,false);@icon;@eventName; - Original Message From: Alex Harui [EMAIL PROTECTED] To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Sent: Sunday, September 14, 2008 1:09:59 AM Subject: RE: [flexcoders] Icons are not displayed in menuItem I think it should just be ( no curlys ): mx:XML id=myMenuData root menuitem label=MenuItem 1 eventName=copy icon=imgdeleteClass/ menuitem label=MenuItem 2 eventName=paste icon=imgeditClass/ /root /mx:XML From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Rajan Jain Sent: Saturday, September 13, 2008 8:55 PM To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] Icons are not displayed in menuItem Hi All I am trying to display icon in the menu. I am using example from livedocs language reference. I have added icon attribute to dataprovider myMenu.iconField=@icon but icons are not displayed. Any pointers are highly appreciated. Thanks Rajan - - - - - - - - - - - - - - - - Complete Source Code- ?xml version=1..0? !-- Simple example to demonstrate the Menu control. -- mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml mx:Script ![CDATA[ import mx.controls. Menu; import mx.events.MenuEvent ; import mx.controls. Alert; impo! rt flash.geom.Point; [Bindable] [Embed(source=assets/icon_ help.gif)] public var imgdeleteClass: Class; [Bindable] [Embed(source=assets/button_ edit.gif)] public var imgeditClass: Class; private var point1:Point = new Point(); private var myMenu:Menu; // Create and display the Menu control. private function showMenu():void { myMenu= Menu.createMenu( panel, myMenuData, false); myMenu.labelField=@label myMenu.iconField=@icon; myMenu.addEventList ener(itemClick, menuHandler) ; // Calculate position of Menu in Application' s coordinates. point1.x=mybutton. x; point1.y=mybutton. y; point1=mybutton. localToGlobal( point1); myMenu.show( point1.x + 25, point1.y + 25); } // Event handler for the Menu control's change event. private function menuHandler( event:MenuEvent) :void { Alert.show(Label: + event.item.@ label, Clicked menu item); } ]] /mx:Script mx:XML id=myMenuData root menuitem label=MenuItem 1 eventName=copy icon={imgdeleteClass}/ menuitem label=MenuItem 2 eventName=paste icon={imgeditClass}/ /root /mx:XML mx:Panel id=panel title=Menu Control Example height=75% width=75% paddingTop=10 paddingLeft=10 mx:Label width=100% color=blue text=Click the button to open the Menu control./ mx:Button id=mybutton label=Open Menu click=showMenu
[flexcoders] Icons are not displayed in menuItem
Hi All I am trying to display icon in the menu. I am using example from livedocs language reference. I have added icon attribute to dataprovider myMenu.iconField=@icon but icons are not displayed. Any pointers are highly appreciated. Thanks Rajan Complete Source Code- ?xml version=1.0? !-- Simple example to demonstrate the Menu control. -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ import mx.controls.Menu; import mx.events.MenuEvent; import mx.controls.Alert; import flash.geom.Point; [Bindable] [Embed(source=assets/icon_help.gif)] public var imgdeleteClass:Class; [Bindable] [Embed(source=assets/button_edit.gif)] public var imgeditClass:Class; private var point1:Point = new Point(); private var myMenu:Menu; // Create and display the Menu control. private function showMenu():void { myMenu= Menu.createMenu(panel, myMenuData, false); myMenu.labelField=@label myMenu..iconField=@icon; myMenu.addEventListener(itemClick, menuHandler); // Calculate position of Menu in Application's coordinates. point1.x=mybutton.x; point1.y=mybutton.y; point1=mybutton.localToGlobal(point1); myMenu.show(point1.x + 25, point1.y + 25); } // Event handler for the Menu control's change event. private function menuHandler(event:MenuEvent):void { Alert.show(Label: + [EMAIL PROTECTED], Clicked menu item); } ]] /mx:Script mx:XML id=myMenuData root menuitem label=MenuItem 1 eventName=copy icon={imgdeleteClass}/ menuitem label=MenuItem 2 eventName=paste icon={imgeditClass}/ /root /mx:XML mx:Panel id=panel title=Menu Control Example height=75% width=75% paddingTop=10 paddingLeft=10 mx:Label width=100% color=blue text=Click the button to open the Menu control./ mx:Button id=mybutton label=Open Menu click=showMenu();/ /mx:Panel /mx:Application
[flexcoders] AdvancedDataGrid | totals | Hierachicalata
Hi Is mx:rendererProviders tag inside mx:AdvancedDatagrid can be used with HierarchicalData only? I don't have HierarchicalData and i want to show the totals in the grid. I have the xml in the format. But if i use the piece of code at bottom end then render is never executed. Can anybody explain me why is this hapeningemployees totals salary1/salary employees2/employees /totals employee firstnameRajan/firstname lastnameJain/lastname addressIndia/address salary1000/salary /employee employee firstnameRajan2/firstname lastnameJain/lastname addressIndia/address salary9000/salary /employee /employees ---mx:XMLid=employessDataBase source=../database/database1.xml/mx:AdvancedDataGridx=46 y=44 width=552 dataProvider={employessDataBase.employee}mx:columnsmx:AdvancedDataGridColumndataField=lastname sortable=false /mx:AdvancedDataGridColumndataField=firstname sortable=false /mx:AdvancedDataGridColumndataField=address sortable=false/mx:AdvancedDataGridColumndataField=salary sortable=false //mx:columnsmx:rendererProvidersdataField= columnIndex= columnSpan= rowSpan= renderer=mx:AdvancedDataGridRendererProvideremployessDataBase.totals 14 1learn.too.develop.renderer.showTotal//mx:rendererProviders/mx:AdvancedDataGrid ---
Re: [flexcoders] flex testing
Try http://code.google.com/p/visualflexunit/ - Original Message From: phil swenson [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, July 16, 2008 12:59:56 AM Subject: [flexcoders] flex testing Any thoughts on testing the Flex UI? I tried FunFX, but it crashed immediately after lanching safari (I'm on a mac). After looking at FlexSPY, it seems to me that it should be possible to do flex testing without native code. any thoughts?
Re: [flexcoders] Cast XMLList with 1 child to XML
Hi I think it is better to use XMLList.length(). IF you one child it will be 1. Hope this helps. Thanks ilikeflex - Original Message From: Sergey Kovalyov [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Monday, July 14, 2008 1:50:26 AM Subject: [flexcoders] Cast XMLList with 1 child to XML Hi All! Is it correct to cast XMLList with 1 child to XML like this: var myXMLList : XMLList = sourceXML..item. (@id == 1); // It is guaranteed that only one node with name == item and attribute id == 1 exists in sourceXML. var myXML : XML = XML(myXMLList) ; Actually it works and it fails only when I change the sourceXML thus there are more then one node with name == item and attribute id == 1 in it. In this case exception is thrown. But I would like to know is it correct approach in general or not. Sergey.