[flexcoders] using as breaks data binding?
I've run across some peculiar behavior and I am trying to figure out if I should report it and if so, how exactly to explain it. Given these two bits of code: *TestObject.as:* package { public class TestObject { [Bindable] public var a:uint = 2; [Bindable] public var b:uint = 3; [Bindable] public var x:uint = 1; } } *Main Application:* ?xml version=1.0 encoding=utf-8? Application xmlns=http://www.adobe.com/2006/mxml; Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var d:ArrayCollection = new ArrayCollection([ new TestObject, new TestObject, new TestObject ]); ]] /Script List dataProvider={d} itemRenderer Component HBox Label text={TestObject(data).a}/ Label text={(data as TestObject).b}/ Label text={(data as TestObject).x}/ /HBox /Component /itemRenderer /List Button click=for each (var o:TestObject in d) { o.x++; o.a++; o.b++ }/ /Application If you run this application, you get the following warnings: warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' There's a couple of things that stand out here. First, it doesn't complain about properties x or a. The reason it doesn't complain about property a is that I used TestObject(data).a instead of (data as TestObject).a. If you change it to the other way around, you will get a warning on a as well. I find this rather bizarre, as I thought there was no functional difference to the two, other than as returning null if the object wasn't of the appropriate type rather than just erroring out like straight type coercion does. But type coercion/as are very (ahem) lightly documented so I admit I don't know a lot. But I don't think it's because of the null problem, since you can replace it with TestObject(null).b and it stops giving the warning. The second weird thing is that it doesn't complain about x when using (data as TestObject).x like it does with a. As you can see, it's claiming this error is on GenericTest_inlineComponent1. This is significant because it appears that it's instead doing some binding to the x property on the item renderer, which is *very* odd. You can try this yourself by changing x to other strings. Ones where there is a property of HBox named the same thing won't give you a warning. Others will. Yet for all this griping, it seems the data binding IS working. If you click on the button, you'll see all the labels in the list change as the data is being changed. So, anyone want to shed some light on these two behaviors? -- Jason
[flexcoders] Re: Anyone using Flex with LCDS ColdFusion
LiveCycle DataServices ES... comes packaged w/ Coldfusion installation, or on it's own integrated with Tomcat or such... What do you want to know re: the configuration? --- In flexcoders@yahoogroups.com, Charles Parcell pokemonkil...@... wrote: I am going to go ahead and out myself. What is LCDS? Could you explain what this configuration is? Charles P. On Fri, May 8, 2009 at 12:11 PM, Brendan Meutzner bmeutz...@...wrote: Hi All, I've already got another post up with a conundrum I'm facing with LCDS and ColdFusion, but it's not the first question I've posted over the last year which has gone unanswered. So... my second question is... Is anyone out there using this particular setup? I never see any posts relating to this, and as I already mentioned, there's not a lot of feedback when I bring up questions. So if you're using these technologies, throw in a reply to this thread... I wouldn't think I'm the only person facing difficulties with this, so it'd be nice to hook up with other folks who are doing the same thing. Brendan -- Brendan Meutzner http://www.meutzner.com/blog/ http://www.riajobs.com
[flexcoders] session pooling with Flex/SQLServer w/o ColdFusion?
All of our business logic is within stored procedures so we do not need ColdFusion logic. We bought one of the Flex webservices (FlexSQL) to get started, but this is single-threaded. Is it possible to create a pool of webservices? Not sure how how one would bundle them as they would have no knowledge of each other. Any ideas greatly appreciated. Mic.
[flexcoders] .csv import stuff
is there any nice and easy way to 'Browse' .csv file on flex and after that send 'Import Request' to php and php will import this .csv file's data to database.? any thought on this stuff!!? Cricket on your mind? Visit the ultimate cricket website. Enter http://beta.cricket.yahoo.com
Re: [flexcoders] Collaborative project: realtime ActionScript WMA converter
This should be possible in theory, given Microsoft Silverlight has just added support for doing this exact thing in Silverlight 3 (and there is a project for providing Ogg Vorbis support going on). Who knows what the licensing implications here are though. The only WMA decoder I know of that has source available is the one inside ffmpeg. Performance would be an interesting thing. It might be worth trying to get something going on Alchemy instead, mainly for better performance (without the AS overhead). 2009/5/9 tottenkamen tottenka...@yahoo.com: Hi everyone. I'm working on an application that reads MP3 streams and it would be even better if it could read in WMA streams (or Real for that matter), decode them, and play them back to the user. My initial thoughts are that this is not impossible. It SHOULD be a matter of loading the WMA in as a URLStream or Socket and decoding the result into something the Sound object can play. Is anyone familiar with source that would do this decoding, perhaps in another language that could be ported to AS3? Would anyone be interested in joining me on coding an open-source version of this? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] session pooling with Flex/SQLServer w/o ColdFusion?
If that tool is single threaded then don't use it since that would be a significant downside. Instead, use a programming language like PHP, Java, .NET, or ColdFusion. -Mike Chabot On Sat, May 9, 2009 at 4:28 AM, Mic chigwel...@yahoo.com wrote: All of our business logic is within stored procedures so we do not need ColdFusion logic. We bought one of the Flex webservices (FlexSQL) to get started, but this is single-threaded. Is it possible to create a pool of webservices? Not sure how how one would bundle them as they would have no knowledge of each other. Any ideas greatly appreciated. Mic.
Re: [flexcoders] Re: Anyone using Flex with LCDS ColdFusion
I am not at all familiar with the LiveCycle products. What does it do for you? within the context of ColdFusion? Charles P. On Sat, May 9, 2009 at 2:54 AM, Brendan Meutzner bmeutz...@gmail.comwrote: LiveCycle DataServices ES... comes packaged w/ Coldfusion installation, or on it's own integrated with Tomcat or such... What do you want to know re: the configuration? --- In flexcoders@yahoogroups.com, Charles Parcell pokemonkil...@... wrote: I am going to go ahead and out myself. What is LCDS? Could you explain what this configuration is? Charles P. On Fri, May 8, 2009 at 12:11 PM, Brendan Meutzner bmeutz...@...wrote: Hi All, I've already got another post up with a conundrum I'm facing with LCDS and ColdFusion, but it's not the first question I've posted over the last year which has gone unanswered. So... my second question is... Is anyone out there using this particular setup? I never see any posts relating to this, and as I already mentioned, there's not a lot of feedback when I bring up questions. So if you're using these technologies, throw in a reply to this thread... I wouldn't think I'm the only person facing difficulties with this, so it'd be nice to hook up with other folks who are doing the same thing. Brendan -- Brendan Meutzner http://www.meutzner.com/blog/ http://www.riajobs.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Anyone using Flex with LCDS ColdFusion
Brendan, I daily fight against LCDS + CF problems too. Sorry if I missed any previous emails but flexcoders is quite heavy in email traffic. I'm currently running with CF8.0.1 and LCDS 2.6. Didn't upgrade to 2.6.1 since it seems there are a lot of new bugs. So, what issues do you have with this combo? -- João Fernandes Adobe Certified Expert Adobe Community Expert http://www.onflexwithcf.org http://www.riapt.org Portugal Adobe User Group (http://aug.riapt.org)
[flexcoders] Re: dynamic labels with public variable
Thanks Tracy I put that into a try catch statement and still get the ReferenceError: Error #1069 but it's working now? Should i be concerned with the error I tried only one line to less complicate things try{ this[public_ + whichmeal + _image1] = urlpath + createmeal_http.lastResult.breakfast.itemdata[id].imgsource; }catch(err:Error){ Alert.show(err.toString()); } --- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote: {Braces} are not legal in Actionscript except to create a new Object, or in literal XML. You probably want something like: this[public_ + whichmeal + _item1_label] Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Jason B Sent: Friday, May 08, 2009 9:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] dynamic labels with public variable I'm trying to set a set of labels but its based on public variable whichmeal. Is there a special way to use these labels dynamically? try{ this[public_{whichmeal}_item1_label] = item1_label.text; this[public_{whichmeal}_serving1_label] = serving1_label.text; }catch(err:Error){ Alert.show(err.toString()); } Shows Reference Error 1069 Reference Error 1056
[flexcoders] Re: dynamic labels with public variable
nevermind i had another try statement i forgot with the old code, thanks again Tracy your the best ! --- In flexcoders@yahoogroups.com, Jason B nos...@... wrote: Thanks Tracy I put that into a try catch statement and still get the ReferenceError: Error #1069 but it's working now? Should i be concerned with the error I tried only one line to less complicate things try{ this[public_ + whichmeal + _image1] = urlpath + createmeal_http.lastResult.breakfast.itemdata[id].imgsource; }catch(err:Error){ Alert.show(err.toString()); } --- In flexcoders@yahoogroups.com, Tracy Spratt tracy@ wrote: {Braces} are not legal in Actionscript except to create a new Object, or in literal XML. You probably want something like: this[public_ + whichmeal + _item1_label] Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Jason B Sent: Friday, May 08, 2009 9:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] dynamic labels with public variable I'm trying to set a set of labels but its based on public variable whichmeal. Is there a special way to use these labels dynamically? try{ this[public_{whichmeal}_item1_label] = item1_label.text; this[public_{whichmeal}_serving1_label] = serving1_label.text; }catch(err:Error){ Alert.show(err.toString()); } Shows Reference Error 1069 Reference Error 1056
Re: [flexcoders] Re: Anyone using Flex with LCDS ColdFusion
Charles, LCDS brings Flex applications to a new level of data centric applications. LCDS is a super-set of BlazeDS, everything it's in Blaze is also available in LCDS. LCDS does however contain a Data Management service which relies on Messaging to keep all your clients connected to the same data in sync. Other key features is support for RTMP and NIO endpoints that allow you to support 1000+ concurrent users per server when BlazeDS doesn't support more than a few hundreds. I know that Farata System guys did add support for NIO but don't know if they provided it publicly and free of charge. -- João Fernandes Adobe Certified Expert Adobe Community Expert http://www.onflexwithcf.org http://www.riapt.org Portugal Adobe User Group (http://aug.riapt.org)
Re: [flexcoders] .csv import stuff
What do you mean with browse? You can just load the file using FileReference.load() and then just show it. Just split the text of the file by \n\r (or just \r) and then split every line by the separator (normally the comma). After parsing the first line you could use those as the keys for the array you construct. I would think something like below could work: var data: Array = []; var values: Array; var lines: Array = data.split( \n\r ); for ( var i: Number=0; i lines.length; i++ ) { var line: String = lines[i]; values = line.split(,); // do something data.push(values); } Weyert de Boer is there any nice and easy way to 'Browse' .csv file on flex and after that send 'Import Request' to php and php will import this .csv file's data to database.? any thought on this stuff!!? From Chandigarh to Chennai - find friends all over India. Click here.
[flexcoders] Slider: dataTips always visible?
Can this be done? I tried searching online but no one seems to have a concrete solution.
[flexcoders] Re: Sending textinput id
--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote: And if you do need to just send changed items, put a, isModified property on the VO and set it when the data is updated.. I have never done anything like it, you think you can maybe, elaborate a little more? a little example, I'm kind of bad at theory. I pass all edits through a single function, and since I usually use xml, I can set a datamodified=true attribute on any changed node. I use JSON so it better to put evrything on an array, maybe this approach can be used like that? When I send the data to the server, a function extracts the modified nodes and builds an update xml structure. I think I could do that with the array decoded by json, that is... if I can manage to understand the whole idea. Please, could you maybe put some example code so I can make a better mind image of it? thanks.
RE: [flexcoders] Re: dynamic labels with public variable
Glad you got it. One more piece of advice, avoid using lastResult in AS code. It is intended for use in binding expressions only. Normally, it is not a problem, but in more complex architectures, lastResult can be null or can contain what you do not expect. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Jason B Sent: Saturday, May 09, 2009 10:14 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: dynamic labels with public variable nevermind i had another try statement i forgot with the old code, thanks again Tracy your the best ! --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Jason B nos...@... wrote: Thanks Tracy I put that into a try catch statement and still get the ReferenceError: Error #1069 but it's working now? Should i be concerned with the error I tried only one line to less complicate things try{ this[public_ + whichmeal + _image1] = urlpath + createmeal_http.lastResult.breakfast.itemdata[id].imgsource; }catch(err:Error){ Alert.show(err.toString()); } --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Tracy Spratt tracy@ wrote: {Braces} are not legal in Actionscript except to create a new Object, or in literal XML. You probably want something like: this[public_ + whichmeal + _item1_label] Tracy Spratt, Lariat Services, development services available _ From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of Jason B Sent: Friday, May 08, 2009 9:37 PM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] dynamic labels with public variable I'm trying to set a set of labels but its based on public variable whichmeal. Is there a special way to use these labels dynamically? try{ this[public_{whichmeal}_item1_label] = item1_label.text; this[public_{whichmeal}_serving1_label] = serving1_label.text; }catch(err:Error){ Alert.show(err.toString()); } Shows Reference Error 1069 Reference Error 1056
RE: [flexcoders] Re: Sending textinput id
There is really too much happening, too many options to give you an example. Do you understand what a VO, value Object is? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Gustavo Sent: Saturday, May 09, 2009 1:04 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Sending textinput id --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Tracy Spratt tr...@... wrote: And if you do need to just send changed items, put a, isModified property on the VO and set it when the data is updated.. I have never done anything like it, you think you can maybe, elaborate a little more? a little example, I'm kind of bad at theory. I pass all edits through a single function, and since I usually use xml, I can set a datamodified=true attribute on any changed node. I use JSON so it better to put evrything on an array, maybe this approach can be used like that? When I send the data to the server, a function extracts the modified nodes and builds an update xml structure. I think I could do that with the array decoded by json, that is... if I can manage to understand the whole idea. Please, could you maybe put some example code so I can make a better mind image of it? thanks.
[flexcoders] Flash Speed test - RESULTS !
Thanks to all those who took part in my Flash speed test a few weeks ago. I'd like to share back the results, but I must caveat that I only got a small amount of data, so these results are not statically significant. The Purpose = I wanted to know how consistent the timing is in Flash across the plethora of web browsers out there in the wild. I had been working on a app that somewhat reliest on consistent timing, hence my curiosity. The Method = I wrote a very simple app using the flex framework, that did the following: 1. Set the framerate to x 2. Measure the system time (getTimer()) 3. Add an event listener to Event.ENTER_FRAME 4. on each frame enter, increment a counter, until the counter == x * 10 5. Measure the system time again, and deduct the value from (2) 6. Compute the implied framerate as (x * 10)/ value from (5) 7. Capture OS/Browser setup from UserAgent string, using JS. 8. send data to server (GAE) I did this for x=24 and for x=1000 Known Experimental Deficiencies = a) getTimer may not be accurate b) incrementing a counter once per frame is not representative of the real computational load most apps would place per frame c) individual system performance varies with time, e.g. with the load placed by other apps, with GC, etc d) I don't know enough about the internals on the Flash player, or the browsers, to really know what's going on in there, and what else might make this experiment flawed (unknown unknowns...) e) Some of the data points came from the same PCs (including mine) f) Most tests were done on developers' machines, which are not representative of the average machine g) I didn't test anything between x=24 and x=1000, and there may be speeds between 24 and 1000 that operate very differently. Results == Data Set: data points (n) = 134 n By OS - Mac: 28, Win: 100, Linux: 6 n By x - x=1000 FPS: 73,x=24 FPS: 61 Range of results: x=24: min=16.5, max=24.2 x=1000: min=24.3, max=998.9 Results by OS/browser: (the data gets spotty here, so I'll summarize) x=1000 OS = Mac n= 10 results: min = 24.3, max=58.0, mean = 49.6 results: 7 @ 56-58, 2 @ 24-26, 1...@46 x=24 OS = Mac n= 18 results: min = 16.5, max=24.1, mean = 21.5 Safari 4 on Intel: mean=23.9, n=4 Safari 4 on PPC: mean=16.5, n=1 Safari 3 on Intel: mean=19.4, n=3 FF3.0.z on Intel: mean = 20.6, n=5 (other data points are one-offs, so not quoted) x=1000 OS = Win XP / Vista (excluded Win 2000, and 'Windows') n= 56 results: min = 54.6, max=998.9, mean = 586 FF 3.0.8: mean = 930, n=21, min=780, max=998.9 IE 6.z 7.z 8.z: mean = 62.6, n=13, min=54.7 max=64.1 Chrome: mean = 187.3, n=5, min=173.5 max = 199.7 x=24 OS = Win XP / Vista (excluded Win 2000, and 'Windows') n= 40 results: min = 20.7, max=24.2, mean =23.1 FF 3.0.8: mean =23.3 , n=17, min=21.6, max=24.2 IE 6.z 7.z 8.z: mean =23.1 , n=11, min=20.7 max=24.2 Chrome: mean =24.2 , n=2, min=24.169 max =24.174 x=1000 OS=Linux n=3 mean=80.9 ,min=66.8, max=105 x=24 OS=Linux n=3 mean = 24.0, min=23.8, max=24.1 Discussion None of this data is statistically significant, as there isn't enough of it, but a few patterns emerge nonetheless. To prevent me peppering this section with qualifying words, like 'maybe', 'perhaps', etc I shall present these observations as facts, though they clearly ARE NOT. 1) You can't get higher than 60 FPS on Mac when you request 1000 FPS 2) Requesting 24 FPS on a Mac gives varied results. Safari 4 seems pretty reliable, unless the machine is running PowerPC. FF 3.0.z delivers a mean on 20.6 FPS, which 14% slow of the target 24 FPS 3) Windows is very different to Mac 4) The max FPS on windows is highly dependent on the browser. 5) The actual FPS on windows when FPS 1000 is requested for a specific browser is pretty consistent - FF 3.0.8 is clustered around 900, Chrome is clustered around 180, IE is clustered around 60 6) The actual FPS on Windows when FPS 24 is requested is pretty reliable on all browsers, averaging 23.1 FPS 7) The actual FPS on Windows and Mac when requesting FPS 24 never exceeded 24.2 FPS - i.e. you 'never' get a speed that's too fast. To summarize these point observations: don't rely on actually getting the FPS that you request, and don't rely on what you do get being consistent across browsers and OSs. It appears that FPS 24 is a fairly safe bet (but FPS 40 might be too, for all I know). If you can, write apps that don't require the FPS to be correct for the app to function properly (i.e. dont try to derive time from a count of ENTER_FRAME, either implicitly or explicitly). Test extensively across browsers and OSs, especially cross Windows-Mac. I'd be interested to hear what you all think - what important things have I missed? cheers tom
RE: [flexcoders] using as breaks data binding?
Which version of Flex? I don't get it on the latest builds that will ship as 3.4 Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Pan Troglodytes Sent: Friday, May 08, 2009 11:06 PM To: flexcoders Subject: [flexcoders] using as breaks data binding? I've run across some peculiar behavior and I am trying to figure out if I should report it and if so, how exactly to explain it. Given these two bits of code: TestObject.as: package { public class TestObject { [Bindable] public var a:uint = 2; [Bindable] public var b:uint = 3; [Bindable] public var x:uint = 1; } } Main Application: ?xml version=1.0 encoding=utf-8? Application xmlns=http://www.adobe.com/2006/mxml; Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var d:ArrayCollection = new ArrayCollection([ new TestObject, new TestObject, new TestObject ]); ]] /Script List dataProvider={d} itemRenderer Component HBox Label text={TestObject(data).a}/ Label text={(data as TestObject).b}/ Label text={(data as TestObject).x}/ /HBox /Component /itemRenderer /List Button click=for each (var o:TestObject in d) { o.x++; o.a++; o.b++ }/ /Application If you run this application, you get the following warnings: warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' There's a couple of things that stand out here. First, it doesn't complain about properties x or a. The reason it doesn't complain about property a is that I used TestObject(data).a instead of (data as TestObject).a. If you change it to the other way around, you will get a warning on a as well. I find this rather bizarre, as I thought there was no functional difference to the two, other than as returning null if the object wasn't of the appropriate type rather than just erroring out like straight type coercion does. But type coercion/as are very (ahem) lightly documented so I admit I don't know a lot. But I don't think it's because of the null problem, since you can replace it with TestObject(null).b and it stops giving the warning. The second weird thing is that it doesn't complain about x when using (data as TestObject).x like it does with a. As you can see, it's claiming this error is on GenericTest_inlineComponent1. This is significant because it appears that it's instead doing some binding to the x property on the item renderer, which is very odd. You can try this yourself by changing x to other strings. Ones where there is a property of HBox named the same thing won't give you a warning. Others will. Yet for all this griping, it seems the data binding IS working. If you click on the button, you'll see all the labels in the list change as the data is being changed. So, anyone want to shed some light on these two behaviors? -- Jason
[flexcoders] Difference between URLRequest and HTTPService
What's the benefit of using HTTPService over URLRequest? When would you use one over the other? Thanks. - Alex
[flexcoders] Re: Custom List Item Render to have multiline (so variable Height)
Looking for an answers on how to solve my ItemRenderer height 100% woes, I stumbled on this post (and subsequently FlexCoders!) and have a few questions. After taking the advice below to override measure and set minHeight and invalidateSize() on my Text controls dataChange event, it appears to almost be working in giving me the right size hiding. A few things I can't figure out, and maybe somebody could help answers, is it seems like the first item in the list upon load is way beyond the normal height. It only looks normal after dragging the list down and back up again. I'm guessing it's coming from this added height: measuredHeight = theTextID.textHeight + 40 ; I can't seem to force it on creationComplete or anything like that. Other than that, it looks like from time to time the same error occurs on other members of the list pretty randomly on the first few scrolls. Getting close here! Anyone have any ideas? --- In flexcoders@yahoogroups.com, Fotis Chatzinikos fotis.chatzini...@... wrote: Have a look at the following bits of a working variableRowHeight item renderer (I am using it it to display conversation like comments on pictures): canvas mx:TextArea id=theTextID minHeight=0 change=invalidateSize() color=#FF backgroundAlpha=0 text={comment.comment} textAlign=left fontWeight=bold borderStyle=none left=5 right=5 top=25 bottom=5 wordWrap=true editable=false / /canvas Pay attention to: minHeight=0 //to accomodate for really short renderers change=invalidateSize() //re-measure on text change, for correct remeasuring on renderer recycling The measure function: override protected function measure():void { super.measure(); measuredHeight = theTextID.textHeight + 40 ; } On Wed, Feb 4, 2009 at 11:26 PM, Flap Flap flapflapl...@...wrote: Hi there, Second night that I'm pulling my hairs on this stuff, I'm sure you will give me some good hints. So, I have a custom list item render. It's a VBOx with a GradientCanvas (width 100%, no height) child that have a TextArea for child (width 100%, no height). The GradientCanvas he's a custom component to have a advanced gradient background. The problem is one the TextArea. Here is the behavior that I'd like to have: When text is on several lines, the item renderer should update his height to match the TextArea height. At this moment, the TextArea display scrollbars. I've try with Label (but no multiline). With UITextField, but not a mx component... With Text component but the list act weird with this one... Can you point me to some clues ? thx Benoît Milgram / Flapflap http://www.kilooctet.net I'm also a music mashup / bootlegs producer : http://www.djgaston.net -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@...,
Re: [flexcoders] .csv import stuff
Hey, I am not an Expert in Flex but i do know that .csv files are Easy to handle using a Paser on ',' that's the separator in the .csv files (Comma Separated Value). If i were you, i would take the .csv file and convert it to a Well formated XML file then send it in an AJAX request to PHP to insert it into database. Good Luck From: Vikram Singh vikisingh...@yahoo.in To: Flex Coders flexcoders@yahoogroups.com Sent: Saturday, May 9, 2009 12:59:32 PM Subject: [flexcoders] .csv import stuff is there any nice and easy way to 'Browse' .csv file on flex and after that send 'Import Request' to php and php will import this .csv file's data to database.? any thought on this stuff!!? From Chandigarh to Chennai - find friends all over India. Click here.
[flexcoders] create a file in system using AIR
I know how i can create a file in documentsDirectory, applicationStorageDirectory, desktopDirectory userDirectory. but how i can create a file using file system in AIR in the path like c:\kanu\test\Hello.txt
[flexcoders] create a file in memory and downlof it using AIR
Hi, I plan to create a in-memory file with AIR.the content come from other remote object. I can download it when I click a button in AIR. Thanks for your help Mark
Re: [flexcoders] create a file in system using AIR
See 'the second way' under the 'Referencing a file or directory' section. http://labs.adobe.com/wiki/index.php/AIR:Articles:Adobe_AIR_Local_File_System_Access#Reading_and_writing_files 2009/5/10 kanu kukreja kanukukr...@gmail.com: I know how i can create a file in documentsDirectory, applicationStorageDirectory, desktopDirectory userDirectory. but how i can create a file using file system in AIR in the path like c:\kanu\test\Hello.txt -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: Setting currentState from a function located a child mxml file
While I've also suggested using these in the past, in the spirit of loose coupling, the prefered method would be to dispatch an event, from the component, that would trigger the drillDown method in the parent; where the states are actually located. This way the child doesn't know or care about the parent and can be reused elsewhere. This also elliminates the need to maintain the state names in multiple classes; should any name changes become necessary. Basically, it's not best practice to control a parent's state directly, from a child. -TH --- In flexcoders@yahoogroups.com, Charles Parcell pokemonkil...@... wrote: Application.application.currentState = 'invoiceDetailsInfoPanel'; or parentDocument.currentState = 'invoiceDetailsInfoPanel'; Either of these work for you? Charles P. On Fri, May 8, 2009 at 4:05 PM, rdell123 rdell...@... wrote: Is it possible to set the currentState from a function located in a child mxml file when the States are in the parent file? INVOICES.MXML --- mx:Script ![CDATA[ private function drillDown(event:ListEvent):void { if (currentState != invoiceDetailsInfoPanel) { currentState = 'invoiceDetailsInfoPanel'; } else { currentState = ''; } } ]] /mx:Script mx:DataGrid id=invoiceGrid dataProvider={model.data} doubleClickEnabled=true itemDoubleClick=drillDown(event) mx:DataGrid:columns mx:DataGridColumn headerText=Invoice # dataField=agency/ /mx:DataGrid:columns /mx:Datagrid --- MAINFORM.MXML --- mx:Canvas xmlns:invoice=com.vendor.invoice.* mx:states mx:State name=invoiceDetailsInfoPanel mx:SetProperty target={infoBoxInvoices} name=height value=290/ mx:AddChild relativeTo={infoBoxInvoices} mx:Canvasmx:FormItem label=Vendor:mx:Label text=Yahoo//mx:FormItem/mx:Canvas /mx:AddChild /mx:State /mx:states mx:Canvas id=infoBoxInvoices height=100 mx:FormItem label=Client: mx:Label text=Nabisco/ /mx:FormItem /mx:Canvas invoice:invoiceToolbar id=invoiceToolbarPanel/ /mx:Canvas
[flexcoders] Re: change color text when doing toggle The button
Use the textSelectedColor style. -TH --- In flexcoders@yahoogroups.com, ade_huh ade_...@... wrote: hello there. do u know how to change color text when doing 'toggle function'(it is similar 'selected function') The button? thank before
[flexcoders] how to know the AIR version in my local pc?
Please give me a idea,thanks Mark
RE: [flexcoders] .csv import stuff
You will have two delimiters. One, the row delimiter is a newline or carriage-return or both. The other is the field delimeter, often but not always a comma. Google this and I think you will find some examples. I haven't parsed a csv file in actionscript myself. In .net, you actually read the file one line at a time, then parse that. I do not know if the best wasy to do it inas would be to parse the rows into an array using split() with the newline(maybe chr(13))?, then in a nested loop using split(,). Like I said, google this. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of khaled hafez Sent: Saturday, May 09, 2009 8:27 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] .csv import stuff Hey, I am not an Expert in Flex but i do know that .csv files are Easy to handle using a Paser on ',' that's the separator in the .csv files (Comma Separated Value). If i were you, i would take the .csv file and convert it to a Well formated XML file then send it in an AJAX request to PHP to insert it into database. Good Luck _ From: Vikram Singh vikisingh...@yahoo.in To: Flex Coders flexcoders@yahoogroups.com Sent: Saturday, May 9, 2009 12:59:32 PM Subject: [flexcoders] .csv import stuff is there any nice and easy way to 'Browse' .csv file on flex and after that send 'Import Request' to php and php will import this .csv file's data to database.? any thought on this stuff!!? _ From Chandigarh to Chennai - find friends all over India. Click here. http://in.rd.yahoo.com/tagline_groups_10/*http:/in.promos.yahoo.com/groups/ citygroups/
Re: [flexcoders] using as breaks data binding?
3.3.0. I also get it with 4.0.0.6137. Just downloaded and got it in 6772, too. I'm using player version 10,0,12,36. Do you need to know anything about my Flex Builder version? Let me know anything else I can provide. When you say you don't get it with the soon-to-be 3.4, what exactly do you mean? You just don't get the run-time warning? Did you track down why it would be okay with x and see if that's still doing whatever weird thing it is in 3.4? On Sat, May 9, 2009 at 4:11 PM, Alex Harui aha...@adobe.com wrote: Which version of Flex? I don’t get it on the latest builds that will ship as 3.4 Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Pan Troglodytes *Sent:* Friday, May 08, 2009 11:06 PM *To:* flexcoders *Subject:* [flexcoders] using as breaks data binding? I've run across some peculiar behavior and I am trying to figure out if I should report it and if so, how exactly to explain it. Given these two bits of code: *TestObject.as:* package { public class TestObject { [Bindable] public var a:uint = 2; [Bindable] public var b:uint = 3; [Bindable] public var x:uint = 1; } } *Main Application:* ?xml version=1.0 encoding=utf-8? Application xmlns=http://www.adobe.com/2006/mxml; Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var d:ArrayCollection = new ArrayCollection([ new TestObject, new TestObject, new TestObject ]); ]] /Script List dataProvider={d} itemRenderer Component HBox Label text={TestObject(data).a}/ Label text={(data as TestObject).b}/ Label text={(data as TestObject).x}/ /HBox /Component /itemRenderer /List Button click=for each (var o:TestObject in d) { o.x++; o.a++; o.b++ }/ /Application If you run this application, you get the following warnings: warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' warning: unable to bind to property 'b' on class 'GenericTest_inlineComponent1' There's a couple of things that stand out here. First, it doesn't complain about properties x or a. The reason it doesn't complain about property a is that I used TestObject(data).a instead of (data as TestObject).a. If you change it to the other way around, you will get a warning on a as well. I find this rather bizarre, as I thought there was no functional difference to the two, other than as returning null if the object wasn't of the appropriate type rather than just erroring out like straight type coercion does. But type coercion/as are very (ahem) lightly documented so I admit I don't know a lot. But I don't think it's because of the null problem, since you can replace it with TestObject(null).b and it stops giving the warning. The second weird thing is that it doesn't complain about x when using (data as TestObject).x like it does with a. As you can see, it's claiming this error is on GenericTest_inlineComponent1. This is significant because it appears that it's instead doing some binding to the x property on the item renderer, which is *very* odd. You can try this yourself by changing x to other strings. Ones where there is a property of HBox named the same thing won't give you a warning. Others will. Yet for all this griping, it seems the data binding IS working. If you click on the button, you'll see all the labels in the list change as the data is being changed. So, anyone want to shed some light on these two behaviors? -- Jason -- Jason