Re: [flexcoders] Re: modify item before binding to datagrid
Thanks Valdhor and Thanks to Mark for all your help. I finally got this to work. Kind regards. Angelo From: valdhor valdhorli...@embarqmail.com To: flexcoders@yahoogroups.com Sent: Saturday, 23 May, 2009 2:07:18 Subject: [flexcoders] Re: modify item before binding to datagrid This is how I would do it.. mx:DataGrid id=MydataGrid creationComplete= getGridData( ); width=100% height=100% visible=false dataProvider= {_xmlData. *} itemClick=getDataI tems(); mx:columns mx:DataGridColumn headerText= ID dataField=Supplier ID width=30 sortCompareFunction =IDCompare / mx:DataGridColumn headerText= Company Name dataField=CompanyN ame width=100/ mx:DataGridColumn headerText= Contact Name dataField=ContactN ame width=100/ mx:DataGridColumn headerText= Contact Title dataField=ContactT itle width=50/ mx:DataGridColumn headerText= Address dataField=Address width=150/ /mx:columns /mx:DataGrid private function IDCompare(itemA: Object, itemB:Object) :int { return ObjectUtil.numericC ompare(itemA.SupplierID, itemB.SupplierID); } --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi Mark, Thanks for your patience. I did write the import code for the ObjectUtil class. But I still cannot get things properly. In your code, you have this.. return ObjectUtil.numericC ompare(itemA[ TrackTotal. col], itemB[TrackTotal. col]); my dataGrid's ID is MydataGrid what does the col pertains to? the column id defined for the datagrid? Here's my datagrid mxml mx:DataGrid id=MydataGrid creationComplete= getGridData( ); width=100% height=100% visible=false dataProvider= {_xmlData. *} itemClick=getDataI tems(); mx:columns mx:DataGridColumn headerText= ID dataField=Supplier ID width=30/ mx:DataGridColumn headerText= Company Name dataField=CompanyN ame width=100/ mx:DataGridColumn headerText= Contact Name dataField=ContactN ame width=100/ mx:DataGridColumn headerText= Contact Title dataField=ContactT itle width=50/ mx:DataGridColumn headerText= Address dataField=Address width=150/ /mx:columns /mx:DataGrid The SupplierID is the numeric column. But when I tried private function sortNumericColumn( itemA:Object, itemB:Object) : int { return ObjectUtil.numericC ompare(itemA[ MydataGrid. SupplierID] , itemB[MydataGrid. SupplierID] ); } in the function you gave, I am getting the error: Access of possibly undefined property SupplierID through a reference with static type mx.controls: DataGrid Thanks a bunch for your patience. _ _ __ From: markgoldin_2000 markgoldin_2000@ ... To: flexcod...@yahoogro ups.com Sent: Friday, 22 May, 2009 21:51:55 Subject: [flexcoders] Re: modify item before binding to datagrid Of cource I meant: import mx.utils.ObjectUtil ; --- In flexcod...@yahoogro ups.com, markgoldin_ 2000 markgoldin_ 2000@ wrote: How about import.utils. ObjectUtil; --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ wrote: Hi Mark, I cannot seem to get your code working for me.. I am getting this error: Access of Undefined Property ObjectUtil.. I am trying to simply copy the function which you have posted. Any further advise? _ _ __ From: markgoldin_2000 markgoldin_ 2000@ To: flexcod...@yahoogro ups.com Sent: Wednesday, 20 May, 2009 21:52:25 Subject: [flexcoders] Re: modify item before binding to datagrid Here is what I am doing. column definition: mx:DataGridColumn headerText= Block dataField=tcbkcd sortCompareFunction =sortNumericCol umnTrackTotal / and: private function sortNumericColumnTr ackTotal( itemA:Object, itemB:Object) :int { return ObjectUtil.numericC ompare(itemA[ TrackTotal. col], itemB[TrackTotal. col]); } where TrackTotal is a DG's id. HTH --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi. I am quite new in Flex and would like to ask a simple question. I am retrieving datasets from a .NET webservice and binding the same to a datagrid. The datagrid comes with a feature that when you click on any of the headers, the column is sorted ASC or DESC. Now, one column which I am binding to is originally a numeric column. But when it binds to the datagrid, it's data type becomes string. Is it possible that prior to binding the said column to the datagrid, I would be able to convert it back to its numeric data taype? Since sorting the
[flexcoders] Flex Coding Standards
Hi FlexCoders, Would someone be kind enough to share their coding standards relative to flex development? I am starting Flex and I would want to at least follow good standard(s) especially on coding side. Thanks and best regards. Angelo
[flexcoders] Newbie Question - databinding an arrayCollection to a List Control
Hello, I've been reading a lot of information on databinding and I'm still a little confused on how to execute it and when is it necessary. I have a simple list control of names that I create by adding to an array collection that I use as the List's dataprovider. when I add a name to the array the list updates automatically as I would suspect I also have associated with the names is a status attribute (absent or present) that I use to determine which icon to display next to the name using IconFunction property of the List control. I have a contextual menu bound to the list control that allows the user to right click on a name to change the status and thus the icon. This is where I have the problem and can't figure out what to do. The contextual menu works in that the status will change in the arraycollection (i check and see that it does) however I can't get the iconFunction to reevaluate the new value to display the proper icon. I've read in many postings or similar examples on line that I have to create an event listener and an event for the collection change event. This is where I am a little fuzzy in the execution - assuming this is teh correct solution. I've also peripherally read about setter and getter functions but I don't even know where to begin with this aspect. I would appreciate any help with this. here is what I have in terms of code: for my List Control: mx:List id=absentee dataProvider={absentItems} labelField=name iconFunction={myIconFunction} contextMenu={cm}/ for my arrayCollection: [Bindable] public var absentItems:ArrayCollection = new ArrayCollection(); I add to the arrayCollection: private function addAbsentee():void { var tmp:Object = new Object(); tmp = ({name:ac.selectedItem.name, status:absent}); absentItems.addItem(tmp); } my iconFunction is just a switch statement that changes icons based on the text value of status (either absent or present) private function myIconFunction(item:Object):Class { var value:String = item.status.toString(); switch(value) { case absent: return Aicon; break; case vacation: return Vicon; break; case late: return Licon; break; } return null; } the contextual menu functions just changes the status for example: private function makeAbsent(evt:ContextMenuEvent):void { absentee.selectedItem.status = absent; } 1. I don't understand why the list updates when I update the arraycollection with new items but not when I change a specific property of an array. 2. If I add and event do I add it to the arraycollection and the listener to the List control, or is it vice-versa. Also what is the function/method that I add to make the list control update the draw on the icon. 3. Is there a better way to do this, ie., use an xml format instead of a an arraycollection? Is there an article with examples that is really clear about explaining all this. I am confused as to some things I've read that says xmlcollections and arraycollections are not good choices for databinding. Thanks! be well, hoyt
[flexcoders] Swap Data Provider with a combo
Hello, I have a combo with two items. For each Item I want to have a specific data provider for a tile list. How to swap the data provider of a tile list. Thank you, Christophe
Re: [flexcoders] Swap Data Provider with a combo
put an if condition which checks for combobox.selectedItem and change the dataProvider accordingly. On Sun, May 24, 2009 at 3:08 PM, christophe_jacquelin christophe_jacque...@yahoo.fr wrote: Hello, I have a combo with two items. For each Item I want to have a specific data provider for a tile list. How to swap the data provider of a tile list. Thank you, Christophe
[flexcoders] Re: Swap Data Provider with a combo
here tileListDataProvider is a tilelist which gets data from MySql and categoryCombo is combobox which also gets data from MySql look filter image function where it is return new xmlList ..and item.(category == categoryCombo.selectedLabel) put your login in the bracket i used mine when combo box selected label match the tilelist one item name category /* private function filterImage(item:XML):Boolean { var xList:XMLList = new XMLList(); xList = item.(category == categoryCombo.selectedLabel); if(xList.length() 0) { return true; } else { return false; } } private function filterTileListData(e:ListEvent):void { if (categoryCombo.selectedLabel !== All categoryCombo.selectedLabel !== ) { tileListDataProvider.filterFunction = filterImage; } else { tileListDataProvider.filterFunction = null; } tileListDataProvider.refresh(); } /*/
[flexcoders] Re: Swap Data Provider with a combo
here tileListDataProvider is a tilelist which gets data from MySql and categoryCombo is combobox which also gets data from MySql look filter image function where it is return new xmlList ..and item.(category == categoryCombo.selectedLabel) put your login in the bracket i used mine when combo box selected label match the tilelist one item name category /* private function filterImage(item:XML):Boolean { var xList:XMLList = new XMLList(); xList = item.(category == categoryCombo.selectedLabel); if(xList.length() 0) { return true; } else { return false; } } private function filterTileListData(e:ListEvent):void { if (categoryCombo.selectedLabel !== All categoryCombo.selectedLabel !== ) { tileListDataProvider.filterFunction = filterImage; } else { tileListDataProvider.filterFunction = null; } tileListDataProvider.refresh(); } /*/
[flexcoders] Default font in Flex Builder
Hello, What is the default font used in the interface by Flex Builder 3 ? Thank you, Christophe,
Re: [flexcoders] Flex Coding Standards
Hope this helps http://blog.dclick.com.br/2007/02/13/adobe_flex_coding_guidelines_english/pt/ I'm currently basing my coding standards from there :) On Sun, May 24, 2009 at 2:04 PM, Angelo Anolin angelo_ano...@yahoo.comwrote: Hi FlexCoders, Would someone be kind enough to share their coding standards relative to flex development? I am starting Flex and I would want to at least follow good standard(s) especially on coding side. Thanks and best regards. Angelo
Re: [flexcoders] Flex Coding Standards
The conventions/standards/guidelines for Flex SDK are here - http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions 2009/5/25 Romeo Obane ro...@vhubs.com: Hope this helps http://blog.dclick.com.br/2007/02/13/adobe_flex_coding_guidelines_english/pt/ I'm currently basing my coding standards from there :) On Sun, May 24, 2009 at 2:04 PM, Angelo Anolin angelo_ano...@yahoo.com wrote: Hi FlexCoders, Would someone be kind enough to share their coding standards relative to flex development? I am starting Flex and I would want to at least follow good standard(s) especially on coding side. Thanks and best regards. Angelo
[flexcoders] Multiple events dispatched, data lost
I have a function which loops and for each iteration dispatches an event. The event handler is inside a new class (AddSourceCommand). Inside the event handler class I am dispatching another event which is being handled by a function inside the same class. There's a variable that originates from the initial function, is passed to the first event handler via the event, and then passed to the second event handler via the second event. The variable changes each time it is sent to the first event. The first event handler is receiving the variable correctly. (It changes each time.) But for some reason the second event handler always receives the last variable sent, every time. How do I get the second event handler to receive the correct variable? See code below. It's almost as if the configureSource handler is called every time by the last instantiation of the AddSourceCommand class. But I thought by creating a new AddSourceCommand instantiation, like I did below, should take care of that. ImportAllFlickrSetsCommand.as -- public function ImportAllFlickrSetsCommand() { this.addEventListener(AddSourceEvent.ADD_FLICKR_SET,(new AddSourceCommand()).execute); } public function execute(event:ImportAllFlickrSetsEvent):void { for each(var phSet:PhotoSet in data.photoSets) { newAlbum = stuffToGetNewAlbum(); dispatchEvent(new AddSourceEvent(AddSourceEvent.ADD_FLICKR_SET, newAlbum, phSet.title, phSet.id)); } // the above 'for each' will execute 4 times. // the newAlbum variable sends the album that is unpacked in the AddSourceCommand below. // newAlbum.name is album1, album2, album3, album4 in the 1st, 2nd, 3rd, and 4th 'for each' iteration } AddSourceCommand.as import com.adobe.webapis.flickr.FlickrService; import com.adobe.webapis.flickr.Photo; import com.adobe.webapis.flickr.events.FlickrResultEvent; private var flickr:FlickrService = new FlickrService(data.API_KEY); private var albumForSource:Album; public function AddSourceCommand() { flickr.addEventListener(FlickrResultEvent.PHOTOSETS_GET_PHOTOS, configureSource); } public function execute(event:AddSourceEvent):void { albumForSource = event.album; trace(albumForSource from execute: + albumForSource.name); flickr.photosets.getPhotos(event.id); // retrieves photos from flickr apr. dispatches FlickrResultEvent when done. } private function configureSource(event:FlickrResultEvent):void { trace(albumForSource from configureSource: + albumForSource.name); } OUTPUT albumForSource from execute: album1 albumForSource from execute: album2 albumForSource from execute: album3 albumForSource from execute: album4 albumForSource from configureSource: album4 albumForSource from configureSource: album4 albumForSource from configureSource: album4 albumForSource from configureSource: album4 DESIRED OUTPUT albumForSource from execute: album1 albumForSource from execute: album2 albumForSource from execute: album3 albumForSource from execute: album4 albumForSource from configureSource: album1 albumForSource from configureSource: album2 albumForSource from configureSource: album3 albumForSource from configureSource: album4 ascii
[flexcoders] Re: Multiple events dispatched, data lost
Hi Steve, What's going on in stuffToGetNewAlbum()? -TH --- In flexcoders@yahoogroups.com, steve horvath flexcod...@... wrote: I have a function which loops and for each iteration dispatches an event. The event handler is inside a new class (AddSourceCommand). Inside the event handler class I am dispatching another event which is being handled by a function inside the same class. There's a variable that originates from the initial function, is passed to the first event handler via the event, and then passed to the second event handler via the second event. The variable changes each time it is sent to the first event. The first event handler is receiving the variable correctly. (It changes each time.) But for some reason the second event handler always receives the last variable sent, every time. How do I get the second event handler to receive the correct variable? See code below. It's almost as if the configureSource handler is called every time by the last instantiation of the AddSourceCommand class. But I thought by creating a new AddSourceCommand instantiation, like I did below, should take care of that. ImportAllFlickrSetsCommand.as -- public function ImportAllFlickrSetsCommand() { this.addEventListener(AddSourceEvent.ADD_FLICKR_SET,(new AddSourceCommand()).execute); } public function execute(event:ImportAllFlickrSetsEvent):void { for each(var phSet:PhotoSet in data.photoSets) { newAlbum = stuffToGetNewAlbum(); dispatchEvent(new AddSourceEvent(AddSourceEvent.ADD_FLICKR_SET, newAlbum, phSet.title, phSet.id)); } // the above 'for each' will execute 4 times. // the newAlbum variable sends the album that is unpacked in the AddSourceCommand below. // newAlbum.name is album1, album2, album3, album4 in the 1st, 2nd, 3rd, and 4th 'for each' iteration } AddSourceCommand.as import com.adobe.webapis.flickr.FlickrService; import com.adobe.webapis.flickr.Photo; import com.adobe.webapis.flickr.events.FlickrResultEvent; private var flickr:FlickrService = new FlickrService(data.API_KEY); private var albumForSource:Album; public function AddSourceCommand() { flickr.addEventListener(FlickrResultEvent.PHOTOSETS_GET_PHOTOS, configureSource); } public function execute(event:AddSourceEvent):void { albumForSource = event.album; trace(albumForSource from execute: + albumForSource.name); flickr.photosets.getPhotos(event.id); // retrieves photos from flickr apr. dispatches FlickrResultEvent when done. } private function configureSource(event:FlickrResultEvent):void { trace(albumForSource from configureSource: + albumForSource.name); } OUTPUT albumForSource from execute: album1 albumForSource from execute: album2 albumForSource from execute: album3 albumForSource from execute: album4 albumForSource from configureSource: album4 albumForSource from configureSource: album4 albumForSource from configureSource: album4 albumForSource from configureSource: album4 DESIRED OUTPUT albumForSource from execute: album1 albumForSource from execute: album2 albumForSource from execute: album3 albumForSource from execute: album4 albumForSource from configureSource: album1 albumForSource from configureSource: album2 albumForSource from configureSource: album3 albumForSource from configureSource: album4 ascii
[flexcoders] Re: Multiple events dispatched, data lost
Nevermind, was looking at it backwards. Usually, you would go through the FrontController, with a second command, for the second Event. -TH --- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote: Hi Steve, What's going on in stuffToGetNewAlbum()? -TH --- In flexcoders@yahoogroups.com, steve horvath flexcoders@ wrote: I have a function which loops and for each iteration dispatches an event. The event handler is inside a new class (AddSourceCommand). Inside the event handler class I am dispatching another event which is being handled by a function inside the same class. There's a variable that originates from the initial function, is passed to the first event handler via the event, and then passed to the second event handler via the second event. The variable changes each time it is sent to the first event. The first event handler is receiving the variable correctly. (It changes each time.) But for some reason the second event handler always receives the last variable sent, every time. How do I get the second event handler to receive the correct variable? See code below. It's almost as if the configureSource handler is called every time by the last instantiation of the AddSourceCommand class. But I thought by creating a new AddSourceCommand instantiation, like I did below, should take care of that. ImportAllFlickrSetsCommand.as -- public function ImportAllFlickrSetsCommand() { this.addEventListener(AddSourceEvent.ADD_FLICKR_SET,(new AddSourceCommand()).execute); } public function execute(event:ImportAllFlickrSetsEvent):void { for each(var phSet:PhotoSet in data.photoSets) { newAlbum = stuffToGetNewAlbum(); dispatchEvent(new AddSourceEvent(AddSourceEvent.ADD_FLICKR_SET, newAlbum, phSet.title, phSet.id)); } // the above 'for each' will execute 4 times. // the newAlbum variable sends the album that is unpacked in the AddSourceCommand below. // newAlbum.name is album1, album2, album3, album4 in the 1st, 2nd, 3rd, and 4th 'for each' iteration } AddSourceCommand.as import com.adobe.webapis.flickr.FlickrService; import com.adobe.webapis.flickr.Photo; import com.adobe.webapis.flickr.events.FlickrResultEvent; private var flickr:FlickrService = new FlickrService(data.API_KEY); private var albumForSource:Album; public function AddSourceCommand() { flickr.addEventListener(FlickrResultEvent.PHOTOSETS_GET_PHOTOS, configureSource); } public function execute(event:AddSourceEvent):void { albumForSource = event.album; trace(albumForSource from execute: + albumForSource.name); flickr.photosets.getPhotos(event.id); // retrieves photos from flickr apr. dispatches FlickrResultEvent when done. } private function configureSource(event:FlickrResultEvent):void { trace(albumForSource from configureSource: + albumForSource.name); } OUTPUT albumForSource from execute: album1 albumForSource from execute: album2 albumForSource from execute: album3 albumForSource from execute: album4 albumForSource from configureSource: album4 albumForSource from configureSource: album4 albumForSource from configureSource: album4 albumForSource from configureSource: album4 DESIRED OUTPUT albumForSource from execute: album1 albumForSource from execute: album2 albumForSource from execute: album3 albumForSource from execute: album4 albumForSource from configureSource: album1 albumForSource from configureSource: album2 albumForSource from configureSource: album3 albumForSource from configureSource: album4 ascii
[flexcoders] Re: Multiple events dispatched, data lost
Actually yes, what's going on with phSet.id in stuffToGetNewAlbum()? Add a second trace for that field. -TH --- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote: Nevermind, was looking at it backwards. Usually, you would go through the FrontController, with a second command, for the second Event. -TH --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote: Hi Steve, What's going on in stuffToGetNewAlbum()? -TH --- In flexcoders@yahoogroups.com, steve horvath flexcoders@ wrote: I have a function which loops and for each iteration dispatches an event. The event handler is inside a new class (AddSourceCommand). Inside the event handler class I am dispatching another event which is being handled by a function inside the same class. There's a variable that originates from the initial function, is passed to the first event handler via the event, and then passed to the second event handler via the second event. The variable changes each time it is sent to the first event. The first event handler is receiving the variable correctly. (It changes each time.) But for some reason the second event handler always receives the last variable sent, every time. How do I get the second event handler to receive the correct variable? See code below. It's almost as if the configureSource handler is called every time by the last instantiation of the AddSourceCommand class. But I thought by creating a new AddSourceCommand instantiation, like I did below, should take care of that. ImportAllFlickrSetsCommand.as -- public function ImportAllFlickrSetsCommand() { this.addEventListener(AddSourceEvent.ADD_FLICKR_SET,(new AddSourceCommand()).execute); } public function execute(event:ImportAllFlickrSetsEvent):void { for each(var phSet:PhotoSet in data.photoSets) { newAlbum = stuffToGetNewAlbum(); dispatchEvent(new AddSourceEvent(AddSourceEvent.ADD_FLICKR_SET, newAlbum, phSet.title, phSet.id)); } // the above 'for each' will execute 4 times. // the newAlbum variable sends the album that is unpacked in the AddSourceCommand below. // newAlbum.name is album1, album2, album3, album4 in the 1st, 2nd, 3rd, and 4th 'for each' iteration } AddSourceCommand.as import com.adobe.webapis.flickr.FlickrService; import com.adobe.webapis.flickr.Photo; import com.adobe.webapis.flickr.events.FlickrResultEvent; private var flickr:FlickrService = new FlickrService(data.API_KEY); private var albumForSource:Album; public function AddSourceCommand() { flickr.addEventListener(FlickrResultEvent.PHOTOSETS_GET_PHOTOS, configureSource); } public function execute(event:AddSourceEvent):void { albumForSource = event.album; trace(albumForSource from execute: + albumForSource.name); flickr.photosets.getPhotos(event.id); // retrieves photos from flickr apr. dispatches FlickrResultEvent when done. } private function configureSource(event:FlickrResultEvent):void { trace(albumForSource from configureSource: + albumForSource.name); } OUTPUT albumForSource from execute: album1 albumForSource from execute: album2 albumForSource from execute: album3 albumForSource from execute: album4 albumForSource from configureSource: album4 albumForSource from configureSource: album4 albumForSource from configureSource: album4 albumForSource from configureSource: album4 DESIRED OUTPUT albumForSource from execute: album1 albumForSource from execute: album2 albumForSource from execute: album3 albumForSource from execute: album4 albumForSource from configureSource: album1 albumForSource from configureSource: album2 albumForSource from configureSource: album3 albumForSource from configureSource: album4 ascii
Re: [flexcoders] TextArea not working as Custom Item Renderer
I will quote from eariler post of Manish Jetani from flexcomponents mail conference If you want your item renderer to affect the height of the row set correct measuredHeight in measure() method http://www.mail-archive.com/flexcompone...@yahoogroups.com/msg02972.html If you are not confident with how to set measuredHeight in your custom itemRenderer, you can change rowHeight property of you listBase control (List or Datagrid) to a some greater value that will be good enough for you than default 21 pixels. -- Best regards, Andriy Panas 2009/5/23 Laurence MacNeill lmacne...@comcast.net: I have a TextArea that I'm using as a custom ItemRenderer. Problem is, it's not showing all the lines of the data -- only the first one. I can set the height to anything, and it's always just high enough to see only the first line of the text.
[flexcoders] How to determine the minimum container size while scroll bars still not needed
Hi All! There is mx_internal::getScrollableRect() method and the value it returns does not change when you make the container smaller at some moment when scroll bars appears. But I need to know those values at any given time. Finally what I want to achieve is to have resize handle in the right bottom corner that allows to resize the container, but does not allow to make it smaller than the size when all children fit and no scroll bars are needed. Any ideas? Sergey.
[flexcoders] list itemrenderer
Hi, Is there a possibility to do some code differently in a drag proxy instance of itemRenderer ? thomas --- http://www.web-attitude.fr/ msn : thomas.parqu...@web-attitude.fr softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net téléphone portable : +33601 822 056
[flexcoders] itunes clipboard format not understood in AIR
Hi there, I've been trying to drag a song from itunes into my app, but the clipboard (in AIR) doesn't seem to have any format acceptable to AIR. Does anyone have any idea how to overcome this? thanks! Paul
Re: [flexcoders] Flex Coding Standards
@Sam and @Romeo Thanks for the links. Those would surely help me get started further and know that I am following good coding conventions. Regards, Angelo From: Sam Lai samuel@gmail.com To: flexcoders@yahoogroups.com Sent: Monday, 25 May, 2009 0:11:34 Subject: Re: [flexcoders] Flex Coding Standards The conventions/ standards/ guidelines for Flex SDK are here - http://opensource. adobe.com/ wiki/display/ flexsdk/Coding+ Conventions 2009/5/25 Romeo Obane ro...@vhubs. com: Hope this helps http://blog. dclick.com. br/2007/02/ 13/adobe_ flex_coding_ guidelines_ english/pt/ I'm currently basing my coding standards from there :) On Sun, May 24, 2009 at 2:04 PM, Angelo Anolin angelo_anolin@ yahoo.com wrote: Hi FlexCoders, Would someone be kind enough to share their coding standards relative to flex development? I am starting Flex and I would want to at least follow good standard(s) especially on coding side. Thanks and best regards. Angelo
Re: [flexcoders] Flex Coding Standards
On Sun, May 24, 2009 at 9:41 PM, Sam Lai samuel@gmail.com wrote: The conventions/standards/guidelines for Flex SDK are here - http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions One of the things the document doesn't mention is the order of the private, protected, and public definitions in a class. Here's the order: 1. Private properties 2. Protected properties 3. Public properties 4. Public methods 5. Protected methods 6. Private methods Manish
Re: [flexcoders] Multiple events dispatched, data lost
On Mon, May 25, 2009 at 12:59 AM, steve horvath flexcod...@stevehorvath.com wrote: I have a function which loops and for each iteration dispatches an event. The event handler is inside a new class (AddSourceCommand). Inside the event handler class I am dispatching another event which is being handled by a function inside the same class. There's a variable that originates from the initial function, is passed to the first event handler via the event, and then passed to the second event handler via the second event. The variable changes each time it is sent to the first event. The first event handler is receiving the variable correctly. (It changes each time.) But for some reason the second event handler always receives the last variable sent, every time. What does flickr.photosets.getPhotos() do? Does it go to the Flickr server to fetch the data asynchronously? Obviously you have only one instance of AddSourceCommand in your program, so you have only one copy of the albumForSource variable. It retains the reference to the last object that is assigned to it and that's what you get in configureSource() Why not call execute() directly on a new instance of AddSourceCommand each time, instead of have it called through an event? Manish
Re: [flexcoders] NEED more than 15 menu item in Context Menu ????
Is the Flex app loaded in the IE ActiveX control, or the Flash Player ActiveX control? If it is IE, any of the tricks to hide the context menu in the normal IE browser should work. Never tried doing this myself though. On 5/23/09, Dharmendra Chauhan chauhan_i...@yahoo.com wrote: Thanks Lot for the Reply. My FLex Application is not running inside browser , It is running inside DOt Net container as a Active X control. the idea you suggested required default context menu to be hidden ..is it possible to hide it ? If yes then I Can open some custom window on right click and design. I am not sure how concrete this idea is.. --- In flexcoders@yahoogroups.com, Yves Riel r...@... wrote: What about intercepting the right-click at the browser level and displaying your own contextual menu? However, you might have some browser incompatibility to look at. http://blog.another-d-mention.ro/programming/right-click-and-custom-cont ext-menu-in-flash-flex/ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dharmendra Chauhan Sent: Friday, May 22, 2009 3:03 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] NEED more than 15 menu item in Context Menu Hi, I really need to have more than 15 menu item displayed on Context Menu. I desperately need some workaround or ideas to achieve this My client has invested thousands of dollar in Flex Project, he definitely need more than 15 menu item.If this project failed , client will NEVER think to invest in flex. Had I been aware of this limitation before I would have thought some solution by now.This comes as a surprise to me at the last moment ,just fews days before Prod Date. Pls gents help me get rid of this ...PLEASE provide some ideas. Thanks in advance. Thanks, Dharmendra -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Sent from my mobile device
Re: [flexcoders] chart labelRotation problem
Please see this link -- http://demo.quietlyscheming.com/ChartSampler/app.html In the Style folder see the Axis Labels example. You can also see the code. Regards On Sat, May 23, 2009 at 11:02 AM, Jake Churchill j...@cfwebtools.com wrote: It seems like I’ve gotten this working before. At least on the axis I did but I had to embed the font for it to work. I think by default, Flex can only rotate the system font or one that’s embedded in the app. Here’s a link to the widget I did with this: http://www.sonburst.com/lfg/LFG401kAssetAccumulationChart/LFG401kAssetAccumulationChart4.html The right vertical axis has rotation applied. Jake Churchill CF Webtools 11204 Davenport, Ste. 100 Omaha, NE 68154 http://www.cfwebtools.com 402-408-3733 x103 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Vikram Singh Sent: Saturday, May 23, 2009 5:32 AM To: Flex Coders Subject: [flexcoders] chart labelRotation problem Hello Friends, I am facing problem in labelRotation of ColumnChart. Can we use labelRotation with ColumnChart ?? If no, which one is suitable option? I want to display label (Text type as well as Numbers) of horizontal axis at 45 degree of rotation. any idea please Regards, Vikram Cricket on your mind? Visit the ultimate cricket website. Enter now! -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:flexcoders-dig...@yahoogroups.com mailto:flexcoders-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: flexcoders-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Multiple events dispatched, data lost
--- In flexcoders@yahoogroups.com, Manish Jethani manish.jeth...@... wrote: On Mon, May 25, 2009 at 12:59 AM, steve horvath flexcod...@... wrote: I have a function which loops and for each iteration dispatches an event. The event handler is inside a new class (AddSourceCommand). Inside the event handler class I am dispatching another event which is being handled by a function inside the same class. There's a variable that originates from the initial function, is passed to the first event handler via the event, and then passed to the second event handler via the second event. The variable changes each time it is sent to the first event. The first event handler is receiving the variable correctly. (It changes each time.) But for some reason the second event handler always receives the last variable sent, every time. What does flickr.photosets.getPhotos() do? Does it go to the Flickr server to fetch the data asynchronously? Yes, you're correct. It is part of the Adobe AS Flickr API's. Obviously you have only one instance of AddSourceCommand in your program, so you have only one copy of the albumForSource variable. It retains the reference to the last object that is assigned to it and that's what you get in configureSource() Yes, that was it. I thought by putting the (new AddSourceCommand()).execute in the listener it would create a new instance every time, but apparently this is not the case. I ended up creating a helper function in ImportAllFlickrSetsCommand which instantiates a new copy of AddSourceCommand and then calls it directly. Then I point the listener to the helper function. Why not call execute() directly on a new instance of AddSourceCommand each time, instead of have it called through an event? We are in the progress of moving to an MVC architecture, but not there yet. But I at least want to set up the code in preparation of it. We have no Front Controller yet, which I guess would do the above automatically. ascii