[flexcoders] Re: How to display the Image
Hi, I tried this but didnt got any success mx:DataGrid dataProvider={_xlDayData} height=180 mx:columns mx:DataGridColumn labelFunction=lfDayData headerText=Day width=200 / mx:DataGridColumn labelFunction=lfDayData headerText=High width=100 / mx:DataGridColumn labelFunction=lfDayData headerText=Low width=100 / mx:DataGridColumn labelFunction=lfDayData headerText=Image dataField=image mx:itemRenderer mx:Component mx:Image source=??/ /mx:Component /mx:itemRenderer /mx:DataGridColumn /mx:columns /mx:DataGrid Can any one correct this how to retrive the Image Regards Praveen --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: If you set the itemRenderer to mx:Image, and dataField set to WeatherImage you should see the image. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Praveen Saxena Sent: Thursday, May 17, 2007 8:39 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] How to display the Image Hi, Is it possible to put the image in the datagrid after getting the the image url from the XML file. My sample Xml look like this. WeatherData DaySaturday, May 19, 2007/Day WeatherImagehttp://www.nws.noaa.gov/weather/images/fcicons/few.jpg http://www.nws.noaa.gov/weather/images/fcicons/few.jpg /We atherImage MaxTemperatureF76/MaxTemperatureF MinTemperatureF43/MinTemperatureF MaxTemperatureC24/MaxTemperatureC MinTemperatureC6/MinTemperatureC /WeatherData My requirement is display the image after from the URL specified in the WeatherImage tag. Thanks Regards, Praveen
RE: [flexcoders] Override failing.... between MXML base class and AS3 subclass
Can you show us some code? How are things set up in MXML and in the subclass? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matthew OMeara Sent: Thursday, May 17, 2007 6:16 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Override failing between MXML base class and AS3 subclass Perhaps I shopuld not be trying to do this, but here it is anyway... I have a compound MXML component that I have created that has a few MXML children and 2 states. It serves as an agnostic visual control that Value Objects get assigned to for dipslay. I want to reuse the MXML control several times over, so I have subclassed it in an AS3 class. Everything works fine except... when I override functions from the base class in the descendant class, it is failing to override. Meaning I have a button in the base class that calls its own function, which is overriden in this instance but flex fails to route my event to the overriden function... it sends it to my placeholder function in the base class. I realize that Flex does not support Abstract functions yet, but what I am trying to do should work without requiring abstract. Any insights are appreciated. Matthew
RE: [flexcoders] Does Drag Drop Only Update the DataProvider?
How do you know it didn't update __employees? Can you post a mini-example in a couple of screenfuls of text? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Thursday, May 17, 2007 6:11 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Does Drag Drop Only Update the DataProvider? I have a DataGrid that has a dataProvider bound to an ArrayCollection. code mx:DataGrid id=dgEmployees dataProvider={__employees} ... /code I also have another DataGrid (dgAllEmployees) that is within a popup, which I use as a source for Drag Drop operations to populate the dgEmployee dataGrid. What I've noticed is that when I drag drop employees from the all employees DataGrid to the employees DataGrid, it seems to only update the dataProvider of dgEmployees, and not the ArrayCollection __employees. Why is this? Below is a snip of my drag drop code where it actually copies the data. This is a generic method that is used all over the application. code public static function doDragDrop( event:DragEvent ):void { // Prevent the default event from happening. event.preventDefault(); // Get drop target var dropTarget:DataGrid = DataGrid(event.currentTarget); // Get the dragged items from the drag initiator. var dropItems:Array = event.dragSource.dataForFormat(items) as Array; // Add each item to the drop target. for (var i:uint = 0; i dropItems.length; i++) { var dest:IList = IList(dropTarget.dataProvider); if (!contains(dest, dropItems[i])) { dest.addItem(dropItems[i]); } } } /code I think that I had event.preventDefault(); in there because it was putting 2 of each dropped item in the dgEmployee DataGrid. Might this be messing something up? Also, contains() is a custom method to compare the source items to what's in the target's list to prevent duplicates. Is there a better way to do this? Thanks in advance. GT
RE: [flexcoders] Re: How to display the Image
I think it would look more like: mx:DataGridColumn headerText=Image dataField=image mx:itemRenderer mx:Component mx:Image / /mx:Component /mx:itemRenderer /mx:DataGridColumn From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Praveen Saxena Sent: Thursday, May 17, 2007 11:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: How to display the Image Hi, I tried this but didnt got any success mx:DataGrid dataProvider={_xlDayData} height=180 mx:columns mx:DataGridColumn labelFunction=lfDayData headerText=Day width=200 / mx:DataGridColumn labelFunction=lfDayData headerText=High width=100 / mx:DataGridColumn labelFunction=lfDayData headerText=Low width=100 / mx:DataGridColumn labelFunction=lfDayData headerText=Image dataField=image mx:itemRenderer mx:Component mx:Image source=??/ /mx:Component /mx:itemRenderer /mx:DataGridColumn /mx:columns /mx:DataGrid Can any one correct this how to retrive the Image Regards Praveen --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: If you set the itemRenderer to mx:Image, and dataField set to WeatherImage you should see the image. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Praveen Saxena Sent: Thursday, May 17, 2007 8:39 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] How to display the Image Hi, Is it possible to put the image in the datagrid after getting the the image url from the XML file. My sample Xml look like this. WeatherData DaySaturday, May 19, 2007/Day WeatherImagehttp://www.nws.noaa.gov/weather/images/fcicons/few.jpg http://www.nws.noaa.gov/weather/images/fcicons/few.jpg http://www.nws.noaa.gov/weather/images/fcicons/few.jpg http://www.nws.noaa.gov/weather/images/fcicons/few.jpg /We atherImage MaxTemperatureF76/MaxTemperatureF MinTemperatureF43/MinTemperatureF MaxTemperatureC24/MaxTemperatureC MinTemperatureC6/MinTemperatureC /WeatherData My requirement is display the image after from the URL specified in the WeatherImage tag. Thanks Regards, Praveen
[flexcoders] Sound Security Errors
When loading sound files from a remote domain without a policyfile how do I catch security errors. I cant find any help in the documentation. Regards, Bjorn Schultheiss
Re: {Disarmed} Re: [flexcoders] Flex on Mac
On Thursday 17 May 2007, fuad_kamal wrote: main window. Sure, you could size the main eclipse window across all three of your monitors, but that's not what we're talking about, here. Open a new Eclipse window, you can then drag the tabs to that one. -- Tom Chiverton Helping to appropriately incubate intuitive interfaces 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] Re: Resize Effect for Auto
On Thursday 17 May 2007, Matt wrote: Thanks for the response. That has many potential problems though. First of, that would expand to the maximum available space, whereas I only want it to take up the area it needs. So add up all your component widths. -- Tom Chiverton Helping to economically orchestrate clicks-and-mortar patterns 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] Flex cookbook article: Flex2 XML Reader Can Create UIComponents
On Friday 18 May 2007, Austin Kottke wrote: more scaleable and integration with the server end would be a lot more feasible. (As in doing HTTPRequests where serverside MXML could be generated through Velocity/JSP and then given back to the ui) I think you'd be a lot better off returning a domain-specific description of what the GUI should do and look like, and have the client reconfigure itself (removeChild(), addChild(new Button()) etc. etc. scalability and integration with servers - similar to the Apache IIS mod for JSP, etc - the only problem is that it's just for Apache or IIS. Some run tomcat, resin, etc. But having it on the client end would eliminate this problem. There is already a web-tier compiler. -- Tom Chiverton Helping to competently incentivize low-risk environments 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/
[flexcoders] DataGrid dynamic toolTips or dataTips
Hi all, my name is James Wilson, I am a flex programmer in the atlanta area, new to the list. On a datagrid, I'd like to display more information about the item the user is hovering over in a tooltip, but I want to get this information (a fair bit) dynamically based on a case number/id from the datagrid item that is being hovered over. The best way I can think of is to do a loop in the dataTipFunction: public function myDataTipFunction(e:HitData):String { while(httpService.lastResult == null){} //return tooltip based on result. } Surely there is a better way. Thanks everyone. Nice to meet you all. :) James Wilson
[flexcoders] using custom components
Hi folks, I'm trying to use a MVC model for buildin my application. I have built 2 custom components placed them in my components folder. My components are: - Appliction Layout component, similiar to a VDivided box - Custom panel component with minimise, maximise, close button. In my main.mxml, I plan to set up 10 different states, each one representing different screens of my application. Each of these states, will be made up of 1 custom layout component which can contain multiple custom panels on the left and multiple custom panels on the right hand side. My question is, im main.mxml, how can I write the following: - Create a new Layout Component - In the lhs of the Layout Component put 2 custom panels - In the RHS of the layout componnet put 3 custom panels Once I can do that, I an create lots of different states, I just cant figure out how to write it...im sooo close, but yet so far! Here is my Layout Component ?xml version=1.0 encoding=utf-8? mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% xmlns:components=assets.src.components.* mx:Script ![CDATA[ public var indexValue:int = 0; private function changeState() : void { if(indexValue == 0){ currentState='zeroOneHundred'; indexValue = 1; } else if(indexValue == 1){ currentState='fiftyFifty'; indexValue = 0; } } ]] /mx:Script mx:states mx:State name=fiftyFifty mx:SetProperty target={fnwLeftPanel} name=width value=50%/ mx:SetProperty target={fnwRightPanel} name=width value=50%/ /mx:State mx:State name=zeroOneHundred mx:SetProperty target={fnwLeftPanel} name=width value=0%/ mx:SetProperty target={fnwRightPanel} name=width value=100%/ /mx:State /mx:states mx:transitions mx:Transition id=fnwTransition fromState=* toState=* mx:Parallel id=t1 targets={[fnwLeftPanel,fnwRightPanel]} mx:Move duration=500/ mx:Resize duration=500/ /mx:Parallel /mx:Transition /mx:transitions mx:VBox id=fnwLeftPanel width=50% height=100% backgroundColor=red /mx:VBox mx:Image source=assets/src/images/arrow_sample.png click=changeState();/ mx:VBox id=fnwRightPanel width=50% height=100% backgroundColor=green /mx:VBox /mx:HBox -- - here is my panel -- ?xml version=1.0 encoding=utf-8? mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; styleName=layoutPanel layout=absolute width=100% height=200 paddingTop=0 paddingLeft=0 paddingRight=0 paddingBottom=0 x=0 y=0 mx:states mx:State name=minimise mx:SetProperty name=height value=48/ mx:SetEventHandler target={button1} name=click handler=currentState=''/ /mx:State /mx:states mx:transitions mx:Transition fromState=* toState=* mx:Parallel target={this} mx:Resize duration=1000/ mx:Move duration=1000/ /mx:Parallel /mx:Transition /mx:transitions mx:Label id=fnwPanelLabel text=/ !-- taskbar control items -- mx:HBox id=fnwPanelControlBox width=100% height=22 styleName=panelOpts mx:Spacer width=100%/ mx:Button height=13 width=13 styleName=optionsButton / mx:Button height=13 width=2 styleName=panelDivider / mx:Button height=13 width=10 styleName=minButton click=currentState='minimise' id=button1/ mx:Button height=13 width=2 styleName=panelDivider / mx:Button height=13 width=12 styleName=closeButton / /mx:HBox !-- main content items -- mx:VBox id=fnwPanelContentBox styleName=contentHolder y=22 width=100% height=100% /mx:VBox /mx:Panel -- -- here is my main.mxml -- -- ?xml version=1.0
[flexcoders] Events not firing from swf imported with SwfLoader
Hi, I'm not a flash expert so you'll have to bear with me on this. I'm not creating the swf's myself. I've recieved animations in swf's before and used them in image controls and they work fine. (movie clips generated in Flash MX 2004) If however the swf has a button on it (just an animation which plays on the rollover and snaps back to first frame on rollout) no events get fired from it when it's embeded into my image control. I'm assuming that the button in the swf is catching all mouse events and not passing them on. Does anybody know if this is the expected behaviour or if there's an easy way around it? As it stands I guess I'll need to handle switching to an animation on the rollover event within Flex2. Thanks in advance Bill P.S. I saw this, but it seems like overkill for what I want. http://www.jessewarden.com/archives/2006/08/flash_9_button.html
[flexcoders] TileList skinning help
I'm trying to skin up the TileList component and am not having the best of luck - aside from just changing colors and whatnot. Has anyone succeeded in using skins through CSS to style the TileList component? Specifically, I have a background skin that I'm trying to use for the normal background state, roll over, and selected states. When you have a custom item renderer for the TileList, does it override any settings you make for the component? I even imported my CSS styles into the itemRenderer that I created and applied the style to VBox components in there - that doesn't take unless I put another nested VBox inside (but then I don't have all the states available). Since I'm creating a pretty custom item renderer with various elements, should I just be importing these skins directly into the itemRenderer and handling it from there? Any thoughts are appreciated. cheers, jon
[flexcoders] zoom for buttons in ButtonBar
Hi, I'm kind of new to Flex :) What would be the way to show zoom effect on buttons contains withing ButtonBar? Thanks, Ken
Re: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents
Ely, I find runtime MXML something that would be invaluable. It is something that if implemented could make developing in flex a lot more scaleable and integration with the server end would be a lot more feasible. (As in doing HTTPRequests where serverside MXML could be generated through Velocity/JSP and then given back to the ui) A lot of developers don't know a thing about flex, but can learn basic MXML for layout or simple scripting and implement basic server side operations. And if these are kept just as mxml it makes updates in the future easier. We can then just tell someone (edit the MXML) and you're done, instead of download the flex sdk, set your ant build, yada ya -- some aren't programmers, but MXML is very easy to learn. It's a lot more confrontable for a designer/layout guy to tackle. Anyway, runtime MXML would be something that would majorly increase scalability and integration with servers - similar to the Apache IIS mod for JSP, etc - the only problem is that it's just for Apache or IIS. Some run tomcat, resin, etc. But having it on the client end would eliminate this problem. Best, austin Ely Greenfield wrote: Austin et. al. -- There are a number of features of MXML that simply can't be replicated at runtime. Things like script blocks. Other features would be prohibitively difficult (arbitrary binding expressions, @Embed, mx:Component, among others). You could reduce MXML to a runtime-parsable subset, and I know various people have taken various approaches to this. The more you reduce it, the easier it would be to replicate...removing repeaters, implicit arrays, default properties, etc. would get you down to something that could be implemented in a reasonable amount of time. I'm curious...how many people would find runtime MXML to be important to them? Ely. *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Doug McCune *Sent:* Thursday, May 17, 2007 12:47 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents Yeah, ummm, my advice would be ignore that article. That's one of the effects of having an article submission process that allows anyone to submit anything. I know the cookbook is supposed to be user generated and reviewed, but anyone from Adobe want to exercise a little editorial control? I wouldn't mind the hand of god going in there and selectively removing a little content... sometimes democracy needs a helping hand. On 5/17/07, *Daniel Freiman* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I think they're just stating that the mx.modules package exists. The sentence We also know Flex2 knows how to read MXML at runtime because the compiler knows how to convert MXML into GUI Objects doesn't inspire confidence that they know what they're talking about. Since it's possible that they don't know what a compiler does, it's also possible they're just writing and compiling Modules and don't understand that they're doing it. Then again, that wouldn't explain what they're fighting with another company about earlier in the article. They claim what they're talking about is in the docs so I'd either search them or not worry about it. My guess is you'd be searching a long time for something that isn't there. It would be nice if someone could prove my guess wrong though. Dan Freiman nondocs http://nondocs.blogspot.com On 5/17/07, *Austin Kottke* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, There is an intriguing article in the flex cookbook on the adobe site about reading in MXML at runtime and using the XML object to create components at runtime. While I don't totally get how this works as there are no code samples, but very vague actually, but it states: Let's consider, for a moment, how Adobe might have chosen to leverage reuse within the Flex2 programming model. Assuming the Adobe engineers did not want to have to recreate the wheel in terms of how to make Flex2 able to load normal non-GUI XML I would surmise they chose to simply reuse whatever code they wrote that was able to read MXML into a way to read XML. As we know, MXML resembles XML rather closely. Heck, MXML is XML ! Yipee, now I can easily read MXML because it is essentially a form of XML. We also know Flex2 knows how to read MXML at runtime because the compiler knows how to convert MXML into GUI Objects. But what if we could trick Flex2 into dynamically loading MXML at runtime ? So my question, has anyone ever done this and how did they do it? I'm not talking about using the modules package to load in precompiled swfs. But loading in mxml and having it run after being loaded. Best, Austin -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives:
RE: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents
I'm not to keen on this personally for security reasons. My company just got some security training recently and I saw the effects of XSS (cross side scripting attacks). One plus for Flex is that it is not affected by this, however implementing runtime MXML execution would make it prone to similar type of attacks. So weighing runtime MXML vs security, I would take security. Dimitrios Gianninas Developer Optimal Payments Inc. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Austin Kottke Sent: Thursday, May 17, 2007 7:23 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents Ely, I find runtime MXML something that would be invaluable. It is something that if implemented could make developing in flex a lot more scaleable and integration with the server end would be a lot more feasible. (As in doing HTTPRequests where serverside MXML could be generated through Velocity/JSP and then given back to the ui) A lot of developers don't know a thing about flex, but can learn basic MXML for layout or simple scripting and implement basic server side operations. And if these are kept just as mxml it makes updates in the future easier. We can then just tell someone (edit the MXML) and you're done, instead of download the flex sdk, set your ant build, yada ya -- some aren't programmers, but MXML is very easy to learn. It's a lot more confrontable for a designer/layout guy to tackle. Anyway, runtime MXML would be something that would majorly increase scalability and integration with servers - similar to the Apache IIS mod for JSP, etc - the only problem is that it's just for Apache or IIS. Some run tomcat, resin, etc. But having it on the client end would eliminate this problem. Best, austin Ely Greenfield wrote: Austin et. al. – There are a number of features of MXML that simply can’t be replicated at runtime. Things like script blocks. Other features would be prohibitively difficult (arbitrary binding expressions, @Embed, mx:Component, among others). You could reduce MXML to a runtime-parsable subset, and I know various people have taken various approaches to this. The more you reduce it, the easier it would be to replicate…removing repeaters, implicit arrays, default properties, etc. would get you down to something that could be implemented in a reasonable amount of time. I’m curious…how many people would find runtime MXML to be important to them? Ely. *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Doug McCune *Sent:* Thursday, May 17, 2007 12:47 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents Yeah, ummm, my advice would be ignore that article. That's one of the effects of having an article submission process that allows anyone to submit anything. I know the cookbook is supposed to be user generated and reviewed, but anyone from Adobe want to exercise a little editorial control? I wouldn't mind the hand of god going in there and selectively removing a little content... sometimes democracy needs a helping hand. On 5/17/07, *Daniel Freiman* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I think they're just stating that the mx.modules package exists. The sentence We also know Flex2 knows how to read MXML at runtime because the compiler knows how to convert MXML into GUI Objects doesn't inspire confidence that they know what they're talking about. Since it's possible that they don't know what a compiler does, it's also possible they're just writing and compiling Modules and don't understand that they're doing it. Then again, that wouldn't explain what they're fighting with another company about earlier in the article. They claim what they're talking about is in the docs so I'd either search them or not worry about it. My guess is you'd be searching a long time for something that isn't there. It would be nice if someone could prove my guess wrong though. Dan Freiman nondocs http://nondocs.blogspot.com On 5/17/07, *Austin Kottke* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, There is an intriguing article in the flex cookbook on the adobe site about reading in MXML at runtime and using the XML object to create components at runtime. While I don't totally get how this works as there are no code samples, but very vague actually, but it states: Let's consider, for a moment, how Adobe might have chosen to leverage reuse within the Flex2 programming model. Assuming the Adobe engineers did not want to have to recreate the wheel in terms of how to make Flex2 able to load normal non-GUI XML I would surmise they chose to simply reuse whatever code they wrote that was able to read MXML into a way to read XML. As we know, MXML resembles XML rather closely. Heck, MXML
[flexcoders] WebService in AS
Hello you flexers Well, i have created an WebService in AS, because in the mxml tag way, the WSDL derived from an TextInput does NOT WORK.. :( sad... so i create this simple AS but i cant get the lastResult successful, Always give me null in the beginning, click again, and then the result, and for last [Object Object], can you light me :P ? [Bindable] public var webService:WebService = new WebService; public function wsHelloWorld():void{ webService.wsdl = myWsdl.text; webService.loadWSDL(); webService.HelloWorld(myInput.text); trace(webService.HelloWorld.lastResult); } null Hello, testee (-- This is the THING!!) [object Object] (-- This enter in HelloWorldResponse Object, ??) Hope you can help on this, Grate for all the help!
[flexcoders] Re: Flex cookbook article: Flex2 XML Reader Can Create UIComponents
I find runtime MXML something that would be invaluable. I'm not too sure about this. Wouldn't every swf have to link to every mx library (just in case it's used)? That would mean that every time you load from a URL you'd download the whole of MX, not just the components that are actually being instantiated. Wouldn't that be a problem in practice? Ed
Re: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents
Yea, I get it. It sounds really cool though -- I'd love to be able to see dynamically created MXML and not have it to be server side (Apache IIS mod). This would make flex's value a lot higher. I suppose that there is some class in the flex framework which does this however, converts MXML to objects and then it's ready. Has anyone ever used this or is it internal? Best, Austin Daniel Freiman wrote: I think they're just stating that the mx.modules package exists. The sentence We also know Flex2 knows how to read MXML at runtime because the compiler knows how to convert MXML into GUI Objects doesn't inspire confidence that they know what they're talking about. Since it's possible that they don't know what a compiler does, it's also possible they're just writing and compiling Modules and don't understand that they're doing it. Then again, that wouldn't explain what they're fighting with another company about earlier in the article. They claim what they're talking about is in the docs so I'd either search them or not worry about it. My guess is you'd be searching a long time for something that isn't there. It would be nice if someone could prove my guess wrong though. Dan Freiman nondocs http://nondocs.blogspot.com On 5/17/07, *Austin Kottke* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, There is an intriguing article in the flex cookbook on the adobe site about reading in MXML at runtime and using the XML object to create components at runtime. While I don't totally get how this works as there are no code samples, but very vague actually, but it states: Let's consider, for a moment, how Adobe might have chosen to leverage reuse within the Flex2 programming model. Assuming the Adobe engineers did not want to have to recreate the wheel in terms of how to make Flex2 able to load normal non-GUI XML I would surmise they chose to simply reuse whatever code they wrote that was able to read MXML into a way to read XML. As we know, MXML resembles XML rather closely. Heck, MXML is XML ! Yipee, now I can easily read MXML because it is essentially a form of XML. We also know Flex2 knows how to read MXML at runtime because the compiler knows how to convert MXML into GUI Objects. But what if we could trick Flex2 into dynamically loading MXML at runtime ? So my question, has anyone ever done this and how did they do it? I'm not talking about using the modules package to load in precompiled swfs. But loading in mxml and having it run after being loaded. Best, Austin -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links (Yahoo! ID required) mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
[flexcoders] Getting 500 error on uploading
Hi All, I am getting HTTP status 500 when I am trying to upload a file more then 3 MB on server from my machine. I want that there should not be any restriction on file size limit. It is giving me following error message 'IOErrorEvent type=ioError bubbles=false cancelable=false eventPhase=2 text=Error #2038: File I/O Error. URL: http://localhost:5151/default.aspx?category=uploaduid=66; ' please suggest any solution to quickly fix the bug. Thanks, Kumar - Office firewalls, cyber cafes, college labs, don't allow you to download CHAT? Here's a solution!
RE: [flexcoders] Re: Cairngorm 2.2 incompatible with AS-based ServiceLocator?
Hi Ben, I can't think of anything that's changed between 2.1 and 2.2 that would cause this. I'm guessing that the web services your defining dynamically aren't getting registered with the service locator, so its probably a timing thing. Have you moved to Flex 2.0.1 at the same time, though I don't know of any specific reason why that would change something. Can you check if your web services have registered in the _webServices Dictionary stored inside ServiceLocator? That dictionary is created through lazy instantiation on the first call to get webServices() on the service locator, so ensure that that call never happens before you have created your dynamic web services. Thanks, Alistair -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: 17 May 2007 19:07 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Cairngorm 2.2 incompatible with AS-based ServiceLocator? I declared my ServiceLocator subclass in AS rather than MXML, and when my app loads I load an XML file. That XML file contains the WSDL URLs for all the WebServices that I use in my app, so once it is loaded I call an initServices() method that I defined on the ServiceLocator subclass. The initServices() method declares my WebService objects, sets up event listeners and calls loadWSDL() for each, using the URLs defined in the loaded XML. Once all my loadWSDL() calls have returned the app continues on to other startup tasks. This all worked perfectly in Cairngorm 2.1. With 2.2 however, as soon as I call ServiceLocator.getInstance().getWebService(), I get the error and callstack pasted below. Debugging shows that all of my WebService variables are defined and in memory, but for some reason they are not registered with the ServiceLocator. In some quick tests, I noticed that the describeType() call in AbstractServices.as does not seem to include references to variables defined in AS. Since the accessors list from describeType() seems to be the source of what gets registered with ServiceLocator, my guess is that that is the source of the problem. You can see a slightly obfuscated version of the class at http://returnundefined.com/files/MyAppServices.as Thanks, Ben Error: C0009E: WebService not found for documentMetadataWebService at com.adobe.cairngorm.business::WebServices/getService()[C:\dev\swat\proje cts\ac_emea\Cairngorm\com\adobe\cairngorm\business\WebServices.as:83] at com.adobe.cairngorm.business::ServiceLocator/getWebService()[C:\dev\swat \projects\ac_emea\Cairngorm\com\adobe\cairngorm\business\ServiceLocator. as:171] at com.fmr.projects.PsaBatchTool.business::BatchDelegate$iinit()[D:\ClearCa se_Storage\a391949_PsaBatchToolRefactor_view\BackOffice\Components\Sourc e\PSA.BatchTool\com\fmr\projects\PsaBatchTool\business\BatchDelegate.as: 27] at com.fmr.projects.PsaBatchTool.commands::GetRecentBatchesCommand/execute( )[D:\ClearCase_Storage\a391949_PsaBatchToolRefactor_view\BackOffice\Comp onents\Source\PSA.BatchTool\com\fmr\projects\PsaBatchTool\commands\GetRe centBatchesCommand.as:27] at com.adobe.cairngorm.control::FrontController/com.adobe.cairngorm.control :FrontController::executeCommand()[C:\dev\swat\projects\ac_emea\Cairngor m\com\adobe\cairngorm\control\FrontController.as:212] at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven tFunction() at flash.events::EventDispatcher/dispatchEvent() at com.adobe.cairngorm.control::CairngormEventDispatcher/dispatchEvent()[C: \dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\Cairngo rmEventDispatcher.as:113] at com.adobe.cairngorm.control::CairngormEvent/dispatch()[C:\dev\swat\proje cts\ac_emea\Cairngorm\com\adobe\cairngorm\control\CairngormEvent.as:77] at com.fmr.projects.PsaBatchTool.commands::ApplicationIsReadyCommand/execut e()[D:\ClearCase_Storage\a391949_PsaBatchToolRefactor_view\BackOffice\Co mponents\Source\PSA.BatchTool\com\fmr\projects\PsaBatchTool\commands\App licationIsReadyCommand.as:16] at com.adobe.cairngorm.control::FrontController/com.adobe.cairngorm.control :FrontController::executeCommand()[C:\dev\swat\projects\ac_emea\Cairngor m\com\adobe\cairngorm\control\FrontController.as:212] at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven tFunction() at flash.events::EventDispatcher/dispatchEvent() at com.adobe.cairngorm.control::CairngormEventDispatcher/dispatchEvent()[C: \dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\Cairngo rmEventDispatcher.as:113] at com.adobe.cairngorm.control::CairngormEvent/dispatch()[C:\dev\swat\proje cts\ac_emea\Cairngorm\com\adobe\cairngorm\control\CairngormEvent.as:77] at com.fmr.projects.PsaBatchTool.commands::LoadAppConfigCommand/com.fmr.pro jects.PsaBatchTool.commands:LoadAppConfigCommand::configFileLoaded()[D:\
[flexcoders] TextArea: Show selection even when focus lost
Hi, I have a TextArea that shows a dialog when the user makes a selection. The only trouble is, when the dialog displays, the focus is lost from the text area, and now it appears as if there is no selection. Is there a setting I can change somewhere to get the selection to always draw (or to draw always when a specific condition is on)? Thanks, Mark
[flexcoders] Re: Difference between getChild and getAtomationChild
I understand that it is a method of the IAutomationObject. But there is still something that I do not figure out. I have created an adapter that enables me to take advantage of the automation package and replay events on a Flex application I have created. With this application all the display components have automation children. But with a mock class I have used to test the adapter, where I just create a class that extends Application and add some panels and buttons, none of those have automation children only regular children. (Both projects implements the automation.swc and automation_agent.swc. And all components are UIComponents, which implements IAutomationObject) What in Flex decides if a object has automation children or regular children? Thank you --- In flexcoders@yahoogroups.com, Peter Hall [EMAIL PROTECTED] wrote: Correct. getAutomationChild() is a method of the IAutomationObject interface, and only returns children that also implement that interface. IAutomationObject is part of the mx.automation package, which is designed for automated testing. So basically, it's a filter for testing tools so they only have to look at objects that can be automated. The Flex extension for Mercury QTP is currently (I think) the only commercial tool that makes use of it. Peter On 5/15/07, Johannes Nel [EMAIL PROTECTED] wrote: my guess its the interface for QTP On 5/15/07, Tom Chiverton [EMAIL PROTECTED] wrote: On Tuesday 15 May 2007, pmotzfeldt wrote: Hi, I am wondering what the difference between a regular child and an automation child of for instance an UIComponent. guess Some children are for purely GUI purposes, such as a title bar or label. -- Tom Chiverton Helping to administratively repurpose bricks-and-clicks clusters 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 -- j:pn http://www.lennel.org
Re: [flexcoders] WebService in AS
Actually, I may have screwed this up because loadWSDL is also asynchronous. Remove the first line of wsHelloWorld (initHelloWorld()) and just make sure to call initHelloWorld well before you call wsHelloWorld. Really you should add an eventListener to webService for LoadEvent.LOAD and not call helloworld until that LOAD has been received once. Unfortunately, I have to go do something right now so I can't write that up. Sorry for the confusion Dan Freiman nondocs http://nondocs.blogspot.com On 5/18/07, Daniel Freiman [EMAIL PROTECTED] wrote: Hello world is an asynchronous call so the trace function will be called before HelloWorld is completed. Instead try this: [Bindable] public var webService:WebService; public function wsHelloWorld():void{ initHelloWorld(); webService.HelloWorld(myInput.text); // call web service function } public function initHelloWorld():void{ // initialization that only needs to be called once if (!webService) { webService = new WebService(); webService.wsdl = myWsdl.text; webService.loadWSDL(); webService.addEventListener(ResultEvent.RESULT, resultListener); } } public function resultListener(event:ResultEvent):void { // handle result of webservice trace(event.result ); } Dan Freiman nondocs http://nondocs.blogspot.com On 5/18/07, hugocorept [EMAIL PROTECTED] wrote: Hello you flexers Well, i have created an WebService in AS, because in the mxml tag way, the WSDL derived from an TextInput does NOT WORK.. :( sad... so i create this simple AS but i cant get the lastResult successful, Always give me null in the beginning, click again, and then the result, and for last [Object Object], can you light me :P ? [Bindable] public var webService:WebService = new WebService; public function wsHelloWorld():void{ webService.wsdl = myWsdl.text; webService.loadWSDL(); webService.HelloWorld(myInput.text); trace(webService.HelloWorld.lastResult); } null Hello, testee (-- This is the THING!!) [object Object] (-- This enter in HelloWorldResponse Object, ??) Hope you can help on this, Grate for all the help!
[flexcoders] Setting dataTipCalloutStroke={null} when dataTipMode=multiple?
Hello, I have a CartesianChart where I don't want the calloutStroke to be drawn (and thereby offset the positioning of the dataTips from their data point), so I've set dataTipCalloutStroke={null}. This works fine when dataTipMode=single, but it does not work when I set dataTipMode=multiple: the callout is still drawn and the dataTips are offset. Any ideas? This is kind of a deal-breaker for my app, since a major feature is to display my custom dataTips directly adjacent to all (plot) data points at the same time. I suppose I could go way-deep into concatenating the default itemRenderer and the dataTip's custom contents into a custom itemRenderer, but I'd rather not have to code all that internal plumbing if I could instead do it all with this one style setting. Thanks for any suggestions! -Peter Demling Lexington, MA
Re: [flexcoders] Re: Flex is Broken
I had a similar problem .. never really got to the bottom of it but I found that addChildAt worked while addChild didn't ? On 18 May 2007, at 15:03, Matt wrote: The exact error message I'm currently getting is as follows: RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/addChildAt() at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal:: $addChildAt() at mx.core::Container/addChildAt() at mx.effects::EffectManager$/::removedEffectHandler() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() at flash.utils::Timer/flash.utils:Timer::_timerDispatch() at flash.utils::Timer/flash.utils:Timer::tick() Just to be clear here though, I'm calling addChild, not addChildAt (internally addChild calls addChildAt). --- In flexcoders@yahoogroups.com, Matt [EMAIL PROTECTED] wrote: I have been using Flex for quite a while now and I've found quite a few moderate to serious bugs, but the one that keeps slapping my face when I approach something close to stability is this error: RangeError: Error #2006: The supplied index is out of bounds. This seems to occur due to ActionScript 3's lack of concurrency support. It would seem that if I quickly remove and add several components to a container this shows its ugly head. What makes this particularly scary is that the error message appears once and then any time I try to do anything at all to the container after that it throws the same message over and over. I originally saw this appear in reference to popups on the SystemManager container and created a work-around to pre-instantiate windows and just keep them hidden until needed. It was specifically a problem when I would use the popup manager to display a menu and the selection of a menu option would then display a window. What ended up happening was that the window would be created and popped up at the same time the popup was being removed and it would get its internal indexing off it would seem and never could you do anything to the SystemManager container again. Is there a way to add and remove items safely or is this a known bug and one I just have to live with until Adobe gets around to fixing it?
[flexcoders] Re: Flex is Broken
The exact error message I'm currently getting is as follows: RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/addChildAt() at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$addChildAt() at mx.core::Container/addChildAt() at mx.effects::EffectManager$/::removedEffectHandler() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() at flash.utils::Timer/flash.utils:Timer::_timerDispatch() at flash.utils::Timer/flash.utils:Timer::tick() Just to be clear here though, I'm calling addChild, not addChildAt (internally addChild calls addChildAt). --- In flexcoders@yahoogroups.com, Matt [EMAIL PROTECTED] wrote: I have been using Flex for quite a while now and I've found quite a few moderate to serious bugs, but the one that keeps slapping my face when I approach something close to stability is this error: RangeError: Error #2006: The supplied index is out of bounds. This seems to occur due to ActionScript 3's lack of concurrency support. It would seem that if I quickly remove and add several components to a container this shows its ugly head. What makes this particularly scary is that the error message appears once and then any time I try to do anything at all to the container after that it throws the same message over and over. I originally saw this appear in reference to popups on the SystemManager container and created a work-around to pre-instantiate windows and just keep them hidden until needed. It was specifically a problem when I would use the popup manager to display a menu and the selection of a menu option would then display a window. What ended up happening was that the window would be created and popped up at the same time the popup was being removed and it would get its internal indexing off it would seem and never could you do anything to the SystemManager container again. Is there a way to add and remove items safely or is this a known bug and one I just have to live with until Adobe gets around to fixing it?
[flexcoders] Re: Cairngorm 2.2 incompatible with AS-based ServiceLocator?
Hi Alistair, _webServices is empty, but we already knew that. Looking at ServiceLocator in the debugger shows all of my WebService objects properly constructed and present, they're just not registered for whatever reason. As far as I can tell, getWebService() does not get called before the first time I try to access one of my WS objects, which is when it bombs. I thought maybe it was because I had forgotten to remove my manual calls to loadWSDL(), but removing those didn't help either. I've been up to date on the Flex SDK for a while now. Like I said, this began as soon as I switched to 2.2 without changing anything else. The _webServices dictionary is populated by calling describeType() and then harvesting the accessors XMLList, correct? I am almost positive that is the problem. WS properties defined in AS don't seem to be included in accessors, resulting in them never getting registered. Let me know what you think. Ben PS - I've converted to an MXML ServiceLocator, so this issue isn't holding me up, I'm just trying to make Cairngorm as robust as possible. --- In flexcoders@yahoogroups.com, Alistair McLeod [EMAIL PROTECTED] wrote: Hi Ben, I can't think of anything that's changed between 2.1 and 2.2 that would cause this. I'm guessing that the web services your defining dynamically aren't getting registered with the service locator, so its probably a timing thing. Have you moved to Flex 2.0.1 at the same time, though I don't know of any specific reason why that would change something. Can you check if your web services have registered in the _webServices Dictionary stored inside ServiceLocator? That dictionary is created through lazy instantiation on the first call to get webServices() on the service locator, so ensure that that call never happens before you have created your dynamic web services. Thanks, Alistair -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: 17 May 2007 19:07 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Cairngorm 2.2 incompatible with AS-based ServiceLocator? I declared my ServiceLocator subclass in AS rather than MXML, and when my app loads I load an XML file. That XML file contains the WSDL URLs for all the WebServices that I use in my app, so once it is loaded I call an initServices() method that I defined on the ServiceLocator subclass. The initServices() method declares my WebService objects, sets up event listeners and calls loadWSDL() for each, using the URLs defined in the loaded XML. Once all my loadWSDL() calls have returned the app continues on to other startup tasks. This all worked perfectly in Cairngorm 2.1. With 2.2 however, as soon as I call ServiceLocator.getInstance().getWebService(), I get the error and callstack pasted below. Debugging shows that all of my WebService variables are defined and in memory, but for some reason they are not registered with the ServiceLocator. In some quick tests, I noticed that the describeType() call in AbstractServices.as does not seem to include references to variables defined in AS. Since the accessors list from describeType() seems to be the source of what gets registered with ServiceLocator, my guess is that that is the source of the problem. You can see a slightly obfuscated version of the class at http://returnundefined.com/files/MyAppServices.as Thanks, Ben Error: C0009E: WebService not found for documentMetadataWebService at com.adobe.cairngorm.business::WebServices/getService()[C:\dev\swat\proje cts\ac_emea\Cairngorm\com\adobe\cairngorm\business\WebServices.as:83] at com.adobe.cairngorm.business::ServiceLocator/getWebService()[C:\dev\swat \projects\ac_emea\Cairngorm\com\adobe\cairngorm\business\ServiceLocator. as:171] at com.fmr.projects.PsaBatchTool.business::BatchDelegate$iinit()[D:\ClearCa se_Storage\a391949_PsaBatchToolRefactor_view\BackOffice\Components\Sourc e\PSA.BatchTool\com\fmr\projects\PsaBatchTool\business\BatchDelegate.as: 27] at com.fmr.projects.PsaBatchTool.commands::GetRecentBatchesCommand/execute( )[D:\ClearCase_Storage\a391949_PsaBatchToolRefactor_view\BackOffice\Comp onents\Source\PSA.BatchTool\com\fmr\projects\PsaBatchTool\commands\GetRe centBatchesCommand.as:27] at com.adobe.cairngorm.control::FrontController/com.adobe.cairngorm.control :FrontController::executeCommand()[C:\dev\swat\projects\ac_emea\Cairngor m\com\adobe\cairngorm\control\FrontController.as:212] at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven tFunction() at flash.events::EventDispatcher/dispatchEvent() at com.adobe.cairngorm.control::CairngormEventDispatcher/dispatchEvent()[C: \dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\Cairngo rmEventDispatcher.as:113] at com.adobe.cairngorm.control::CairngormEvent/dispatch()[C:\dev\swat\proje
RE: [flexcoders] Getting 500 error on uploading
Something is wrong on the server-side... check your application logs to see if there is some kind of exception happening. Dimitrios Gianninas Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kumarpal jain Sent: Friday, May 18, 2007 8:27 AM To: FlexCoders Subject: [flexcoders] Getting 500 error on uploading Hi All, I am getting HTTP status 500 when I am trying to upload a file more then 3 MB on server from my machine. I want that there should not be any restriction on file size limit. It is giving me following error message 'IOErrorEvent type=ioError bubbles=false cancelable=false eventPhase=2 text=Error #2038: File I/O Error. URL: http://localhost:5151/default.aspx?category=uploaduid=66 http://localhost:5151/default.aspx?category=uploaduid=66 ' please suggest any solution to quickly fix the bug. Thanks, Kumar Office firewalls, cyber cafes, college labs, don't allow you to download CHAT? Here's a solution! http://us.rd.yahoo.com/mail/in/ymessenger/*http://in.messenger.yahoo.com/webmessengerpromo.php -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.
RE: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents
Would this be what you are looking for? http://labs.adobe.com/wiki/index.php/Flex_Module_for_Apache_and_IIS Giles From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Austin Kottke Sent: 17 May 2007 21:09 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents Ely, I find runtime MXML something that would be invaluable. It is something that if implemented could make developing in flex a lot more scaleable and integration with the server end would be a lot more feasible. (As in doing HTTPRequests where serverside MXML could be generated through Velocity/JSP and then given back to the ui) A lot of developers don't know a thing about flex, but can learn basic MXML for layout or simple scripting and implement basic server side operations. And if these are kept just as mxml it makes updates in the future easier. We can then just tell someone (edit the MXML) and you're done, instead of download the flex sdk, set your ant build, yada ya -- some aren't programmers, but MXML is very easy to learn. It's a lot more confrontable for a designer/layout guy to tackle. Anyway, runtime MXML would be something that would majorly increase scalability and integration with servers - similar to the Apache IIS mod for JSP, etc - the only problem is that it's just for Apache or IIS. Some run tomcat, resin, etc. But having it on the client end would eliminate this problem. Best, austin Ely Greenfield wrote: Austin et. al. - There are a number of features of MXML that simply can't be replicated at runtime. Things like script blocks. Other features would be prohibitively difficult (arbitrary binding expressions, @Embed, mx:Component, among others). You could reduce MXML to a runtime-parsable subset, and I know various people have taken various approaches to this. The more you reduce it, the easier it would be to replicate...removing repeaters, implicit arrays, default properties, etc. would get you down to something that could be implemented in a reasonable amount of time. I'm curious...how many people would find runtime MXML to be important to them? Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doug McCune Sent: Thursday, May 17, 2007 12:47 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents Yeah, ummm, my advice would be ignore that article. That's one of the effects of having an article submission process that allows anyone to submit anything. I know the cookbook is supposed to be user generated and reviewed, but anyone from Adobe want to exercise a little editorial control? I wouldn't mind the hand of god going in there and selectively removing a little content... sometimes democracy needs a helping hand. On 5/17/07, Daniel Freiman [EMAIL PROTECTED] wrote: I think they're just stating that the mx.modules package exists. The sentence We also know Flex2 knows how to read MXML at runtime because the compiler knows how to convert MXML into GUI Objects doesn't inspire confidence that they know what they're talking about. Since it's possible that they don't know what a compiler does, it's also possible they're just writing and compiling Modules and don't understand that they're doing it. Then again, that wouldn't explain what they're fighting with another company about earlier in the article. They claim what they're talking about is in the docs so I'd either search them or not worry about it. My guess is you'd be searching a long time for something that isn't there. It would be nice if someone could prove my guess wrong though. Dan Freiman nondocs http://nondocs.blogspot.com On 5/17/07, Austin Kottke [EMAIL PROTECTED] wrote: Hi, There is an intriguing article in the flex cookbook on the adobe site about reading in MXML at runtime and using the XML object to create components at runtime. While I don't totally get how this works as there are no code samples, but very vague actually, but it states: Let's consider, for a moment, how Adobe might have chosen to leverage reuse within the Flex2 programming model. Assuming the Adobe engineers did not want to have to recreate the wheel in terms of how to make Flex2 able to load normal non-GUI XML I would surmise they chose to simply reuse whatever code they wrote that was able to read MXML into a way to read XML. As we know, MXML resembles XML rather closely. Heck, MXML is XML ! Yipee, now I can easily read MXML because it is essentially a form of XML.
RE: [flexcoders] Events not firing from swf imported with SwfLoader
Flex strips off all actionscript unless it is generated by Flash 9 ! So therez no way u can monitor the events from flex From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of beecee1977 Sent: Friday, May 18, 2007 4:07 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Events not firing from swf imported with SwfLoader Hi, I'm not a flash expert so you'll have to bear with me on this. I'm not creating the swf's myself. I've recieved animations in swf's before and used them in image controls and they work fine. (movie clips generated in Flash MX 2004) If however the swf has a button on it (just an animation which plays on the rollover and snaps back to first frame on rollout) no events get fired from it when it's embeded into my image control. I'm assuming that the button in the swf is catching all mouse events and not passing them on. Does anybody know if this is the expected behaviour or if there's an easy way around it? As it stands I guess I'll need to handle switching to an animation on the rollover event within Flex2. Thanks in advance Bill P.S. I saw this, but it seems like overkill for what I want. http://www.jessewarden.com/archives/2006/08/flash_9_button.html http://www.jessewarden.com/archives/2006/08/flash_9_button.html
[flexcoders] Flex is Broken
I have been using Flex for quite a while now and I've found quite a few moderate to serious bugs, but the one that keeps slapping my face when I approach something close to stability is this error: RangeError: Error #2006: The supplied index is out of bounds. This seems to occur due to ActionScript 3's lack of concurrency support. It would seem that if I quickly remove and add several components to a container this shows its ugly head. What makes this particularly scary is that the error message appears once and then any time I try to do anything at all to the container after that it throws the same message over and over. I originally saw this appear in reference to popups on the SystemManager container and created a work-around to pre-instantiate windows and just keep them hidden until needed. It was specifically a problem when I would use the popup manager to display a menu and the selection of a menu option would then display a window. What ended up happening was that the window would be created and popped up at the same time the popup was being removed and it would get its internal indexing off it would seem and never could you do anything to the SystemManager container again. Is there a way to add and remove items safely or is this a known bug and one I just have to live with until Adobe gets around to fixing it?
Re: [flexcoders] WebService in AS
Hello world is an asynchronous call so the trace function will be called before HelloWorld is completed. Instead try this: [Bindable] public var webService:WebService; public function wsHelloWorld():void{ initHelloWorld(); webService.HelloWorld(myInput.text); // call web service function } public function initHelloWorld():void{ // initialization that only needs to be called once if (!webService) { webService = new WebService(); webService.wsdl = myWsdl.text; webService.loadWSDL(); webService.addEventListener(ResultEvent.RESULT, resultListener); } } public function resultListener(event:ResultEvent):void { // handle result of webservice trace(event.result); } Dan Freiman nondocs http://nondocs.blogspot.com On 5/18/07, hugocorept [EMAIL PROTECTED] wrote: Hello you flexers Well, i have created an WebService in AS, because in the mxml tag way, the WSDL derived from an TextInput does NOT WORK.. :( sad... so i create this simple AS but i cant get the lastResult successful, Always give me null in the beginning, click again, and then the result, and for last [Object Object], can you light me :P ? [Bindable] public var webService:WebService = new WebService; public function wsHelloWorld():void{ webService.wsdl = myWsdl.text; webService.loadWSDL(); webService.HelloWorld(myInput.text); trace(webService.HelloWorld.lastResult); } null Hello, testee (-- This is the THING!!) [object Object] (-- This enter in HelloWorldResponse Object, ??) Hope you can help on this, Grate for all the help!
Re: [flexcoders] TextArea: Show selection even when focus lost
TextField (which displays the text in TextArea) has a property alwaysShowSelection. If you don't know how to access the textField of a TextArea, check out my post on it: http://nondocs.blogspot.com/2007/05/faqtext.html. Dan Freiman nondocs http://nondocs.blogspot.com On 5/18/07, Mark Ingram [EMAIL PROTECTED] wrote: Hi, I have a TextArea that shows a dialog when the user makes a selection. The only trouble is, when the dialog displays, the focus is lost from the text area, and now it appears as if there is no selection. Is there a setting I can change somewhere to get the selection to always draw (or to draw always when a specific condition is on)? Thanks, Mark
Re: [flexcoders] Flex is Broken
Why not check the number of children in the container before trying to access them? And/or if you already have a variable pointed to the child, check to see that it isn't null before accessing it. If you were to provide some code it might be easier to suggest options. At 09:58 AM 5/18/2007, Matt wrote: I have been using Flex for quite a while now and I've found quite a few moderate to serious bugs, but the one that keeps slapping my face when I approach something close to stability is this error: RangeError: Error #2006: The supplied index is out of bounds. This seems to occur due to ActionScript 3's lack of concurrency support. It would seem that if I quickly remove and add several components to a container this shows its ugly head. What makes this particularly scary is that the error message appears once and then any time I try to do anything at all to the container after that it throws the same message over and over. I originally saw this appear in reference to popups on the SystemManager container and created a work-around to pre-instantiate windows and just keep them hidden until needed. It was specifically a problem when I would use the popup manager to display a menu and the selection of a menu option would then display a window. What ended up happening was that the window would be created and popped up at the same time the popup was being removed and it would get its internal indexing off it would seem and never could you do anything to the SystemManager container again. Is there a way to add and remove items safely or is this a known bug and one I just have to live with until Adobe gets around to fixing it? -- 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: Flex is Broken
I noticed that you are using removeEffects on the components. That is the root of your problem. I bet it you took those off, you wouldn't get the error anymore. In my experience with Flex, I've noticed that the child indexes change when an item is actually removed (when the effect has completed). There is a synchronization issue that occurs while the effect is playing. Adding children while a remove effect is playing usually causes errors very similar to what you are experiencing. If you are adding another child, try adding it after the remove effect has finished playing. Hope that helps. -Andy _ Andrew Trice Technical Lead Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Wicks Sent: Friday, May 18, 2007 10:23 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Flex is Broken I had a similar problem .. never really got to the bottom of it but I found that addChildAt worked while addChild didn't ? On 18 May 2007, at 15:03, Matt wrote: The exact error message I'm currently getting is as follows: RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/addChildAt() at mx.core::UIComponent/http://www.adobe. http://www.adobe.com/2006/flex/mx/internal::$addChildAt com/2006/flex/mx/internal::$addChildAt() at mx.core::Container/addChildAt() at mx.effects::EffectManager$/::removedEffectHandler() at Function/http://adobe. http://adobe.com/AS3/2006/builtin::apply com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() at flash.utils::Timer/flash.utils:Timer::_timerDispatch() at flash.utils::Timer/flash.utils:Timer::tick() Just to be clear here though, I'm calling addChild, not addChildAt (internally addChild calls addChildAt). --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com, Matt [EMAIL PROTECTED] wrote: I have been using Flex for quite a while now and I've found quite a few moderate to serious bugs, but the one that keeps slapping my face when I approach something close to stability is this error: RangeError: Error #2006: The supplied index is out of bounds. This seems to occur due to ActionScript 3's lack of concurrency support. It would seem that if I quickly remove and add several components to a container this shows its ugly head. What makes this particularly scary is that the error message appears once and then any time I try to do anything at all to the container after that it throws the same message over and over. I originally saw this appear in reference to popups on the SystemManager container and created a work-around to pre-instantiate windows and just keep them hidden until needed. It was specifically a problem when I would use the popup manager to display a menu and the selection of a menu option would then display a window. What ended up happening was that the window would be created and popped up at the same time the popup was being removed and it would get its internal indexing off it would seem and never could you do anything to the SystemManager container again. Is there a way to add and remove items safely or is this a known bug and one I just have to live with until Adobe gets around to fixing it?
[flexcoders] e4x, nested elements tree data provider
I'm whipping up a mock-up of a UI much like a mail client (folder tree + data grid), using XML dummy data. I've got the rows of the data grid populating with an e4x predicate, and I have the tree populating with data like this: mx:Tree x=0 y=0 width=100% height=100% dataProvider={folders} labelField=@name showRoot=false defaultLeafIcon=@Embed(source='Assets.swf', symbol='TreeFolderClosed')/mx:Tree mx:XML id=folders folders account name=account1 folder name=Inbox /folder folder name=Sent Items /folder /account account name=account2 folder name=Inbox /folder folder name=Sent Items /folder /account /folders /mx:XML But I'd like to have nested folder elements, and haven't figured out how to do that. If I do the dot dot notation, the tree shows the folders twice. Can anyone help? Thanks.
[flexcoders] TextArea: Halo skin draws over top of child controls!
Hi, I have a Text Area with a child control embedded in it. Even though the child control was added last, the halo skin still gets drawn on top of everything. Which looks odd! Is there any way I can stop this? Thanks, Mark
RE: [flexcoders] Flexbuilder2 bug: line number setting not remembered
Hi, If you will, Eclipse doesn't have this kind of 'bug'. I think you should opt for using the plugin versus the native Flex Builder environment. Cheers, Petro From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Bruce Hopkins Sent: Friday, May 18, 2007 6:06 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flexbuilder2 bug: line number setting not remembered No, I'd would argue that it definitely is a bug. It occurs inconsistently -- sometimes I get line numbers, and sometimes I don't. On 5/17/07, Petro Bochan [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, This is definitely not a bug, happens from time to time. Cheers, Petro From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] ups.com http://ups.com ] On Behalf Of li wenzhi Sent: Thursday, May 17, 2007 10:57 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flexbuilder2 bug: line number setting not remembered I use flexbuilder2.0.1 in windowsXP, when i check the option by selecting : Preferences/General/Editors/Text editors/Show line numbers then line numbers showed, but while i close the IDE, and restart again, the setting lost! Anyone found this? Get the Yahoo! toolbar and be alerted to new email http://us.rd.yahoo.com/evt=48225/*http:/new.toolbar.yahoo.com/toolbar/f eatures/mail/index.php wherever you're surfing.
Re: [flexcoders] Flexbuilder2 bug: line number setting not remembered
No, I'd would argue that it definitely is a bug. It occurs inconsistently -- sometimes I get line numbers, and sometimes I don't. On 5/17/07, Petro Bochan [EMAIL PROTECTED] wrote: Hi, This is definitely not a bug, happens from time to time. Cheers, Petro -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *li wenzhi *Sent:* Thursday, May 17, 2007 10:57 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Flexbuilder2 bug: line number setting not remembered I use flexbuilder2.0.1 in windowsXP, when i check the option by selecting : Preferences/General/Editors/Text editors/Show line numbers then line numbers showed, but while i close the IDE, and restart again, the setting lost! Anyone found this? -- Get the Yahoo! toolbar and be alerted to new email http://us.rd.yahoo.com/evt=48225/*http:/new.toolbar.yahoo.com/toolbar/features/mail/index.phpwherever you're surfing.
Re: [flexcoders] e4x, nested elements tree data provider
Not sure what you're really asking, how to do a nested tree? You need to use XMLList instead of XML (I don't think it dynamically casts the dataProvider to a XMLList if you provide it just XML). You can swap out label with name and use the same labelField convention. good luck, - jon Here's a tested example: mx:XMLList id=myTreeData node label=Accounts node label=First Account node label=Inbox node label=Flexcoders/ node label=Flashcoders/ node label=Flashnewbie/ /node node label=Send Items node label=Nested Tree e4x/ /node node label=Trash node label=Flashnewbie/ /node /node node label=Second Account node label=Inbox node label=New Messages/ node label=Flagged Items/ node label=Attachments/ node label=All Mail/ /node node label=Send Items node label=Tree Data Provider with e4x/ /node node label=Trash node label=Lame Yahoo HTML emails/ /node /node /node /mx:XMLList On May 18, 2007, at 11:12 AM, Richard Rodseth wrote: I'm whipping up a mock-up of a UI much like a mail client (folder tree + data grid), using XML dummy data. I've got the rows of the data grid populating with an e4x predicate, and I have the tree populating with data like this: mx:Tree x=0 y=0 width=100% height=100% dataProvider={folders} labelField=@name showRoot=false defaultLeafIcon=@Embed(source='Assets.swf', symbol='TreeFolderClosed')/mx:Tree mx:XML id=folders folders account name=account1 folder name=Inbox /folder folder name=Sent Items /folder /account account name=account2 folder name=Inbox /folder folder name=Sent Items /folder /account /folders
[flexcoders] Re: doPrint and ViewStack
anyone? :(
Re: [flexcoders] tree event using cairngorm
On Thursday 17 May 2007, achegedus wrote: How do I call a method for a flex tree from a cairngorm command? We pass the tree into the Event, and save a copy of this in the Command before calling the Delegate. When it returns, you've got the tree to hand then. -- Tom Chiverton Helping to simultaneously optimize network m-commerce 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] doPrint and ViewStack
On Thursday 17 May 2007, tkacyndra wrote: by half of my text is getting cut off (anything beyong the scroll bar) What scaling mode are you using for the print job ? Can you post your code ? -- Tom Chiverton Helping to paradigmatically syndicate transparent content 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] Re: Cairngorm 2.2 incompatible with AS-based ServiceLocator?
Hi Ben, It does sound like something to do with describeType(), though I can't see Cairngorm 2.2 could have changed what it returns. Can you compare the describeType() output in the two versions. Have you debugged the application and stepped through the getWebService() call to see whats happening there? Ali -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: 18 May 2007 14:47 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Cairngorm 2.2 incompatible with AS-based ServiceLocator? Hi Alistair, _webServices is empty, but we already knew that. Looking at ServiceLocator in the debugger shows all of my WebService objects properly constructed and present, they're just not registered for whatever reason. As far as I can tell, getWebService() does not get called before the first time I try to access one of my WS objects, which is when it bombs. I thought maybe it was because I had forgotten to remove my manual calls to loadWSDL(), but removing those didn't help either. I've been up to date on the Flex SDK for a while now. Like I said, this began as soon as I switched to 2.2 without changing anything else. The _webServices dictionary is populated by calling describeType() and then harvesting the accessors XMLList, correct? I am almost positive that is the problem. WS properties defined in AS don't seem to be included in accessors, resulting in them never getting registered. Let me know what you think. Ben PS - I've converted to an MXML ServiceLocator, so this issue isn't holding me up, I'm just trying to make Cairngorm as robust as possible. --- In flexcoders@yahoogroups.com, Alistair McLeod [EMAIL PROTECTED] wrote: Hi Ben, I can't think of anything that's changed between 2.1 and 2.2 that would cause this. I'm guessing that the web services your defining dynamically aren't getting registered with the service locator, so its probably a timing thing. Have you moved to Flex 2.0.1 at the same time, though I don't know of any specific reason why that would change something. Can you check if your web services have registered in the _webServices Dictionary stored inside ServiceLocator? That dictionary is created through lazy instantiation on the first call to get webServices() on the service locator, so ensure that that call never happens before you have created your dynamic web services. Thanks, Alistair -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: 17 May 2007 19:07 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Cairngorm 2.2 incompatible with AS-based ServiceLocator? I declared my ServiceLocator subclass in AS rather than MXML, and when my app loads I load an XML file. That XML file contains the WSDL URLs for all the WebServices that I use in my app, so once it is loaded I call an initServices() method that I defined on the ServiceLocator subclass. The initServices() method declares my WebService objects, sets up event listeners and calls loadWSDL() for each, using the URLs defined in the loaded XML. Once all my loadWSDL() calls have returned the app continues on to other startup tasks. This all worked perfectly in Cairngorm 2.1. With 2.2 however, as soon as I call ServiceLocator.getInstance().getWebService(), I get the error and callstack pasted below. Debugging shows that all of my WebService variables are defined and in memory, but for some reason they are not registered with the ServiceLocator. In some quick tests, I noticed that the describeType() call in AbstractServices.as does not seem to include references to variables defined in AS. Since the accessors list from describeType() seems to be the source of what gets registered with ServiceLocator, my guess is that that is the source of the problem. You can see a slightly obfuscated version of the class at http://returnundefined.com/files/MyAppServices.as Thanks, Ben Error: C0009E: WebService not found for documentMetadataWebService at com.adobe.cairngorm.business::WebServices/getService()[C:\dev\swat\pro je cts\ac_emea\Cairngorm\com\adobe\cairngorm\business\WebServices.as:83] at com.adobe.cairngorm.business::ServiceLocator/getWebService()[C:\dev\sw at \projects\ac_emea\Cairngorm\com\adobe\cairngorm\business\ServiceLocator. as:171] at com.fmr.projects.PsaBatchTool.business::BatchDelegate$iinit()[D:\Clear Ca se_Storage\a391949_PsaBatchToolRefactor_view\BackOffice\Components\Sou rc e\PSA.BatchTool\com\fmr\projects\PsaBatchTool\business\BatchDelegate.as: 27] at com.fmr.projects.PsaBatchTool.commands::GetRecentBatchesCommand/execut e( )[D:\ClearCase_Storage\a391949_PsaBatchToolRefactor_view\BackOffice\Co mp onents\Source\PSA.BatchTool\com\fmr\projects\PsaBatchTool\commands\Get Re centBatchesCommand.as:27] at
RE: [flexcoders] Setting dataTipCalloutStroke={null} when dataTipMode=multiple?
Set it to a stroke with an alpha of 0. dataTipCalloutStroke Stroke alpha=0 / / Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter Demling Sent: Friday, May 18, 2007 7:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Setting dataTipCalloutStroke={null} when dataTipMode=multiple? Hello, I have a CartesianChart where I don't want the calloutStroke to be drawn (and thereby offset the positioning of the dataTips from their data point), so I've set dataTipCalloutStroke={null}. This works fine when dataTipMode=single, but it does not work when I set dataTipMode=multiple: the callout is still drawn and the dataTips are offset. Any ideas? This is kind of a deal-breaker for my app, since a major feature is to display my custom dataTips directly adjacent to all (plot) data points at the same time. I suppose I could go way-deep into concatenating the default itemRenderer and the dataTip's custom contents into a custom itemRenderer, but I'd rather not have to code all that internal plumbing if I could instead do it all with this one style setting. Thanks for any suggestions! -Peter Demling Lexington, MA image001.jpgimage002.jpg
[flexcoders] Re: Flex Builder - built in help ..
That's the first time I've heard of this problem. Please check the Flex 2 Developer's Guide to see if there is a Modules chapter. If so, it's the 2.0.1 help. Another quick way to check is to look for Macintosh information in the Using Flex Builder help. And finally, if you click the LiveDocs link at the bottom of each page, does it go to the flex/2/xxx URL or flex/201? Because it was an x.0.1 release we didn't really call out the version number. In retrospect, that was a mistake and we won't do it again. Regards, Randy Nielsen Flex Documentation Manager
RE: [flexcoders] Setting dataTipCalloutStroke={null} when dataTipMode=multiple?
Peter - Took a peek at the code, and that looks to be an unfortunately bug on my part. Use 'calloutStroke' instead of 'dataTipCalloutStroke' style. You might have to set it programmatically: myChart.setStyle(calloutStroke,null); That should solve the problem (and in a more performant way). Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter Demling Sent: Friday, May 18, 2007 7:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Setting dataTipCalloutStroke={null} when dataTipMode=multiple? Hello, I have a CartesianChart where I don't want the calloutStroke to be drawn (and thereby offset the positioning of the dataTips from their data point), so I've set dataTipCalloutStroke={null}. This works fine when dataTipMode=single, but it does not work when I set dataTipMode=multiple: the callout is still drawn and the dataTips are offset. Any ideas? This is kind of a deal-breaker for my app, since a major feature is to display my custom dataTips directly adjacent to all (plot) data points at the same time. I suppose I could go way-deep into concatenating the default itemRenderer and the dataTip's custom contents into a custom itemRenderer, but I'd rather not have to code all that internal plumbing if I could instead do it all with this one style setting. Thanks for any suggestions! -Peter Demling Lexington, MA image001.jpgimage002.jpg
Re: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents
Not exactly as it only works for Apache and IIS - no support for other servers such as tomcat, resin, etc. It's definitely in the ball park, but needs to be supported on other servers. If that could be worked out then runtime mxml wouldn't be a problem (depending on compile speed). The main thing I was thinking of is adding support similar to JSP/Velocity style flex apps so you can add in layout code without having to have someone know everything about programming (mainly layout code) so designer types can layout their canvas's, hboxes without having to know how to compile with the SDK. Best, Austin Giles Taylor wrote: Would this be what you are looking for? http://labs.adobe.com/wiki/index.php/Flex_Module_for_Apache_and_IIS http://labs.adobe.com/wiki/index.php/Flex_Module_for_Apache_and_IIS Giles *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Austin Kottke *Sent:* 17 May 2007 21:09 *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents Ely, I find runtime MXML something that would be invaluable. It is something that if implemented could make developing in flex a lot more scaleable and integration with the server end would be a lot more feasible. (As in doing HTTPRequests where serverside MXML could be generated through Velocity/JSP and then given back to the ui) A lot of developers don't know a thing about flex, but can learn basic MXML for layout or simple scripting and implement basic server side operations. And if these are kept just as mxml it makes updates in the future easier. We can then just tell someone (edit the MXML) and you're done, instead of download the flex sdk, set your ant build, yada ya -- some aren't programmers, but MXML is very easy to learn. It's a lot more confrontable for a designer/layout guy to tackle. Anyway, runtime MXML would be something that would majorly increase scalability and integration with servers - similar to the Apache IIS mod for JSP, etc - the only problem is that it's just for Apache or IIS. Some run tomcat, resin, etc. But having it on the client end would eliminate this problem. Best, austin Ely Greenfield wrote: Austin et. al. – There are a number of features of MXML that simply can’t be replicated at runtime. Things like script blocks. Other features would be prohibitively difficult (arbitrary binding expressions, @Embed, mx:Component, among others). You could reduce MXML to a runtime-parsable subset, and I know various people have taken various approaches to this. The more you reduce it, the easier it would be to replicate…removing repeaters, implicit arrays, default properties, etc. would get you down to something that could be implemented in a reasonable amount of time. I’m curious…how many people would find runtime MXML to be important to them? Ely. *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Doug McCune *Sent:* Thursday, May 17, 2007 12:47 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents Yeah, ummm, my advice would be ignore that article. That's one of the effects of having an article submission process that allows anyone to submit anything. I know the cookbook is supposed to be user generated and reviewed, but anyone from Adobe want to exercise a little editorial control? I wouldn't mind the hand of god going in there and selectively removing a little content... sometimes democracy needs a helping hand. -- 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] Re: Communication of data between parent and child movie.
mySWFLoader.content.myProperty = myValue; Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ivansebastiansurya Sent: Thursday, May 17, 2007 5:55 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Communication of data between parent and child movie. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: And if loose coupling is not a key issue for you, you can simply access public members in the loaded swf using the content property of SWFLoader. If you are loading appliations, use SWFLoader, not Image. Access top level application members using Application.application. You will need to listen for the complete event of the loader and the APPLICATION_COMPLETE event of the loaded app before you can access properties via the content property: mx:SWFLoader id=ldMain progress=showProgress(event) width=100% height=100% complete=onCompleteAppLoader(event)/ /** runs when SWFLoader content has all downloaded */ private function onCompleteAppLoader(oEvent:Event):void { var smAppLoaded:SystemManager = SystemManager(oEvent.target.content); smAppLoaded.addEventListener(FlexEvent.APPLICATION_COMPLETE, onCurrentApplicationComplete) //vbMask.visible = false; }//onCompleteAppLoader /** runs when the app loaded in the SWFLoader has completed initialization * and is ready for any access (applicationComplete event) */ private function onCurrentApplicationComplete(oEvent:Event):void { _appLoaded = Application(oEvent.target.application); _sAppLoadedUrl = _appLoaded.url var iPosLastPathDelimiter:int = _sAppLoadedUrl.lastIndexOf (\\); if (iPosLastPathDelimiter == -1) { iPosLastPathDelimiter = _sAppLoadedUrl.lastIndexOf(/); } _sAppLoadedName = _sAppLoadedUrl.substring (iPosLastPathDelimiter+1,_sAppLoadedUrl.lastInde xOf(.)); }//onCurrentApplicationComplete /** */ public function showProgress(oEvent:Event):void { var sBytesLoaded:String = oEvent.target.bytesLoaded; var sBytesTotal:String = oEvent.target.bytesTotal; _nLoadProgress = (sBytesLoaded/sBytesTotal) * 100; lbLoading.alpha = 1/_nLoadProgress * 10; if (_nLoadProgress == 100) { lbLoading.visible = false; lbLoading.alpha = 1; } } //showProgress Tracy Hi Tracy, Thanks for your reply. However, I have one question. How if I want to actually get a public property of my child application? Say my child application has a public property called parentProp. How can I assign values to parentProp (String type) from the parent application? I.e. I need to pass info from parent to child? Thanks. Ivan.
Re: [flexcoders] e4x, nested elements tree data provider
Thanks, Jon. Your example works for me, but I also need to add message leaf elements, and exclude those from the tree. i.e. mx:XMLList id=folders folders folder name=account1 folder name=Inbox message name=Greetings /message /folder /folder /folders /mx:XMLList They're included in the data grid like so: mx:DataGrid width=100% height=100% dataProvider={folders..folder.(@name == 'Inbox').message} Even though this is a mock-up, I'd like to use the same XML structure for both controls, and see how much interactivity I can mock up just using e4x to manipulate the XMLList object. Obviously, I will eventually have to change the datagrid to use the selected tree node rather than the above predicate. On 5/18/07, Jon Bradley [EMAIL PROTECTED] wrote: Not sure what you're really asking, how to do a nested tree? You need to use XMLList instead of XML (I don't think it dynamically casts the dataProvider to a XMLList if you provide it just XML). You can swap out label with name and use the same labelField convention. good luck, - jon Here's a tested example: mx:XMLList id=myTreeData node label=Accounts node label=First Account node label=Inbox node label=Flexcoders/ node label=Flashcoders/ node label=Flashnewbie/ /node node label=Send Items node label=Nested Tree e4x / /node node label=Trash node label=Flashnewbie/ /node /node node label=Second Account node label=Inbox node label=New Messages/ node label=Flagged Items/ node label=Attachments/ node label=All Mail/ /node node label=Send Items node label=Tree Data Provider with e4x/ /node node label=Trash node label=Lame Yahoo HTML emails/ /node /node /node /mx:XMLList On May 18, 2007, at 11:12 AM, Richard Rodseth wrote: I'm whipping up a mock-up of a UI much like a mail client (folder tree + data grid), using XML dummy data. I've got the rows of the data grid populating with an e4x predicate, and I have the tree populating with data like this: mx:Tree x=0 y=0 width=100% height=100% dataProvider={folders} labelField=@name showRoot=false defaultLeafIcon=@Embed(source='Assets.swf', symbol='TreeFolderClosed')/mx:Tree mx:XML id=folders folders account name=account1 folder name=Inbox /folder folder name=Sent Items /folder /account account name=account2 folder name=Inbox /folder folder name=Sent Items /folder /account /folders
[flexcoders] Re: Does Drag Drop Only Update the DataProvider?
I don't have the code in front of me right now, but to be more precise, dgEmployees is not broadcasting a change event upon a DD action. I want dgEmployees to broadcast an event every time there is a change to the DataGrid. The dgEmployees DataGrid has a change event method defined, somthing like: code mx:DataGrid id=dgEmployees dataProvider={__employees} change=broadcastEvent(event) ... /code The broadcastEvent() method constructs a custom event containing the number of elements in the DataGrid, and then dispatches it to be used elsewhere. Now, as I type this, I see that I might have keyed off the wrong event, change. Not sure if that is broadcast upon a change in the dataProvider, BUT I had been working on this code previously (converting to Flex 2.0), and I believe that I saw this same issue. I noticed that when I used the debugger to step throught the doDragDrop() method, I was seeing that only the dataProvider was being updated, and not the ArrayCollection. I can't verify this until Monday (5/21), but I'm almost 100% sure this is what I saw. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: How do you know it didn't update __employees? Can you post a mini-example in a couple of screenfuls of text? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Thursday, May 17, 2007 6:11 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Does Drag Drop Only Update the DataProvider? I have a DataGrid that has a dataProvider bound to an ArrayCollection. code mx:DataGrid id=dgEmployees dataProvider={__employees} ... /code I also have another DataGrid (dgAllEmployees) that is within a popup, which I use as a source for Drag Drop operations to populate the dgEmployee dataGrid. What I've noticed is that when I drag drop employees from the all employees DataGrid to the employees DataGrid, it seems to only update the dataProvider of dgEmployees, and not the ArrayCollection __employees. Why is this? Below is a snip of my drag drop code where it actually copies the data. This is a generic method that is used all over the application. code public static function doDragDrop( event:DragEvent ):void { // Prevent the default event from happening. event.preventDefault(); // Get drop target var dropTarget:DataGrid = DataGrid(event.currentTarget); // Get the dragged items from the drag initiator. var dropItems:Array = event.dragSource.dataForFormat(items) as Array; // Add each item to the drop target. for (var i:uint = 0; i dropItems.length; i++) { var dest:IList = IList(dropTarget.dataProvider); if (!contains(dest, dropItems[i])) { dest.addItem(dropItems[i]); } } } /code I think that I had event.preventDefault(); in there because it was putting 2 of each dropped item in the dgEmployee DataGrid. Might this be messing something up? Also, contains() is a custom method to compare the source items to what's in the target's list to prevent duplicates. Is there a better way to do this? Thanks in advance. GT
[flexcoders] Re: Setting dataTipCalloutStroke={null} when dataTipMode=multiple?
Thanks for the reply, Ely! I really appreciate your input. myChart.setStyle(calloutStroke,null); This works to hide the calloutStroke... ...but the positions of the dataTip boxes still get offset from the chartItems (in my case, far away from the DiamondItemRenderers of my plotSeries). In other words, when dataTipMode=multiple, I want the dataTip boxes to position themselves like they do when dataTipMode=single: i.e., a few pixels to the northeast of the chartItem. My real end goal is to show the all the items in the plotSeries, with their corresponding dataTips right next to them (I'm using a high mouseSensitivity to forcibly show multiple dataTips right now, but I know I'll eventually have to explicitly dispatch MOUSE_OVER, or else override findDataPoints and toggle all the showDataTips value to false/true). If I can't force the offset-positioning of these dataTips in order to align nicely with their chartItems, do you think I need to use a custom ItemRenderer instead? Your StoplightItemRenderer example at qs* is quite helpful in this regard, but I can't figure out how I'd also draw text values from the chartItem adjacent to the DiamondItemRenderer (e.g., Smith,John (age 30) adjacent to the diamond graphic). Thanks again for any suggestions; believe me, little bumps in the road like this don't take away from the enormous benefit this charting API has already been for us. Regards, -Peter Demling Lexington, MA *is quietlyScheming.com down? I lost connection this morning... --- In flexcoders@yahoogroups.com, Ely Greenfield [EMAIL PROTECTED] wrote: Peter - Took a peek at the code, and that looks to be an unfortunately bug on my part. Use 'calloutStroke' instead of 'dataTipCalloutStroke' style. You might have to set it programmatically: myChart.setStyle(calloutStroke,null); That should solve the problem (and in a more performant way). Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter Demling Sent: Friday, May 18, 2007 7:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Setting dataTipCalloutStroke={null} when dataTipMode=multiple? Hello, I have a CartesianChart where I don't want the calloutStroke to be drawn (and thereby offset the positioning of the dataTips from their data point), so I've set dataTipCalloutStroke={null}. This works fine when dataTipMode=single, but it does not work when I set dataTipMode=multiple: the callout is still drawn and the dataTips are offset. Any ideas? This is kind of a deal-breaker for my app, since a major feature is to display my custom dataTips directly adjacent to all (plot) data points at the same time. I suppose I could go way-deep into concatenating the default itemRenderer and the dataTip's custom contents into a custom itemRenderer, but I'd rather not have to code all that internal plumbing if I could instead do it all with this one style setting. Thanks for any suggestions! -Peter Demling Lexington, MA
Re: [flexcoders] e4x, nested elements tree data provider
Ah, I see what you mean. Tracy - yea, i realized my goof on that one after I sent the message (XML and XMLList are interchangeable for Tree). Thanks for keeping me in check. :) Try the isBranch attribute for folders that you do not want the tree to display. Then you can write a custom renderer for leaf nodes – the tree will treat nodes with the isBranch flag set to false as leaf nodes. This shouldn't cause any problems with your datagrid. Example as follows: mx:XMLList id=treeData folder label=Accounts folder label=First Account folder label=Inbox isBranch=false message label=Flexcoders/ message label=Flashcoders/ message label=Flashnewbie/ /folder folder label=Send Items isBranch=false message label=Nested Tree e4x/ /folder folder label=Trash isBranch=false message label=Flashnewbie/ /folder /folder folder label=Second Account folder label=Inbox isBranch=false message label=New Messages/ message label=Flagged Items/ message label=Attachments/ message label=All Mail/ /folder folder label=Send Items isBranch=false message label=Tree Data Provider with e4x/ /folder folder label=Trash isBranch=false message label=Lame Yahoo HTML emails/ /folder /folder /folder /mx:XMLList On May 18, 2007, at 12:27 PM, Richard Rodseth wrote: Thanks, Jon. Your example works for me, but I also need to add message leaf elements, and exclude those from the tree. i.e. mx:XMLList id=folders folders folder name=account1 folder name=Inbox message name=Greetings /message /folder /folder /folders /mx:XMLList
[flexcoders] Re: Flex is Broken
That actually does fix it...shouldn't I be able to add and remove without having to write work-arounds for bugs in Flex though? If I wanted that kind of development experience I'd go back to writing HTML and JavaScript. ;) --- In flexcoders@yahoogroups.com, Andrew Trice [EMAIL PROTECTED] wrote: I noticed that you are using removeEffects on the components. That is the root of your problem. I bet it you took those off, you wouldn't get the error anymore. In my experience with Flex, I've noticed that the child indexes change when an item is actually removed (when the effect has completed). There is a synchronization issue that occurs while the effect is playing. Adding children while a remove effect is playing usually causes errors very similar to what you are experiencing. If you are adding another child, try adding it after the remove effect has finished playing. Hope that helps. -Andy _ Andrew Trice Technical Lead Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Wicks Sent: Friday, May 18, 2007 10:23 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Flex is Broken I had a similar problem .. never really got to the bottom of it but I found that addChildAt worked while addChild didn't ? On 18 May 2007, at 15:03, Matt wrote: The exact error message I'm currently getting is as follows: RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/addChildAt() at mx.core::UIComponent/http://www.adobe. http://www.adobe.com/2006/flex/mx/internal::$addChildAt com/2006/flex/mx/internal::$addChildAt() at mx.core::Container/addChildAt() at mx.effects::EffectManager$/::removedEffectHandler() at Function/http://adobe. http://adobe.com/AS3/2006/builtin::apply com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() at flash.utils::Timer/flash.utils:Timer::_timerDispatch() at flash.utils::Timer/flash.utils:Timer::tick() Just to be clear here though, I'm calling addChild, not addChildAt (internally addChild calls addChildAt). --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com, Matt matt@ wrote: I have been using Flex for quite a while now and I've found quite a few moderate to serious bugs, but the one that keeps slapping my face when I approach something close to stability is this error: RangeError: Error #2006: The supplied index is out of bounds. This seems to occur due to ActionScript 3's lack of concurrency support. It would seem that if I quickly remove and add several components to a container this shows its ugly head. What makes this particularly scary is that the error message appears once and then any time I try to do anything at all to the container after that it throws the same message over and over. I originally saw this appear in reference to popups on the SystemManager container and created a work-around to pre-instantiate windows and just keep them hidden until needed. It was specifically a problem when I would use the popup manager to display a menu and the selection of a menu option would then display a window. What ended up happening was that the window would be created and popped up at the same time the popup was being removed and it would get its internal indexing off it would seem and never could you do anything to the SystemManager container again. Is there a way to add and remove items safely or is this a known bug and one I just have to live with until Adobe gets around to fixing it?
[flexcoders] A couple questions on Tree controls
Hi folks, I've just started playing around with a Tree control and was wondering if it's possible to NOT display the arrow graphic (that identifies that an item has children) or to replace it with another image/symbol? I've tweaked the opening/closing functionality to open/close upon clicking of the entire item so funcitonality stays intact. Also I've been able to replace the icons with custom symbols but I need to replace certain folders that are several levels deep with varying symbols. The example in the Help shows replacing individual icons like so: myTree.setItemIcon(myTree.dataProvider.getItemAt(2), iconSymbol1, iconSymbol1); this line changes index 2 on the main level but I'm not sure how to reference a deeper level item in the dataProvider. Does anyone know how to go about this?
RE: [flexcoders] e4x, nested elements tree data provider
XML works fine with tree. The xml methods dispatch the necessary events to sync the display with the xml changes. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jon Bradley Sent: Friday, May 18, 2007 11:32 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] e4x, nested elements tree data provider Not sure what you're really asking, how to do a nested tree? You need to use XMLList instead of XML (I don't think it dynamically casts the dataProvider to a XMLList if you provide it just XML). You can swap out label with name and use the same labelField convention. good luck, - jon Here's a tested example: mx:XMLList id=myTreeData node label=Accounts node label=First Account node label=Inbox node label=Flexcoders/ node label=Flashcoders/ node label=Flashnewbie/ /node node label=Send Items node label=Nested Tree e4x/ /node node label=Trash node label=Flashnewbie/ /node /node node label=Second Account node label=Inbox node label=New Messages/ node label=Flagged Items/ node label=Attachments/ node label=All Mail/ /node node label=Send Items node label=Tree Data Provider with e4x/ /node node label=Trash node label=Lame Yahoo HTML emails/ /node /node /node /mx:XMLList On May 18, 2007, at 11:12 AM, Richard Rodseth wrote: I'm whipping up a mock-up of a UI much like a mail client (folder tree + data grid), using XML dummy data. I've got the rows of the data grid populating with an e4x predicate, and I have the tree populating with data like this: mx:Tree x=0 y=0 width=100% height=100% dataProvider={folders} labelField=@name showRoot=false defaultLeafIcon=@Embed(source='Assets.swf', symbol='TreeFolderClosed')/mx:Tree mx:XML id=folders folders account name=account1 folder name=Inbox /folder folder name=Sent Items /folder /account account name=account2 folder name=Inbox /folder folder name=Sent Items /folder /account /folders
RE: [flexcoders] Re: Setting dataTipCalloutStroke={null} when dataTipMode=multiple?
DataTips were really written to be interactive tips, while a lot of people have asked for functionality that allows you to treat them more like labels. We hear the request, and are considering ways to update it for a future release. If I wanted to put labels on the plot items, I'd probably, in increasing order of difficulty: 1) Use the data graphics drawing API (see the post on my blog). Pro: very easy. Con: less performant. 2) Write a custom item renderer. Pro: more performant, leverages existing plot series. Con: axes won't automatically make sure there's enough room for the labels. 3) Write a custom series (or extension to plot series). Pro: best performance option, best experience (can make the chart axes make room for labels). Con: requires understanding writing custom series. Personally, I'd suggest taking a shot at #3. Writing a custom series really isn't all that difficult, esp. for a plot series, which is the simplest kind. I'd probably try this: 1) Extend PlotSeries. 2) In the constructor for your extension, create a UIComponent and addChild it. This will be the sprite that will contain your labels. 3) Override the get labelLayer property, and return a reference to that UIComponent. This makes sure the chart adds it to your display, above all the series, so labels don't appear under items. 4) Override updateDisplayList. First call the super. Second, for each chart item in the renderData.filteredCache array, create a Label (or some custom component), position it where you want relative to the x/y values in the chart item, and add it as a child to your labelLayer. 5) Override describeData. This is the method where you tell the axes what range your data represents. You also have the option of telling the series that you need a certain number of pixels on either size of your data. You'll want to report to the axis that you need space to the right of your data for the label. See the ASDoc for describeData for more details. 6) Optimize. Reuse your labels in your updateDisplayList function, etc. 7) Deal with transitions, if you want. Eearlier I said that in updateDisplayList, you want to look at the renderData.filteredCache array. With transitions, it's a little more complicated. You might have a transitionRenderData property, in which case you want to use that. Your transition render data property might have an elementBounds array, in which case you want to use that instead. Honestly, in my experience, it's better to hide labels during transitions, so probably you just want to see if you have a transitionRenderData value, and hide all your labels if you do. See PlotSeries.updateDisplayList for an example of how to deal with transitions and render data. Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter Demling Sent: Friday, May 18, 2007 10:15 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Setting dataTipCalloutStroke={null} when dataTipMode=multiple? Thanks for the reply, Ely! I really appreciate your input. myChart.setStyle(calloutStroke,null); This works to hide the calloutStroke... ...but the positions of the dataTip boxes still get offset from the chartItems (in my case, far away from the DiamondItemRenderers of my plotSeries). In other words, when dataTipMode=multiple, I want the dataTip boxes to position themselves like they do when dataTipMode=single: i.e., a few pixels to the northeast of the chartItem. My real end goal is to show the all the items in the plotSeries, with their corresponding dataTips right next to them (I'm using a high mouseSensitivity to forcibly show multiple dataTips right now, but I know I'll eventually have to explicitly dispatch MOUSE_OVER, or else override findDataPoints and toggle all the showDataTips value to false/true). If I can't force the offset-positioning of these dataTips in order to align nicely with their chartItems, do you think I need to use a custom ItemRenderer instead? Your StoplightItemRenderer example at qs* is quite helpful in this regard, but I can't figure out how I'd also draw text values from the chartItem adjacent to the DiamondItemRenderer (e.g., Smith,John (age 30) adjacent to the diamond graphic). Thanks again for any suggestions; believe me, little bumps in the road like this don't take away from the enormous benefit this charting API has already been for us. Regards, -Peter Demling Lexington, MA *is quietlyScheming.com down? I lost connection this morning... --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Ely Greenfield [EMAIL PROTECTED] wrote: Peter - Took a peek at the code, and that looks to be an unfortunately bug on my part. Use 'calloutStroke' instead of 'dataTipCalloutStroke' style. You might have to set it programmatically: myChart.setStyle(calloutStroke,null); That should solve the problem (and in a more
[flexcoders] Flex help
Hi, I am having this problem . I am trying to call this function from a button' s click event. The function is like this: public function Insert():void { myResult.deleteorder(orderid); for (var i:int = 0; i myData.length; i++ ) { var newProduct:Product = myData[i] ; myService.insertsp( newProduct ) ; }//end for loop var uv:URLVariables = new URLVariables(); var request:URLRequest = new URLRequest (OrderReview.html); uv.ordern = lblordern.text; request.data=uv; navigateToURL(request,_self); } When I was testing with 2 or 4 records it was working fine. Now I am testing with real data. It just doesn't work . This doesn't wait for the for loop to be finished completely and starts processing the other steps. I want the other steps to be processed after the loop is done. Please help. Is there some wait command in Flex? I am a new bee.. Thanks in advance.
Re: [flexcoders] Re: Flex is Broken
On 5/18/07, Matt [EMAIL PROTECTED] wrote: That actually does fix it...shouldn't I be able to add and remove without having to write work-arounds for bugs in Flex though? Of course... we should outlaw bugs :) Hank If I wanted that kind of development experience I'd go back to writing HTML and JavaScript. ;) --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Andrew Trice [EMAIL PROTECTED] wrote: I noticed that you are using removeEffects on the components. That is the root of your problem. I bet it you took those off, you wouldn't get the error anymore. In my experience with Flex, I've noticed that the child indexes change when an item is actually removed (when the effect has completed). There is a synchronization issue that occurs while the effect is playing. Adding children while a remove effect is playing usually causes errors very similar to what you are experiencing. If you are adding another child, try adding it after the remove effect has finished playing. Hope that helps. -Andy _ Andrew Trice Technical Lead Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of Matt Wicks Sent: Friday, May 18, 2007 10:23 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: Re: [flexcoders] Re: Flex is Broken I had a similar problem .. never really got to the bottom of it but I found that addChildAt worked while addChild didn't ? On 18 May 2007, at 15:03, Matt wrote: The exact error message I'm currently getting is as follows: RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/addChildAt() at mx.core::UIComponent/http://www.adobe. http://www.adobe.com/2006/flex/mx/internal::$addChildAt com/2006/flex/mx/internal::$addChildAt() at mx.core::Container/addChildAt() at mx.effects::EffectManager$/::removedEffectHandler() at Function/http://adobe. http://adobe.com/AS3/2006/builtin::apply com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() at flash.utils::Timer/flash.utils:Timer::_timerDispatch() at flash.utils::Timer/flash.utils:Timer::tick() Just to be clear here though, I'm calling addChild, not addChildAt (internally addChild calls addChildAt). --- In [EMAIL PROTECTED] mailto:flexcoders% flexcoders%25 40yahoogroups.com ups.com, Matt matt@ wrote: I have been using Flex for quite a while now and I've found quite a few moderate to serious bugs, but the one that keeps slapping my face when I approach something close to stability is this error: RangeError: Error #2006: The supplied index is out of bounds. This seems to occur due to ActionScript 3's lack of concurrency support. It would seem that if I quickly remove and add several components to a container this shows its ugly head. What makes this particularly scary is that the error message appears once and then any time I try to do anything at all to the container after that it throws the same message over and over. I originally saw this appear in reference to popups on the SystemManager container and created a work-around to pre-instantiate windows and just keep them hidden until needed. It was specifically a problem when I would use the popup manager to display a menu and the selection of a menu option would then display a window. What ended up happening was that the window would be created and popped up at the same time the popup was being removed and it would get its internal indexing off it would seem and never could you do anything to the SystemManager container again. Is there a way to add and remove items safely or is this a known bug and one I just have to live with until Adobe gets around to fixing it?
RE: [flexcoders] TileList skinning help
All List controls rip off the background of the renderers by blocking the CSS background styles in the main component. We do this so the selection and rollover highlights show through. You can modify the renderer to pick up the appropriate background styles, but then you may block viewing of the selection and rollover. There's a way to get around that too. There's an example on my blog. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jon Bradley Sent: Friday, May 18, 2007 5:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] TileList skinning help I'm trying to skin up the TileList component and am not having the best of luck - aside from just changing colors and whatnot. Has anyone succeeded in using skins through CSS to style the TileList component? Specifically, I have a background skin that I'm trying to use for the normal background state, roll over, and selected states. When you have a custom item renderer for the TileList, does it override any settings you make for the component? I even imported my CSS styles into the itemRenderer that I created and applied the style to VBox components in there - that doesn't take unless I put another nested VBox inside (but then I don't have all the states available). Since I'm creating a pretty custom item renderer with various elements, should I just be importing these skins directly into the itemRenderer and handling it from there? Any thoughts are appreciated. cheers, jon
[flexcoders] star (*) data type vs. Object
Can anyone tell me what the difference is between setting a generic variable's data type to Object and setting it to *. Are they equivalent? I tried to search for the answer, but it's hard to do a search for *. :) thanks, Adam
RE: [flexcoders] DataGrid dynamic toolTips or dataTips
dataTipFunction should be the answer, but I don't get what you are doing in the loop. Can you give more detail of what you are trying to accomplish? -Alex From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of James Sent: Thursday, May 17, 2007 10:47 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid dynamic toolTips or dataTips Hi all, my name is James Wilson, I am a flex programmer in the atlanta area, new to the list. On a datagrid, I'd like to display more information about the item the user is hovering over in a tooltip, but I want to get this information (a fair bit) dynamically based on a case number/id from the datagrid item that is being hovered over. The best way I can think of is to do a loop in the dataTipFunction: public function myDataTipFunction(e:HitData):String { while(httpService.lastResult == null){} //return tooltip based on result. } Surely there is a better way. Thanks everyone. Nice to meet you all. :) James Wilson
[flexcoders] Re: Setting dataTipCalloutStroke={null} when dataTipMode=multiple?
Thanks for the details on the options, especially #3. 1) Use the data graphics drawing API (see the post on my blog). Excellent; I'll start with this (I need to demo a proof-of-concept this weekend). QuietlyScheming is still refusing my connection, though (it must know I want to do unsavory things with dataTips). 2) Write a custom item renderer Once I'm in updateDisplayList() and I have access to the _ChartItem, is it possible to then output the contents of a data field from the item (e.g. _ChartItem.hitData.item.NAME in a Label to output Smith,John via addChild() or something), or is it restricted to pure Graphics drawing methods? 3) Write a custom series (or extension to plot series) I like that as my eventual solution; and assuming that the answer to the above question is no, I assume this would be the only way to embed data provider fields (e.g. Smith,John from the ChartItem) into the ItemRenderer? thanks again, -Peter Demling Lexington, MA --- In flexcoders@yahoogroups.com, Ely Greenfield [EMAIL PROTECTED] wrote: DataTips were really written to be interactive tips, while a lot of people have asked for functionality that allows you to treat them more like labels. We hear the request, and are considering ways to update it for a future release. If I wanted to put labels on the plot items, I'd probably, in increasing order of difficulty: 1) Use the data graphics drawing API (see the post on my blog). Pro: very easy. Con: less performant. 2) Write a custom item renderer. Pro: more performant, leverages existing plot series. Con: axes won't automatically make sure there's enough room for the labels. 3) Write a custom series (or extension to plot series). Pro: best performance option, best experience (can make the chart axes make room for labels). Con: requires understanding writing custom series. Personally, I'd suggest taking a shot at #3. Writing a custom series really isn't all that difficult, esp. for a plot series, which is the simplest kind. I'd probably try this: 1) Extend PlotSeries. 2) In the constructor for your extension, create a UIComponent and addChild it. This will be the sprite that will contain your labels. 3) Override the get labelLayer property, and return a reference to that UIComponent. This makes sure the chart adds it to your display, above all the series, so labels don't appear under items. 4) Override updateDisplayList. First call the super. Second, for each chart item in the renderData.filteredCache array, create a Label (or some custom component), position it where you want relative to the x/y values in the chart item, and add it as a child to your labelLayer. 5) Override describeData. This is the method where you tell the axes what range your data represents. You also have the option of telling the series that you need a certain number of pixels on either size of your data. You'll want to report to the axis that you need space to the right of your data for the label. See the ASDoc for describeData for more details. 6) Optimize. Reuse your labels in your updateDisplayList function, etc. 7) Deal with transitions, if you want. Eearlier I said that in updateDisplayList, you want to look at the renderData.filteredCache array. With transitions, it's a little more complicated. You might have a transitionRenderData property, in which case you want to use that. Your transition render data property might have an elementBounds array, in which case you want to use that instead. Honestly, in my experience, it's better to hide labels during transitions, so probably you just want to see if you have a transitionRenderData value, and hide all your labels if you do. See PlotSeries.updateDisplayList for an example of how to deal with transitions and render data. Ely.
RE: [flexcoders] Flex help
Flex/Flash is single-threaded. The loop has to complete before moving on to the URLVariables code. I'd double check to see if the data.length is what you expect From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sunitaleena Sent: Friday, May 18, 2007 9:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex help Hi, I am having this problem . I am trying to call this function from a button' s click event. The function is like this: public function Insert():void { myResult.deleteorder(orderid); for (var i:int = 0; i myData.length; i++ ) { var newProduct:Product = myData[i] ; myService.insertsp( newProduct ) ; }//end for loop var uv:URLVariables = new URLVariables(); var request:URLRequest = new URLRequest (OrderReview.html); uv.ordern = lblordern.text; request.data=uv; navigateToURL(request,_self); } When I was testing with 2 or 4 records it was working fine. Now I am testing with real data. It just doesn't work . This doesn't wait for the for loop to be finished completely and starts processing the other steps. I want the other steps to be processed after the loop is done. Please help. Is there some wait command in Flex? I am a new bee.. Thanks in advance.
Re: [flexcoders] Re: Flex is Broken
Maybe things like trying to shift into another gear without the clutch in factors into this equation as well. You didn't show any code, so I don't know if you are trying to brute force something that in the design of the framework was not a bug to begin with but an implementation. Peace, Mike On 5/18/07, hank williams [EMAIL PROTECTED] wrote: On 5/18/07, Matt [EMAIL PROTECTED] wrote: That actually does fix it...shouldn't I be able to add and remove without having to write work-arounds for bugs in Flex though? Of course... we should outlaw bugs :) Hank If I wanted that kind of development experience I'd go back to writing HTML and JavaScript. ;) --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Andrew Trice [EMAIL PROTECTED] wrote: I noticed that you are using removeEffects on the components. That is the root of your problem. I bet it you took those off, you wouldn't get the error anymore. In my experience with Flex, I've noticed that the child indexes change when an item is actually removed (when the effect has completed). There is a synchronization issue that occurs while the effect is playing. Adding children while a remove effect is playing usually causes errors very similar to what you are experiencing. If you are adding another child, try adding it after the remove effect has finished playing. Hope that helps. -Andy _ Andrew Trice Technical Lead Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com[mailto:flexcoders@yahoogroups.comflexcoders%40yahoogroups.com] On Behalf Of Matt Wicks Sent: Friday, May 18, 2007 10:23 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: Re: [flexcoders] Re: Flex is Broken I had a similar problem .. never really got to the bottom of it but I found that addChildAt worked while addChild didn't ? On 18 May 2007, at 15:03, Matt wrote: The exact error message I'm currently getting is as follows: RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/addChildAt() at mx.core::UIComponent/http://www.adobe. http://www.adobe.com/2006/flex/mx/internal::$addChildAt com/2006/flex/mx/internal::$addChildAt() at mx.core::Container/addChildAt() at mx.effects::EffectManager$/::removedEffectHandler() at Function/http://adobe. http://adobe.com/AS3/2006/builtin::apply com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() at flash.utils::Timer/flash.utils:Timer::_timerDispatch() at flash.utils::Timer/flash.utils:Timer::tick() Just to be clear here though, I'm calling addChild, not addChildAt (internally addChild calls addChildAt). --- In [EMAIL PROTECTED] mailto:flexcoders% flexcoders%25 40yahoogroups.com ups.com, Matt matt@ wrote: I have been using Flex for quite a while now and I've found quite a few moderate to serious bugs, but the one that keeps slapping my face when I approach something close to stability is this error: RangeError: Error #2006: The supplied index is out of bounds. This seems to occur due to ActionScript 3's lack of concurrency support. It would seem that if I quickly remove and add several components to a container this shows its ugly head. What makes this particularly scary is that the error message appears once and then any time I try to do anything at all to the container after that it throws the same message over and over. I originally saw this appear in reference to popups on the SystemManager container and created a work-around to pre-instantiate windows and just keep them hidden until needed. It was specifically a problem when I would use the popup manager to display a menu and the selection of a menu option would then display a window. What ended up happening was that the window would be created and popped up at the same time the popup was being removed and it would get its internal indexing off it would seem and never could you do anything to the SystemManager container again. Is there a way to add and remove items safely or is this a known bug and one I just have to live with until Adobe gets around to fixing it? -- 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] Flex help
Data service calls are asynchronous and do not block code execution. Use the AsyncToken to track the data service calls, and a result handler function to invoke rest of the code when all of the calls have returned. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sunitaleena Sent: Friday, May 18, 2007 12:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex help Hi, I am having this problem . I am trying to call this function from a button' s click event. The function is like this: public function Insert():void { myResult.deleteorder(orderid); for (var i:int = 0; i myData.length; i++ ) { var newProduct:Product = myData[i] ; myService.insertsp( newProduct ) ; }//end for loop var uv:URLVariables = new URLVariables(); var request:URLRequest = new URLRequest (OrderReview.html); uv.ordern = lblordern.text; request.data=uv; navigateToURL(request,_self); } When I was testing with 2 or 4 records it was working fine. Now I am testing with real data. It just doesn't work . This doesn't wait for the for loop to be finished completely and starts processing the other steps. I want the other steps to be processed after the loop is done. Please help. Is there some wait command in Flex? I am a new bee.. Thanks in advance.
RE: [flexcoders] Re: Does Drag Drop Only Update the DataProvider?
Mx:DataGrid's change event is for when selection changes, not when the collection changes. Could that be the issue? collectionChange may be what you want. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Friday, May 18, 2007 10:12 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Does Drag Drop Only Update the DataProvider? I don't have the code in front of me right now, but to be more precise, dgEmployees is not broadcasting a change event upon a DD action. I want dgEmployees to broadcast an event every time there is a change to the DataGrid. The dgEmployees DataGrid has a change event method defined, somthing like: code mx:DataGrid id=dgEmployees dataProvider={__employees} change=broadcastEvent(event) ... /code The broadcastEvent() method constructs a custom event containing the number of elements in the DataGrid, and then dispatches it to be used elsewhere. Now, as I type this, I see that I might have keyed off the wrong event, change. Not sure if that is broadcast upon a change in the dataProvider, BUT I had been working on this code previously (converting to Flex 2.0), and I believe that I saw this same issue. I noticed that when I used the debugger to step throught the doDragDrop() method, I was seeing that only the dataProvider was being updated, and not the ArrayCollection. I can't verify this until Monday (5/21), but I'm almost 100% sure this is what I saw. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: How do you know it didn't update __employees? Can you post a mini-example in a couple of screenfuls of text? From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Geoffrey Sent: Thursday, May 17, 2007 6:11 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Does Drag Drop Only Update the DataProvider? I have a DataGrid that has a dataProvider bound to an ArrayCollection. code mx:DataGrid id=dgEmployees dataProvider={__employees} ... /code I also have another DataGrid (dgAllEmployees) that is within a popup, which I use as a source for Drag Drop operations to populate the dgEmployee dataGrid. What I've noticed is that when I drag drop employees from the all employees DataGrid to the employees DataGrid, it seems to only update the dataProvider of dgEmployees, and not the ArrayCollection __employees. Why is this? Below is a snip of my drag drop code where it actually copies the data. This is a generic method that is used all over the application. code public static function doDragDrop( event:DragEvent ):void { // Prevent the default event from happening. event.preventDefault(); // Get drop target var dropTarget:DataGrid = DataGrid(event.currentTarget); // Get the dragged items from the drag initiator. var dropItems:Array = event.dragSource.dataForFormat(items) as Array; // Add each item to the drop target. for (var i:uint = 0; i dropItems.length; i++) { var dest:IList = IList(dropTarget.dataProvider); if (!contains(dest, dropItems[i])) { dest.addItem(dropItems[i]); } } } /code I think that I had event.preventDefault(); in there because it was putting 2 of each dropped item in the dgEmployee DataGrid. Might this be messing something up? Also, contains() is a custom method to compare the source items to what's in the target's list to prevent duplicates. Is there a better way to do this? Thanks in advance. GT
RE: [flexcoders] TextArea: Halo skin draws over top of child controls!
TextArea doesn't really expect children other than its border and scrollbars. If you add another child, you have to figure out when and how to set the z-order by using setChildIndex or getting the index right on addChildAt, and correctly report the measured width/height including the child. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mark Ingram Sent: Friday, May 18, 2007 8:21 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] TextArea: Halo skin draws over top of child controls! Hi, I have a Text Area with a child control embedded in it. Even though the child control was added last, the halo skin still gets drawn on top of everything. Which looks odd! Is there any way I can stop this? Thanks, Mark
RE: [flexcoders] Re: Setting dataTipCalloutStroke={null} when dataTipMode=multiple?
Hmmm...seems to be down right now. I'll send you're the code directly. Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter Demling Sent: Friday, May 18, 2007 11:43 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Setting dataTipCalloutStroke={null} when dataTipMode=multiple? Thanks for the details on the options, especially #3. 1) Use the data graphics drawing API (see the post on my blog). Excellent; I'll start with this (I need to demo a proof-of-concept this weekend). QuietlyScheming is still refusing my connection, though (it must know I want to do unsavory things with dataTips). 2) Write a custom item renderer Once I'm in updateDisplayList() and I have access to the _ChartItem, is it possible to then output the contents of a data field from the item (e.g. _ChartItem.hitData.item.NAME in a Label to output Smith,John via addChild() or something), or is it restricted to pure Graphics drawing methods? 3) Write a custom series (or extension to plot series) I like that as my eventual solution; and assuming that the answer to the above question is no, I assume this would be the only way to embed data provider fields (e.g. Smith,John from the ChartItem) into the ItemRenderer? thanks again, -Peter Demling Lexington, MA --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Ely Greenfield [EMAIL PROTECTED] wrote: DataTips were really written to be interactive tips, while a lot of people have asked for functionality that allows you to treat them more like labels. We hear the request, and are considering ways to update it for a future release. If I wanted to put labels on the plot items, I'd probably, in increasing order of difficulty: 1) Use the data graphics drawing API (see the post on my blog). Pro: very easy. Con: less performant. 2) Write a custom item renderer. Pro: more performant, leverages existing plot series. Con: axes won't automatically make sure there's enough room for the labels. 3) Write a custom series (or extension to plot series). Pro: best performance option, best experience (can make the chart axes make room for labels). Con: requires understanding writing custom series. Personally, I'd suggest taking a shot at #3. Writing a custom series really isn't all that difficult, esp. for a plot series, which is the simplest kind. I'd probably try this: 1) Extend PlotSeries. 2) In the constructor for your extension, create a UIComponent and addChild it. This will be the sprite that will contain your labels. 3) Override the get labelLayer property, and return a reference to that UIComponent. This makes sure the chart adds it to your display, above all the series, so labels don't appear under items. 4) Override updateDisplayList. First call the super. Second, for each chart item in the renderData.filteredCache array, create a Label (or some custom component), position it where you want relative to the x/y values in the chart item, and add it as a child to your labelLayer. 5) Override describeData. This is the method where you tell the axes what range your data represents. You also have the option of telling the series that you need a certain number of pixels on either size of your data. You'll want to report to the axis that you need space to the right of your data for the label. See the ASDoc for describeData for more details. 6) Optimize. Reuse your labels in your updateDisplayList function, etc. 7) Deal with transitions, if you want. Eearlier I said that in updateDisplayList, you want to look at the renderData.filteredCache array. With transitions, it's a little more complicated. You might have a transitionRenderData property, in which case you want to use that. Your transition render data property might have an elementBounds array, in which case you want to use that instead. Honestly, in my experience, it's better to hide labels during transitions, so probably you just want to see if you have a transitionRenderData value, and hide all your labels if you do. See PlotSeries.updateDisplayList for an example of how to deal with transitions and render data. Ely. image001.jpgimage002.jpg
RE: [flexcoders] star (*) data type vs. Object
See: http://livedocs.adobe.com/flex/2/langref/specialTypes.html#* The type * is just like Object but it can also store values that are undefined. Object can only store null. It's useful to determine whether a dynamic property actually exists on a type and just happens to be null, or whether it literally is not defined on that type. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Adam Pasztory Sent: Friday, May 18, 2007 2:42 PM To: flexcoders Subject: [flexcoders] star (*) data type vs. Object Can anyone tell me what the difference is between setting a generic variable's data type to Object and setting it to *. Are they equivalent? I tried to search for the answer, but it's hard to do a search for *. :) thanks, Adam
Re: [flexcoders] TileList skinning help
Woa... great overview you have on itemRenderers on your blog. Unfortunately, I couldn't figure out what demo you were referring to that solves these problems. Could you post a direct link (or email it to me)? thanks a ton! - jon On May 18, 2007, at 2:33 PM, Alex Harui wrote: All List controls rip off the background of the renderers by blocking the CSS background styles in the main component. We do this so the selection and rollover highlights show through. You can modify the renderer to pick up the appropriate background styles, but then you may block viewing of the selection and rollover. There’s a way to get around that too. There’s an example on my blog.
Re: [flexcoders] zoom for buttons in ButtonBar
The individual buttons on a ButtonBar are children of the ButtonBar. Therefore, you would play a Zoom effect specifying a child as the target. Here is an example: mx:Zoom id=myZoom / mx:ButtonBar id=bb horizontalGap=5 itemClick=clickHandler(event); mx:dataProvidermx:Array mx:StringFlash/mx:String mx:StringDirector/mx:String mx:StringDreamweaver/mx:String mx:StringColdFusion/mx:String/mx:Array /mx:dataProvider /mx:ButtonBar mx:Button label=play effect click=myZoom.play([bb.getChildAt(1)]) / If you want to play an effect on the click on one of the buttons, you can also use the relatedObject property of the itemClick. For example, using the ButtonBar above, you might have: private function clickHandler(event:ItemClickEvent):void { myZoom.play([event.relatedObject]);} Good luck, Joan On 5/17/07 9:43 PM, chen_saraf [EMAIL PROTECTED] wrote: Hi, I'm kind of new to Flex :) What would be the way to show zoom effect on buttons contains withing ButtonBar? Thanks, Ken
Re: [flexcoders] Hide scrollbar on Horizontal List in Flex2
Set horizontalScrollPolicy=²off² on your HorizontalList. Joan On 5/17/07 3:12 PM, mondainx [EMAIL PROTECTED] wrote: I have a horizontal list and I want to hide the scrollbar, since I use buttons/images to scroll left or right. How do I go about doing this? Paul
Re: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents
For the archives, compile times can be greatly reduced using fcsh, though I'm not sure how you'd go about using it in a server-side environment. http://labs.adobe.com/wiki/index.php/Flex_Compiler_Shell John On May 17, 2007, at 8:30 PM, Paul J DeCoursey wrote: You can easily integrate a compile on demand system using the Flex SDK and Tomcat. The problem is the compilers are not very fast. I'm guessing that the Apache/IIS module does some caching so that compiles run faster because they don't have to reload large libraries each time. Once the compiler is opened up a little more you should be able to implement this kind of thing. Austin Kottke wrote: Ely, I find runtime MXML something that would be invaluable. It is something that if implemented could make developing in flex a lot more scaleable and integration with the server end would be a lot more feasible. (As in doing HTTPRequests where serverside MXML could be generated through Velocity/JSP and then given back to the ui) A lot of developers don't know a thing about flex, but can learn basic MXML for layout or simple scripting and implement basic server side operations. And if these are kept just as mxml it makes updates in the future easier. We can then just tell someone (edit the MXML) and you're done, instead of download the flex sdk, set your ant build, yada ya -- some aren't programmers, but MXML is very easy to learn. It's a lot more confrontable for a designer/layout guy to tackle. Anyway, runtime MXML would be something that would majorly increase scalability and integration with servers - similar to the Apache IIS mod for JSP, etc - the only problem is that it's just for Apache or IIS. Some run tomcat, resin, etc. But having it on the client end would eliminate this problem. Best, austin Ely Greenfield wrote: Austin et. al. – There are a number of features of MXML that simply can’t be replicated at runtime. Things like script blocks. Other features would be prohibitively difficult (arbitrary binding expressions, @Embed, mx:Component, among others). You could reduce MXML to a runtime-parsable subset, and I know various people have taken various approaches to this. The more you reduce it, the easier it would be to replicate…removing repeaters, implicit arrays, default properties, etc. would get you down to something that could be implemented in a reasonable amount of time. I’m curious…how many people would find runtime MXML to be important to them? Ely. *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Doug McCune *Sent:* Thursday, May 17, 2007 12:47 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents Yeah, ummm, my advice would be ignore that article. That's one of the effects of having an article submission process that allows anyone to submit anything. I know the cookbook is supposed to be user generated and reviewed, but anyone from Adobe want to exercise a little editorial control? I wouldn't mind the hand of god going in there and selectively removing a little content... sometimes democracy needs a helping hand. On 5/17/07, *Daniel Freiman* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I think they're just stating that the mx.modules package exists. The sentence We also know Flex2 knows how to read MXML at runtime because the compiler knows how to convert MXML into GUI Objects doesn't inspire confidence that they know what they're talking about. Since it's possible that they don't know what a compiler does, it's also possible they're just writing and compiling Modules and don't understand that they're doing it. Then again, that wouldn't explain what they're fighting with another company about earlier in the article. They claim what they're talking about is in the docs so I'd either search them or not worry about it. My guess is you'd be searching a long time for something that isn't there. It would be nice if someone could prove my guess wrong though. Dan Freiman nondocs http://nondocs.blogspot.com On 5/17/07, *Austin Kottke* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, There is an intriguing article in the flex cookbook on the adobe site about reading in MXML at runtime and using the XML object to create components at runtime. While I don't totally get how this works as there are no code samples, but very vague actually, but it states: Let's consider, for a moment, how Adobe might have chosen to leverage reuse within the Flex2 programming model. Assuming the Adobe engineers did not want to have to recreate the wheel in terms of how to make Flex2 able to load normal non-GUI XML I would surmise they chose to simply reuse whatever code they wrote that was able to read MXML into a way to read XML. As we know, MXML resembles XML rather
[flexcoders] Re: Flex is Broken
It's pretty straight-forward to reproduce. Just do something like: container.removeChild(c1); container.removeChild(c2); container.removeChild(c3); container.addChild(c4); container.addChild(c5); container.addChild(c6); Just make sure that the components have addedEffects and removedEffects on them and you'll see the handy-dandy evil error message. :) I think the only way I can manage this is to have a utility method that I call to add and remove components from a container and if the component has a removedEffect then it queues it up and waits for the removedEvent to finish before going on with removals. It just seems like Flex should already be doing that internally instead of partially removing it, but not really. --- In flexcoders@yahoogroups.com, Michael Schmalle [EMAIL PROTECTED] wrote: Maybe things like trying to shift into another gear without the clutch in factors into this equation as well. You didn't show any code, so I don't know if you are trying to brute force something that in the design of the framework was not a bug to begin with but an implementation. Peace, Mike On 5/18/07, hank williams [EMAIL PROTECTED] wrote: On 5/18/07, Matt [EMAIL PROTECTED] wrote: That actually does fix it...shouldn't I be able to add and remove without having to write work-arounds for bugs in Flex though? Of course... we should outlaw bugs :) Hank If I wanted that kind of development experience I'd go back to writing HTML and JavaScript. ;) --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Andrew Trice andrew.trice@ wrote: I noticed that you are using removeEffects on the components. That is the root of your problem. I bet it you took those off, you wouldn't get the error anymore. In my experience with Flex, I've noticed that the child indexes change when an item is actually removed (when the effect has completed). There is a synchronization issue that occurs while the effect is playing. Adding children while a remove effect is playing usually causes errors very similar to what you are experiencing. If you are adding another child, try adding it after the remove effect has finished playing. Hope that helps. -Andy _ Andrew Trice Technical Lead Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: andrew.trice@ Office: 866-CYNERGY From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com[mailto:flexcoders@yahoogroups.comflexcoders%40yahoogroups.com] On Behalf Of Matt Wicks Sent: Friday, May 18, 2007 10:23 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: Re: [flexcoders] Re: Flex is Broken I had a similar problem .. never really got to the bottom of it but I found that addChildAt worked while addChild didn't ? On 18 May 2007, at 15:03, Matt wrote: The exact error message I'm currently getting is as follows: RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/addChildAt() at mx.core::UIComponent/http://www.adobe. http://www.adobe.com/2006/flex/mx/internal::$addChildAt com/2006/flex/mx/internal::$addChildAt() at mx.core::Container/addChildAt() at mx.effects::EffectManager$/::removedEffectHandler() at Function/http://adobe. http://adobe.com/AS3/2006/builtin::apply com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() at flash.utils::Timer/flash.utils:Timer::_timerDispatch() at flash.utils::Timer/flash.utils:Timer::tick() Just to be clear here though, I'm calling addChild, not addChildAt (internally addChild calls addChildAt). --- In [EMAIL PROTECTED] mailto:flexcoders% flexcoders%25 40yahoogroups.com ups.com, Matt matt@ wrote: I have been using Flex for quite a while now and I've found quite a few moderate to serious bugs, but the one that keeps slapping my face when I approach something close to stability is this error: RangeError: Error #2006: The supplied index is out of bounds. This seems to occur due to ActionScript 3's lack of concurrency support. It would seem that if I quickly remove and add several components to a container this shows its ugly head. What makes this particularly scary is that the error message appears once and then any time I try to do anything at all to the container after that it throws the same message over and over. I originally saw this appear in reference to popups on the SystemManager
[flexcoders] TileList itemRenderer resize
I am using a mostly default (some options, no subclassing) TileList with a custom itemRenderer. I have been using the same itemRenderer for a while with no problems. I made a change to where one of the UI elements inside of this itemRenderer sets its visible and includeInLayout to false depending on the underlying data. When this happens the height of the itemRenderer should change, but the TileList doesn't seem to realize this. I am assuming that the TileList does a height/width calculation early on and doesn't notice that things are different. I am fine with subclassing, but at this point I don't know where to look for the right functions/events to latch on to to make this work as I expect. BTW, I know that the measurements are based off of the first data element, but because of the way this actual application works all of its itemRenderers will be the same size -- they just need to change sizes at runtime sometimes. TIA, Daniel
RE: [flexcoders] Re: Flex is Broken
If you can, just reverse that. Add the new items, and then remove the old ones. You *should* see nearly identical visual effects, and shouldn't get that error. Without seeing the full code, I can't guarantee that it will solve your problems, but I'm pretty sure that this would help you. -Andy _ Andrew Trice Technical Lead Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Sent: Friday, May 18, 2007 3:24 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flex is Broken It's pretty straight-forward to reproduce. Just do something like: container.removeChild(c1); container.removeChild(c2); container.removeChild(c3); container.addChild(c4); container.addChild(c5); container.addChild(c6); Just make sure that the components have addedEffects and removedEffects on them and you'll see the handy-dandy evil error message. :) I think the only way I can manage this is to have a utility method that I call to add and remove components from a container and if the component has a removedEffect then it queues it up and waits for the removedEvent to finish before going on with removals. It just seems like Flex should already be doing that internally instead of partially removing it, but not really. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Michael Schmalle [EMAIL PROTECTED] wrote: Maybe things like trying to shift into another gear without the clutch in factors into this equation as well. You didn't show any code, so I don't know if you are trying to brute force something that in the design of the framework was not a bug to begin with but an implementation. Peace, Mike On 5/18/07, hank williams [EMAIL PROTECTED] wrote: On 5/18/07, Matt [EMAIL PROTECTED] wrote: That actually does fix it...shouldn't I be able to add and remove without having to write work-arounds for bugs in Flex though? Of course... we should outlaw bugs :) Hank If I wanted that kind of development experience I'd go back to writing HTML and JavaScript. ;) --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com, Andrew Trice andrew.trice@ wrote: I noticed that you are using removeEffects on the components. That is the root of your problem. I bet it you took those off, you wouldn't get the error anymore. In my experience with Flex, I've noticed that the child indexes change when an item is actually removed (when the effect has completed). There is a synchronization issue that occurs while the effect is playing. Adding children while a remove effect is playing usually causes errors very similar to what you are experiencing. If you are adding another child, try adding it after the remove effect has finished playing. Hope that helps. -Andy _ Andrew Trice Technical Lead Cynergy Systems, Inc. http://www.cynergysystems.com http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice http://www.cynergysystems.com/blogs/page/andrewtrice Email: andrew.trice@ Office: 866-CYNERGY From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of Matt Wicks Sent: Friday, May 18, 2007 10:23 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com Subject: Re: [flexcoders] Re: Flex is Broken I had a similar problem .. never really got to the bottom of it but I found that addChildAt worked while addChild didn't ? On 18 May 2007, at 15:03, Matt wrote: The exact error message I'm currently getting is as follows: RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/addChildAt() at mx.core::UIComponent/http://www.adobe. http://www.adobe.com/2006/flex/mx/internal::$addChildAt http://www.adobe.com/2006/flex/mx/internal::$addChildAt com/2006/flex/mx/internal::$addChildAt() at mx.core::Container/addChildAt() at mx.effects::EffectManager$/::removedEffectHandler() at Function/http://adobe. http://adobe.com/AS3/2006/builtin::apply http://adobe.com/AS3/2006/builtin::apply com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() at
Re: [flexcoders] e4x, nested elements tree data provider
Thanks! That's good for now. I don't need a custom renderer because I set the defaultLeafIcon. defaultLeafIcon=@Embed(source='Assets.swf', symbol='TreeFolderClosed') On 5/18/07, Jon Bradley [EMAIL PROTECTED] wrote: Try the isBranch attribute for folders that you do not want the tree to display. Then you can write a custom renderer for leaf nodes – the tree will treat nodes with the isBranch flag set to false as leaf nodes.
RE: [flexcoders] TileList skinning help
The background color demo shows how to determine when to remove the background so the selection and highlight can show. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jon Bradley Sent: Friday, May 18, 2007 12:10 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] TileList skinning help Woa... great overview you have on itemRenderers on your blog. Unfortunately, I couldn't figure out what demo you were referring to that solves these problems. Could you post a direct link (or email it to me)? thanks a ton! - jon On May 18, 2007, at 2:33 PM, Alex Harui wrote: All List controls rip off the background of the renderers by blocking the CSS background styles in the main component. We do this so the selection and rollover highlights show through. You can modify the renderer to pick up the appropriate background styles, but then you may block viewing of the selection and rollover. There's a way to get around that too. There's an example on my blog.
[flexcoders] Re: selectedIndices are Strings???
Now, now No need for chastising. Consider how illogical ActionScript (and coding) tend to be in general. I mean we'd think a banker counting money by going 1,10,11...19,2,20,21,...3 and so on would think the banker had gone nuts. *LOL*
RE: [flexcoders] TileList itemRenderer resize
Try setting itemsNeedMeasurement=true and calling invalidateProperties(). From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Grace Sent: Friday, May 18, 2007 12:26 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] TileList itemRenderer resize I am using a mostly default (some options, no subclassing) TileList with a custom itemRenderer. I have been using the same itemRenderer for a while with no problems. I made a change to where one of the UI elements inside of this itemRenderer sets its visible and includeInLayout to false depending on the underlying data. When this happens the height of the itemRenderer should change, but the TileList doesn't seem to realize this. I am assuming that the TileList does a height/width calculation early on and doesn't notice that things are different. I am fine with subclassing, but at this point I don't know where to look for the right functions/events to latch on to to make this work as I expect. BTW, I know that the measurements are based off of the first data element, but because of the way this actual application works all of its itemRenderers will be the same size -- they just need to change sizes at runtime sometimes. TIA, Daniel
[flexcoders] Re: DataGrid dynamic toolTips or dataTips
I want to get information about the item that is being hovered over. I don't have this information in memory, I need to get it from the web server, that requires waiting for a result event from HTTPService before returning the data I need. Thanks! --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: dataTipFunction should be the answer, but I don't get what you are doing in the loop. Can you give more detail of what you are trying to accomplish? -Alex From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of James Sent: Thursday, May 17, 2007 10:47 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid dynamic toolTips or dataTips Hi all, my name is James Wilson, I am a flex programmer in the atlanta area, new to the list. On a datagrid, I'd like to display more information about the item the user is hovering over in a tooltip, but I want to get this information (a fair bit) dynamically based on a case number/id from the datagrid item that is being hovered over. The best way I can think of is to do a loop in the dataTipFunction: public function myDataTipFunction(e:HitData):String { while(httpService.lastResult == null){} //return tooltip based on result. } Surely there is a better way. Thanks everyone. Nice to meet you all. :) James Wilson
Re: [flexcoders] TileList itemRenderer resize
I added the following code to the TileList: public override function set dataProvider(o: Object): void { if (this.dataProvider) { this.dataProvider.removeEventListener(collectionChange, this.cc); } super.dataProvider = o; this.dataProvider.addEventListener(collectionChange, this.cc); this.callLater(this.cc); } private function cc(event: Event = null): void { this.itemsNeedMeasurement = true; this.invalidateProperties(); } I have added (and since removed, since it was noisy) an alert to my cc function, so I know that it's getting called when my underlying data gets changed... but the individual tiles still aren't resizing. I can see the very top part of the unhidden data in the tiles, but it doesn't expand to see the rest. Am I handling this in the wrong place? TIA, Daniel On 5/18/07, Alex Harui [EMAIL PROTECTED] wrote: Try setting itemsNeedMeasurement=true and calling invalidateProperties(). -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Daniel Grace *Sent:* Friday, May 18, 2007 12:26 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] TileList itemRenderer resize I am using a mostly default (some options, no subclassing) TileList with a custom itemRenderer. I have been using the same itemRenderer for a while with no problems. I made a change to where one of the UI elements inside of this itemRenderer sets its visible and includeInLayout to false depending on the underlying data. When this happens the height of the itemRenderer should change, but the TileList doesn't seem to realize this. I am assuming that the TileList does a height/width calculation early on and doesn't notice that things are different. I am fine with subclassing, but at this point I don't know where to look for the right functions/events to latch on to to make this work as I expect. BTW, I know that the measurements are based off of the first data element, but because of the way this actual application works all of its itemRenderers will be the same size -- they just need to change sizes at runtime sometimes. TIA, Daniel
[flexcoders] Printing from Flex
Anyone tried to do much printing from Flex? Any words of wisdom before I dive headlong into the docs and scour the message boards? Any good examples? How about Charts, anyone managed to print them successfully? And PDF generation? Anyone found a good way of doing that containing charts? Thanks in advance for any help.
[flexcoders] Error 2152 with RTMP streams
Does anyone else get this error when viewing and then attempting full screen on RTMP based FLV streams? Error #2152: Full screen mode is not allowed. And if so do you know how to fix it, in Flex2? Paul -- It is difficult to free fools from the chains they revere. - Voltaire
RE: [flexcoders] Re: DataGrid dynamic toolTips or dataTips
Hmm. The request to the server could take a long time. What would you want to show in the interim? Waiting too long for lastResult will cause the UI to appear stuck. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of James Sent: Friday, May 18, 2007 12:17 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: DataGrid dynamic toolTips or dataTips I want to get information about the item that is being hovered over. I don't have this information in memory, I need to get it from the web server, that requires waiting for a result event from HTTPService before returning the data I need. Thanks! --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: dataTipFunction should be the answer, but I don't get what you are doing in the loop. Can you give more detail of what you are trying to accomplish? -Alex From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of James Sent: Thursday, May 17, 2007 10:47 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] DataGrid dynamic toolTips or dataTips Hi all, my name is James Wilson, I am a flex programmer in the atlanta area, new to the list. On a datagrid, I'd like to display more information about the item the user is hovering over in a tooltip, but I want to get this information (a fair bit) dynamically based on a case number/id from the datagrid item that is being hovered over. The best way I can think of is to do a loop in the dataTipFunction: public function myDataTipFunction(e:HitData):String { while(httpService.lastResult == null){} //return tooltip based on result. } Surely there is a better way. Thanks everyone. Nice to meet you all. :) James Wilson
[flexcoders] Automatic reply
Notice: this automatic message was sent on behalf of [EMAIL PROTECTED] Hi, I am enjoying a vacation this week. If you have an urgent matter you would like to discuss with me: ++ 31 (0)646 150 820 Or send an E-mail to Eelco Voogd, [EMAIL PROTECTED]
Re: {Disarmed} Re: [flexcoders] Flex on Mac
You guys think that I have to wait for the Leopard OS to buy a MacBook? Or the Tiger OS is good too? I'll use two operacional systems... or maybe tree. Windows, Mac, Linux. Thanks 2007/5/18, Tom Chiverton [EMAIL PROTECTED]: On Thursday 17 May 2007, fuad_kamal wrote: main window. Sure, you could size the main eclipse window across all three of your monitors, but that's not what we're talking about, here. Open a new Eclipse window, you can then drag the tabs to that one. -- Tom Chiverton Helping to appropriately incubate intuitive interfaces 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
[flexcoders] Gradient Fill in ChartArea
Is it possible to apply a fill to chart with a gradient without having to make a custom Renderer? Also, does anyone have any good examples of custom toot tip renderers? Thanks, Patrick
RE: [flexcoders] Re: selectedIndices are Strings???
The look like ints to me. Did you do for..in instead of for (; length)? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jason Sent: Friday, May 18, 2007 12:05 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: selectedIndices are Strings??? Now, now No need for chastising. Consider how illogical ActionScript (and coding) tend to be in general. I mean we'd think a banker counting money by going 1,10,11...19,2,20,21,...3 and so on would think the banker had gone nuts. *LOL*
[flexcoders] Re: Flex: Remote Objects
For Java: YES, you *do* need FDS For ColdFusion: No For HTTP: No, but there's a proxy in FDS you *could* use For WebServices: No, but there's a proxy in FDS you also *could* use Hope this helps, Oliver --- In flexcoders@yahoogroups.com, Scott Hoff [EMAIL PROTECTED] wrote: Do I have to have FDS2 do call remote objects? (Java etc.)
[flexcoders] AS/Flex equivilent of getElementById() ??
Given a string that represents the id of a given component, is there a way to get a handle to that component? Something like: var myCheckboxName:String = checkbox1; var myActualCheckbox:CheckBox = getElementById(myCheckboxName); myActualCheckbox.selected = true; I figured if nothing else I'd be able to eval() the string... but then I remembered that AS3 deprecated eval(). Anyone know of a way to do this? Thanks in advance! -Carl
Re: [flexcoders] Printing from Flex
http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html take a look at Print Controls On 5/18/07, simonjpalmer [EMAIL PROTECTED] wrote: Anyone tried to do much printing from Flex? Any words of wisdom before I dive headlong into the docs and scour the message boards? Any good examples? How about Charts, anyone managed to print them successfully? And PDF generation? Anyone found a good way of doing that containing charts? Thanks in advance for any help. -- André Rodrigues Pena LOCUS www.locus.com.br Blog www.techbreak.org
RE: [flexcoders] AS/Flex equivilent of getElementById() ??
mx:CheckBox id=checkbox1 ... / is referred to in the mx:Script block as: checkbox1 this.checkbox1 this[checkbox1] as in: trace(checkbox1.selected) // get the selected property There is no function since they are actually properties on the document. Subdocuments use parentDocument to talk to parent documents. -Alex From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of carl_steinhilber Sent: Friday, May 18, 2007 4:46 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] AS/Flex equivilent of getElementById() ?? Given a string that represents the id of a given component, is there a way to get a handle to that component? Something like: var myCheckboxName:String = checkbox1; var myActualCheckbox:CheckBox = getElementById(myCheckboxName); myActualCheckbox.selected = true; I figured if nothing else I'd be able to eval() the string... but then I remembered that AS3 deprecated eval(). Anyone know of a way to do this? Thanks in advance! -Carl
Re: [flexcoders] AS/Flex equivilent of getElementById() ??
something like: var myCheckBox:CheckBox = new CheckBox(); myCheckBox.id = myCheckBoxID; Works like this: myCheckBox.selected = true; On May 18, 2007, at 4:46 PM, carl_steinhilber wrote: Given a string that represents the id of a given component, is there a way to get a handle to that component? Something like: var myCheckboxName:String = checkbox1; var myActualCheckbox:CheckBox = getElementById(myCheckboxName); myActualCheckbox.selected = true; I figured if nothing else I'd be able to eval() the string... but then I remembered that AS3 deprecated eval(). Anyone know of a way to do this? Thanks in advance! -Carl
[flexcoders] Vertial Scroll Issue with Using Date Field ItemRenderer in a DataGrid
Hi folks, This is a weird bug and I hope someone can help me with it. In my example code (DateRendererWTF.mxml being the main app and OMGRenderer.mxml being the renderer), everything initially scrolls fine. Then choose a date for any one of the datefields. Now move your mouse down and up so that in travels through and out of the datagrid on the top and bottom. As you can see the datagrid now scrolls automatically. What is with this? Sample mxml files: http://www.speechlessrock.com/DateRendererWTF.mxml http://www.speechlessrock.com/OMGRenderer.mxml Thanks for any help, Troy
[flexcoders] Having really tough time with Data Services [EMAIL PROTECTED]!!
Finally figured out how to get dataservice.getItem() to work. I've bound it's result to a textInput, but changes to the interface are not affecting the DataService on commit. Does any one have a sample work flow for getting then updating data? Thanks -A
[flexcoders] WSDLError Element not resolvable with WebService using creationComplete
I've encountered something that looks like a timing issue within Flex2. When I try to access a WebService operation in the 'creationComplete' param of mx:Application: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=wsWidgetQueries.GetWidgetsByType.send() mx:WebService id=wsWidgetQueries endpointURI=http://localhost:/widgets-ws-1.0-SNAPSHOT/Widgets-WS; wsdl=http://localhost:8080/widgets-ws-1.0-SNAPSHOT/widgets.wsdl; useProxy=false showBusyCursor=true mx:operation name=GetWidgetsByType mx:request GetWidgetsByTypeRequest typeId{cbxType.value}/typeId /GetWidgetsByTypeRequest /mx:request /mx:operation ... I get the following error: [WSDLError faultString=Element http://www.widgets-inc.com/testapp/schemas:GetWidgetsByTypeRequest not resolvable faultCode=WSDL.BadElement faultDetail=null] at mx.rpc.soap::WSDLParser/http://www.adobe.com/2006/flex/mx/internal::pars\ eMessage() at mx.rpc.soap::WSDLOperation/parseMessages() at mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::invok\ ePendingCall() at mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::invok\ eAllPending() at mx.rpc.soap::WebService/::unEnqueueCalls() at mx.rpc.soap::WebService/http://www.adobe.com/2006/flex/mx/internal::wsdl\ Handler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven\ tFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc.soap::WSDLParser/dispatchEvent() at mx.rpc.soap::WSDLParser/::parseCompleted() at mx.rpc.soap::WSDLParser/http://www.adobe.com/2006/flex/mx/internal::http\ ResultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven\ tFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::disp\ atchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resu\ ltHandler() at mx.rpc::Responder/result() at mx.rpc::AsyncRequest/acknowledge() at ::DirectHTTPMessageResponder/completeHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven\ tFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/flash.net:URLLoader::onComplete() But, when I comment out the 'creationComplete' parameter and run the wsWidgetQueries.GetWidgetsByType.send() as an action off a 'click' event on a button, the WebService works just fine. That indicates to me that 'creationComplete' is executing BEFORE the WSDL has been properly parsed. If so, 'creationComplete' isn't really complete when that .send() gets invoked! Have others encountered this problem? And, if so, is it a known bug or is there a standard workaround for it? TIA.
[flexcoders] WSDLError Element not resolvable with WebService using creationComplete
When I include a creationComplete .send() to a WebService in my app: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=wsWidgetQueries.GetWidgetsByType.send() mx:WebService id=wsWidgetQueries wsdl=http://localhost:8080/widgets-ws-1.0-SNAPSHOT/widgets.wsdl; useProxy=false showBusyCursor=true mx:operation name=GetWidgetsByType mx:request GetWidgetsByTypeRequest typeId{cbxType.value}/typeId /GetWidgetsByTypeRequest /mx:request ... I get the follow WSDLError: [WSDLError faultString=Element http://www.widgets-inc.com/widgets/schemas:GetWidgetsByTypeRequest not resolvable faultCode=WSDL.BadElement faultDetail=null] at mx.rpc.soap::WSDLParser/http://www.adobe.com/2006/flex/mx/internal::parseMessage() at mx.rpc.soap::WSDLOperation/parseMessages() at mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::invokePendingCall() at mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::invokeAllPending() at mx.rpc.soap::WebService/::unEnqueueCalls() at mx.rpc.soap::WebService/http://www.adobe.com/2006/flex/mx/internal::wsdlHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc.soap::WSDLParser/dispatchEvent() at mx.rpc.soap::WSDLParser/::parseCompleted() at mx.rpc.soap::WSDLParser/http://www.adobe.com/2006/flex/mx/internal::httpResultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler() at mx.rpc::Responder/result() at mx.rpc::AsyncRequest/acknowledge() at ::DirectHTTPMessageResponder/completeHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/flash.net:URLLoader::onComplete() But when I take out the 'creationComplete' parameter and, instead, have the .send() action occur with a 'click' event on a button, the request works fine. The sample application from Chapter 18 of the Getting Started with Flex2 works fine on my workstations (Firefox IE7), but my own app does not. The sample is obviously using ColdFusion, whereas I am using Tomcat 5.5.x to host the web services. It seems that the WSDL is not completely parsed when the 'creationComplete' .send() is processed. Has anyone encountered this problem too? If so, is it a known bug? TIA. PS: Btw, I posted this before using the beta Rich-Text Editor. It did not seem to post successfully... ?!?!
[flexcoders] Re: WebService sending dynamic XML - problem
It just doesn't seem 'right' to do that, you know? :) With all of the great XML constructs in Flex, to have to do a sloppy translation of gt; into on the webservice side.. I cant sleep at night :) It seems like such a hack hehehe. - - Dan --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Ah, rats. And you don't want to manually encode/decode the strings? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of discipl4 Sent: Wednesday, May 16, 2007 7:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: WebService sending dynamic XML - problem Tracy, Thanks for the reply :) If you pass it like that, it gets encoded :( The XML tags get turned into gt and lt because the SOAP wrapper thinks you were sending string data inside of 1 XML tag.. which you are really. That is my problem exactly. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote: What happens if you sen the xml as a string explicitly, and then parse it into a dom on the server? mx:operation name=SaveAction mx:request mx:myParameter{myXMLObject.toXMLString()}/mx:myParameter /mx:request /mx:operation Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of discipl4 Sent: Wednesday, May 16, 2007 6:39 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: WebService sending dynamic XML - problem Nate, Thank you for the quick response!! :) I did not know you could implement a WS call the way you do, very cool, although unless Im understanding it improperly, I dont think it will work for me. Please correct me if I am misinterpreting how your way works. You do ws.getMyFunction(firstName, lastName, city) .. for instance, and your webservice gets the data in an expected size and format, right? It goes, param1 is the firstname, param2 is the lastname, and param3 is the city. No definition involved but it is still finite. What I need to do is have a flexible structure in my xml to have an infinite amount tags inside certain blocks. So sometimes I might pass and xml that looks like this: person tag2FirstName/tag2 tag3LastName/tag3 tag4San Diego/tag4 /person and sometimes I need to send this: person tag2FirstName/tag2 tag3LastName/tag3 tag4San Diego/tag4 tag5Chicago/tag5 tag6New York/tag6 /person If I pass in the parameters as you have, I have no way to denote the beginning and end of that section that contains 'n' number of elements. Does that make sense? I know it's hairy :) I really want to keep the XML structure. I think if I did it your way, I could pass in a ton of parameters as key/value pairs and build the xml on the other side... like.. ws.getMyFunction(firstname, Bill, lastname, Smith, city1, Chicago) ... but man, then I have to dissect the nice XML object that Flex gives you to work with. Thanks again for your time in hashing this out with me!! Best, - - Dan --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Nate Pearson napearson99@ wrote: This is how I do it: mx:WebService id=ws wsdl=http://myurl/service.asmx?WSDL http://myurl/service.asmx?WSDL http://myurl/service.asmx?WSDL http://myurl/service.asmx?WSDL useProxy=false showBusyCursor=true mx:operation name=getMyFunction result=projectsHandler(event)/ /mx:WebService Then in action script I go ws.getMyFunction(param1, param2, param3). You don't have to define your parameters in MXML. If you don't, Flex will let you send as many or as little parameters as you want. I only get an error if the amount of parameters that I send don't match the type and number on the server side. Hope this helps, Nate --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , discipl4 discipl4@ wrote: Hi friends - I have been wrestling with a problem that I was hoping you could help me out with :) I understand the premise of defining a WebService in Flex, with parameters and data, and sending the data over the wire to my WSDL. However, I have a unique situation where I want to assemble a dynamic XML file and send it over a WebService. Unless you define a 1 to 1 mapping of parameters in Flex to a WSDL, I cant find any way to make this work. Example: This works just fine as an operation on a webservice - mx:operation name=SaveAction mx:request mx:myParameter{someStringVariable}/mx:myParameter /mx:request