Re: [flexcoders] Re: Chart itemRenderers - how to get origional data values?
Hi Barry, barry.beattie wrote: rats! didn't work _label.text = _chartItem.item[BarSeries(_chartItem.element).xField]; Call to a possibly undefined method BarSeries var bs:BarSeries = _chartItem.element as BarSeries; if (bs) ... cheers, shaun
[flexcoders] Re: Tree collapses when dataProvider for tree changes
Hi, Thanks for suggestion. But dataProvider has to be changed, accordingly tree changes. Considering XML as tree of nodes, I am retrieving that particular node when dataProvider changes on the basis of id attribute . Each node is going to have unique value for id atribute in XML String. By this way i gets a XML object. That XML object is used for expandItem() method or for selectedItem attribute. Thanks Regards, Baljeet --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Where the XML comes from shouldn't matter. Think of XML as a tree of nodes each with a unique id (UID). The Tree tracks the UIDs of nodes that are open. If you change the XML enough, the set of nodes, even if they look the same, may have new UIDs and thus the set of open items and calls to expandItem may not work. Also note that if you bind to the XMLListCollection, you risk changes to the collection causing the collection to be re-assigned and thus flush the open items list. Thus: [Bindable[ var xmlc:XMLListCollection; mx:Tree id=foo dataProvider={xmlc} / may end up resetting the dataProvider as you modify xmlc. var xmlc:XMLListCollection mx:Tree id=foo initialize=foo.dataProvider=xmlc / Will not reset as it is not watching the collection for bindable changes. Similarly, if you assign the dataProvider on the result of the server fetch, you'll be safer that way too. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Baljeet singh Sent: Wednesday, September 05, 2007 9:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Tree collapses when dataProvider for tree changes Hi, Actually, i am using XML string, that is coming from server side. From that XML string, i get the XMLListCollection as dataProvider. When i click on selected node, either i am editing th information related to node or creating children. This edited/children information is stored in database. So, dataProvider changes(it's required). Tree is created on the basis of id attribute of each XML node . When dataProvider changes, i again retrieve that node on basis of id attribute. Then i tried to use expandItem() method, selectedItem etc, providing the retrieved node. But it's not working. Thanks Regards Baljeet
[flexcoders] Selected Text Color for Accordion
Hi, I want to change the text color for the selected accordion. I am not able to find any styles to do the same. I tried the selectedTextColor option, it applies only when i click on the accordion, but then it changes back to its own color. Any help would be appreciated. Thanks Regards Jaga
RE: [flexcoders] Re: Tree collapses when dataProvider for tree changes
You said that last time, and I still don't know what it means to change on the basis of an id attribute. I am recommending you not use {} to assign the dataprovider if possible. If you are changing the xml, you may need to cal validateNow before calling expandItem. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Baljeet singh Sent: Wednesday, September 05, 2007 11:07 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Tree collapses when dataProvider for tree changes Hi, Thanks for suggestion. But dataProvider has to be changed, accordingly tree changes. Considering XML as tree of nodes, I am retrieving that particular node when dataProvider changes on the basis of id attribute . Each node is going to have unique value for id atribute in XML String. By this way i gets a XML object. That XML object is used for expandItem() method or for selectedItem attribute. Thanks Regards, Baljeet --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: Where the XML comes from shouldn't matter. Think of XML as a tree of nodes each with a unique id (UID). The Tree tracks the UIDs of nodes that are open. If you change the XML enough, the set of nodes, even if they look the same, may have new UIDs and thus the set of open items and calls to expandItem may not work. Also note that if you bind to the XMLListCollection, you risk changes to the collection causing the collection to be re-assigned and thus flush the open items list. Thus: [Bindable[ var xmlc:XMLListCollection; mx:Tree id=foo dataProvider={xmlc} / may end up resetting the dataProvider as you modify xmlc. var xmlc:XMLListCollection mx:Tree id=foo initialize=foo.dataProvider=xmlc / Will not reset as it is not watching the collection for bindable changes. Similarly, if you assign the dataProvider on the result of the server fetch, you'll be safer that way too. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Baljeet singh Sent: Wednesday, September 05, 2007 9:19 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Tree collapses when dataProvider for tree changes Hi, Actually, i am using XML string, that is coming from server side. From that XML string, i get the XMLListCollection as dataProvider. When i click on selected node, either i am editing th information related to node or creating children. This edited/children information is stored in database. So, dataProvider changes(it's required). Tree is created on the basis of id attribute of each XML node . When dataProvider changes, i again retrieve that node on basis of id attribute. Then i tried to use expandItem() method, selectedItem etc, providing the retrieved node. But it's not working. Thanks Regards Baljeet
RE: [flexcoders] using Modules Problem
Please do not hijack threads. Apparently nobody has a ticker to share or they are too busy or on vacation to answer you. This is a volunteer group so no-one is obligated to respond and they won't unless they have good news for you. I thought there was a ticker out there, but if not, you'll have to build your own. I would build things off-screen and copy bitmaps into the ticker and move them as necessary. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jitendra jain Sent: Wednesday, September 05, 2007 10:33 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] using Modules Problem Hi Coders, How to code a ticker in stock market with flex components like labels,images as well as moving these components. Please help me. I posted many times this question but no replies. Thanks, with regards, JJain Got a little couch potato? Check out fun summer activities for kids. http://us.rd.yahoo.com/evt=48248/*http://search.yahoo.com/search?fr=oni _on_mailp=summer+activities+for+kidscs=bz
RE: [flexcoders] customize busy cursor permanently
busyCursor is a style. See defaults.css From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ary Sent: Wednesday, September 05, 2007 10:23 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] customize busy cursor permanently Hi :) i'm just wondering if its possible to change busy cursor permanently with our own animation instead of default(animated clock) so everytime we call showBusyCursor=true it show custom animation, not calling a function/handler that use CursorManager.setCursor , but simply setting the property. ary. __ Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/ http://travel.yahoo.com/
[flexcoders] How do I get a property from a custom component?
I have a repeated custom component as follows: mx:Repeater id=productsRepeater dataProvider={this.category1} local:ComFolderItem mouseOver=CFSMouseOver_Folder(event) click=CFSClick_Folder(event) studentName='{productsRepeater.currentItem.productName + ( + productsRepeater.currentItem.productPrice + )}' /local:ComFolderItem /mx:Repeater And I want to retrieve the studentName and productPrice when this component is clicked on private function CFSClick_Folder(evt_obj:Object):void { var studentName:String = ?? } Please can anyone tell me how I can get this value? Thanks Paul
[flexcoders] Re: Memory Allocation Error - Garbage Collection Hack
Nobody want to give it a shot? --- In flexcoders@yahoogroups.com, marcel.panse [EMAIL PROTECTED] wrote: Check out the source code at: http://base.google.com/base/a/2685374/D9044196074378539154 --- In flexcoders@yahoogroups.com, marcel.panse marcel.panse@ wrote: Hi, I'm working on an AIR application that has to load a lot of pictures from a users harddrive. I have to be able to load about 120 photos (of 3MB each), open them, resize it, save it in memory and cache a resized photo to disk. So i created a manager which has an internal queueing system that loads the photos one by one and doing the operations before continueing on to the next photo. The most processor time goes into loading the photos from disk into memory, which is a asynchronous job, so the GUI has plenty of time to update and keep track with a simple loading bar. Now the calls to load the next photo uses 'Application.application.callLater(loadPhoto)', on a Windows machine this is no problem at all, and it loads 120photos easily (i've tested it with up to 500). Now if you change that sencentence to 'setTimeOut(loadPhoto, 500)', then it suddenly stops working. It loads up to 70photos and then sais 'Invalid bitmapdata'. This is probably because the garbage collector is too slow and can't free the memory in time, resulting in memory allocation errors. When i'm running the same thing on a MacBook Pro (which is faster then my windows laptop, and has twice the amount of RAM), then suddenly both scenarios don't work and i can only load up to 17 photos. The RAM Climbing very fast up to 500megs and crashes... The solution would be to force the garbage collector to free the memory between each load, but there is as far as i know no such functionality in flex. I have found a little hack that forces the garbage collection to free the memory by creating multiple LocalConnections with the same name (and catching the exception it throws). Using that hack everything works fine on both the windows laptop and the MacBook. This is the garbage collection hack: private function gcHack():void { // unsupported hack that seems to force a full GC try { var lc1:LocalConnection = new LocalConnection(); var lc2:LocalConnection = new LocalConnection(); lc1.connect('name'); lc2.connect('name'); } catch (e:Error) { } } This is offcourse not the solution we'd like to go into production with. Is there a better solution, what is the 'official' way to do such things?
RE: [flexcoders] customize busy cursor permanently
ahh i see..i did missed that thanks alex! --- Alex Harui [EMAIL PROTECTED] wrote: busyCursor is a style. See defaults.css From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ary Sent: Wednesday, September 05, 2007 10:23 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] customize busy cursor permanently Hi :) i'm just wondering if its possible to change busy cursor permanently with our own animation instead of default(animated clock) so everytime we call showBusyCursor=true it show custom animation, not calling a function/handler that use CursorManager.setCursor , but simply setting the property. ary. __ Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/ http://travel.yahoo.com/ Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
Re: [flexcoders] Flex canvas more then 4300px?
On Wednesday 05 Sep 2007, [EMAIL PROTECTED] wrote: My SFW file height is 5000px, and it works just fine, but the canvas component stops expanding at 4300px, anyone knows why? Text components work. There are player-built-in limits. -- Tom Chiverton Helping to autoschediastically build high-end bandwidth on: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] please help itemrenderer accessing
On Thursday 06 Sep 2007, [EMAIL PROTECTED] wrote: ItemRenderers are tricky because they are recycled. Even resizing the internal image might cause a rerenderer and change which renderer is displaying the image. Once you know the way to do things, it's very easy though (like most Flexy things). In this case, create an (override) 'set data' method, and make sure that (re)sets up your renderer when ever it's called based on the argument which will be an item from the dataProvider. -- Tom Chiverton Helping to dramatically disintermediate guinine e-markets on: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] newbie
I am sorry but I am slow. By applying the filter in the main instance variable, are you suggesting that I put it somewhere within this function? private function accommodationLocatorResultHandler(event:ResultEvent):void { var lodgings:ArrayCollection = event.result.accommodations.accommodation; var temp:ArrayCollection = new ArrayCollection(); var cursor:IViewCursor = lodgings.createCursor(); var filter:AccommodationFilter = new AccommodationFilter(); while (!cursor.afterLast) { var accommodation:Accommodation = new Accommodation(); accommodation.fill(cursor.current); temp.addItem(accommodation); cursor.moveNext(); } accommodations = temp; } Tracy Spratt [EMAIL PROTECTED] wrote: Call it in the result handler. Either apply the filter to the main instance level variable accomodations, or do as you have and then assign selectedAccoms to the dataGrid dataProvider. Tracy - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema Sent: Wednesday, September 05, 2007 6:57 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] newbie This is the function I thought of introducing. I didn't introduce it because I couldn't really work out how it would be called if I wanted data to be updated automatically i.e. without a button click or something like that. [Bindable] private var selectedAccoms:ArrayCollection; public function updateGrid():void { selectedAccoms = new ArrayCollection(accommodations); //selectedAccoms.filterFunction =; selectedAccoms.refresh(); dgAccom.dataProvider = selectedAccoms; } Tracy Spratt [EMAIL PROTECTED] wrote: Does your handler get called? Does it contain the reference you need? How are you applying the filter? Are you calling refresh()? Tracy - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema Sent: Wednesday, September 05, 2007 5:54 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] newbie Main Application Script //sending data methods using httpservice to say var accommodations /Script SearchView id=search lodgings={accommodations}/ /Application SearchView HBox Script [Bindable] public var lodgings:ArrayCollections; /Script filterComp id=compfil/ displayGrid id=dg dataprovider={lodgings}/ HBox filterComp //assume it has 2 checkboxes: chk1 and chk2 which call // dispatchFilter() when clicked private function dispatchFilter():void { var event:FilterEvent = new FilterEvent(filter, checked); //filter hold values of selection of chk1 chk2 dispatchEvent(event); } filterEvent.as comstructor public function FilterEvent(filter:MyFilter, live:Boolean) { super(FILTER); this.filter = filter; this.live = live; } MyFilter.as public function accept(accommodation:Accommodation):Boolean { if (graded !accommodation.graded) return false; if (backpacker !accommodation.backpacker) return false; return true; } Above is my abbreviated code. I think my problem is that I am unsure about how to get the result data after filtering. In my mind the filtering function is working on the data retrieved using httpservice...but I havent actually cracked that part well...at one point I thought of introducing a function for capturing selected data. Tracy Spratt [EMAIL PROTECTED] wrote: Ok, that is reasonable, what does not work? Does your handler get called? Does it contain the reference you need? How are you updating the dataProvider? Tracy - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema Sent: Wednesday, September 05, 2007 2:52 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] newbie I have two pages. The first is the main. In the main I load my xml data as follows using Httpservice. I pass this data to the second page as follows: SearchView id=searchView label=Search accommodations={accoms} / // accommodations has been declared publicly in SearchView.mxml and accoms is the variable that was used to accept data sent by httpservice. Once the data is passed, I display in the datagrid. All is fine at this stage. My second step was to attempt to filter the data in the datagrid and this is where my trouble began. I have two actionscript files one is for carrying out the filtering and the other is for the filterEvent. oh by the way there is
[flexcoders] Text display in a ComboBox
Hi, I have a simple question concerning the text display in a (closed) ComboBox. Is it possible to reduce the offset of the displayed text from the upper left corner? My ComboBox seems to be large enough for the text but by default I have an offset of 6 pixels to the top and around 4 pixels to the right. Thanks for your help. Regards Markus
[flexcoders] Re: Tree collapses when dataProvider for tree changes
Hi, Lets consider an XML as tree of nodes. Let me explain u the meaning of id. My sample XML string look like: node!--First Level -- node id=1 name=A code=1!--Second Level -- node id=2 name=A-1 code=1-1/ !--Third Level -- node id=3 name=A-2 code=1-2 node id=4 name=A-2-1 code=1-2-1/ !-- Fourth Level-- node id=5 name=A-2-2 code=1-2-2/. . /node /node !-- So on--- /node Here my each XML node has unique Id attribute. Now suppose I create a tree with this XML i click on any node. For the selected node, say node with id=5, i can find out the value of id attribute of selected node save this in session object. Means now i have idea about which node i selected. Now suppose , i create two children for selected node i.e for node with id=5. So my XML changes somewhat like below: node!--First Level -- node id=1 name=A code=1!--Second Level -- node id=2 name=A-1 code=1-1/ !--Third Level -- node id=3 name=A-2 code=1-2 node id=4 name=A-2-1 code=1-2-1/ !-- Fourth Level-- node id=5 name=A-2-2 code=1-2-2/. node id=100 name=A-2-2-1 code=1-2-2-1/ !-- Level 5th--- node id=101 name=A-2-2-2 code=1-2-2-2/. /node /node !-- So on--- /node So my dataProvider changes tree gets collapsed. As we have already stored the id attribte value of selected node in session. Now we can iterate over XMLListCollection to find the XML node with that particular id value. Now i use expandItem() method selectedItem property, providing selected node. But none of these things works. Thanks Regards, Baljeet
[flexcoders] Re: Chart itemRenderers - how to get origional data values?
awww ... woe ... 1180: Call to a possibly undefined method BarSeries. 1120: Access of undefined property BarSeries. 1046: Type was not found or was not a compile-time constant: BarSeries. import mx.charts.series.items.BarSeriesItem; import mx.charts.series.items.*; //eh,whynot ... public function set data(value:Object):void { if (_chartItem == value) { trace(value already set: ); return; // and ... exit } _chartItem = ChartItem(value); // else set the value var bs:BarSeries = _chartItem.element as BarSeries; if (bs) { _label.text = _chartItem.item[BarSeries(_chartItem.element).xField]; } }
[flexcoders] Editable tab titles
Hi all, Say I wanted to provide a tabbar with a certain functionality...I want the user to be able to double-click the tab header to edit the tab title. What would be the best way to go about it? Trap the double click event on the tab and dynamically create a TextInput control at that position? Thanks, Roy
[flexcoders] skins of buttons in ToggleButtonBar
HI, how do i set the skins for each button in a ToggleButtonBar? each button in this ToggleButtonBar should get its own skin. what i m tying to do is to set the upSkin, downSkin, overSkin, selectedUpSkin, selectedOverSkin, selectedDownSkin for each one of them buttons. this ToggleButtonBar is used for a 'tools bar' and i have an image for selected/un-selected state for each tool, how do i give each button his own skin that depends on his selected state ??
[flexcoders] Flex Fonts: How to implement the Bitmap text (no anti-alias) effect in Flex
Hi there Flash 8 and up provide an option in the property panel for textfields, Bitmap text (no anti-alias). I can use this with embedded fonts to get clear text without depending on the user having the font installed. How do I do this with the Flex compiler? From what I can see, I can only set which of the two anti-alias methods I want to use; I can't seem to say 'don't anti-alias it, but use the embedded font please'! Tracy
[flexcoders] Re: skins of buttons in ToggleButtonBar
reply to myself: i have succeeded doing so like this: private function btnsComplete():void{ Button(btnBar.getChildAt(0)).setStyle(upSkin, i1a); Button(btnBar.getChildAt(0)).setStyle(overSkin, i1a); Button(btnBar.getChildAt(0)).setStyle(downSkin, i1a); Button(btnBar.getChildAt(0)).setStyle(selectedUpSkin, i1b); Button(btnBar.getChildAt(0)).setStyle(selectedOverSkin, i1b); Button(btnBar.getChildAt(0)).setStyle(selectedDownSkin, i1b); Button(btnBar.getChildAt(1)).setStyle(upSkin, i2a); Button(btnBar.getChildAt(1)).setStyle(overSkin, i2a); Button(btnBar.getChildAt(1)).setStyle(downSkin, i2a); Button(btnBar.getChildAt(1)).setStyle(selectedUpSkin, i2b); Button(btnBar.getChildAt(1)).setStyle(selectedOverSkin, i2b); Button(btnBar.getChildAt(1)).setStyle(selectedDownSkin, i2b); Button(btnBar.getChildAt(2)).setStyle(upSkin, i3a); Button(btnBar.getChildAt(2)).setStyle(overSkin, i3a); Button(btnBar.getChildAt(2)).setStyle(downSkin, i3a); Button(btnBar.getChildAt(2)).setStyle(selectedUpSkin, i3b); Button(btnBar.getChildAt(2)).setStyle(selectedOverSkin, i3b); Button(btnBar.getChildAt(2)).setStyle(selectedDownSkin, i3b); } is this the only way? --- In flexcoders@yahoogroups.com, shemeshkale [EMAIL PROTECTED] wrote: HI, how do i set the skins for each button in a ToggleButtonBar? each button in this ToggleButtonBar should get its own skin. what i m tying to do is to set the upSkin, downSkin, overSkin, selectedUpSkin, selectedOverSkin, selectedDownSkin for each one of them buttons. this ToggleButtonBar is used for a 'tools bar' and i have an image for selected/un-selected state for each tool, how do i give each button his own skin that depends on his selected state ??
[flexcoders] web services
Hi guys...i m manju here new to this group.even new to flex technology. from my past one month experience i came to know that its awesome...superbmorever i hav learnt little,it made me to feel incredible technologyits rocking evrywhere... -Manju
Re: [flexcoders] ManureMail.com
Hi, i am seeing except some text and next button which is showing contactinfo. Appan. On 9/6/07, Dave [EMAIL PROTECTED] wrote: Am I missing something? All I see is an image with one 'Next' button that actually does a pop-up of contact info? Dave *Brendan Meutzner [EMAIL PROTECTED]* wrote: Curious why you chose Flex for this site...? Brendan On 9/4/07, grimmwerks [EMAIL PROTECTED] wrote: Think it looks great - but I'm curious how you put the link buttons right in the middle of the text -- is that built up or some secret htmlText trick? On Sep 4, 2007, at 5:12 PM, Randy Cooper wrote: Guys, I'd love to get your feedback on a new site I just launched built entirely in Flex. Thanks in advance for your comments. Randy Cooper [EMAIL PROTECTED] http://www.randycooper.net 678.799.0152 -- Brendan Meutzner http://www.meutzner.com/blog/
[flexcoders] Remoting issue (.net fluorine framework)
Hi All, I am developing a flex application using .net fluorine framework. Earlier i used web services written in c#. I used the code in this manner: Webservice mx:WebService id=smHttp wsdl= http://localhost/SM.WebSrv/default.asmx?WSDL; fault=Alert.show( event.fault.faultString) useProxy=false showBusyCursor=true /mx:WebService and i called web method like smHttp.UpdatePersonLoginInfo(personInfo) where personinfo is an object. Remoting using .net Flourine framework: mx:RemoteObject id=smHttp destination=fluorine source=SM.WebSrv.Soap fault=DisplayError(event) showBusyCursor=true /mx:RemoteObject and i called remote method like smHttp.UpdatePersonLoginInfo(personInfo); Incase of web service, it is working properly, and no error at all. But in case of remoting, i am getting error like [RPC Fault faultString=Could not find a suitable method with name InsertPersonLoginInfo faultCode=Server.Processing faultDetail= at com.TheSilentGroup.Fluorine.MethodHandler.GetMethod(IApplicationContext applicationContext, Type type, String methodName, IList arguments). I am facing lot of problems while converting web service code to remoting. Please clarify this issue. Thanks in advance, Appan Parige.
[flexcoders] Help needed in drag and drop of Flex tree
Hi, We have an application which allows drag and drop between multiple trees and lists. Here are the steps I follow to refresh on drag and drop: 1. Dispatch a custom event which calls server. 2. On successful response from server I change the model which is data provider for the tree. 3. Then, set a flag which triggers 'invalidateDisplayList' and 'invalidateList' for tree (and other listeners). 4. The tree refreshes fine. But as soon as I drag and drop between trees again, I get this error in Tree.as: TypeError: Error #1010: A term is undefined and has no properties. at mx.controls::Tree/::updateDropData() at mx.controls::Tree/calculateDropIndex() at mx.controls.listClasses::ListBase/showDropFeedback() at mx.controls::Tree/showDropFeedback() The behaviour is weird, sometimes the browser hangs and stops responding. I am calling 'contentTree.showDropFeedback(event)' in my dragOver event listener which is triggering error. My tree data provider is a custom class which has 'children' array collection attribute. Any help on how to resolve this issue would be highly appreciated. Thanks in advance, Sujatha
[flexcoders] Re: Disable scrolling via mouse wheel
no luck.. heres what i did.. public function wheelStop():void{ myTextArea.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler); } public function mouseWheelHandler(event:MouseEvent):void{ event.stopImmediatePropagation(); } and I called wheelStop() in the creationComplete function and also tried it in mouseWheel scroll in the TextArea, none worked.. also tried myTextArea.addEventListener(ScrollEvent.SCROLL, mouseScrollHandler); public function mouseWheelHandler(event:ScrollEvent):void{ event.stopImmediatePropagation(); } am i doing something wrong? --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I would capture MOUSE_WHEEL and call stopImmediatePropagation. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jayson Sent: Wednesday, September 05, 2007 2:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Disable scrolling via mouse wheel Here's my situation. I have a TextArea that is filled with text(more text than can be displayed). I have the scroll bars removed so that you can not scroll with them, but you can still scroll with the mouse wheel. How can I disable this? I've tried a number of things but nothing seems to be working. I'm thinking I need an event listener, and a function needs to be performed on ScrollEvent.SCROLL, but what would it be? TextArea doesn't have scrollPosition, so I can't do myTextArea.scrollPosition = 0; or whatever it would be. Any ideas? Thanks, Jayson
[flexcoders] Data binding not displaying anything on subesquent visits to screen
I could really do with some help on this one. I have a screen (State) in my application that displays some custom mxml components using a repeater. The first time I come to this screen, all the data appears correctly. However if I navigate away from this screen to another screen (State), then return to it, all that appears is a scroll bar, with no custom components appearing. I would appreciate if anyone can take a peek at my code below to try and identify the problem. Perhaps this is a problem others have experienced? The relevant code is as follows: mx:State name=ComponentFolderScreen basedOn=QualificationSummaryScreen mx:RemoveChild target={qualificationSummaryScreenDG}/ mx:AddChild relativeTo={vbox1} position=lastChild mx:Tile autoLayout=true width=740 height=230 id=tile1 borderStyle=none mx:Repeater id=productsRepeater dataProvider={this.category1} local:ComFolderItem mouseOver=CFSMouseOver_Folder(event) click=CFSClick_Folder(event) studentName='{productsRepeater.currentItem.productName + ( + productsRepeater.currentItem.productPrice + )}' componentStatus='{productsRepeater.currentItem.componentStatus}' /local:ComFolderItem /mx:Repeater /mx:Tile /mx:AddChild /mx:State And here is the code that populates the ArrayCollection that is the dataprovider var ComponentFolderData:ArrayCollection = new ArrayCollection(); ComponentFolderData = _dataManager.returnComponentFolderData(componentCode); var howManyObjects:uint = ComponentFolderData.length; var objectInstance:Object = new Object(); category1 = new ArrayCollection(); for (var objectIndex:uint = 0; objectIndex howManyObjects; objectIndex++) { objectInstance.productName = ComponentFolderData.getItemAt(objectIndex).productName; objectInstance.componentStatus = ComponentFolderData.getItemAt(objectIndex).componentStatus; category1.addItem(objectInstance);
RE: [flexcoders] stock ticker: was using Modules Problem
The first hit on a google search of Flex stock ticker comes up with an example by Peter Ent: http://weblogs.macromedia.com/eanderson/archives/2004/12/stock_ticker_in .cfm -matt -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Thursday, September 06, 2007 2:26 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] using Modules Problem Please do not hijack threads. Apparently nobody has a ticker to share or they are too busy or on vacation to answer you. This is a volunteer group so no-one is obligated to respond and they won't unless they have good news for you. I thought there was a ticker out there, but if not, you'll have to build your own. I would build things off-screen and copy bitmaps into the ticker and move them as necessary. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jitendra jain Sent: Wednesday, September 05, 2007 10:33 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] using Modules Problem Hi Coders, How to code a ticker in stock market with flex components like labels,images as well as moving these components. Please help me. I posted many times this question but no replies. Thanks, with regards, JJain Got a little couch potato? Check out fun summer activities for kids. http://us.rd.yahoo.com/evt=48248/*http://search.yahoo.com/sea rch?fr=oni_on_mailp=summer+activities+for+kidscs=bz
RE: [flexcoders] ResourceBundle - Problem with ActionScript code
So, rather than methods like getString() on ResourceBundle, you use methods like getString() on ResourceManager, like this: var s:String = resourceManager.getString(bundle_name, key); -matt -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Smith Sent: Wednesday, September 05, 2007 3:33 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] ResourceBundle - Problem with ActionScript code Yes, that's the recommendation. Methods like getString() on ResourceBundle are now deprecated (and will be removed in a future release), but a compiler bug is currently preventing you from getting the deprecation warnings. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brian Holmes Sent: Wednesday, September 05, 2007 11:39 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] ResourceBundle - Problem with ActionScript code Gordon, Is that the recommendation? I'm dynamically creating and loading resource bundles and have been pulling the values of the content without problem. I am storing the bundles in the Resource Manager however, but is there something I should beware of? brian.. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Smith Sent: Wednesday, September 05, 2007 11:48 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] ResourceBundle - Problem with ActionScript code No. In Flex 3, all resources should be accessed via the ResourceManager, not through vars of type ResourceBundle. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brian Holmes Sent: Wednesday, September 05, 2007 9:57 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] ResourceBundle - Problem with ActionScript code reference the resource bundle by key instead of the getString() such as rb.content[txName]; you can read more here: http://livedocs.adobe.com/labs/flex/3/html/wwhelp/wwhimpl/comm on/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=l10n_033_1 .html http://livedocs.adobe.com/labs/flex/3/html/wwhelp/wwhimpl/com mon/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=l10n_033_1.html Hope that helps, brian.. size=2 width=100% align=center tabIndex=-1 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mayurrami Sent: Tuesday, September 04, 2007 10:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] ResourceBundle - Problem with ActionScript code Hi everybody... I am having few problems for ResourceBundle. The code is as below /* code in Flex 3 (Moxie - Beta) */ -- mxml code : RB_3.mxml -- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute xmlns:local=* pageTitle= Resoruce Bundle !--mx:Label text=@Resource(key='txName',bundle='German') / -- !-- The above commented line works very well, but when I try to achieve the same through Actionscript it gives an Error -- local:RB_B_AS width=200 height=200 borderStyle=solid paddingLeft=10 paddingTop=10 / /mx:Application -- Actionscript code : RB_ActionScript.as -- package { import mx.resources.ResourceBundle; import mx.containers.VBox; import mx.controls.Label; import mx.controls.Alert; [ResourcBundle(German)] public class RB_B_AS extends VBox { private static var rb:ResourceBundle = new ResourceBundle(); public var l:Label; function RB_B_AS() { this.width = 300; this.height = 300; this.setStyle(borderStyle,solid); this.setStyle(paddingLeft,10); this.setStyle(paddingTop,10); l = new Label(); l.width = 100; l.height = 30; /* Error come on Line : 34 [ Error: Key txName was not found in resource bundle null at mx.resources::ResourceBundle/::_getObject() at mx.resources::ResourceBundle/getString() at RB_B_AS$iinit() ] */ l.text = rb.getString(txName); this.addChild(l); var child2:Label = new Label(); child2.name = Lable2; child2.text = Two; this.addChild(child2); } } } -- Res.Bundle : German.properties -- txName=What is your Name ? -- If you can provide me any link for ResourceBundle example purely in AS-3, that will be helpful to me. Thanking you in advance. - Mayur
[flexcoders] Load MXML at run time?
I'm designing what is in essence a custom registration form, so clients of our flex app can design their own registration information. I'd like to try to store MXML somewhere on the server or perhaps the database and render it at runtime based on what client is using the application. For example: Some clients want an installation where they collect a zip code, while another may want to collect opt-in/out information. I'd like to store this in MXML and render it at run time inside my registration form. Anyone done anything like this or seen it done? M@
Re: [flexcoders] Load MXML at run time?
i think livecycle does that, not sure if thats what u mean, it compiles the app on the server and sends it to the user - Original Message From: M@ Sheppard [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, September 6, 2007 9:45:41 AM Subject: [flexcoders] Load MXML at run time? I'm designing what is in essence a custom registration form, so clients of our flex app can design their own registration information. I'd like to try to store MXML somewhere on the server or perhaps the database and render it at runtime based on what client is using the application. For example: Some clients want an installation where they collect a zip code, while another may want to collect opt-in/out information. I'd like to store this in MXML and render it at run time inside my registration form. Anyone done anything like this or seen it done? M@ !-- #ygrp-mkp{ border:1px solid #d8d8d8;font-family:Arial;margin:14px 0px;padding:0px 14px;} #ygrp-mkp hr{ border:1px solid #d8d8d8;} #ygrp-mkp #hd{ color:#628c2a;font-size:85%;font-weight:bold;line-height:122%;margin:10px 0px;} #ygrp-mkp #ads{ margin-bottom:10px;} #ygrp-mkp .ad{ padding:0 0;} #ygrp-mkp .ad a{ color:#ff;text-decoration:none;} -- !-- #ygrp-sponsor #ygrp-lc{ font-family:Arial;} #ygrp-sponsor #ygrp-lc #hd{ margin:10px 0px;font-weight:bold;font-size:78%;line-height:122%;} #ygrp-sponsor #ygrp-lc .ad{ margin-bottom:10px;padding:0 0;} -- !-- #ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean, sans-serif;} #ygrp-mlmsg table {font-size:inherit;font:100%;} #ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean, sans-serif;} #ygrp-mlmsg pre, code {font:115% monospace;} #ygrp-mlmsg * {line-height:1.22em;} #ygrp-text{ font-family:Georgia; } #ygrp-text p{ margin:0 0 1em 0;} #ygrp-tpmsgs{ font-family:Arial; clear:both;} #ygrp-vitnav{ padding-top:10px;font-family:Verdana;font-size:77%;margin:0;} #ygrp-vitnav a{ padding:0 1px;} #ygrp-actbar{ clear:both;margin:25px 0;white-space:nowrap;color:#666;text-align:right;} #ygrp-actbar .left{ float:left;white-space:nowrap;} .bld{font-weight:bold;} #ygrp-grft{ font-family:Verdana;font-size:77%;padding:15px 0;} #ygrp-ft{ font-family:verdana;font-size:77%;border-top:1px solid #666; padding:5px 0; } #ygrp-mlmsg #logo{ padding-bottom:10px;} #ygrp-vital{ background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;} #ygrp-vital #vithd{ font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:uppercase;} #ygrp-vital ul{ padding:0;margin:2px 0;} #ygrp-vital ul li{ list-style-type:none;clear:both;border:1px solid #e0ecee; } #ygrp-vital ul li .ct{ font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-right:.5em;} #ygrp-vital ul li .cat{ font-weight:bold;} #ygrp-vital a{ text-decoration:none;} #ygrp-vital a:hover{ text-decoration:underline;} #ygrp-sponsor #hd{ color:#999;font-size:77%;} #ygrp-sponsor #ov{ padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;} #ygrp-sponsor #ov ul{ padding:0 0 0 8px;margin:0;} #ygrp-sponsor #ov li{ list-style-type:square;padding:6px 0;font-size:77%;} #ygrp-sponsor #ov li a{ text-decoration:none;font-size:130%;} #ygrp-sponsor #nc{ background-color:#eee;margin-bottom:20px;padding:0 8px;} #ygrp-sponsor .ad{ padding:8px 0;} #ygrp-sponsor .ad #hd1{ font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-height:122%;} #ygrp-sponsor .ad a{ text-decoration:none;} #ygrp-sponsor .ad a:hover{ text-decoration:underline;} #ygrp-sponsor .ad p{ margin:0;} o{font-size:0;} .MsoNormal{ margin:0 0 0 0;} #ygrp-text tt{ font-size:120%;} blockquote{margin:0 0 0 4px;} .replbq{margin:4;} -- Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting
[flexcoders] Re: NEW FLEX WEBSITE: ManureMail.com
Ah my friend - ancient Chinese secret. Actually, neither ancient or Chinese Just just spaces in your text (yeah there's a little trial and error involved) and then plop down the link button. --- In flexcoders@yahoogroups.com, grimmwerks [EMAIL PROTECTED] wrote: Think it looks great - but I'm curious how you put the link buttons right in the middle of the text -- is that built up or some secret htmlText trick? On Sep 4, 2007, at 5:12 PM, Randy Cooper wrote: Guys, I'd love to get your feedback on a new site I just launched built entirely in Flex. Thanks in advance for your comments. Randy Cooper [EMAIL PROTECTED] http://www.randycooper.net 678.799.0152
RE: [flexcoders] Load MXML at run time?
We attempted this but found it much easier to manage by using mx:States but if you must, look at the isapi plugins on adobe labs, or livecycle, store the mxml strings in the db, then compile and serve the resulting swf with your web server. brian.. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of M@ Sheppard Sent: Thursday, September 06, 2007 8:46 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Load MXML at run time? I'm designing what is in essence a custom registration form, so clients of our flex app can design their own registration information. I'd like to try to store MXML somewhere on the server or perhaps the database and render it at runtime based on what client is using the application. For example: Some clients want an installation where they collect a zip code, while another may want to collect opt-in/out information. I'd like to store this in MXML and render it at run time inside my registration form. Anyone done anything like this or seen it done? M@ *** The information in this e-mail is confidential and intended solely for the individual or entity to whom it is addressed. If you have received this e-mail in error please notify the sender by return e-mail delete this e-mail and refrain from any disclosure or action based on the information. ***
[flexcoders] Re: NEW FLEX WEBSITE: ManureMail.com
Brendan, DARN good question!!! 1) I wanted to build an entire site in Flex. Why? Same reason the guy climbed Everest - because it was there. 2) I had originally started the project in PHP and AJAX using a freebie template I'd found. Between getting bogged down in a mire of DIV tags and all kinds of issues setting up the checkout to go to authorize.net I finally had to give up on it for a while. (As you might guess manure doesn't pay the bills). Once I started with flex I was off to the races. 3) UI options galore! Without all of the AJAX/DIV/HTML nightmare associated with it. (Did I mention all of the IE vs. Firefox issues to test and deal with? 4) C'mon man! Flex is freaking cool! --- In flexcoders@yahoogroups.com, Brendan Meutzner [EMAIL PROTECTED] wrote: Curious why you chose Flex for this site...? Brendan On 9/4/07, grimmwerks [EMAIL PROTECTED] wrote: Think it looks great - but I'm curious how you put the link buttons right in the middle of the text -- is that built up or some secret htmlText trick? On Sep 4, 2007, at 5:12 PM, Randy Cooper wrote: Guys, I'd love to get your feedback on a new site I just launched built entirely in Flex. Thanks in advance for your comments. Randy Cooper [EMAIL PROTECTED] http://www.randycooper.net 678.799.0152 -- Brendan Meutzner http://www.meutzner.com/blog/
[flexcoders] Re: NEW FLEX WEBSITE: ManureMail.com
--- In flexcoders@yahoogroups.com, Jayson [EMAIL PROTECTED] wrote: I see that you have digg and reddit and all those, do you have a method for handling url requests? How does the site your sending it to (digg for example) know which page it is being sent? or are you just sending manuremail.com? There is only one page - ManureMail.com I really like the end results of flex, it being interactive and all that, but search engines just dont pick it up like html(obviously). I thought that as well until I started poking around a little. Somewhere in the not too recent past, Google started doing full text indexing on flash based sites. No worries! Randy
RE: [flexcoders] Re: loading images at runtime
look into using a runtime shared libraries ( RSL ) or use the url to your image somebody smarter than me may have another option. somebody? brian.. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sk_acura Sent: Thursday, September 06, 2007 9:27 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: loading images at runtime Hi All, Is there a way to load the images at runtime?? I am using SpringGraph and implementing the ViewFactory and as we will have different types of Items in a Graph we would like to use different images .. Is there a way to specify the images at run time in Image Class ?? Thanks Kumar --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , fuad_kamal [EMAIL PROTECTED] wrote: I am able to load images from a .swf file as long as the .swf is embedded in my flex app, but when I try to do the same at runtime / without embedding, it fails. Is there a different syntax for referencing the images within the .swf at runtime, or is it not possible without embedding? works: [Bindable] [Embed(source=testImage.swf#testImage)] private var testImage:Class; mx:Image source={testImage} id=image2 / doesn't work: mx:Image source=testImage.swf#testImage id=image1/ When embedding, does the entire .swf get embedded, or only the actual images that are referenced after the '#'? Is the '#' interpreted as code by the compiler, hence causing it to work within the curly braces when embedding the image, but failing when part of the source string for run-time loading? *** The information in this e-mail is confidential and intended solely for the individual or entity to whom it is addressed. If you have received this e-mail in error please notify the sender by return e-mail delete this e-mail and refrain from any disclosure or action based on the information. ***
[flexcoders] Re: ManureMail.com
It's manuremail.com not randycooper.net --- In flexcoders@yahoogroups.com, Appan Parige [EMAIL PROTECTED] wrote: Hi, i am seeing except some text and next button which is showing contactinfo. Appan. On 9/6/07, Dave [EMAIL PROTECTED] wrote: Am I missing something? All I see is an image with one 'Next' button that actually does a pop-up of contact info? Dave *Brendan Meutzner [EMAIL PROTECTED]* wrote: Curious why you chose Flex for this site...? Brendan On 9/4/07, grimmwerks [EMAIL PROTECTED] wrote: Think it looks great - but I'm curious how you put the link buttons right in the middle of the text -- is that built up or some secret htmlText trick? On Sep 4, 2007, at 5:12 PM, Randy Cooper wrote: Guys, I'd love to get your feedback on a new site I just launched built entirely in Flex. Thanks in advance for your comments. Randy Cooper [EMAIL PROTECTED] http://www.randycooper.net 678.799.0152 -- Brendan Meutzner http://www.meutzner.com/blog/
[flexcoders] Re: ManureMail.com
Yes, you're missing something - the right URL. You went to my randycooper.net site vs. ManureMail.com --- In flexcoders@yahoogroups.com, Dave [EMAIL PROTECTED] wrote: Am I missing something? All I see is an image with one 'Next' button that actually does a pop-up of contact info? Dave Brendan Meutzner [EMAIL PROTECTED] wrote: Curious why you chose Flex for this site...? Brendan On 9/4/07, grimmwerks [EMAIL PROTECTED] wrote:Think it looks great - but I'm curious how you put the link buttons right in the middle of the text -- is that built up or some secret htmlText trick? On Sep 4, 2007, at 5:12 PM, Randy Cooper wrote: Guys, I'd love to get your feedback on a new site I just launched built entirely in Flex. Thanks in advance for your comments. Randy Cooper [EMAIL PROTECTED] http://www.randycooper.net 678.799.0152 -- Brendan Meutzner http://www.meutzner.com/blog/
Re: [flexcoders] Re: NEW FLEX WEBSITE: ManureMail.com
Randy, I second that sentiment! Flex kicks ass! I am still struggling with the 100% Flex site structure. Will it be too much out of the gate? Will users get turned off everytime they see a site using flash/flex, because so many developers are going to use it when there was no need for it? These are the unknowns. I think your site is a good example of having a Full Flex solution. Little site content, lots of data centric needs (eCommerce). Oh, the struggles of a web application developer. Tony Randy Cooper wrote: Brendan, DARN good question!!! 1) I wanted to build an entire site in Flex. Why? Same reason the guy climbed Everest - because it was there. 2) I had originally started the project in PHP and AJAX using a freebie template I'd found. Between getting bogged down in a mire of DIV tags and all kinds of issues setting up the checkout to go to authorize.net I finally had to give up on it for a while. (As you might guess manure doesn't pay the bills). Once I started with flex I was off to the races. 3) UI options galore! Without all of the AJAX/DIV/HTML nightmare associated with it. (Did I mention all of the IE vs. Firefox issues to test and deal with? 4) C'mon man! Flex is freaking cool! --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com, Brendan Meutzner [EMAIL PROTECTED] wrote: Curious why you chose Flex for this site...? Brendan
[flexcoders] [Embed] path
I'm afraid after reading the docs and flexcoders archive, I'm still confused by this unable to resolve for transcoding error. My library project is laid out as follows: assets ..images myimage.png src ..com foo ..MyClass.as MyClass.as contains one of: [Embed(source=../assets/images/myimage.png)] [Embed(source=/assets/images/myimage.png)] [Embed(source=assets/images/myimage.png)] In FlexBuilder, do I need to add assets to the source path? Do I need to move assets under src? Thanks in advance.
[flexcoders] Populating XMLListCollection and sending it to a Datagrid
Hello, I'm trying to populate a datagrid. Here is my code. Everything works, but when I use the dataProvider dg2data within my datagrid it comes back empty. I know there is data there, but not sure if I'm missing something. public function onSelectFirstGrid(event:Event):void { myRequest.addEventListener(Event.COMPLETE, onResult) myRequest.send(dg.selectedItem.myID); } private function onResult(e:ResultEvent):void { dg2data = e.result as XMLListCollection; } private function onFault(e:FaultEvent):void { Alert.show(e.fault.message, Could not load); } [Bindable] public var dg2data: XMLListCollection; My DataGrid mx:DataGrid id=dg2 width=100% height=100% rowCount=10 dataProvider={dg2data} mx:columns mx:DataGridColumn dataField=name headerText=Name / /mx:columns /mx:DataGrid Thanks!
[flexcoders] Re: Problem with Content spilling over beyond it's container's bounds
I'm having a very similar issue. Did you ever come up with a good resolution or at least an understanding as to what was going on? --- In flexcoders@yahoogroups.com, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, I have an irritating problem with a draggable TitleWindow, that houses a UIComponent w/embedded SWF. My Custom Class extending a UIComponent embeds an external SWF File, which gives me the ability to wrap it with code. This way I can control the SWF and all the MovieClips it contains, programmatically. Basically, upon the initial Load of the UIComponent, it exceeds the size of the TitleWindow - and instead of the TitleWindow Container masking off the extents of the UIComponent, it literally lets the entire SWF File show through. Now if I trigger a Resize Event by actually sizing the TitleWindow (I have code in place, that allows the user to resize the window), THEN the TitleWindow immediately clips the Content properly. The UIComponent can be controlled by the User, via a Slider Control (which controls the Zoom Level), and the user can also pan the Component around via startDrag() and stopDrag(). Because of all this potential interaction, it's imperative that the Content's Parent Container, properly clips the parts that should not be showing. So with all that said, is there anything I can do differently, to ensure that the TitleWindow always clips the Children that it houses? Thanks in advance for your help, Mike
[flexcoders] DataGrid Scrolling Weirdness
Hi y'all, I'm having a problem with my DataGrid. I'm using a custom component as an ItemRenderer in one of the cells. It generates two buttons. The buttons are colored differently depending on the data. It looks like this: mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=colorizeIt(); mx:Script ![CDATA[ public function colorizeIt():void { if (data.remarks == FIRST BAG) { first.setStyle(color,yellow); last.setStyle(color,white); } else { first.setStyle(color,white); last.setStyle(color,yellow); } } ]] /mx:Script mx:Button fontSize=12 label=FIRST id=first / mx:Button fontSize=12 label=LAST id=last / /mx:HBox This works when the grid is displayed. However, when I scroll through the data grid, the colors of the buttons are changed, seeming randomly. I scroll down, then back up, and the colors have swapped. Another scroll through and back up, and some have returned to their proper color, some have not. Any ideas as to what's going on here, and is this correctable? Thanks! -cj
[flexcoders] Multiple Drag and Drop handlers
Hi coders, I'm trying to implement multiple dragdrop components in the same view, each with a different drop container. The problem is that every container have an dropHandler, and when I'm dragging the first component over the second component's container the drop action is enabled. Of course I can validate this, but I want the red x in the mouse cursor not to dissapear when the component is not on top of it's container. Does anyone know how to do this? DaN
[flexcoders] playing videos from s3
We're trying to play some videos from an amazon s3 bucket, but we keep getting a security error. I've tried putting a crossdomain.xml up there, but that's not working. What's the correct way to deal with this? Thanks
[flexcoders] Re: Is there a way to debug Flex without Flex Builder?
Yes, there is: the free Flex SDK includes fdb, a fully functional command-line debugger. The command set of fdb is modeled after that of gdb, so if you have used gdb, its commands will be familiar. For basic instructions, run fdb, then type help at the prompt. - Mike Morearty Flex Builder team
RE: [flexcoders] DataGrid Scrolling Weirdness
creationComplete only gets called once. You need to react to dataChange. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of cjsutherland Sent: Thursday, September 06, 2007 9:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid Scrolling Weirdness Hi y'all, I'm having a problem with my DataGrid. I'm using a custom component as an ItemRenderer in one of the cells. It generates two buttons. The buttons are colored differently depending on the data. It looks like this: mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml creationComplete=colorizeIt(); mx:Script ![CDATA[ public function colorizeIt():void { if (data.remarks == FIRST BAG) { first.setStyle(color,yellow); last.setStyle(color,white); } else { first.setStyle(color,white); last.setStyle(color,yellow); } } ]] /mx:Script mx:Button fontSize=12 label=FIRST id=first / mx:Button fontSize=12 label=LAST id=last / /mx:HBox This works when the grid is displayed. However, when I scroll through the data grid, the colors of the buttons are changed, seeming randomly. I scroll down, then back up, and the colors have swapped. Another scroll through and back up, and some have returned to their proper color, some have not. Any ideas as to what's going on here, and is this correctable? Thanks! -cj
RE: [flexcoders] Populating XMLListCollection and sending it to a Datagrid
if you know the name of the child you want to loop over you can access it like dataprovider={myXmlListCollection.myChildElement} otherwise, you can usually use something like dataprovider={dg2data.getChildern()} which returns an XMLList brian.. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of its_llpj Sent: Thursday, September 06, 2007 10:13 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Populating XMLListCollection and sending it to a Datagrid Hello, I'm trying to populate a datagrid. Here is my code. Everything works, but when I use the dataProvider dg2data within my datagrid it comes back empty. I know there is data there, but not sure if I'm missing something. public function onSelectFirstGrid(event:Event):void { myRequest.addEventListener(Event.COMPLETE, onResult) myRequest.send(dg.selectedItem.myID); } private function onResult(e:ResultEvent):void { dg2data = e.result as XMLListCollection; } private function onFault(e:FaultEvent):void { Alert.show(e.fault.message, Could not load); } [Bindable] public var dg2data: XMLListCollection; My DataGrid mx:DataGrid id=dg2 width=100% height=100% rowCount=10 dataProvider={dg2data} mx:columns mx:DataGridColumn dataField=name headerText=Name / /mx:columns /mx:DataGrid Thanks! *** The information in this e-mail is confidential and intended solely for the individual or entity to whom it is addressed. If you have received this e-mail in error please notify the sender by return e-mail delete this e-mail and refrain from any disclosure or action based on the information. ***
RE: [flexcoders] Re: Problem with Content spilling over beyond it's container's bounds
Are you reporting a measured or explicit widht/height in measure() and matching that in updateDisplayList()? If you base it on the SWF size, keep in mind that the SWF's size may change and measure incorrectly. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Stawarz Sent: Thursday, September 06, 2007 9:00 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Problem with Content spilling over beyond it's container's bounds I'm having a very similar issue. Did you ever come up with a good resolution or at least an understanding as to what was going on? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Mike Anderson [EMAIL PROTECTED] wrote: Hello All, I have an irritating problem with a draggable TitleWindow, that houses a UIComponent w/embedded SWF. My Custom Class extending a UIComponent embeds an external SWF File, which gives me the ability to wrap it with code. This way I can control the SWF and all the MovieClips it contains, programmatically. Basically, upon the initial Load of the UIComponent, it exceeds the size of the TitleWindow - and instead of the TitleWindow Container masking off the extents of the UIComponent, it literally lets the entire SWF File show through. Now if I trigger a Resize Event by actually sizing the TitleWindow (I have code in place, that allows the user to resize the window), THEN the TitleWindow immediately clips the Content properly. The UIComponent can be controlled by the User, via a Slider Control (which controls the Zoom Level), and the user can also pan the Component around via startDrag() and stopDrag(). Because of all this potential interaction, it's imperative that the Content's Parent Container, properly clips the parts that should not be showing. So with all that said, is there anything I can do differently, to ensure that the TitleWindow always clips the Children that it houses? Thanks in advance for your help, Mike
Re: [flexcoders] ManureMail.com
Go to the URL in the subject ( manuremail.com ) not the URL in Randy's sig ( http://www.randycooper.net ) Appan Parige wrote: Hi, i am seeing except some text and next button which is showing contactinfo. Appan. On 9/6/07, *Dave* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Am I missing something? All I see is an image with one 'Next' button that actually does a pop-up of contact info? Dave */Brendan Meutzner [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]/* wrote: Curious why you chose Flex for this site...? Brendan On 9/4/07, *grimmwerks* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Think it looks great - but I'm curious how you put the link buttons right in the middle of the text -- is that built up or some secret htmlText trick? On Sep 4, 2007, at 5:12 PM, Randy Cooper wrote: Guys, I'd love to get your feedback on a new site I just launched built entirely in Flex. Thanks in advance for your comments. Randy Cooper [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://www.randycooper.net http://www.randycooper.net/ 678.799.0152 -- Brendan Meutzner http://www.meutzner.com/blog/ http://www.meutzner.com/blog/ -- Jeffry Houser, Technical Entrepreneur, Software Developer, Author, Recording Engineer AIM: Reboog711 | Phone: 1-203-379-0773 -- My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com
Re: [flexcoders] Re: NEW FLEX WEBSITE: ManureMail.com
Yeah, That struggle was evident from the transition of MS DOS to Windows... Application centric internet/desktop IS the future, just depends on the road we take to get there. Peace, Mike On 9/6/07, Tony Alves [EMAIL PROTECTED] wrote: Randy, I second that sentiment! Flex kicks ass! I am still struggling with the 100% Flex site structure. Will it be too much out of the gate? Will users get turned off everytime they see a site using flash/flex, because so many developers are going to use it when there was no need for it? These are the unknowns. I think your site is a good example of having a Full Flex solution. Little site content, lots of data centric needs (eCommerce). Oh, the struggles of a web application developer. Tony Randy Cooper wrote: Brendan, DARN good question!!! 1) I wanted to build an entire site in Flex. Why? Same reason the guy climbed Everest - because it was there. 2) I had originally started the project in PHP and AJAX using a freebie template I'd found. Between getting bogged down in a mire of DIV tags and all kinds of issues setting up the checkout to go to authorize.net I finally had to give up on it for a while. (As you might guess manure doesn't pay the bills). Once I started with flex I was off to the races. 3) UI options galore! Without all of the AJAX/DIV/HTML nightmare associated with it. (Did I mention all of the IE vs. Firefox issues to test and deal with? 4) C'mon man! Flex is freaking cool! --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders% flexcoders%2540yahoogroups.com, Brendan Meutzner [EMAIL PROTECTED] wrote: Curious why you chose Flex for this site...? Brendan -- Teoti Graphix http://www.teotigraphix.com Blog - Flex2Components http://www.flex2components.com You can find more by solving the problem then by 'asking the question'.
RE: [flexcoders] Re: Problem with Content spilling over beyond it's container's bounds
Given Alex's point, that SWF size can change dynamically, getting your measure/updateDisplayList functionality right might be difficult. An easy solution, in my mind, would be: 1) Set the width/height of your custom class to 100%, so it fills your title window (or do whatever you want to give it a size...but if you don't give it a size, and don't implement measure(), it will default to 0x0). 2) In your createChildren() function of your custom component, create a shape, addChild it, draw a rectangle into it, and add it as a mask: override protected function createChildren():void { var tmp:Shape = new Shape(); tmp.beginFill(0); tmp.drawRect(0,0,10,10); tmp.endFill(); addChild(tmp); mask = tmp; } 3) In your updateDisplayList(), set the width/height of your mask to match your unscaled width/height: override protected function updateDisplayList(...):void { mask.width = unscaledWidth; mask.height = unscaledHeight; } Now you don't need to rely on the masking capabilities of TitleWindow...your custom component self-masks. Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Thursday, September 06, 2007 9:41 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Problem with Content spilling over beyond it's container's bounds Are you reporting a measured or explicit widht/height in measure() and matching that in updateDisplayList()? If you base it on the SWF size, keep in mind that the SWF's size may change and measure incorrectly. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Stawarz Sent: Thursday, September 06, 2007 9:00 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Problem with Content spilling over beyond it's container's bounds I'm having a very similar issue. Did you ever come up with a good resolution or at least an understanding as to what was going on? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Mike Anderson [EMAIL PROTECTED] wrote: Hello All, I have an irritating problem with a draggable TitleWindow, that houses a UIComponent w/embedded SWF. My Custom Class extending a UIComponent embeds an external SWF File, which gives me the ability to wrap it with code. This way I can control the SWF and all the MovieClips it contains, programmatically. Basically, upon the initial Load of the UIComponent, it exceeds the size of the TitleWindow - and instead of the TitleWindow Container masking off the extents of the UIComponent, it literally lets the entire SWF File show through. Now if I trigger a Resize Event by actually sizing the TitleWindow (I have code in place, that allows the user to resize the window), THEN the TitleWindow immediately clips the Content properly. The UIComponent can be controlled by the User, via a Slider Control (which controls the Zoom Level), and the user can also pan the Component around via startDrag() and stopDrag(). Because of all this potential interaction, it's imperative that the Content's Parent Container, properly clips the parts that should not be showing. So with all that said, is there anything I can do differently, to ensure that the TitleWindow always clips the Children that it houses? Thanks in advance for your help, Mike image001.jpgimage002.jpg
[flexcoders] DataGrid Speed
Hi, I have an app where it uses a datagrid to display screen data. The grid is 25 columns wide with 3 columns of comboboxes, 5 columns of checkboxes and the rest are textinputs. The number of rows varies, but can be as high as 40. What I'm seeing is that after all the server results have been processed and the data for the comboboxes (including data providers), checkboxes, etc has been passed to the data grid, the app just spins for up to 30 secs. The app code I wrote isn't doing anything specific during that time. It is just waiting for the next user event to happen. So it seems like it is the flex stuff working to maybe redraw the screen/datagrid. During this time, my processor generally pegs. Is there someway to speed up this internal processing? Or control it? I've tried reducing the number of rows displayed and that helps, but I really want to be able to display all rows at once without the 20-30sec penalty. Thanks, John
RE: [flexcoders] Re: Chart itemRenderers - how to get origional data values?
You probably need an import statement. import mx.charts.series.BarSeries; Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of shaun Sent: Wednesday, September 05, 2007 11:06 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Chart itemRenderers - how to get origional data values? Hi Barry, barry.beattie wrote: rats! didn't work _label.text = _chartItem.item[BarSeries(_chartItem.element).xField]; Call to a possibly undefined method BarSeries var bs:BarSeries = _chartItem.element as BarSeries; if (bs) ... cheers, shaun image001.jpgimage002.jpg
RE: [flexcoders] How do I get a property from a custom component?
Yes, the evt_obj target or currentTarget has a reference to the custom component. Have a getter function in the component return the name. I also advise passing in the entire item. It cleans up the code and provides flexibility when you decide you need some other bit of item data in the component or in the handler. See below. Tracy Goal: Display a list of items using a complex display for each item, and have each of those items behave like a menu element and respond to a click anywhere on the item by running a handler function. One solution is to use a Repeater with a custom component In the main app or component, declare the Repeater, and the click handler function. mx:Application ... mx:Script![CDATA[ import MyRepeaterItem; ... private function onRPItemClick(oEvent:Event):void { var xmlItem:XML = XML(oEvent.target); }//onRPItemClick ]]/mx:Script mx:VBox ... mx:Repeater id=rp dataProvider={_xmlData} ... !-- Note we pass in the entire currentItem, and define a click handler -- MyRepeaterItem xmlItem={rp.currentItem} itemClick=onRPItemClick(event) .../ /mx:Repeater /mx:VBox /mx:Application And in the component, MyRepeaterItem.mxml: ?xml version=1.0 encoding=utf-8? mx:HBox mouseChildren=false buttonMode=true click=onClick(event) !-- The metadata tag below allows us to define an itemClick handler in mxml, as in the code above -- mx:Metadata [Event(name=itemClick, type=flash.events.Event)] /mx:Metadata mx:Script![CDATA[ [Bindable]private var _xmlItem:XML; /** Setter function */ public function set xmlItem(xml:XML):void { _xmlItem = xml; //do any special, non-bound ui stuff you want }//set xmlItem /** Getter function */ public function get xmlItem():XML { return _xmlItem; }//get xmlItem /** Outer VBox Click handler function */ private function onClick():void { dispatchEvent(new Event(itemClick,false); //we do not need/want this event to bubble }//onClick ]]/mx:Script !-- Now declare the Item UI -- mx:Text id=lbDescription text=[EMAIL PROTECTED] width=100% height=100% / /mx:HBox From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Paul Steven Sent: Thursday, September 06, 2007 2:36 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] How do I get a property from a custom component? I have a repeated custom component as follows: mx:Repeater id=productsRepeater dataProvider={this.category1} local:ComFolderItem mouseOver=CFSMouseOver_Folder(event) click=CFSClick_Folder(event) studentName='{productsRepeater.currentItem.productName + ( + productsRepeater.currentItem.productPrice + )}' /local:ComFolderItem /mx:Repeater And I want to retrieve the studentName and productPrice when this component is clicked on private function CFSClick_Folder(evt_obj:Object):void { var studentName:String = ?? } Please can anyone tell me how I can get this value? Thanks Paul
[flexcoders] file not included in bin
I have a project that for some reason stopped including a file in the bin folder when debugging or doing a clean build. In particular the style.css. Now I have to manually add it to the 'bin' folder each time I update the web server. here is a snippet of my project folder Project assets images style.css bin component1 component2 component3 Is there a config setting that controls this ???
Re: [flexcoders] DataGrid Speed
John - I am guessing that it is the large number of complex controls (particularly combo box) you are using as renderers that is slowing you down. I had a similar situation and had to change my app such that the data rendered for combo boxes and text inputs is rendered using mx:Label or mx:Text until a user clicks on the cell... then the combo box or text input shows up (itemEditor) to allow the edit. This coupled with parsing my data into ActionScript objects and storing them in ArrayCollections and using those as grid data providers (rather than binding directly to e4x) made performance acceptable for me. hth Scott j_lentzz wrote: Hi, I have an app where it uses a datagrid to display screen data. The grid is 25 columns wide with 3 columns of comboboxes, 5 columns of checkboxes and the rest are textinputs. The number of rows varies, but can be as high as 40. What I'm seeing is that after all the server results have been processed and the data for the comboboxes (including data providers), checkboxes, etc has been passed to the data grid, the app just spins for up to 30 secs. The app code I wrote isn't doing anything specific during that time. It is just waiting for the next user event to happen. So it seems like it is the flex stuff working to maybe redraw the screen/datagrid. During this time, my processor generally pegs. Is there someway to speed up this internal processing? Or control it? I've tried reducing the number of rows displayed and that helps, but I really want to be able to display all rows at once without the 20-30sec penalty. Thanks, John
Re: [flexcoders] Flex Fonts: How to implement the Bitmap text (no anti-alias) effect in Flex
polestar11 wrote: Hi there Flash 8 and up provide an option in the property panel for textfields, Bitmap text (no anti-alias). I can use this with embedded fonts to get clear text without depending on the user having the font installed. How do I do this with the Flex compiler? From what I can see, I can only set which of the two anti-alias methods I want to use; I can't seem to say 'don't anti-alias it, but use the embedded font please'! Tracy I second that. This is really annoying thing in Flex. Sometimes I really want to use blur or fade effects on text and I cannot do this without embedded fonts. It's not that embedded fonts are looking weird (though they are :P), the problem is coherence - when I use embedded fonts (antialiased) somewhere, I'm forced to use it everywhere, to not break usability and not confuse user. And I really prefer those crisp, not-embedded look. Please oh please, give us a way to turn antialiasing off. -- | Sebastian Zarzycki / rat[tkin] | [EMAIL PROTECTED] | i'm a little lost in this postmodern space | gg:#2692696 / icq:#264185739 irc :#tool #ot-oa / skype:rattkin -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Populating XMLListCollection and sending it to a Datagrid
Are you sure onResult is getting called? If so, trace out dg2data.toXMLString() to make sure you have what you expect. You should see readable xml. Make sure name is a first generation child node name in the item node. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of its_llpj Sent: Thursday, September 06, 2007 12:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Populating XMLListCollection and sending it to a Datagrid Hello, I'm trying to populate a datagrid. Here is my code. Everything works, but when I use the dataProvider dg2data within my datagrid it comes back empty. I know there is data there, but not sure if I'm missing something. public function onSelectFirstGrid(event:Event):void { myRequest.addEventListener(Event.COMPLETE, onResult) myRequest.send(dg.selectedItem.myID); } private function onResult(e:ResultEvent):void { dg2data = e.result as XMLListCollection; } private function onFault(e:FaultEvent):void { Alert.show(e.fault.message, Could not load); } [Bindable] public var dg2data: XMLListCollection; My DataGrid mx:DataGrid id=dg2 width=100% height=100% rowCount=10 dataProvider={dg2data} mx:columns mx:DataGridColumn dataField=name headerText=Name / /mx:columns /mx:DataGrid Thanks!
RE: [flexcoders] Re: Tree collapses when dataProvider for tree changes
A few things to consider. 1) How are you adding nodes?. If you use XML as the dataProvider and use the XML API to add the nodes, the tree will not collapse. 2) After you programatically change a dataProvider, you need to use callLater to defer any interaction with the Tree control, to allow it to render first. 3) If you use XML as the tree dataProvider, you can use e4x expressions to find the node by its Id property, rather then iterating recursively over the collection. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Baljeet singh Sent: Thursday, September 06, 2007 5:40 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Tree collapses when dataProvider for tree changes Hi, Lets consider an XML as tree of nodes. Let me explain u the meaning of id. My sample XML string look like: node!--First Level -- node id=1 name=A code=1!--Second Level -- node id=2 name=A-1 code=1-1/ !--Third Level -- node id=3 name=A-2 code=1-2 node id=4 name=A-2-1 code=1-2-1/ !-- Fourth Level-- node id=5 name=A-2-2 code=1-2-2/. . /node /node !-- So on--- /node Here my each XML node has unique Id attribute. Now suppose I create a tree with this XML i click on any node. For the selected node, say node with id=5, i can find out the value of id attribute of selected node save this in session object. Means now i have idea about which node i selected. Now suppose , i create two children for selected node i.e for node with id=5. So my XML changes somewhat like below: node!--First Level -- node id=1 name=A code=1!--Second Level -- node id=2 name=A-1 code=1-1/ !--Third Level -- node id=3 name=A-2 code=1-2 node id=4 name=A-2-1 code=1-2-1/ !-- Fourth Level-- node id=5 name=A-2-2 code=1-2-2/. node id=100 name=A-2-2-1 code=1-2-2-1/ !-- Level 5th--- node id=101 name=A-2-2-2 code=1-2-2-2/. /node /node !-- So on--- /node So my dataProvider changes tree gets collapsed. As we have already stored the id attribte value of selected node in session. Now we can iterate over XMLListCollection to find the XML node with that particular id value. Now i use expandItem() method selectedItem property, providing selected node. But none of these things works. Thanks Regards, Baljeet
[flexcoders] Best DataProvider for Combo Box
I am using CF remote objects I want to populate a Combo Box from the result of the CFC method - TermsList which will be a query with two fields TermDesc, and TermCode. Should this be an ArrayCollection or just an Array or something else? I want to display the TermDesc and use TermCode as the value. AS something related -- after the creationComplete I have this function: public function initMe():void{ //this runs when the application is first created getMembers(); itemNum=Application.application.parameters.itemNum; submittedby=Application.application.parameters.submittedby; getWorksfor(); fetchPO(); // getTerms(); } Is there any problem calling multiple functions - getMember(), fetchPO(), getTerms()? These functions in turn call service_ro.getMember etc. Thanks, Michael Sumner Nations Best Sports 817-788-0034 ext 244 817-788-8542 fax
Re: [flexcoders] playing videos from s3
Extremely frustrating; I'm now trying to deal with any possible crossdomain.xml or even putting the flash up on the s3 bucket; but the video won't load.
[flexcoders] Re: DataGrid Speed
I was wondering about using labels and text as renderers and then making the editor the combobox. I'm already using ArrayCollections for providers. Do you have a feel for how much a speed improvement getting rid of combobox renderers was? Another thought is how did you indicate to the user that the label could be clicked, so they would know it would act like a combobox? Thanks for the ideas, John --- In flexcoders@yahoogroups.com, Scott - FastLane [EMAIL PROTECTED] wrote: John - I am guessing that it is the large number of complex controls (particularly combo box) you are using as renderers that is slowing you down. I had a similar situation and had to change my app such that the data rendered for combo boxes and text inputs is rendered using mx:Label or mx:Text until a user clicks on the cell... then the combo box or text input shows up (itemEditor) to allow the edit. This coupled with parsing my data into ActionScript objects and storing them in ArrayCollections and using those as grid data providers (rather than binding directly to e4x) made performance acceptable for me. hth Scott j_lentzz wrote: Hi, I have an app where it uses a datagrid to display screen data. The grid is 25 columns wide with 3 columns of comboboxes, 5 columns of checkboxes and the rest are textinputs. The number of rows varies, but can be as high as 40. What I'm seeing is that after all the server results have been processed and the data for the comboboxes (including data providers), checkboxes, etc has been passed to the data grid, the app just spins for up to 30 secs. The app code I wrote isn't doing anything specific during that time. It is just waiting for the next user event to happen. So it seems like it is the flex stuff working to maybe redraw the screen/datagrid. During this time, my processor generally pegs. Is there someway to speed up this internal processing? Or control it? I've tried reducing the number of rows displayed and that helps, but I really want to be able to display all rows at once without the 20-30sec penalty. Thanks, John
[flexcoders] Why will Debug show all my datagrid results
I have an application that has two datagrids if I view/test the app with just the browser only one datagrid populates, if I view/test with debug both datagrids populate? I do receive this warning in the Flash tracer window of firefox, though I am able to insert data to the db. The warning shows up regardless of the way I run the app. Warning: 404 - Not found: /crossdomain.xml [RPC Fault faultString=Send failed faultCode=Client.Error.MessageSend faultDetail=Channel.Security.Error error Error #2048: Security sandbox violation: file:///C|/Documents%20and%20Settings/msumner/Local%20Settings/Temporary%20I nternet%20Files/Content.IE5/90M6DX5T/C%5F%5FInetpub%5Fwwwroot%5Fgrid%5FMyGri d%5Fbin%5FMyGrid%5B1%5D.swf cannot load data from http://localhost/flex2gateway/.;] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHan dler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at mx.messaging::ChannelSet/::faultPendingSends() at mx.messaging::ChannelSet/channelFaultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFun ction() at flash.events::EventDispatcher/dispatchEvent() at mx.messaging.channels::NetConnectionChannel/::defaultErrorHandler() at mx.messaging.channels::NetConnectionChannel/::securityErrorHandler() Michael Sumner Nations Best Sports 817-788-0034 ext 244 817-788-8542 fax
RE: [flexcoders] newbie
Get your filtering code working without the event and custom event object. I think you need to have a better understanding how filtering works. Review the docs if needed. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema Sent: Thursday, September 06, 2007 4:51 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] newbie I am sorry but I am slow. By applying the filter in the main instance variable, are you suggesting that I put it somewhere within this function? private function accommodationLocatorResultHandler(event:ResultEvent):void { var lodgings:ArrayCollection = event.result.accommodations.accommodation; var temp:ArrayCollection = new ArrayCollection(); var cursor:IViewCursor = lodgings.createCursor(); var filter:AccommodationFilter = new AccommodationFilter(); while (!cursor.afterLast) { var accommodation:Accommodation = new Accommodation(); accommodation.fill(cursor.current); temp.addItem(accommodation); cursor.moveNext(); } accommodations = temp; } Tracy Spratt [EMAIL PROTECTED] wrote: Call it in the result handler. Either apply the filter to the main instance level variable accomodations, or do as you have and then assign selectedAccoms to the dataGrid dataProvider. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema Sent: Wednesday, September 05, 2007 6:57 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] newbie This is the function I thought of introducing. I didn't introduce it because I couldn't really work out how it would be called if I wanted data to be updated automatically i.e. without a button click or something like that. [Bindable] private var selectedAccoms:ArrayCollection; public function updateGrid():void { selectedAccoms = new ArrayCollection(accommodations); //selectedAccoms.filterFunction =; selectedAccoms.refresh(); dgAccom.dataProvider = selectedAccoms; } Tracy Spratt [EMAIL PROTECTED] wrote: Does your handler get called? Does it contain the reference you need? How are you applying the filter? Are you calling refresh()? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema Sent: Wednesday, September 05, 2007 5:54 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] newbie Main Application Script //sending data methods using httpservice to say var accommodations /Script SearchView id=search lodgings={accommodations}/ /Application SearchView HBox Script [Bindable] public var lodgings:ArrayCollections; /Script filterComp id=compfil/ displayGrid id=dg dataprovider={lodgings}/ HBox filterComp //assume it has 2 checkboxes: chk1 and chk2 which call // dispatchFilter() when clicked private function dispatchFilter():void { var event:FilterEvent = new FilterEvent(filter, checked); //filter hold values of selection of chk1 chk2 dispatchEvent(event); } filterEvent.as comstructor public function FilterEvent(filter:MyFilter, live:Boolean) { super(FILTER); this.filter = filter; this.live = live; } MyFilter.as public function accept(accommodation:Accommodation):Boolean { if (graded !accommodation.graded) return false; if (backpacker !accommodation.backpacker) return false; return true; } Above is my abbreviated code. I think my problem is that I am unsure about how to get the result data after filtering. In my mind the filtering function is working on the data retrieved using httpservice...but I havent actually cracked that part
RE: [flexcoders] Best DataProvider for Combo Box
Array is fine if you do not plan to programatically update parts of the data. If you do, use ArrayCollection, because its API dispatches the events necessary to sync the visual control with the changed data. There is no problem calling multiple functions. However, remember that all the RPC data service calls are asynchronous. You must use a result handler to access the result data. So the functions you call immediately after the data service call can not access the data of that call. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Sumner Sent: Thursday, September 06, 2007 1:04 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Best DataProvider for Combo Box I am using CF remote objects I want to populate a Combo Box from the result of the CFC method - TermsList which will be a query with two fields TermDesc, and TermCode. Should this be an ArrayCollection or just an Array or something else? I want to display the TermDesc and use TermCode as the value. AS something related -- after the creationComplete I have this function: public function initMe():void{ //this runs when the application is first created getMembers(); itemNum=Application.application.parameters.itemNum; submittedby=Application.application.parameters.submittedby; getWorksfor(); fetchPO(); // getTerms(); } Is there any problem calling multiple functions - getMember(), fetchPO(), getTerms()? These functions in turn call service_ro.getMember etc. Thanks, Michael Sumner Nations Best Sports 817-788-0034 ext 244 817-788-8542 fax
[flexcoders] How to update UI during long operations
I've got a long operation that is updating the UI through data binding, but the UI doesn't update until the operation finishes. How can I relinquish enough control to the UI to update during long operations? Thanks, Robert
RE: [flexcoders] Why will Debug show all my datagrid results
Flex Builder runs in a trusted sandbox and has no restrictions on calling for data from other domains. If you are running from a browser outside FB, you will have security issues. A warning but not an error, now that is curious. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Sumner Sent: Thursday, September 06, 2007 1:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Why will Debug show all my datagrid results I have an application that has two datagrids if I view/test the app with just the browser only one datagrid populates, if I view/test with debug both datagrids populate? I do receive this warning in the Flash tracer window of firefox, though I am able to insert data to the db. The warning shows up regardless of the way I run the app. Warning: 404 - Not found: /crossdomain.xml [RPC Fault faultString=Send failed faultCode=Client.Error.MessageSend faultDetail=Channel.Security.Error error Error #2048: Security sandbox violation: file:///C|/Documents%20and%20Settings/msumner/Local%20Settings/Temporary %20Internet%20Files/Content.IE5/90M6DX5T/C%5F%5FInetpub%5Fwwwroot%5Fgrid %5FMyGrid%5Fbin%5FMyGrid%5B1%5D.swf cannot load data from http://localhost/flex2gateway/.;] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faul tHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at mx.messaging::ChannelSet/::faultPendingSends() at mx.messaging::ChannelSet/channelFaultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven tFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.messaging.channels::NetConnectionChannel/::defaultErrorHandler() at mx.messaging.channels::NetConnectionChannel/::securityErrorHandler() Michael Sumner Nations Best Sports 817-788-0034 ext 244 817-788-8542 fax
[flexcoders] Re: Populating XMLListCollection and sending it to a Datagrid
I'll try tracing it, but I did have alerts all around both functions to make sure things are getting called. I tried the dg2data.getChildren() within the dataProvider, but I get an error: Error: Call to a possibly undefined method getChildren through a reference with static type mx.collections:XMLListCollection. mx:DataGrid id=dg2 width=100% height=100% rowCount=10 dataProvider={dg2data.getChildren(name)} --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Are you sure onResult is getting called? If so, trace out dg2data.toXMLString() to make sure you have what you expect. You should see readable xml. Make sure name is a first generation child node name in the item node. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of its_llpj Sent: Thursday, September 06, 2007 12:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Populating XMLListCollection and sending it to a Datagrid Hello, I'm trying to populate a datagrid. Here is my code. Everything works, but when I use the dataProvider dg2data within my datagrid it comes back empty. I know there is data there, but not sure if I'm missing something. public function onSelectFirstGrid(event:Event):void { myRequest.addEventListener(Event.COMPLETE, onResult) myRequest.send(dg.selectedItem.myID); } private function onResult(e:ResultEvent):void { dg2data = e.result as XMLListCollection; } private function onFault(e:FaultEvent):void { Alert.show(e.fault.message, Could not load); } [Bindable] public var dg2data: XMLListCollection; My DataGrid mx:DataGrid id=dg2 width=100% height=100% rowCount=10 dataProvider={dg2data} mx:columns mx:DataGridColumn dataField=name headerText=Name / /mx:columns /mx:DataGrid Thanks!
Re: [flexcoders] Re: DataGrid Speed
John - I had four columns that were displaying mx:List and 3 that were displaying mx:ComboBox, additionally I was binding directly to e4x and generating labels on the fly (labelFunction). My client likes 1600x1200 and small fonts, so I had quite a few rows on the screen. Rendering was taking between 15-30 seconds. I removed the mx:List displays and instead added String member variables to my AS objects that were formatted with \n between items then added get xyzList():String methods that the data grid then called for that column (returning the pre-formatted string). As I mentioned I also just used mx:Label as the renderer for the combo boxes and the couple of columns that were Text inputs. Additionally I removed all labelFunctions opting instead to pre-define label attributes in my AS objects (like the xyzList attribute mentioned above). After making all of these changes I was able to get redraws down to the 2-3 second range for a full scale data update... the good news is that I don't need to do a full scale update very often :) In my case, pretty much every column is editable, so I did not need to add an editable indicator although that is a great question. Seems you could easily create a EditableField custom renderer that has some type of indicator in addition to your Label or Text component. Just a thought... hth Scott j_lentzz wrote: I was wondering about using labels and text as renderers and then making the editor the combobox. I'm already using ArrayCollections for providers. Do you have a feel for how much a speed improvement getting rid of combobox renderers was? Another thought is how did you indicate to the user that the label could be clicked, so they would know it would act like a combobox? Thanks for the ideas, John --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com, Scott - FastLane [EMAIL PROTECTED] wrote: John - I am guessing that it is the large number of complex controls (particularly combo box) you are using as renderers that is slowing you down. I had a similar situation and had to change my app such that the data rendered for combo boxes and text inputs is rendered using mx:Label or mx:Text until a user clicks on the cell... then the combo box or text input shows up (itemEditor) to allow the edit. This coupled with parsing my data into ActionScript objects and storing them in ArrayCollections and using those as grid data providers (rather than binding directly to e4x) made performance acceptable for me. hth Scott j_lentzz wrote: Hi, I have an app where it uses a datagrid to display screen data. The grid is 25 columns wide with 3 columns of comboboxes, 5 columns of checkboxes and the rest are textinputs. The number of rows varies, but can be as high as 40. What I'm seeing is that after all the server results have been processed and the data for the comboboxes (including data providers), checkboxes, etc has been passed to the data grid, the app just spins for up to 30 secs. The app code I wrote isn't doing anything specific during that time. It is just waiting for the next user event to happen. So it seems like it is the flex stuff working to maybe redraw the screen/datagrid. During this time, my processor generally pegs. Is there someway to speed up this internal processing? Or control it? I've tried reducing the number of rows displayed and that helps, but I really want to be able to display all rows at once without the 20-30sec penalty. Thanks, John
RE: [flexcoders] Re: DataGrid Speed
You will save even more time if you can use subclasses of DataGridItemRenderer instead of Text and Label. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of j_lentzz Sent: Thursday, September 06, 2007 10:26 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: DataGrid Speed I was wondering about using labels and text as renderers and then making the editor the combobox. I'm already using ArrayCollections for providers. Do you have a feel for how much a speed improvement getting rid of combobox renderers was? Another thought is how did you indicate to the user that the label could be clicked, so they would know it would act like a combobox? Thanks for the ideas, John --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Scott - FastLane [EMAIL PROTECTED] wrote: John - I am guessing that it is the large number of complex controls (particularly combo box) you are using as renderers that is slowing you down. I had a similar situation and had to change my app such that the data rendered for combo boxes and text inputs is rendered using mx:Label or mx:Text until a user clicks on the cell... then the combo box or text input shows up (itemEditor) to allow the edit. This coupled with parsing my data into ActionScript objects and storing them in ArrayCollections and using those as grid data providers (rather than binding directly to e4x) made performance acceptable for me. hth Scott j_lentzz wrote: Hi, I have an app where it uses a datagrid to display screen data. The grid is 25 columns wide with 3 columns of comboboxes, 5 columns of checkboxes and the rest are textinputs. The number of rows varies, but can be as high as 40. What I'm seeing is that after all the server results have been processed and the data for the comboboxes (including data providers), checkboxes, etc has been passed to the data grid, the app just spins for up to 30 secs. The app code I wrote isn't doing anything specific during that time. It is just waiting for the next user event to happen. So it seems like it is the flex stuff working to maybe redraw the screen/datagrid. During this time, my processor generally pegs. Is there someway to speed up this internal processing? Or control it? I've tried reducing the number of rows displayed and that helps, but I really want to be able to display all rows at once without the 20-30sec penalty. Thanks, John
RE: [flexcoders] newbie
Thank you. will do that and see what happens. Tracy Spratt [EMAIL PROTECTED] wrote: Get your filtering code working without the event and custom event object. I think you need to have a better understanding how filtering works. Review the docs if needed. Tracy - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema Sent: Thursday, September 06, 2007 4:51 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] newbie I am sorry but I am slow. By applying the filter in the main instance variable, are you suggesting that I put it somewhere within this function? private function accommodationLocatorResultHandler(event:ResultEvent):void { var lodgings:ArrayCollection = event.result.accommodations.accommodation; var temp:ArrayCollection = new ArrayCollection(); var cursor:IViewCursor = lodgings.createCursor(); var filter:AccommodationFilter = new AccommodationFilter(); while (!cursor.afterLast) { var accommodation:Accommodation = new Accommodation(); accommodation.fill(cursor.current); temp.addItem(accommodation); cursor.moveNext(); } accommodations = temp; } Tracy Spratt [EMAIL PROTECTED] wrote: Call it in the result handler. Either apply the filter to the main instance level variable accomodations, or do as you have and then assign selectedAccoms to the dataGrid dataProvider. Tracy - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema Sent: Wednesday, September 05, 2007 6:57 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] newbie This is the function I thought of introducing. I didn't introduce it because I couldn't really work out how it would be called if I wanted data to be updated automatically i.e. without a button click or something like that. [Bindable] private var selectedAccoms:ArrayCollection; public function updateGrid():void { selectedAccoms = new ArrayCollection(accommodations); //selectedAccoms.filterFunction =; selectedAccoms.refresh(); dgAccom.dataProvider = selectedAccoms; } Tracy Spratt [EMAIL PROTECTED] wrote: Does your handler get called? Does it contain the reference you need? How are you applying the filter? Are you calling refresh()? Tracy - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema Sent: Wednesday, September 05, 2007 5:54 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] newbie Main Application Script //sending data methods using httpservice to say var accommodations /Script SearchView id=search lodgings={accommodations}/ /Application SearchView HBox Script [Bindable] public var lodgings:ArrayCollections; /Script filterComp id=compfil/ displayGrid id=dg dataprovider={lodgings}/ HBox filterComp //assume it has 2 checkboxes: chk1 and chk2 which call // dispatchFilter() when clicked private function dispatchFilter():void { var event:FilterEvent = new FilterEvent(filter, checked); //filter hold values of selection of chk1 chk2 dispatchEvent(event); } filterEvent.as comstructor public function FilterEvent(filter:MyFilter, live:Boolean) { super(FILTER); this.filter = filter; this.live = live; } MyFilter.as public function accept(accommodation:Accommodation):Boolean { if (graded !accommodation.graded) return false; if (backpacker !accommodation.backpacker) return false; return true; } Above is my abbreviated code. I think my problem is that I am unsure about how to get the result data after filtering. In my mind the filtering function is working on the data retrieved using httpservice...but I havent actually cracked that part well...at one point I thought of introducing a function for capturing selected data. Tracy Spratt [EMAIL PROTECTED] wrote: Ok, that is reasonable, what does not work? Does your handler get called? Does it contain the reference you need? How are you updating the dataProvider? Tracy - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema Sent: Wednesday, September 05, 2007 2:52 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] newbie I have two pages. The first is the main. In the main I load my xml data as follows using Httpservice. I pass this data to
RE: [flexcoders] Re: Tree collapses when dataProvider for tree changes
Again, I would recommend not using a binding expression to assign the XML to the dataProvider. Otherwise, I can't see why it would get reassigned unless your code is doing so. A call to validateNow() may be required after assigning the dataprovider before calling expandItem. Or use callLater. Showing some code or creating a mini-example may help us see what you are doing. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Thursday, September 06, 2007 10:24 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Tree collapses when dataProvider for tree changes A few things to consider. 1) How are you adding nodes?. If you use XML as the dataProvider and use the XML API to add the nodes, the tree will not collapse. 2) After you programatically change a dataProvider, you need to use callLater to defer any interaction with the Tree control, to allow it to render first. 3) If you use XML as the tree dataProvider, you can use e4x expressions to find the node by its Id property, rather then iterating recursively over the collection. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Baljeet singh Sent: Thursday, September 06, 2007 5:40 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Tree collapses when dataProvider for tree changes Hi, Lets consider an XML as tree of nodes. Let me explain u the meaning of id. My sample XML string look like: node!--First Level -- node id=1 name=A code=1!--Second Level -- node id=2 name=A-1 code=1-1/ !--Third Level -- node id=3 name=A-2 code=1-2 node id=4 name=A-2-1 code=1-2-1/ !-- Fourth Level-- node id=5 name=A-2-2 code=1-2-2/. . /node /node !-- So on--- /node Here my each XML node has unique Id attribute. Now suppose I create a tree with this XML i click on any node. For the selected node, say node with id=5, i can find out the value of id attribute of selected node save this in session object. Means now i have idea about which node i selected. Now suppose , i create two children for selected node i.e for node with id=5. So my XML changes somewhat like below: node!--First Level -- node id=1 name=A code=1!--Second Level -- node id=2 name=A-1 code=1-1/ !--Third Level -- node id=3 name=A-2 code=1-2 node id=4 name=A-2-1 code=1-2-1/ !-- Fourth Level-- node id=5 name=A-2-2 code=1-2-2/. node id=100 name=A-2-2-1 code=1-2-2-1/ !-- Level 5th--- node id=101 name=A-2-2-2 code=1-2-2-2/. /node /node !-- So on--- /node So my dataProvider changes tree gets collapsed. As we have already stored the id attribte value of selected node in session. Now we can iterate over XMLListCollection to find the XML node with that particular id value. Now i use expandItem() method selectedItem property, providing selected node. But none of these things works. Thanks Regards, Baljeet
RE: [flexcoders] How to update UI during long operations
You need to break the operation up into parts which is fairly straight forward if you process is/has a loop. Create an iterator function that processes a set number of items in the loop, starting from the value you keep in an instance variable. At the end of that function, update the instance variable with the ending index, then use callLater() to call another function. Have that function do any screen updates then call the iterator again if the index flag is less than the length of the loop. callLater() will let the UI update. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Stehwien Sent: Thursday, September 06, 2007 1:32 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] How to update UI during long operations I've got a long operation that is updating the UI through data binding, but the UI doesn't update until the operation finishes. How can I relinquish enough control to the UI to update during long operations? Thanks, Robert
RE: [flexcoders] Populating XMLListCollection and sending it to a Datagrid
e.result may be XML and not XMLListCollection. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Thursday, September 06, 2007 10:28 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Populating XMLListCollection and sending it to a Datagrid Are you sure onResult is getting called? If so, trace out dg2data.toXMLString() to make sure you have what you expect. You should see readable xml. Make sure name is a first generation child node name in the item node. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of its_llpj Sent: Thursday, September 06, 2007 12:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Populating XMLListCollection and sending it to a Datagrid Hello, I'm trying to populate a datagrid. Here is my code. Everything works, but when I use the dataProvider dg2data within my datagrid it comes back empty. I know there is data there, but not sure if I'm missing something. public function onSelectFirstGrid(event:Event):void { myRequest.addEventListener(Event.COMPLETE, onResult) myRequest.send(dg.selectedItem.myID); } private function onResult(e:ResultEvent):void { dg2data = e.result as XMLListCollection; } private function onFault(e:FaultEvent):void { Alert.show(e.fault.message, Could not load); } [Bindable] public var dg2data: XMLListCollection; My DataGrid mx:DataGrid id=dg2 width=100% height=100% rowCount=10 dataProvider={dg2data} mx:columns mx:DataGridColumn dataField=name headerText=Name / /mx:columns /mx:DataGrid Thanks!
RE: [flexcoders] Populating XMLListCollection and sending it to a Datagrid
Ah, yes of course, it almost certainly is. I suggest, in verbose style: var xmlResult:XML = e.result as XML; trace(xmlResult.toXMLString()); //is that the xml you expected? var xlResult:XMLList = xmlResult.children(); //or other expression trace(xlResult.length()); //is that the right expression? dg2data = new XMLListCollection(xlResult) trace(dg2data.getItemAt(0).toXMLString()); //to make It easy to know the dataField Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Thursday, September 06, 2007 2:03 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Populating XMLListCollection and sending it to a Datagrid e.result may be XML and not XMLListCollection. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Thursday, September 06, 2007 10:28 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Populating XMLListCollection and sending it to a Datagrid Are you sure onResult is getting called? If so, trace out dg2data.toXMLString() to make sure you have what you expect. You should see readable xml. Make sure name is a first generation child node name in the item node. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of its_llpj Sent: Thursday, September 06, 2007 12:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Populating XMLListCollection and sending it to a Datagrid Hello, I'm trying to populate a datagrid. Here is my code. Everything works, but when I use the dataProvider dg2data within my datagrid it comes back empty. I know there is data there, but not sure if I'm missing something. public function onSelectFirstGrid(event:Event):void { myRequest.addEventListener(Event.COMPLETE, onResult) myRequest.send(dg.selectedItem.myID); } private function onResult(e:ResultEvent):void { dg2data = e.result as XMLListCollection; } private function onFault(e:FaultEvent):void { Alert.show(e.fault.message, Could not load); } [Bindable] public var dg2data: XMLListCollection; My DataGrid mx:DataGrid id=dg2 width=100% height=100% rowCount=10 dataProvider={dg2data} mx:columns mx:DataGridColumn dataField=name headerText=Name / /mx:columns /mx:DataGrid Thanks!
[flexcoders] Re: Trigger DataTips - Event Injection?
I'm taking a wild guess this is going to require diving into the core files then. I'll see how long my superiors will let me twiddle with it, and post if I get it working. In the meantime, if anyone has a hint just let me know! - William
[flexcoders] Re: DataGrid Speed
Thanks for all the ideas. I'll give them a try and see what performance gains I get. John --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: You will save even more time if you can use subclasses of DataGridItemRenderer instead of Text and Label. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of j_lentzz Sent: Thursday, September 06, 2007 10:26 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: DataGrid Speed I was wondering about using labels and text as renderers and then making the editor the combobox. I'm already using ArrayCollections for providers. Do you have a feel for how much a speed improvement getting rid of combobox renderers was? Another thought is how did you indicate to the user that the label could be clicked, so they would know it would act like a combobox? Thanks for the ideas, John --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Scott - FastLane smelby@ wrote: John - I am guessing that it is the large number of complex controls (particularly combo box) you are using as renderers that is slowing you down. I had a similar situation and had to change my app such that the data rendered for combo boxes and text inputs is rendered using mx:Label or mx:Text until a user clicks on the cell... then the combo box or text input shows up (itemEditor) to allow the edit. This coupled with parsing my data into ActionScript objects and storing them in ArrayCollections and using those as grid data providers (rather than binding directly to e4x) made performance acceptable for me. hth Scott j_lentzz wrote: Hi, I have an app where it uses a datagrid to display screen data. The grid is 25 columns wide with 3 columns of comboboxes, 5 columns of checkboxes and the rest are textinputs. The number of rows varies, but can be as high as 40. What I'm seeing is that after all the server results have been processed and the data for the comboboxes (including data providers), checkboxes, etc has been passed to the data grid, the app just spins for up to 30 secs. The app code I wrote isn't doing anything specific during that time. It is just waiting for the next user event to happen. So it seems like it is the flex stuff working to maybe redraw the screen/datagrid. During this time, my processor generally pegs. Is there someway to speed up this internal processing? Or control it? I've tried reducing the number of rows displayed and that helps, but I really want to be able to display all rows at once without the 20-30sec penalty. Thanks, John
[flexcoders] How to do a Scrolling Display?
Hello, I'm trying to implement a stock market ticker tape like scrolling display for my application. Is there something available out of the box in Flex implement this type of feature? I didn't find any. I'm also playing with DisplayObject class and mx.effects package. I was wondering if anybody has done a similar thing and if I can get some design ideas. Thanks, Amit Gupta
[flexcoders] Re: Disable scrolling via mouse wheel
Just tried those out.. still no luck.. I'm beginning to think this isn't going to work. I didn't know about the useCapture and priority for event listeners.. thought that was going to work. I don't really want to have to cut the string so it doesn't extend out of the TextArea because I use it other places, that seems like it would be a pain in the ass. Do you think this might be an issue of timing? like the eventListener isn't being added in time? I've tried calling it in creationComplete(for the TextArea and app), scroll, and mouseWheel.
RE: [flexcoders] Re: Disable scrolling via mouse wheel
I just realized that the player takes care of mousewheel over textfields and not the Flex framework which is why event blocking isn't going to work. You can subclass TextArea, get to the underlying textField and set mouseWheelEnabled=false. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jayson Sent: Thursday, September 06, 2007 11:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Disable scrolling via mouse wheel Just tried those out.. still no luck.. I'm beginning to think this isn't going to work. I didn't know about the useCapture and priority for event listeners.. thought that was going to work. I don't really want to have to cut the string so it doesn't extend out of the TextArea because I use it other places, that seems like it would be a pain in the ass. Do you think this might be an issue of timing? like the eventListener isn't being added in time? I've tried calling it in creationComplete(for the TextArea and app), scroll, and mouseWheel.
[flexcoders] Re: Security Error
You need a crossdomain.xml file in the root level on the domain you are trying to access. I happen to have the flex docs open, here is the example they give.. ?xml version=1.0? !-- http://www.foo.com/crossdomain.xml -- cross-domain-policy allow-access-from domain=www.friendOfFoo.com/ allow-access-from domain=*.foo.com/ allow-access-from domain=105.216.0.40/ /cross-domain-policy again, that should be in a file called crossdomain.xml and should be placed in the domain you are trying to access from the flex app. --- In flexcoders@yahoogroups.com, jen_bonnett [EMAIL PROTECTED] wrote: I'm a newbie. I've developed a small dashboard application based upon the Sample Dashboard Application. It works great locally; but, when I upload it to the server, I get a security issue when I try to run the application. (Note: it is pulling XML data from Webservices.) [RPC Fault faultString=Security error accessing url faultCode=Channel.Security.Error faultDetail=Destination: DefaultHTTP] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::fa ultHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at private::DirectHTTPMessageResponder/securityErrorHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv entFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/flash.net:URLLoader::redirectEvent() Technically, both the Webservices and Dashboard are in the same domain. They are in different subdirectories. I tried adding a crossdomain.xml file and it didn't help. Dashboard: http://dev.mooringtech.com/fxDashboard/bin/fxDashboard.html WebService: http://dev.mooringtech.com/fxWebServices/GetMonthlyQuotesBySource.aspx The Dashboard runs fine locally against these webservices. Any suggestions?
Re: [flexcoders] How to update UI during long operations
Thanks. I was afraid of that. Right now I'm using recursion for the solution. I can refactor my code so the recursive state is saved and control is returned to the UI. --Robert On 9/6/07, Tracy Spratt [EMAIL PROTECTED] wrote: You need to break the operation up into parts which is fairly straight forward if you process is/has a loop. Create an iterator function that processes a set number of items in the loop, starting from the value you keep in an instance variable. At the end of that function, update the instance variable with the ending index, then use callLater() to call another function. Have that function do any screen updates then call the iterator again if the index flag is less than the length of the loop. callLater() will let the UI update. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Robert Stehwien *Sent:* Thursday, September 06, 2007 1:32 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] How to update UI during long operations I've got a long operation that is updating the UI through data binding, but the UI doesn't update until the operation finishes. How can I relinquish enough control to the UI to update during long operations? Thanks, Robert
[flexcoders] Re: DataGrid Scrolling Weirdness
I can't believe it was that simple. I was working for hours on this. Thanks a million Alex. -cj --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: creationComplete only gets called once. You need to react to dataChange. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of cjsutherland Sent: Thursday, September 06, 2007 9:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid Scrolling Weirdness Hi y'all, I'm having a problem with my DataGrid. I'm using a custom component as an ItemRenderer in one of the cells. It generates two buttons. The buttons are colored differently depending on the data. It looks like this: mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml creationComplete=colorizeIt(); mx:Script ![CDATA[ public function colorizeIt():void { if (data.remarks == FIRST BAG) { first.setStyle(color,yellow); last.setStyle(color,white); } else { first.setStyle(color,white); last.setStyle(color,yellow); } } ]] /mx:Script mx:Button fontSize=12 label=FIRST id=first / mx:Button fontSize=12 label=LAST id=last / /mx:HBox This works when the grid is displayed. However, when I scroll through the data grid, the colors of the buttons are changed, seeming randomly. I scroll down, then back up, and the colors have swapped. Another scroll through and back up, and some have returned to their proper color, some have not. Any ideas as to what's going on here, and is this correctable? Thanks! -cj
[flexcoders] Re: Disable scrolling via mouse wheel
That makes sense. However, I'm not sure how to go about that.. haha. If you could point me in the right direction, I'd appreciate it. Thanks. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I just realized that the player takes care of mousewheel over textfields and not the Flex framework which is why event blocking isn't going to work. You can subclass TextArea, get to the underlying textField and set mouseWheelEnabled=false. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jayson Sent: Thursday, September 06, 2007 11:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Disable scrolling via mouse wheel Just tried those out.. still no luck.. I'm beginning to think this isn't going to work. I didn't know about the useCapture and priority for event listeners.. thought that was going to work. I don't really want to have to cut the string so it doesn't extend out of the TextArea because I use it other places, that seems like it would be a pain in the ass. Do you think this might be an issue of timing? like the eventListener isn't being added in time? I've tried calling it in creationComplete(for the TextArea and app), scroll, and mouseWheel.
RE: [flexcoders] Re: DataGrid Scrolling Weirdness
For more info: (blogs.adobe.com/aharui) From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of cjsutherland Sent: Thursday, September 06, 2007 11:39 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: DataGrid Scrolling Weirdness I can't believe it was that simple. I was working for hours on this. Thanks a million Alex. -cj --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: creationComplete only gets called once. You need to react to dataChange. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of cjsutherland Sent: Thursday, September 06, 2007 9:19 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] DataGrid Scrolling Weirdness Hi y'all, I'm having a problem with my DataGrid. I'm using a custom component as an ItemRenderer in one of the cells. It generates two buttons. The buttons are colored differently depending on the data. It looks like this: mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml creationComplete=colorizeIt(); mx:Script ![CDATA[ public function colorizeIt():void { if (data.remarks == FIRST BAG) { first.setStyle(color,yellow); last.setStyle(color,white); } else { first.setStyle(color,white); last.setStyle(color,yellow); } } ]] /mx:Script mx:Button fontSize=12 label=FIRST id=first / mx:Button fontSize=12 label=LAST id=last / /mx:HBox This works when the grid is displayed. However, when I scroll through the data grid, the colors of the buttons are changed, seeming randomly. I scroll down, then back up, and the colors have swapped. Another scroll through and back up, and some have returned to their proper color, some have not. Any ideas as to what's going on here, and is this correctable? Thanks! -cj
[flexcoders] Security Error
I'm a newbie. I've developed a small dashboard application based upon the Sample Dashboard Application. It works great locally; but, when I upload it to the server, I get a security issue when I try to run the application. (Note: it is pulling XML data from Webservices.) [RPC Fault faultString=Security error accessing url faultCode=Channel.Security.Error faultDetail=Destination: DefaultHTTP] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::fa ultHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at private::DirectHTTPMessageResponder/securityErrorHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv entFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/flash.net:URLLoader::redirectEvent() Technically, both the Webservices and Dashboard are in the same domain. They are in different subdirectories. I tried adding a crossdomain.xml file and it didn't help. Dashboard: http://dev.mooringtech.com/fxDashboard/bin/fxDashboard.html WebService: http://dev.mooringtech.com/fxWebServices/GetMonthlyQuotesBySource.aspx The Dashboard runs fine locally against these webservices. Any suggestions?
RE: [flexcoders] Re: Disable scrolling via mouse wheel
package { import mx.controls.TextArea; public class JaysonTextArea extends TextArea { override protected function createChildren():void { super.createChildren(); textField.mouseWheelEnabled = false; } } } - mx:Application xmlns:mx=http://www.adobe.com; xmlns:local=* / local:JaysonTextArea . / From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jayson Sent: Thursday, September 06, 2007 11:56 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Disable scrolling via mouse wheel That makes sense. However, I'm not sure how to go about that.. haha. If you could point me in the right direction, I'd appreciate it. Thanks. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: I just realized that the player takes care of mousewheel over textfields and not the Flex framework which is why event blocking isn't going to work. You can subclass TextArea, get to the underlying textField and set mouseWheelEnabled=false. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Jayson Sent: Thursday, September 06, 2007 11:33 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Disable scrolling via mouse wheel Just tried those out.. still no luck.. I'm beginning to think this isn't going to work. I didn't know about the useCapture and priority for event listeners.. thought that was going to work. I don't really want to have to cut the string so it doesn't extend out of the TextArea because I use it other places, that seems like it would be a pain in the ass. Do you think this might be an issue of timing? like the eventListener isn't being added in time? I've tried calling it in creationComplete(for the TextArea and app), scroll, and mouseWheel.
RE: [flexcoders] Re: Populating XMLListCollection and sending it to a Datagrid
dg2data.children(); you might wanna look at http://www.adobe.com/devnet/flex/quickstart/accessing_xml_data/ brian.. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of its_llpj Sent: Thursday, September 06, 2007 11:47 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Populating XMLListCollection and sending it to a Datagrid I'll try tracing it, but I did have alerts all around both functions to make sure things are getting called. I tried the dg2data.getChildren() within the dataProvider, but I get an error: Error: Call to a possibly undefined method getChildren through a reference with static type mx.collections:XMLListCollection. mx:DataGrid id=dg2 width=100% height=100% rowCount=10 dataProvider={dg2data.getChildren(name)} --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: Are you sure onResult is getting called? If so, trace out dg2data.toXMLString() to make sure you have what you expect. You should see readable xml. Make sure name is a first generation child node name in the item node. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of its_llpj Sent: Thursday, September 06, 2007 12:13 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Populating XMLListCollection and sending it to a Datagrid Hello, I'm trying to populate a datagrid. Here is my code. Everything works, but when I use the dataProvider dg2data within my datagrid it comes back empty. I know there is data there, but not sure if I'm missing something. public function onSelectFirstGrid(event:Event):void { myRequest.addEventListener(Event.COMPLETE, onResult) myRequest.send(dg.selectedItem.myID); } private function onResult(e:ResultEvent):void { dg2data = e.result as XMLListCollection; } private function onFault(e:FaultEvent):void { Alert.show(e.fault.message, Could not load); } [Bindable] public var dg2data: XMLListCollection; My DataGrid mx:DataGrid id=dg2 width=100% height=100% rowCount=10 dataProvider={dg2data} mx:columns mx:DataGridColumn dataField=name headerText=Name / /mx:columns /mx:DataGrid Thanks! *** The information in this e-mail is confidential and intended solely for the individual or entity to whom it is addressed. If you have received this e-mail in error please notify the sender by return e-mail delete this e-mail and refrain from any disclosure or action based on the information. ***
[flexcoders] Re: Disable scrolling via mouse wheel
Awesome! Thanks a lot... that did the trick wonderfully. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: package { import mx.controls.TextArea; public class JaysonTextArea extends TextArea { override protected function createChildren():void { super.createChildren(); textField.mouseWheelEnabled = false; } } } - mx:Application xmlns:mx=http://www.adobe.com; xmlns:local=* / local:JaysonTextArea . / From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jayson Sent: Thursday, September 06, 2007 11:56 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Disable scrolling via mouse wheel That makes sense. However, I'm not sure how to go about that.. haha. If you could point me in the right direction, I'd appreciate it. Thanks. --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: I just realized that the player takes care of mousewheel over textfields and not the Flex framework which is why event blocking isn't going to work. You can subclass TextArea, get to the underlying textField and set mouseWheelEnabled=false. From: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of Jayson Sent: Thursday, September 06, 2007 11:33 AM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: Disable scrolling via mouse wheel Just tried those out.. still no luck.. I'm beginning to think this isn't going to work. I didn't know about the useCapture and priority for event listeners.. thought that was going to work. I don't really want to have to cut the string so it doesn't extend out of the TextArea because I use it other places, that seems like it would be a pain in the ass. Do you think this might be an issue of timing? like the eventListener isn't being added in time? I've tried calling it in creationComplete(for the TextArea and app), scroll, and mouseWheel.
[flexcoders] RTMP works with .mxml but not swf?
I'm deploying my app to the web server and I have a major problem Say I have a messaging destination called fleet_demo set up and broadcasting messages. Say my app is the following: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=init() mx:Consumer id=consumer message=rtmpHandler(event.message)/ mx:Script ![CDATA[ import mx.messaging.messages.IMessage; import mx.controls.Alert; private function init():void { consumer.destination = fleet_demo; consumer.subscribe(); } private function rtmpHandler(message:IMessage):void { Alert.show(Recieved RTMP message, ALERT); } ]] /mx:Script /mx:Application If I deploy this to my webserver as an MXML file, it takes a bit of time to compile when loaded, but the alert windows pop up as it receives the RTMP messages. If I deploy this to my webserver as the compiled SWF file, no RTMP messages are recieved. There is no error message at all, its just as though no RTMP messages are getting received. Why is this? My real flex app is too large to compile at run-time so I need to know why apps deployed as SWF files have this problem receiving RTMP messages. Thanks
[flexcoders] Re: Populating XMLListCollection and sending it to a Datagrid
That's it! Thanks Tracy! Thanks everyone! --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Ah, yes of course, it almost certainly is. I suggest, in verbose style: var xmlResult:XML = e.result as XML; trace(xmlResult.toXMLString()); //is that the xml you expected? var xlResult:XMLList = xmlResult.children(); //or other expression trace(xlResult.length()); //is that the right expression? dg2data = new XMLListCollection(xlResult) trace(dg2data.getItemAt(0).toXMLString()); //to make It easy to know the dataField Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Thursday, September 06, 2007 2:03 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Populating XMLListCollection and sending it to a Datagrid e.result may be XML and not XMLListCollection. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Thursday, September 06, 2007 10:28 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Populating XMLListCollection and sending it to a Datagrid Are you sure onResult is getting called? If so, trace out dg2data.toXMLString() to make sure you have what you expect. You should see readable xml. Make sure name is a first generation child node name in the item node. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of its_llpj Sent: Thursday, September 06, 2007 12:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Populating XMLListCollection and sending it to a Datagrid Hello, I'm trying to populate a datagrid. Here is my code. Everything works, but when I use the dataProvider dg2data within my datagrid it comes back empty. I know there is data there, but not sure if I'm missing something. public function onSelectFirstGrid(event:Event):void { myRequest.addEventListener(Event.COMPLETE, onResult) myRequest.send(dg.selectedItem.myID); } private function onResult(e:ResultEvent):void { dg2data = e.result as XMLListCollection; } private function onFault(e:FaultEvent):void { Alert.show(e.fault.message, Could not load); } [Bindable] public var dg2data: XMLListCollection; My DataGrid mx:DataGrid id=dg2 width=100% height=100% rowCount=10 dataProvider={dg2data} mx:columns mx:DataGridColumn dataField=name headerText=Name / /mx:columns /mx:DataGrid Thanks!
[flexcoders] Re: Compiling with compc: can't direct the output properly
That's the format for -include-file parameter: -include-file name path --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: What is the ./src right before -output doing there? - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Paul Neyman Sent: Wednesday, September 05, 2007 3:34 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Compiling with compc: can't direct the output properly I am trying to compile an SWC file with compc. Here's the command line I'm passing: compc -source-path ./src -include-file *.as ./src -output='FlexSDK.swc' And here's what I get back: Error: unable to export SWC FlexSDK.swc: c:\wdir\c8\sdk\flex\.\src (Access is denied) No matter what value I set for the output parameter, compc takes in the 'base' folder and appends it to the current location. I even tried to write an ant build.xml: property name=base value=./src / property name=compiler value=compc.exe / target name=compile description=Compile SWC. echoBuilding ${swcFile}/echo exec executable=cmd failonerror=true arg line=/c ${compiler} -source-path ${base} -include-file * ${base} -output='${swcFile}'/ /exec /target But I get the same error. Any solution? Thanks!
[flexcoders] build.xml/Makefile question
I've written a Makefile that compcs changed packages into .SWC files. Then it mxmlcs all the .SWC files and Main.AS into a final .SWF. It runs fine but doesn't really seem to be faster than just mxmlcing all the .AS files at the same time. Based on my understanding of the Gary Grossman slide show: .ABC files should be easier to build from than .SWC files. Looking around I found information on how I should be able to compile all my classes down to .ABC files with asc. I found asc.jar and wrote a wrapper for it; unfortunately, it can't do anything without a file listing all the interfaces. I think the interfaces file should be called global.as but I couldn't find it on my machine. Is there a way to extract something like global.as from the files that ship with flex? Am I wasting my time (will .ABC files not offer me any improvement)? thank you, David Tudury
[flexcoders] custom component as item renderer
hi. i'm following aral balkan's tutorial on using item renderers: http://www.adobe.com/devnet/flex/quickstart/using_item_renderers/ i'm trying to implement a custom component as my item renderer and i'm going thru the tute and i'm still getting the following error: Definition ImageRenderer could not be found. I thought that assigning the name of the component (it resides in the same directory) to the 'itemRenderer' property of my List component would be fine. Here's my List: !-- scrollable list of materials -- mx:List id=materialsList width=120 height=300 dataProvider={test.availableMaterials} itemRenderer=ImageRenderer // this is line throwing the error. rowHeight=100 verticalAlign=middle /mx:List and here's my custom component that i'm trying to use as an item renderer (ImageRenderer.mxml): ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=200 height=200 mx:Component mx:Image source={data.browseLinkURL}/ /mx:Component /mx:Canvas What might I be missing? any tips are appreciated. thank you. -- matt.
RE: [flexcoders] custom component as item renderer
import ImageRenderer; Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matthew Ganz Sent: Thursday, September 06, 2007 4:38 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] custom component as item renderer hi. i'm following aral balkan's tutorial on using item renderers: http://www.adobe.com/devnet/flex/quickstart/using_item_renderers/ http://www.adobe.com/devnet/flex/quickstart/using_item_renderers/ i'm trying to implement a custom component as my item renderer and i'm going thru the tute and i'm still getting the following error: Definition ImageRenderer could not be found. I thought that assigning the name of the component (it resides in the same directory) to the 'itemRenderer' property of my List component would be fine. Here's my List: !-- scrollable list of materials -- mx:List id=materialsList width=120 height=300 dataProvider={test.availableMaterials} itemRenderer=ImageRenderer // this is line throwing the error. rowHeight=100 verticalAlign=middle /mx:List and here's my custom component that i'm trying to use as an item renderer (ImageRenderer.mxml): ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml width=200 height=200 mx:Component mx:Image source={data.browseLinkURL}/ /mx:Component /mx:Canvas What might I be missing? any tips are appreciated. thank you. -- matt.
Re: [flexcoders] custom component as item renderer
thank you but i'm still getting the same error even when i import my custom component. - Original Message - From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Thursday, September 06, 2007 4:53 PM Subject: RE: [flexcoders] custom component as item renderer import ImageRenderer; Tracy -- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matthew Ganz Sent: Thursday, September 06, 2007 4:38 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] custom component as item renderer hi. i'm following aral balkan's tutorial on using item renderers: http://www.adobe.com/devnet/flex/quickstart/using_item_renderers/ i'm trying to implement a custom component as my item renderer and i'm going thru the tute and i'm still getting the following error: Definition ImageRenderer could not be found. I thought that assigning the name of the component (it resides in the same directory) to the 'itemRenderer' property of my List component would be fine. Here's my List: !-- scrollable list of materials -- mx:List id=materialsList width=120 height=300 dataProvider={test.availableMaterials} itemRenderer=ImageRenderer // this is line throwing the error. rowHeight=100 verticalAlign=middle /mx:List and here's my custom component that i'm trying to use as an item renderer (ImageRenderer.mxml): ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=200 height=200 mx:Component mx:Image source={data.browseLinkURL}/ /mx:Component /mx:Canvas What might I be missing? any tips are appreciated. thank you. -- matt.
RE: [SPAM] RE: [flexcoders] How do I get a property from a custom component?
Thanks yet again Tracy for helping me along on my steep learning curve with this Flex malarkey. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: 06 September 2007 18:15 To: flexcoders@yahoogroups.com Subject: [SPAM] RE: [flexcoders] How do I get a property from a custom component? Yes, the evt_obj target or currentTarget has a reference to the custom component. Have a getter function in the component return the name. I also advise passing in the entire item. It cleans up the code and provides flexibility when you decide you need some other bit of item data in the component or in the handler. See below. Tracy Goal: Display a list of items using a complex display for each item, and have each of those items behave like a menu element and respond to a click anywhere on the item by running a handler function. One solution is to use a Repeater with a custom component In the main app or component, declare the Repeater, and the click handler function. mx:Application ... mx:Script![CDATA[ import MyRepeaterItem; ... private function onRPItemClick(oEvent:Event):void { var xmlItem:XML = XML(oEvent.target); }//onRPItemClick ]]/mx:Script mx:VBox ... mx:Repeater id=rp dataProvider={_xmlData} ... !-- Note we pass in the entire currentItem, and define a click handler -- MyRepeaterItem xmlItem={rp.currentItem} itemClick=onRPItemClick(event) .../ /mx:Repeater /mx:VBox /mx:Application And in the component, MyRepeaterItem.mxml: ?xml version=1.0 encoding=utf-8? mx:HBox mouseChildren=false buttonMode=true click=onClick(event) !-- The metadata tag below allows us to define an itemClick handler in mxml, as in the code above -- mx:Metadata [Event(name=itemClick, type=flash.events.Event)] /mx:Metadata mx:Script![CDATA[ [Bindable]private var _xmlItem:XML; /** Setter function */ public function set xmlItem(xml:XML):void { _xmlItem = xml; //do any special, non-bound ui stuff you want }//set xmlItem /** Getter function */ public function get xmlItem():XML { return _xmlItem; }//get xmlItem /** Outer VBox Click handler function */ private function onClick():void { dispatchEvent(new Event(itemClick,false); //we do not need/want this event to bubble }//onClick ]]/mx:Script !-- Now declare the Item UI -- mx:Text id=lbDescription text=[EMAIL PROTECTED] width=100% height=100% / /mx:HBox From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Paul Steven Sent: Thursday, September 06, 2007 2:36 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] How do I get a property from a custom component? I have a repeated custom component as follows: mx:Repeater id=productsRepeater dataProvider={this.category1} local:ComFolderItem mouseOver=CFSMouseOver_Folder(event) click=CFSClick_Folder(event) studentName='{productsRepeater.currentItem.productName + ( + productsRepeater.currentItem.productPrice + )}' /local:ComFolderItem /mx:Repeater And I want to retrieve the studentName and productPrice when this component is clicked on private function CFSClick_Folder(evt_obj:Object):void { var studentName:String = ?? } Please can anyone tell me how I can get this value? Thanks Paul
RE: [flexcoders] custom component as item renderer
Have you declared the default namespace in the root tag of the app? xmlns=* Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matthew Ganz Sent: Thursday, September 06, 2007 4:51 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] custom component as item renderer thank you but i'm still getting the same error even when i import my custom component. - Original Message - From: Tracy Spratt mailto:[EMAIL PROTECTED] To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Thursday, September 06, 2007 4:53 PM Subject: RE: [flexcoders] custom component as item renderer import ImageRenderer; Tracy From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matthew Ganz Sent: Thursday, September 06, 2007 4:38 PM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: [flexcoders] custom component as item renderer hi. i'm following aral balkan's tutorial on using item renderers: http://www.adobe.com/devnet/flex/quickstart/using_item_renderers/ http://www.adobe.com/devnet/flex/quickstart/using_item_renderers/ i'm trying to implement a custom component as my item renderer and i'm going thru the tute and i'm still getting the following error: Definition ImageRenderer could not be found. I thought that assigning the name of the component (it resides in the same directory) to the 'itemRenderer' property of my List component would be fine. Here's my List: !-- scrollable list of materials -- mx:List id=materialsList width=120 height=300 dataProvider={test.availableMaterials} itemRenderer=ImageRenderer // this is line throwing the error. rowHeight=100 verticalAlign=middle /mx:List and here's my custom component that i'm trying to use as an item renderer (ImageRenderer.mxml): ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml width=200 height=200 mx:Component mx:Image source={data.browseLinkURL}/ /mx:Component /mx:Canvas What might I be missing? any tips are appreciated. thank you. -- matt.
[flexcoders] Flex Builder 2 plugin issue - no more red 'X'
Here's the issue: You all know that Flex Builder does dynamic syntax validation, and places a red 'X' in the left-hand gutter if there is an obvious problem. It is a handy feature, but mine has suddenly stopped working. I reinstalled eclipse / flex builder - and it still will not display the 'X'. btw ... Project Build Automatically is checked. Other developers in the group have experienced the same problem. Any hints?
[flexcoders] Re: Chart itemRenderers - how to get origional data values?
yep. that's it - incorrect namespace. but I've hit another problem... performance on drawing it, esp compared to the origional version. *really* noticable. I must be asking a lot from the framework to do this, unless I'm not doing it the _best_ way? BarChart id=chart width=100% height=100% dataProvider={dataSet.Sample} series BarSet type=stacked BarSeries xField=costs itemRenderer=examples.customizing.LabeledRenderer2 / BarSeries xField=overhead itemRenderer=examples.customizing.LabeledRenderer2 / BarSeries xField=oneTime itemRenderer=examples.customizing.LabeledRenderer2 / /BarSet /series verticalAxis CategoryAxis categoryField=month / /verticalAxis /BarChart
[flexcoders] Service location and configuration
I may yet come back to the Cairngorm fold, but right now I'm looking at ServiceLocator alternatives, since that's the only piece of Cairngorm I'm using. How does that class work anyway? It's not obvious to me how the services in the Services.mxml file make their way into the dictionaries in HTTPServices etc. What am I missing? It seems really valuable to have global lookup of services by name and configuration in an (M)XML file. How do the rest of you do it? Anyone using Prana? Thanks.