[flexcoders] Re: looping with variable on object
--- In flexcoders@yahoogroups.com, [EMAIL PROTECTED] wrote: ive tried using the loop as NO Double quotes and using a bracket around it too? im not having much luck anyone know a way to do this in a for loop NOT foreach. ALSO TRIED funfair_tab_challenge[i] _no.selected=false; public function funfair_tab_select(selectwhich){ if(selectwhich='yes'){ for(var i:Number = 1; i 6; i++){ funfair_tab_challenge + i + _no.selected=false; funfair_tab_challenge + i + _yes.selected=true; } }else{ for(var i:Number = 1; i 6; i++){ funfair_tab_challenge + i + _no.selected=true; funfair_tab_challenge + i + _yes.selected=false; } } try for(var i:Number = 1; i 6; i++){ this.[funfair_tab_challenge + i + _no].selected=! (selectwhich='yes'); this[funfair_tab_challenge + i + _yes].selected= (selectwhich='yes'); }
[flexcoders] Re: looping with variable on object
--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Yes, but leave off the dot after this, as Amy shows in the second line. I am sure the dot in the first one is just a typo. Oops. Sory Mom ;-)
[flexcoders] Re: looping with variable on object
--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: That's ok, dear, we love you anyway. (it's Dad, by the way) Tracy Tee hee...I'd been wondering :-D
[flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger
--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Use the dataProvider API, to remove the item from the dataProvider. It might be better to mark the item as removed in the dataProvider, since that will probably make it easier to do the delete operation on the server. After that (correct me if I'm wrong--this is all theoretical to me), you'd need to filter the dataProvider to only show the items that have not been removed. The last step would be either using the dataProvider's source to send to the server or removing the filter. JMO; Amy
[flexcoders] Re: Adding/Removing child components
--- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote: Tom and Tracy both have good suggestions. However, I'd recommend using any of the List based controls, with an itemRenderer, instead of using a repeater. Unlike the Repeater component, which instantiates all objects that are repeated (no recycling), the List based controls instantiate only objects visible in the list. However, if you know that the most likely use case is that the repeater will not be showing enough items to cause scrolling, you may want to consider this: http://flexdiary.blogspot.com/2008/04/is-horizontallist-faster-than- hbox-with.html
[flexcoders] Re: on the fly XML string change and keep CDATA wraps....
--- In flexcoders@yahoogroups.com, grimmwerks [EMAIL PROTECTED] wrote: Ok I've got this xml setup: item info circleText![CDATA[]]/circleText workingText![CDATA[]]/workingText needText![CDATA[]]/needText/info circle type=work x=200 y=150 percent=25/ circle type=home x=80 y=120 percent=20/ circle type=community x=150 y=130 percent=30/ circle type=self x=300 y=80 percent=25/ /item I can get / set everything fine - I can even set xml.info.circleText = new text but I lose the ![CDATA[ wrapping. I've tried to do xml.info.circleText = ![CDATA[ + new text + ]] but that throws an error. Any suggestions? try something like this: var newText:String = 'new text' xml.info.circleText=![CDATA[{newText}]] HTH; Amy
[flexcoders] Re: How to delete a workspace in FB3
--- In flexcoders@yahoogroups.com, bhaq1972 [EMAIL PROTECTED] wrote: I found the way to do it. Basically, u have to close flexbuilder. And delete the workspace reference stored in org.eclipse.ui.ide.prefs You can find this file in My Documents\Flex Builder 3 \configuration\.settings Now how do I answer my second question? Write yourself a note (i.e. include a text file somewhere with the title copy1.txt and copy2.txt. HTH; Amy
[flexcoders] Re: Scroll HBox
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: hBox.horizontalScrollPosition += dg.columns[0].width Alex, couldn't he also remove the real scrollbars and use a filter function to change the filtering on the collection acting as a dataprovider on click of the replacement buttons? Then the three or four or however many data objects being shown at one time would just be switched out by the repeater... -Amy
[flexcoders] Actionscript 3 Cookbook question
Hi, all; I'm reading in the AS3 Cookbook about working with dates, and it frequently mentions ascb.util.DateUtilities. I'm thinking this is a Flash only package, and it seems a lot of the recipes depend on it. Is there a similar tutorial online that provides a more Flexy way to do this? Thanks; Amy
[flexcoders] Re: Actionscript 3 Cookbook question
--- In flexcoders@yahoogroups.com, Jeff Hindman [EMAIL PROTECTED] wrote: Actually, it's a Joey Lott package check out http://rightactionscript.com/ascb/ Thanks! It would be SOOO cool if the index to that book pointed to some information like this when you look up ascb ;-)
[flexcoders] Re: Scroll HBox
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: If you use repeater, there is no selection model. I'm not sure what he's looking for. I assumed that since the parent container was an HBox, he was using a repeater to repeat the DG's...
[flexcoders] Re: Actionscript 3 Cookbook question
You know, I never thought to look for an index entry in the _front_ of the book! How stupid of me ;-) --- In flexcoders@yahoogroups.com, Jeff Hindman [EMAIL PROTECTED] wrote: Page xxiv in the preface, towards the bottom of the page. You're welcome :-) --Jeff H. _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Amy Sent: Tuesday, May 13, 2008 2:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Actionscript 3 Cookbook question --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com, Jeff Hindman jake247@ wrote: Actually, it's a Joey Lott package check out http://rightactions http://rightactionscript.com/ascb/ cript.com/ascb/ Thanks! It would be SOOO cool if the index to that book pointed to some information like this when you look up ascb ;-)
[flexcoders] bug in setMonth() method?
Hi, all; I'm working on making an app that will allow users to navigate from one month to the next based on a start date and end date. I noticed some interesting effects with the date object and days that fall outside the 1-31 range (http://tinyurl.com/5qc46j), so I thought I'd try something similar with months. What I find is if the current month is 11 and you add 1 to it, you'll actually wind up with a date that's not in the _next_ year, but one in the year following. Here's my code public function makeDisplayedMonths(beginDate:Date, endDate:Date):void { var today:Date= new Date(); //set up date for loop var parseDate:Date = beginDate; //equalize parsedate and enddate parseDate.setDate(1); endDate.setDate(1); while (parseDate = endDate) { //update date parseDate.setMonth(++parseDate.month); trace(parseDate, endDate); } } the trace is this Tue Jul 1 00:00:00 GMT-0500 2008 Thu Jan 1 00:00:00 GMT-0600 2009 Fri Aug 1 00:00:00 GMT-0500 2008 Thu Jan 1 00:00:00 GMT-0600 2009 Mon Sep 1 00:00:00 GMT-0500 2008 Thu Jan 1 00:00:00 GMT-0600 2009 Wed Oct 1 00:00:00 GMT-0500 2008 Thu Jan 1 00:00:00 GMT-0600 2009 Sat Nov 1 00:00:00 GMT-0500 2008 Thu Jan 1 00:00:00 GMT-0600 2009 Mon Dec 1 00:00:00 GMT-0600 2008 Thu Jan 1 00:00:00 GMT-0600 2009 Fri Jan 1 00:00:00 GMT-0600 2010 Thu Jan 1 00:00:00 GMT-0600 2009 Note that it goes from Dec 1 2008 to Jan 1 2010, skipping 2009 altogether. Obviously now I know this I can code around it, but it seems like it should either throw an error that the month is out of range or just keep incrementing. Or have I missed something here? Thanks; Amy
[flexcoders] TabBar and percentage width
Hi, all; I have a tabbar that is in an HBox that is in an Application. The TabBar and the HBox are both set to 100%. If the window is wider than the natural width of the tabbar and I then resize it, then everything works as expected...the tab labels will truncate and everything will squish together to reflect the change. If I then close the browser at that width and relaunch the app, the tabs are all full size and extend off the edge of the page with no way to get to them (unless you resize the browser window). Is this expected behavior? TIA; Amy
[flexcoders] Re: bug in setMonth() method?
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I would not guarantee results if you set values that are out of range. So you think that it's ok to fail silently and return a nearly appropriate value rather than throwing an error?
[flexcoders] Re: bug in setMonth() method?
--- In flexcoders@yahoogroups.com, [EMAIL PROTECTED] wrote: On Fri, May 16, 2008 at 11:10:21PM -0700, Alex Harui wrote: I would not guarantee results if you set values that are out of range. Flex seems targeted to the business world and we need all the date- management help we can get. Every aspect of parsing, validation, and math that you can think of will save us time and agony. I was a bit surprised at the lack of anything analagous to DateDiff and DateAdd in AS3. -Amy
[flexcoders] Re: bug in setMonth() method?
--- In flexcoders@yahoogroups.com, Stephen Allison [EMAIL PROTECTED] wrote: parseDate.setMonth(++parseDate.month); Then that statement above gives different results to: ++parseDate.month parseDate.setMonth(parseDate.month); which gives: Sat Nov 1 00:00:00 GMT+ 2008 Sun Feb 1 00:00:00 GMT+ 2009 Mon Dec 1 00:00:00 GMT+ 2008 Sun Feb 1 00:00:00 GMT+ 2009 Thu Jan 1 00:00:00 GMT+ 2009 Sun (i.e. it behaves as you would expect) Shouldn't the two versions be executed the same way? - i.e. month is incremented from 11 to 0 by the ++month (causing the year rollover) and then this 0 is passed into setMonth which should just set it to 0 again and cause no rollover. The call to setMonth is superfluous (though personally I'd go with setDate(parseDate.month + 1)) but shouldn't actually be doing anything as in both above cases it's just being passed 0 and so should either cause a year rollover in both cases (which would be buggy but consistent) or in neither case, that it's different is a bit worrying. See, I didn't realize you could just increment the month that way :- ). I thought that the setMonth() method was there in lieu of having a setter on month. -Amy
[flexcoders] Re: Bindable tag question
--- In flexcoders@yahoogroups.com, gaurav1146 [EMAIL PROTECTED] wrote: Hi, Thanks, I now get that addItem method was responsible for triggering the property change event. But I am not very clear what purpose does it serve to have the dataProvider as Bindable. Based on your example I created a class Company and used an Arraycollection companyList to display companies in the datagrid. It did not matter whether the companyList was Bindable or not. All that was required was that the name property of Company should be Bindable. Also for a list containing Object the value of the datagrid was not updated if any object property was changed irrespective of whether the list is Bindable or not. The thing is that if I do not set the dataprovider as Bindable I get a warning that Data Binding would not be able to detect assignments to the dataProvider. I would be grateful if you could point me to a scenario where declaring the dataProvider as Bindable makes a difference. Would it be in cases like where I use something like dataGrid2.dataProvider = {dataGrid1.dataProvider}. The reason you get the warning when it is not bindable is you're using the {} notation. That is specifically telling Flex to use a bindable variable. If that variable weren't set prior to your component's being drawn by the Framework, you would actually have an empty datagrid--simply assigning a value to the dataProvider variable would not populate the grid. One advantage of using a bindable variable is that you don't have to worry about setting your dataprovider explicitly at the right time to allow the Framework to lay out and size your component correctly. For instance, if your component that needs a dataProvider is a child of a List component, then the first time the component is drawn, the dataChange event will happen before that child exists. If you try to set the dataProvider in code yourself, you might be tempted to try to use the dataChange event to do that setting. But this won't work because the child component hasn't been drawn. So if you _don't_ use data binding, you need to really understand the component lifecycle, since you'll need to assign the dataprovider to the component yourself at the correct time, in an override of the commitProperties() method. When you _do_ use dataBinding, simply assigning a value (or a new value) to the variable triggers the Framework to handle all of this for you. What you're seeing with the ArrayCollection type is something slightly different from data binding. In essence, this variable type is specifically designed to talk to your dataGrid and stay in synch. When you change something inside an ArrayCollection element, you can get your dataProvider to update by calling the refresh() method on the ArrayCollection. I think this works whether the ArrayCollection itself is bindable or not. I'm a bit fuzzy on the details of that, so I'll leave it to more experienced developers to flesh that out if you need more info. HTH; Amy
[flexcoders] Re: Using custom item renderer with List
--- In flexcoders@yahoogroups.com, the_braniak [EMAIL PROTECTED] wrote: Hi all, In my application I am pooling data every 3 seconds. The data goes into a model which updates a view. I am using a list with a custom Item renderer. In the custom itemRenderer I am overriding the data getter/setter. Everything works fine (the bindings and all) except one fact: the the DataProvider for the List contains only 4 items. When I trace out the data value in the overriden setter in the itemRenderrer the first item form the DataProvider is displayed twice. Has Anyone any ideea why? Does that means somehow that the list adds the first item from the dataProvider twice? When i log the length of the dataProvider it always display 4. This issue is giving me hedaches for a few days now ... code snippet: the overriden data porperty in the custom item renderer look as below private var _data : Object; override public function set data(val : Object) : void { trace(data setter = + val); this._data = val; } the trace always display 5 lines on every model update and the first item is displayed twice I also had this problem: http://flexdiary.blogspot.com/2008/04/is-horizontallist-faster-than- hbox-with.html
[flexcoders] Re:Authorware to Flex?
--- In flexcoders@yahoogroups.com, Merrill, Jason [EMAIL PROTECTED] wrote: Yes, it's possible, but what do you want to do specifically? It would help if you described what specific things you want to do, other than convert a course. In addition to what Jason said, I'll be doing a presentation that hits the highlights of what kinds of projects are good candidates for conversion to Flex and what steps you can take to ease the transition. I'll be doing it online here http://www.elearningguild.com/content.cfm? selection=doc.901, and again in person at the European eLearning Summit http://www.elearningsummit.eu/. I don't claim this will be the definitive guide for doing such conversions...everyone is still working that out, but it might help point you in the right direction. HTH; Amy
[flexcoders] Re: drag from datagrid to textinput
--- In flexcoders@yahoogroups.com, David C. Moody [EMAIL PROTECTED] wrote: Hi, Is is possible to drag from a datagrid to a textinput? I just want one column of the data grid dumped inot the textinput? I'm not having much luck finding examples anywhere, the Adobe examples are mostly for list-based to list-based. And I can't find any that are for list-based to non-list-based. There's a good example in Flex 2: Training from the source (and presumably Flex 3). If you don't have time to go get a book, this may work for you as well http://www.quilix.com/node/3
[flexcoders] Flex in Connect
Has anyone demo'ed Flex in Connect before? I've found that both Flex and Connect slow my machine, and I am worried that the two together may be a horrible combination. Also, am I right in thinking that Connect itself is built in Flex? I thought I heard that somewhere. Thanks; Amy
[flexcoders] Button down event
When a user tabs to a button and presses enter, they're going to expect that pressing the enter key will have the same effect as clicking the button. I thought the buttonDown event would accomplish this, but pressing the enter key doesn't seem to trigger it. What event should I use? TIA; Amy
[flexcoders] Re: Button down event
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: If you set defaultButton on the container it will do it for you What if there are multiple buttons? Surely they can't _all_ be the default button? I thought Flex was supposed to be easy to make accessible. Thanks; Amy
[flexcoders] Re: Button down event
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Flex is pretty good, but not perfect. We design for 80% cases and do not always handle the 20% case. We have code size and developer resource restrictions. The 80% case is that some button should be activated on ENTER pretty much no matter what control has focus. It would seem to me to be a poor UI where ENTER could have more than one meaning. Once there is a defaultButton, focusing any other Button enables ENTER handling on that button. That's the way it seems to work on Windows as well. The current button that will be activated on ENTER is given special highlighting so it will hopefully be apparent to the user what ENTER will do. I would recommend you choose one button that is the default for ENTER. Let's presume for the sake of argument that I have written something similar to a TabButtonBar, where I want to allow the user to tab through the buttons and press Enter to activate the highlighted button. What events would I want to listen for? If you're trying for accessibility, you need to be able to support keyboard-only navigation, as is hinted at in the Flex accessibility documentation. However, when you read the details of the accessibility documents, they talk about screen readers and ignore keyboard-only navigation. When you (not necessarily you personally, but the engineering team as a whole) were programming Flex so that buttons would be automatically highlighted when you tabbed to it, what were you intending that the significance of that visual cue was supposed to be? Thanks; Amy
[flexcoders] Component Broken
Hi, all; I have a component that was working last week, but on Friday I had a crash that meant my machine would not reboot, so I had to restore from the Windows Home Server backup. I thought my machine was back 100% from where it was, but I tried to run some Flex code that worked last week and it is not working at all today. The intent of the component is to read in an external xml file and make it available as a data source in mxml. package magnoliamultimedia { import flash.events.Event; import flash.net.URLLoader; import flash.net.URLRequest; import mx.collections.XMLListCollection; [Bindable] [DefaultProperty(xmlData)] public class XMLLoader extends URLLoader { private var _request:URLRequest; private var _path:String; private var _xmlData:XMLListCollection; public function XMLLoader(request:URLRequest=null) { super(request); } public function get path():String{ return _path; } public function set path(path:String):void{ _path = path; _request = new URLRequest(_path); this.addEventListener(Event.COMPLETE, getURLResult, false, 0, true); this.load(_request); } public function get xmlData():XMLListCollection{ return _xmlData; } private function getURLResult(e:Event):void{ var resultXML:XML = XML(this.data); if (!_xmlData) { _xmlData = new XMLListCollection (resultXML.children()); } else { _xmlData.source = resultXML.children (); } this.removeEventListener(Event.COMPLETE, getURLResult); } } } Am I totally stoned in my recollection that this worked last week? When the complete event fires, the data property is empty. I've tried passing in a path of data/data.xml and moving the xml file to the root and just using data.xml. If anyone has any ideas, I'd greatly appreciate it. Thanks; Amy
[flexcoders] Re: Button down event
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: On Windows, in FF and IE, you tab to any regular Button, and space will activate it. It is standard MSAA But how many people use that instead of the more ubiquitous Enter to activate the highlighted button? I don't know anyone who regularly uses the space bar like that.
[flexcoders] Re: Component Broken
--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: On Tuesday 27 May 2008, Amy wrote: _request = new URLRequest(_path); this.addEventListener(Event.COMPLETE, getURLResult, false, 0, true); And your sure the XML is going across the network ? Or are you using a file:// path ? _path was just data/data.xml. So it should work locally or on a network. But I think the issue was I was building a demo with Stage1.mxml, Stage2.mxml, and Stage3.mxml all in the same project. So when I thought it was working, I suspect it was running Stage1 when I thought I was running Stage3. The problem was that even though the dataprovider from my demo repeater was bound to my custom XMLLoader component, a change in the value wasn't triggering it to pick up the default variable as the value of the component (I think on consideration a default variable is in only...changing the private variable isn't going to inherently trigger the getter to retrieve its read-only version). I fixed it by changing it so it was extending XMLListCollection and compositing in a URLLoader instead of extending URLLoader and compositing in an XMLListCollection. That way when the result of the request comes back and I set the source it automatically broadcasts the change to the bound component. Thanks! -Amy
[flexcoders] Using an ArrayCollection as the dataProvider for multiple components
How do most people deal with using the same ArrayCollection as the dataProvider to more than one component? Do you filter on the dataProvider property itself, make a copy of the ArrayCollection, or is there some other way to present two simultaneous views of the same ArrayCollection I'm missing? Thanks; Amy
[flexcoders] Re: importing packages
--- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote: Think of a package as a path. You're mixing apples and oranges here a little. First, the way that you have it coded, the name of the class file should be DPBSubclass.as; not preloaderOverride.as; since that's the class name. Second, the statement import preloaderOverride.*; is saying import all classes in the src/preloaderOverride folder; not the src folder. My preference would be to remove preloaderOverride from the package declaration, replace the DPBSubclass class and function names with CustomePreloader, and save the class file as CustomPreloader.as in the src folder. At that point, (import CustomPreloader;) will work. Also note that classes in the same package (folder) don't need to import other classes in the same folder. They are considered automatically imported, since they are in the same package. If all your as files are in the src directory, you don't need to import any of them. HTH; Amy
[flexcoders] Re: Working with SQL Lite Indexing and how it always starts at '1'
--- In flexcoders@yahoogroups.com, bredwards358 [EMAIL PROTECTED] wrote: Okay, I discovered the solution to my problem. All I had to do was just check the length of the dataProvider before doing an insert, if the length of the arraycollection was 0(no entries) then it would amend the insert statement to insert a zero into the primary key column. If the length was anything but zero, it would insert the statement normally, allowing the primary key column to increment normally. Here's the code I used to do this: providerLength = model.prodMaintData.length; if(providerLength == 0) { sqlText = INSERT INTO Up18Products(UniqueID, ProductID, ProductName, Barcode, ReorderUnit, ReorderQty, Vendor, + Cost, ListCost, Class, Billable, Status, ToPrint, DateImported, DateUpdated, + RptQtyUsed, RptPercentUsed) + VALUES(0, :productID, :productName, :Barcode, :reorderUnit, :reorderQty, :Vendor, :Cost, :listCost, :Class, + :Billable, :Status, :toPrint, :dateImported, :dateUpdated, + :rptQtyUsed, :rptPercentUsed); } else { sqlText = INSERT INTO Up18Products(ProductID, ProductName, Barcode, ReorderUnit, ReorderQty, Vendor, + Cost, ListCost, Class, Billable, Status, ToPrint, DateImported, DateUpdated, + RptQtyUsed, RptPercentUsed) + VALUES(:productID, :productName, :Barcode, :reorderUnit, :reorderQty, :Vendor, :Cost, :listCost, :Class, + :Billable, :Status, :toPrint, :dateImported, :dateUpdated, + :rptQtyUsed, :rptPercentUsed); } The rest you can probably guess. So far this seems to work perfectly, if for any reason you don't think it will in the future, don't hesitate to tell me. It sounds like you're expecting that your primary key will always be the same as your index within the dataProvider. It won't! Assume for instance that you insert 10 records into the table, then you delete record 10. If your database is relational (let's hope it is), likely there will be other tables with a foreign key that points to the pk's in this table. So you can't reassign them (and I doubt the db would let you anyway). Now, your table will have these UniqueID's: 0, 1, 2, 4, 5, 6, 7, 8, 9. Instead, you should be looking at the relative position of the returned record within the returned Array (data) that represents the recordset. You can probably either add this as a property to each array item in a loop or you may be able to use a subquery to add a field that reflects the order of the item within the recordset. I'm not sure if SQLLite will allow such a subquery, but it might be worth a try. HTH; Amy
[flexcoders] Re: Using an ArrayCollection as the dataProvider for multiple components
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: An array collection is a view of the collection's source. I wouldn't copy the AC, I would make another instance of an AC and have it share the source Array with the other AC. If you want changes to one AC to show up in the other AC, then you want to share the AC's list property instead. The source array is created as a temporary variable inside a function. Can I just point at the source of the ArrayCollection, or do I need to store the Array separately? Thanks; Amy
[flexcoders] Which is more expensive: binding or setting
Hi, all; I have an itemRenderer based (sort of) on the checkBox Header Renderer described here: http://www.returnundefined.com/2006/11/creating-truly-reusable- renderers-with-classfactory I'm using BindingUtils to bind to a property of an object I am passing in. This property is the month number of the month that is currently being displayed in a calendar page so that days prior to the first of the month and after the last of the month can have a different styleName. However, I could probably add that to the code in commitProperties() that sets the styleName based on checking the month of the date property of the data variable against the month property that is set automagically through BindingUtils.bindProperty(). Alternatively, I could add more binding expressions to handle the other settings I'm doing in commitProperties. I'd like to develop a more uniform approach instead of the hodgepodge I have now. The question is, which will perform better, binding or setting in commitProperties()? Thanks; Amy
[flexcoders] Re: Which is more expensive: binding or setting
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: It depends... ...on the data object. Is it bindable? If so, does it really need to be? Let's say you have a person Object { firstName: Alex, lastName: Harui}. Not bindable. It becomes the data property of the renderer and you want to map components in your renderer to it. If you do: mx:Label text={data.firstName} / you will get warnings as the firstName property is not bindable. So the important question is: Does it need to be bindable? Is the firstName property of an object going to get modified in a way that won't refresh the List? Usually not, but sometimes, some other part of the UI is binding to list.selectedItem.firstName which will still work as it will trigger on a change to selectedItem, but if you are editing items in the list and changing the firstName, then selectedItem will not change and other UI will not update. If it doesn't need to be bindable, then I'd just call invalidateProperties and stuff the fields in commitProperties. The speed difference will probably not be obvious, but it should be less code and run slightly faster and you won't get warnings. If the data object does need to bindable, then you might as well hook up with binding if it is just a couple of bindings and the logic is simple. If you already have a commitProperties method, I would probably not use binding and map the data object fields in commitProperties because in most cases, when the fields change in the person object, the entire data property gets re-assigned due to the way most lists update their renderers. OK, thanks :-). That's the direction I was thinking.
[flexcoders] Re: What is a classfactory and why would I use one?
--- In flexcoders@yahoogroups.com, Jonathon Stierman [EMAIL PROTECTED] wrote: I would say it's more flexible to use the ClassFactory because you can dynamically set the properties in the ClassFactory. Simple example: Say you had an application that creates Squares - just simple rectangles on the screen. When the user presses a button, a new square pops up in a random location. If you used a hard-coded class to fill your Square class with pre-set instance data, you're locked in to your implementation. You'll have to write a new class if you wanted to give the user the option to create a RedSquare instead of a Square. It gets exponentially difficult if you have multiple things that might need to change as well: say color, size, border-thickness, etc. You'd have to make a new class (and then configure your application to use that new class!) for each property of Square. Not pretty! ... Also, when you're using a class as an ItemRenderer for a List based component, you don't have the luxury (AFAIK) of passing any properties to its constructor. So you can use a ClassFactory to set those properties in advance, then use the ClassFactory as the ItemRenderer. http://tinyurl.com/56hngy HTH; A
[flexcoders] Re: taking xml var and splitting into 2 xml lists - flex bug?
--- In flexcoders@yahoogroups.com, djohnson29 [EMAIL PROTECTED] wrote: I have noticed some weird behaviour when working with XML vars and XMLListCollections. I have an xml variable that I am looping through using a for each loop. I want to separate the xml into 2 seperate lists based on a value so as I loop through, I am adding each xml node to 2 different XmlListCollections. Here is my code: // myXML is an xml var declared elsewhere in the program var xlc1:XMLListCollection = new XMLListCollection(); var xlc2:XMLListCollection = new XMLListCollection(); for each(var x:XML in myXML.MyNode){ if(x.NodeStatus == 0) xlc1.addItem(x); else if(x.NodeStatus == 1) xlc2.addItem(x); The problem is that the original xml var is getting modified. Say for example that my original myXML variable contains 10 nodes, and there are 7 nodes that have a NodeStatus of 0 and 3 nodes that have a NodeStatus of 1. My 2 XMLListCollection vars contain 7, and 3 nodes respectively as would be expected. However, the original myXML var now contains 9 extra nodes! 19 nodes in total. Flex somehow is adding all these nodes back onto the original xml var except for 1 node from each of the categories. So in other words, the original XML var contains all the newly added nodes minus 2. Is this a bug in Flex? Shouldn't the XMLListCollection just contain pointers back to the original XML var? Someone correct me if I am wrong on this, but I believe that if you add XML to an XMLListCollection, you're actually setting its source to the XML object. So essentially both XMLListCollections are pointing back to the same source and operating on it. I'm not sure why not all of the nodes are getting added. Try something like this: private var xlc1:XMLListCollection=new XMLListCollection (myXML.myNode); private var xlc2:XMLListCollection=new XMLListCollection (myXML.myNode); private function filterForStatus0(item:XML):Boolean{ return item.NodeStatus==0; } private function filterForStatus1(item:XML):Boolean{ return item.NodeStatus==1; } public function init(){ xlc1.filterFunction = filterForStatus0; xlc1.refresh(); xlc2.filterFunction = filterForStatus1; xlc2.refresh(); } You should now see the XMLListCollections properly populated. HTH; Amy
[flexcoders] Re: How to convert a powerpoint to AS3 swf for loading in Flex?
--- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: - Original Message - From: rdebled [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Sunday, June 01, 2008 11:16 PM Subject: [flexcoders] Re: How to convert a powerpoint to AS3 swf for loading in Flex? snip Finally, and most successfully, I started playing with print2flash which can convert a ppt to a swf and has a flex component that can open that swf and move around it. It's early stages right now, but it seems to do everything I need, with API calls for moving from one page to another, zooming, scrolling, etc. The Pro edition is $80 and there's a server edition that has an automation API, letting you integrate conversion into your application. Very cool. Anyone facing this powerpoint to Flex problem should take a look to see if this meets your needs. I've had a quick look at print2flash and it looks good, but I think the problem for powerpoint conversion is the use of animation and transitions - something I don't think that print2flash can handle. I'm sure that conversion of static slides (via the print interface) would work fine. If you know different, let me know fast! Paul Connect (Breeze) does a pretty good translation of Powerpoint to Flash, but doesn't handle it well if you mix animation schemes with other animations. AFAIK, Connect is Flex under the skin, so surely it is possible. I know there was a guy in Italy rewriting Connect to be open source, Giorgio Natali, and I've seen him post occasionally on here. Maybe he will pop in with an opinion. If not, maybe a member of the engineering team could check with the Connect engineers and see if they can give you a hint. HTH; Amy
[flexcoders] What is the default itemRenderer for a List?
What is the default itemRenderer for a List? Thanks; Amy
[flexcoders] Re: working with resulthandler httpservice and referencing lastresult?
--- In flexcoders@yahoogroups.com, Jason B [EMAIL PROTECTED] wrote: Tracy im confused? you keep mentioning my data from XML but that is working fine like i said i am able to comment out the line throwing the error and use alert.show and it works fine... but this line event.result.DATARESULTS.SEVEND_ALOWED; will not work for me and never has i think the reason is because you do it under resultformat=e4x and i do it as the default Object for httpservice Is it possible all you need to do is add target in the path? event.target.result.DATARESULTS.SEVEND_ALLOWED...?
[flexcoders] Using CSS with custom item renderers
Hi, all; I'm trying to style a custom item renderer. I've called it TestRenderer. It's basically a canvas with a label in it. This is the style declaration: TestRenderer{ backgroundColor: #FF; backgroundAlpha:0; fontSize: 16; } This is the mxml declaration: mx:List id=weekList width=200 rowCount={weekList.dataProvider.length} itemRenderer=com.magnoliamultimedia.views.TestRenderer minWidth=0/ I am expecting to see an item renderer with an ugly bright red background. Instead, I see no background. The font size _does_ change, though. Can anyone give me a clue as to why my component style isn't changing? Thanks; Amy
Re: RES: [flexcoders] Using CSS with custom item renderers
--- In flexcoders@yahoogroups.com, Luciano Manerich Junior [EMAIL PROTECTED] wrote: Hi, you are setting the background Alpha to 0, how do you spec to see some bgcolor? Same result with 1. That's just the most recent value I tried. Thanks; Amy
[flexcoders] Re: Using CSS with custom item renderers
--- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote: Hi, all; I'm trying to style a custom item renderer. I've called it TestRenderer. It's basically a canvas with a label in it. This is the style declaration: TestRenderer{ backgroundColor: #FF; backgroundAlpha:0; fontSize: 16; } This is the mxml declaration: mx:List id=weekList width=200 rowCount={weekList.dataProvider.length} itemRenderer=com.magnoliamultimedia.views.TestRenderer minWidth=0/ I am expecting to see an item renderer with an ugly bright red background. Instead, I see no background. The font size _does_ change, though. Can anyone give me a clue as to why my component style isn't changing? OK, I tried just sticking my TestRenderer component in the Application file somewhere other than as an itemRenderer, and that shows the red background (when the alpha is set to 1). So the problem seems to be related to using the styled component as an itemRenderer. Is there something special that the List component is doing to its renderers that is preventing them from using the alpha and color I've set in my CSS? Thanks; Amy
Re: RES: [flexcoders] Using CSS with custom item renderers
--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: Can you post the code for TestRenderer? Are you sure? It's very complicated ;-) ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=200 height=50 mx:Label x=10 y=10 text={data}/ /mx:Canvas
Re: RES: [flexcoders] Using CSS with custom item renderers
--- In flexcoders@yahoogroups.com, Michael Schmalle [EMAIL PROTECTED] wrote: The solution ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=200 height=50 mx:Script ![CDATA[ override protected function commitProperties():void { super.commitProperties() if (data) { // uncomment to see this actually work // setStyle(backgroundColor, 0xFF); // imaginary prop if (data.itemColor is Number) setStyle(backgroundColor, data.itemColor); } } ]] /mx:Script mx:Label x=10 y=10 text={data.label}/ /mx:Canvas I meant a CSS solution. I could possibly create a classFactory and pass in the styleName in that, but that's not nearly as clean as just using the TypeSelector. I could also pass in a reference to the Application and/or its styles and have the component look at that to see if there is a style that matches the ClassName, but that's sort of icky too. Why is the List component set up to break this? Thanks; Amy
Re: RES: [flexcoders] Using CSS with custom item renderers
--- In flexcoders@yahoogroups.com, Michael Schmalle [EMAIL PROTECTED] wrote: Hi, The reason this is not working with TypeSelectors is because the styleName property of the item renderer is getting set to the LisContentHolder instance (it's parent). So what's the solution? I'd rather not have to pass in a styleName. Thannks; Amy
[flexcoders] Re: Questions regarding updating dataProviders after a drag drop
--- In flexcoders@yahoogroups.com, bredwards358 [EMAIL PROTECTED] wrote: Ok, going with the idea of creating a class called Product, since it seems to be referencing the first index of the draggedItems array, would this be an object type class? Or an array since we're adding to the dataProvider which is an arrayCollection? The Flex 2/3 Training from the Sourcce books will walk you through the process of creating pretty much the type of application you seem to be going for. HTH; Amy
Re: RES: [flexcoders] Using CSS with custom item renderers
--- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, Michael Schmalle teoti.graphix@ wrote: The solution ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=200 height=50 mx:Script ![CDATA[ override protected function commitProperties():void { super.commitProperties() if (data) { // uncomment to see this actually work // setStyle(backgroundColor, 0xFF); // imaginary prop if (data.itemColor is Number) setStyle(backgroundColor, data.itemColor); } } ]] /mx:Script mx:Label x=10 y=10 text={data.label}/ /mx:Canvas I meant a CSS solution. I could possibly create a classFactory and pass in the styleName in that, but that's not nearly as clean as just using the TypeSelector. I could also pass in a reference to the Application and/or its styles and have the component look at that to see if there is a style that matches the ClassName, but that's sort of icky too. Why is the List component set up to break this? OK, I figured out how to tell my component yes, I really want you to use your own style, regardless of where you are. Here it is: override protected function commitProperties(){ this.styleName=this.className; } Deceptively simple! :-) -Amy
[flexcoders] How to remeasure itemRenderer
I want to add something to an itemRenderer in a List that will make it taller. I've set the List's variableRowHeight to true. However, when I set invalidateSize() in my click handler, the measure() method never happens. I've stepped through the code in the debugger, and narrowed it down to line 4487 (itemRendererToIndices protected function): if (!item || !(item.name in rowMap)) When that line runs, the invalidateSizeFlag on item (my renderer) suddenly goes to false. Any idea what's happening? What is the recommended way to remeasure an itemRenderer? Thanks; Amy
[flexcoders] Re: How to remeasure itemRenderer
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Could you be using the wrong source for Flex? Your findings don't make sense. You are calling invalidateSize on the renderer I presume? It didn't make any sense to me either. I think that since that is the first line in the function, maybe it is losing the flag as it is passed into the function, but I have no idea how that would happen. I'm stepping through line by line at that point, so I'm not sure what could be happening there that I'm not seeing. I've only got one installed copy of Flex Builder 3. I uninstalled the last beta before installing. Is there any other action I should take? And yes ;-). Thanks! -Amy
[flexcoders] Re: How to remeasure itemRenderer
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: How did you get into itemRendererToIndices? Maybe we need to see more code. ListBase mouseClickHandler line 9019. My function looks like this: private function handleLabelClick(e:Event):void{ addChild(childObject); childObject.x=0; childObject.y=0; childObject.width = childObject.explicitWidth; childObject.height = childObject.explicitHeight; invalidateSize(); } Thanks :-) -Amy
[flexcoders] Re: Getting PropertyChangeEvent to work properly
--- In flexcoders@yahoogroups.com, superbokbok [EMAIL PROTECTED] wrote: Yes I thought that would fix the problem so I tried implementing this within the function notifyPropertyChange method private function notifyPropertyChange(name:String,oldValue:Object,value:Object):void { if (value !== oldValue) { var event:PropertyChangeEvent = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE, true,false,update,name,oldValue,value,this); dispatchEvent(event); } } Now in the main.mxml file, I've set the listener like this: this.addEventListener (PropertyChangeEvent.PROPERTY_CHANGE,testTrace,true\ ); I can never seem to get this event to be recognized by the application. For reference, this notifyPropertyChange method is contained within an AS class that fires the event when a Timer event fires after 1 minute. At this point, a new Date object is created, compared with the old date value and fires the notifyPropertyChange method, to update the onscreen time display. If I register a listener with the target, then I can receive the event. But I cannot seem to get any event, particularly the PROPERTY_CHANGE event, which is what I want. I'd love to be able to use the propertychangeevent cuz it seems like a nice, subtle way to be alerted of changes to an instance's variable. Any suggestions on how to use the PropertyChangeEvent properly?? :) regards What class is your class extending? -Amy
[flexcoders] Re: How to remeasure itemRenderer
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Is that verbatim from the renderer code or somewhere else? How does handleLabelClick get called? That is from my renderer code. It's just a click handler on a canvas that contains a label. I would check to see if the validation of the size causes renderers to be recycled, defeating your addChild. Normally, you need to change a property somewhere so that any renderer that is recycled in for that data item will know to have that new child. Would the recycling be happening in the itemRendererToIndices call? Before the item.invalidateSizeFlag switches to false in that call, the item variable is com.magnoliamultimedia.views.TestRenderer (@4873479). After the flag switches, it is still com.magnoliamultimedia.views.TestRenderer (@4873479). Wouldn't that mean that this is still the same renderer? If not, how would I detect that recycling is happening? The flag seems to be switching to false without going into any code that checks it. However, I don't wholly know what might be happening in some compiled code the debugger might not be showing me, which is part of why I asked the question. If I uploaded my code, would you have time/interest to look at it? Thanks; Amy
[flexcoders] Re: HTTP request sending from IDE(Flex Builder) ERROR
Doesn't HTTPRequest need the compile flag use-network=false set to run locally? URLRequest will work both ways without any special flags set. HTH; Amy --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Precisely what is the error? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Vivian Richard Sent: Wednesday, June 04, 2008 1:17 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] HTTP request sending from IDE(Flex Builder) ERROR Thanks Tracy and all. Actually it worked for me all the time. But now as I copied one of my project's source code and created a new project (with exactly the same code) - this error is occurring but the old project works fine. That is why I was thinking may be the way the old project was set up, it does not have any problem reading from old destination. I remember I had this kind of problem before but it was gone after few times the error occurred but this time it is not going away!!! Oh by the way the very first time I ran the new project it did work though but then I cleaned the whole project - that is when it started to show the error message. Regards On Wed, Jun 4, 2008 at 8:42 AM, Tracy Spratt [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Yes, you should not have to do anything special for this to work under FB. Are you saying you have tried and are having problems? Tracy
[flexcoders] Re: How to remeasure itemRenderer
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I can try to take a look over the weekend. I would break on makeRowsAndColumns in the DataGrid. If it gets hit, then recycling is underway. It's a List. When the flag flips, the rendererChanged variable is false. I was stepping through line by line and I didn't see it go through that function. It won't let me set a break point in the Framework code. Thanks; Amy
[flexcoders] Re: How to remeasure itemRenderer
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: It has nothing to do with rendererChanged, that would be if you changed the classFactory for the renderer. List also has makeRowsAndColumns. If you can't set a breakpoint, that makes me think your source is not in sync with the swcs. How do I fix that? Thanks; Amy
[flexcoders] Re: Getting PropertyChangeEvent to work properly
--- In flexcoders@yahoogroups.com, superbokbok [EMAIL PROTECTED] wrote: My class is extending the EventDispatcher class. Here's a snippet of the class: package com.superbokbok.irisreader { import com.adobe.xml.syndication.generic.*; import flash.events.EventDispatcher; import mx.collections.ArrayCollection; import mx.events.PropertyChangeEvent; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import mx.rpc.http.HTTPService; [Bindable] public class Subscription extends EventDispatcher I think you need to use [Bindable (event=propertyChange)] to get it to work with a property that has a getter only. HTH; Amy
[flexcoders] Re: Datagrid default sorting and row number
--- In flexcoders@yahoogroups.com, Indra Prastha [EMAIL PROTECTED] wrote: Hi guys, I need help about working with large data in a datagrid. I have a datagrid that displays about 500 + rows which gets data from my backend in XML (http service, resultFormat = e4x ). Right now I want to display the row number for the data grid in the first column No., without actually sending norow#/no xml child in the data that is sent from the backend, i tried using example from the documentation using listData function, it works fine only for the displayed data, what i mean is that, since there are 500 data and the datagrid only shows about 15 first (the rest u have to scroll down) when you scroll down, the number resets (means the 16th row shows the row number as 0 again). Found no other way to programmatically counts the row and display it in the datagrid, i included norow#/no in the XML being sent and works like just i wanted UNTIL I click on the header and tried to sort it ascending / descending. Now flex instead of sorting my data 1 to 500 or 500 to 1 , it thinks that these numbers are string and sort them like a string - ascending sort will result in sort like this 1,10,100,101,102...109...2,20,200,201 . and vice versa for descending. This might help http://flexdiary.blogspot.com/2007/11/showing-item-number-in- itemrenderer.html HTH; Amy
Re: RES: [flexcoders] Using CSS with custom item renderers
--- In flexcoders@yahoogroups.com, Stephen Gilson [EMAIL PROTECTED] wrote: One more note on this one: Renderers have their TypeSelectors blocked for the styles: backgroundColor borderStyle borderStyle is blocked because DataGrid/List has a borderStyle and if you put a container in as your renderer, it would pick up that borderStyle by default. Similarly, backgroundColor is blocked, but also for another reason. We want the renderers to not have a background so the selection/highlight colors can be drawn behind them and show through. We can add this to the doc. Thanks :-). It's certainly helpful to have as much information as possible. In my case, I wanted to hide the highlight colors except around the edges (past the border of the itemRenderers). Would it make any sense to provide an override to allow people to set a property that lets the component use its CSS style? The fix I found is fairly easy, but a property would be even easier ;-). -Amy
[flexcoders] Re: Getting PropertyChangeEvent to work properly
--- In flexcoders@yahoogroups.com, superbokbok [EMAIL PROTECTED] wrote: Hi Amy, I created the bindable event as suggested but still nothing :( Is there a sample usage of the PropertyChange class that I could look over to get a good sense of how to use this correctly? Again, I can get the event to work when I create a custom event and dispatch that to one of the instances listening for the event, but in this situation, I want a field to update when an instances variable, 'lastChecked' in this case, is updated. In this way, I'm not creating any explicit eventListeners as the data updates the variable and changes the view on screen automatically. Thx for your help! I'm sorry, I'm out of troubleshooting steps for bindable events. When I've had problems in the past, making sure the class was an EventDispatcher and making sure the Bindable metadata tag has an event associated with it solved the problem. The only other suggestions I have for you are to trace the part of the code that actually dispatches the event and make sure it is dispatched, and to try putting ain individual bindable metadata tag for each variable that the propertyChange applies to. HTH; Amy
[flexcoders] Re: setting fillcolor with actionscript and stylename
--- In flexcoders@yahoogroups.com, netdeep [EMAIL PROTECTED] wrote: Perhaps I am not understanding this properly. When I add the following style to my Panel: mx:Style .gradientBgrd { borderStyle: applicationControlBar; fillColors: #003483,#a9a7ff; fillAlphas: 0.6, 0.6; highlightAlphas: 0, 0; } /mx:Style It renders with a nice gradient background because the borderStyle is set to applicationControlBar. But how do I access the named .gradientBgrd style in my setStyle commands in actionscript? I believe if I could do that, I could effectively set the fillColors in the panel with Actionscript. this.styleName='gradientBgrd'; ??? You may find this helpful if that doesn't work: http://livedocs.adobe.com/flex/3/html/help.html? content=skinstyle_3.html
[flexcoders] Re: new to VO's, why won't this cast?
--- In flexcoders@yahoogroups.com, Derrick Anderson [EMAIL PROTECTED] wrote: hi, i am trying to incorporate value objects into my programming- i have a very simple one set up [Bindable] public class EmployeeVO { public var employeeID:uint; public var roleID:Number; public var employeeTypeID:Number; public var employeeStatusID:Number; and i'm trying to cast a datagrid item which contains these 4 values onclick like: var testVO:EmployeeVO = DataGrid(event.currentTarget).selectedItem as EmployeeVO; testVO is always null, and I can't figure out why. the selectedItem properties are (as they are seen in debugger): employeeID = 1830 [0x726] employeeStatusID = 2 employeeTypeID = 1 mx_internal_uid = D3C roleID = 3 can anyone see what i'm doing wrong here? I don't think that the as operator actually MAKES the object into another data type. I think it just helps the compiler REALIZE it is that data type if the syntax is not clear. So your data grid's dataProvider would need to already contain some sort of collection of EmployeeVO's to begin with. HTH; Amy
[flexcoders] Re: Working with Dates Double Bookings
--- In flexcoders@yahoogroups.com, tspyro2002 [EMAIL PROTECTED] wrote: Hi, I'm currently developing a Villa Reservation system for a client using Flex and at the moment I'm a prototype side bar which holds the search function. What I'm stuck on is how to reference the disabled dates and check them against the date range that the user has chosen. At the moment I have it set up that the user can choose from 4 date ranges - 3, 5, 7 and 14 nights. There are also 3 countries with different disabled dates (not date ranges as yet). My prototype is here at http://www.ravendigital.co.uk/Sample/Sample.html If anyone has any ideas (or code) that can point me in the right direction, that would be a great help. I have a similar thing going on where I have Task VOs that have to be used in different ways in different parts of the application. One part of my application is an array of SchedulerDates (dates that can have a Task attached). I created a Singleton TaskManager, which is essentially my master list of Tasks. When any part of the application needs to display associated Tasks, it checks the TaskManager and pulls a reference to the Tasks it needs. For instance, when a SchedulerDate is created, it calls the getTaskForDate method on the TaskManager, which makes a temporary copy of its tasks ArrayCollection and does a filter on it to return any applicable Task that might be scheduled for that date. I suspect I'm not quite there yet on the best way to apply this pattern, but it's working for me. HTH; Amy
[flexcoders] OOP and Work for Hire
I was recently asked to sign an agreement that would designate a Flex project as Work for Hire. I.e. I would not retain any ownership of the code I wrote for the project. This seems to defeat the purpose of OOP, if I create a whole body of code that I can't then reuse. How do most Flex developers handle the idea of Work for Hire? Thanks; Amy
[flexcoders] Re: OOP and Work for Hire
--- In flexcoders@yahoogroups.com, Doug McCune [EMAIL PROTECTED] wrote: The company is buying the code that you write. They are not buying your time. They might pay you based on how long it takes you to write the code, but in the end all they care about is owning that code. If they pay you $10,000 to write code, and then you turn around to another company and bid on a similar project for $500 because you already wrote the code and you just use the same codebase, they're going to be rightly upset. Anything you store in your head is yours (lessons learned, techniques used, etc). But anything you write is theirs. That's just the way this world works. I'm surprised at the previous response about not giving ownership of the code but instead only signing a non-compete. That's a pretty sweet deal if you can swing it, but I'd be really surprised if you found a large company that would go for that. For consulting projects I know that we sometimes ask for the IP of certain portions of code (ie things not specific to the project or general utility classes), but every time we do, we explicitly ask for exactly what IP we want to hold onto (and every time it is a huge legal hurdle). Whatever you do, be completely up-front from the beginning about what, if any, pieces of what you're writing is not the client's exclusive IP. Also be sure that you have an understanding about any open source code that you are using in a client's project. Sometimes clients can be very adamant about not allowing open source code of any kind, since they don't own the exclusive rights to that. But they often change their mind after you tell them how much money they will save if you don't have to reinvent what the open source community has already done. But it's important that you and the client have the same clear understanding about all this stuff. Part of the issue is that this might be the first big eLearning project I'm going to be doing wholly in Flex (if we win the bid). The eLearning community as a whole is very interested in Flex as a tool but people are hanging back until someone documents the way to solve the common problems. If I don't have to completely have to rewrite example code before making it available to the community, it will make it much easier for me to do my part in helping to document the process. Thanks; Amy
[flexcoders] Re: OOP and Work for Hire
--- In flexcoders@yahoogroups.com, [EMAIL PROTECTED] wrote: Amy - that would be a breach of confidentiality in the legal and business world. You can not share information like that when a company is paying you to develop/code that information, unless it is specifically called out in any agreements. I suspect that the company looking to hire you for this project is also looking to obtain a competitive advantage, soyour sharing of information outside of the employing company would be counter to their desired end game eLearning isn't usually about competitive advantages. I suspect that the whole work for hire thing is because they also _do_ have some business critical code that they contract out. But in general the only reason businesses care _how_ eLearning is coded is based on how that affects code. The eLearning community, however, is waiting with bated breath for Flex example code that will allow people to get their heads around how, for instance, they can present pages of data driven content with a coherent navigational structure. It's been almost a year since Authorware's EOD was announced, and people need something else they can do to with this type of content. And if I retain the freedom to post generic code that doesn't reveal the specific business practices of the client, I'm in a better position to help people move forward. The ideal would be for Adobe to step forward and provide some example code or assist community leaders in doing so, but so far we've gotten loads of lip service from various parties but no actual help. So the ownership of the code isn't so much an issue for me personally, but more for the eLearning community that would like to use this tool but so far has been stymied by lack of a clearly documented path on how to do so. -Amy
[flexcoders] Re: Finding the last day of the month
--- In flexcoders@yahoogroups.com, Indra Prastha [EMAIL PROTECTED] wrote: Hi, I used to work with Coldfusion where they have this function like DaysInMonth(date), to obtain the last day of the month (31 / 30, or 28 / 29 for feb / leap year) ,and it's very handy, is there anyway I could achieve the same function in Flex? You might find this useful http://flexdiary.blogspot.com/2008/05/working-with-dates-in-as3.html
[flexcoders] Re: OOP and Work for Hire
--- In flexcoders@yahoogroups.com, [EMAIL PROTECTED] wrote: Maybe. If said tools and techniques are uncovered while being paid to accomplish this floor re-finishing, then No they do not have any legal right to re-use it. In reality, will folks re-use/re-purpose what they've done? Absolutely but they have no legal right to it and by taking such actions they are placing themselves (albeit how greatly some people like to argue about) in peril of legal proceedings against them. How often would that happen? More often then people might realize. Then if that is the case experienced coders (and laborers) should make the same as new coders, since you wouldn't be able to ever grow and progress. Oddly, companies that have these sorts of agreements are usually very willing to pay pretty well for expertise ;-).
[flexcoders] Re: OOP and Work for Hire
--- In flexcoders@yahoogroups.com, Doug McCune [EMAIL PROTECTED] wrote: Typed code is what you are paid to deliver. That is what the client is buying. When the client pays you you are selling those digital lines of code. I just wrote a book for wiley. I cannot copy and paste any of the prose that I wrote and post it on my blog. It belongs to wiley. I sold it to them (for almost nothing, but that's beside the point). Yes, I can take the knowledge I gained while writing that book and write completely new tutorials that I post on my blog (although a non-compete prohibits me from writing a competitive book). But the instant I copy and paste something I am breaking the legal contract that I signed. The original question was about taking the exact code that was created for one client and using it in another project (either for a client or as open source code for the community). I don't think there's much of a legal gray area here. Yes, everyone agrees that the knowledge and techniques that you gain while writing code are yours and can often be used in other projects. But that is not at all the same as saying it's ok to copy a class or chunks of code verbatim. Actually, the question was about signing a work for hire agreement and what other options there might be. It looks like the client is open to negotiation on this issue. After all, the client has already benefitted from code that I've shared with the community. Interestingly, the code I shared was created specifically for the presentation they attended. The client I have done most of my Flex work for doesn't really care about sharing snippits so long as I don't hand over his whole system. But the code I did for him was too detailed and specific for the top level view I was giving in 70 minutes. It may be that I never share, for instance, the exact VO that I use for driving a multiple choice question. But I'd like to know that if I want to base example code on stuff I do for this client that I don't put myself in legal jeopardy. -Amy
[flexcoders] Re: OOP and Work for Hire
--- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, bubbamorse@ wrote: Amy - that would be a breach of confidentiality in the legal and business world. You can not share information like that when a company is paying you to develop/code that information, unless it is specifically called out in any agreements. I suspect that the company looking to hire you for this project is also looking to obtain a competitive advantage, soyour sharing of information outside of the employing company would be counter to their desired end game eLearning isn't usually about competitive advantages. I suspect that the whole work for hire thing is because they also _do_ have some business critical code that they contract out. But in general the only reason businesses care _how_ eLearning is coded is based on how that affects code. Oops, I meant how that affects COST. :-)
[flexcoders] Re: OOP and Work for Hire
--- In flexcoders@yahoogroups.com, Doug McCune [EMAIL PROTECTED] wrote: What if you spin it as a PR opportunity for the company, and ask to be able to use the code you write as the basis for explanatory tutorials, without giving away any company-specific trade secrets, and give credit to the company for contributing the code? Could be a win-win for everyone involved. You get to blaze the path for other eLearning developers, the client company gets to be seen as open and contributing back to the community, they get their name out in the blogopshere a bit with a positive spin. But get that in writing, otherwise I'd say you'll have to do the project, then write whatever tutorials you want to do from scratch. Depends on the company of course and how willing they'd be to do something like that, most large companies I've dealt with are simply too beuracratic to ever deviate from the standard agreements the lawyers drafted up. It often doesn't matter what your argument is, the lawyers wrote an agreement and that's the only one they'll ever get you to sign. My fear is that if I were to sign the agreement as is even if I write tutorials from scratch the techniques might be inspired by things I did for them and they might decide to sue me. That could be a problem, as it is a big company ;-). But it looks like they're willing to negotiate on this, and so I think we're ok. -Amy
[flexcoders] Extra pixels on right side of TileList.
Hi, all; I have the following MXML code mx:HBox horizontalGap=0 width=100% backgroundColor=#00 mx:VBox verticalGap=4 id=calendarBox backgroundColor=#FF borderStyle=solid borderColor=#00 borderThickness=2 horizontalGap=0 mx:TabBar id=calendarTabs labelFunction=tabLabel width=100% itemClick=handleTabChange(event) / mx:TileList id=calendarDays backgroundColor=#FF00FF width=100% paddingBottom=0 paddingTop=0 borderStyle=none columnCount=7 rowCount={int(Math.ceil (calendarDays.dataProvider.length/7))} itemRenderer={_calendarDay} variableRowHeight=true/ /mx:VBox mx:VBox width=100% backgroundColor=#00 mx:Repeater id=weekRepeater mmv:WeekRenderer data={weekRepeater.currentItem} childObj={testCanvas} / /mx:Repeater /mx:VBox /mx:HBox For some reason, the TileList has about 5 pixels on the right hand side of the last column of item renderers. I've uploaded a picture of the result here http://www.magnoliamultimedia.com/flexissue/TileListCapture.jpg. Note that I gave everything a garish color so it was clear what container was where. If anyone has any ideas of how to get rid of those pixels, I'd be grateful. TIA; Amy
[flexcoders] Re: Extra pixels on right side of TileList.
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: How are you trying to get the size to be an integer number of tiles? I'm letting Flex handle that, just as I would if I were working in HTML and using a table. It's sizing the TileList, and my expectation was that it would size it snugly around the content. You might need paddingRight=0 on VBox or HBox? I tried that already. The padding is inside the TileList. The TileList is the only thing that is that purple color. If I add padding to the vbox, you can see that there are empty pixels to the right of the TileList AND the TabBar. If you break in SystemManager.mouseDownHandler, the event.target should be the container or control that owns the pixels you clicked on. I added a click handler on the TileList as a shortcut to this. The target is the ListBaseContentHolder with the parent id = calendarDays.
[flexcoders] Re: Extra pixels on right side of TileList.
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: MXML is not HTML. I don't remember seeing a specification of columnCount or width of the TileList in pixels. You could be seeing round-off error or simply that the computed width of the tile doesn't fully cover the TL. The columncount is 7. Would tweaking the size of the itemrenderer help?
[flexcoders] Re: Using Flex as a Flash IDE
--- In flexcoders@yahoogroups.com, aphexyuri [EMAIL PROTECTED] wrote: With all due respect, even the guys at Adobe should look long and hard at FlashDevelop. I've been using it to code flash projects for a while, and it's amazing how it boosts productivity. Code hinting, class inspection and great code completion...enjoy ;) Is there any documentation on how to use it with Flex? I couldn't find any. Thanks; Amy
[flexcoders] Re: tilelist and transitions
--- In flexcoders@yahoogroups.com, giopaia [EMAIL PROTECTED] wrote: I have created a series of states with a simple move transition between them... All worked fine until I added a tilelist as child of one of the states. Now the move transition doesn't start until the tilelist is initialized... Tried also to separate the addchildaction of the tilelist using a sequence and trying to trigger the addchild action before or after the move... mx:Sequence mx:AddChildAction target={the_tileList} / mx:Move duration=1000 / !--mx:AddChildAction target={the_tileList}/-- /mx:Sequence BUT clearly the only thing that it's moved backward or forward in time it's the actual action of adding the child, not the initialization of it... So... the freezing still occurs... Any idea how to avoid the freezing problem? Have you tried setting includeInLayout to false on the TileList until after the transition is finished? HTH; Amy
[flexcoders] Re: Extra pixels on right side of TileList.
--- In flexcoders@yahoogroups.com, Troy Gilbert [EMAIL PROTECTED] wrote: I'm not sure if it applies in this case, but TileList definitely has some bugs in its measuring and layout code (or at least did in Flex 2 -- not sure if they fixed it). In particular, when calculating its preferred width it basically does (itemRenderer.width + horizontalGap) * numColumns. That's one extra horizontalGap in there... possible the extra space you're seeing on the end? In several pixel-perfect layouts I've had to actually *not* use TileList because of the bug... though at the time I wasn't aware of the technique of monkey-patching (where if you create a class in the project that matches a class in the SDK the project class overwrites it), which would eliminate the need to modify the SDK source (which I generally avoid). I couldn't find a horizontalGap property on TileList, and trying to manually add a tag when the code hinting said no just resulted in a compiler error. Could you tell me a bit more about monkey patching? Where does the file need to be, and how do you get it to be picked up as if it were in the mx namespace? Thanks; Amy
[flexcoders] Re: Extra pixels on right side of TileList.
--- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote: Hi Amy, Just a thought, but what happens if you take width=100% off of the tile list, or set the width and columnWidth to explicit values? Does the extra space still show up? And, did you try Alex's suggestion to add paddingRight=0 to the tile list? Because of the bindings and itemRenderers, its not possible to fiddle with your example directly. Oh, and you might want to take out the extra period on the right side of the screenshot link. :) paddingLeft and paddingRight are ignored. I tried setting them to some really high number just to see, and nothing happened. When I take off the 100%, it is a lot smaller on the left hand side of the screen (not using the full width of the tabBar). But one of the reasons I like Flex is because it has the capability of liquid layouts similar to HTML. I guess I should be thankful that Flex automatically got that close, even though the native size of the itemRenderer is smaller... How do most people handle this sort of problem? -Amy
[flexcoders] Re: Trying to call a function in a Flex object from JavaScript before it's ready.
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: The JS should be ready before Flash, so I'd make sure there's a function in JS that Flash will call via EI when it is ready. ApplicationComplete event would be a good time to call out to JS. More specifically, he should have a function that looks something like this: handleCreationComplete():void{ ExternalInterface.call('yourStartedJSFunction', true); } The Application's creationComplete event should be set to call this. HTH; Amy
[flexcoders] Re: Extra pixels on right side of TileList.
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: By debugging a simple test case. Can you make one and post it? I managed to managed to get an acceptable look by setting the TileList to 99% and putting a 1 px spacer on the bottom of the Vbox so it has the same visual space all the way around. -Amy
[flexcoders] Re: tilelist and transitions
--- In flexcoders@yahoogroups.com, giopaia [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, Amy amyblankenship@ wrote: Any idea how to avoid the freezing problem? Have you tried setting includeInLayout to false on the TileList until after the transition is finished? HTH; Amy In this way I'm obliged to create all instances of the tilelists before entering the states they are part of... and it is a bit too much in terms of things to download... but for now it works... and really well, the movement now it's smooth. When I have time I'll try to dive into it to optimize it. I would think if you don't specify the dataProvider or itemRenderer of the TileList until you're ready to use the TileList, it shouldn't be that expensive to create. HTH; Amy
[flexcoders] Re: 'Pointer' in actionscript?
--- In flexcoders@yahoogroups.com, fb6668 [EMAIL PROTECTED] wrote: Hi. I have a custom component which uses data from my modellocator. Depending on the way this component is called depends where abouts this data comes from, ie: private var _itemLocation:Object; [Bindable] protected function get itemLocation():Object { if(isAssets) _itemLocation = model.factfind.assets; else _itemLocation = model.factfind.liabilities; return _itemLocation; } protected function set itemLocation(value:Object):void { _itemLocation = value; } You may want to try some combination of the following: 1) Do the setting in the setter tather than the getter 2) Type itemLocation as ArrayCollection rather than Object 3) Use BindingUtils to set up a binding as shown in this example http://www.returnundefined.com/2006/11/creating-truly-reusable- renderers-with-classfactory HTH; Amy
[flexcoders] Re: Splitting FlexCoders in smaller, focused groups
--- In flexcoders@yahoogroups.com, Michael Schmalle [EMAIL PROTECTED] wrote: no matter how hopeless rudely the question is put. Subject :: NED helllp plzz I didn't even talk to my mom like that. ;-) I know there are hundreds of cultures out there but common, isn't this about simple and respectful language protocol? How bout people starting to trim their messages...?
[flexcoders] Re: Example of HTTPService.
--- In flexcoders@yahoogroups.com, Fidel Viegas [EMAIL PROTECTED] wrote: Hi Harshal, Have a look at the documenation. You have some examples. Or just search on google. There are plenty of examples on the net. I found this in a quick search at Adobe.com http://www.adobe.com/devnet/flex/quickstart/httpservice/
[flexcoders] Re: Splitting FlexCoders in smaller, focused groups
--- In flexcoders@yahoogroups.com, Michael Schmalle [EMAIL PROTECTED] wrote: How bout people starting to trim their messages...? heh, yeah well that one has been asked before, I'm guilty due to trying to get other things done in the day. Gmail doesn't make it easy since the 'hide quoted text' is always collapsed. But really, I could care less about trimmed messages, it's what we are talking about that matters. Why complain about the netiquette of others if you're not actually interested in following netiquette yourself? You don't care about trimming netiquette, some users don't care about using ridiculous subjects, some users don't know where to search before asking seemingly stupid questions. What do you see as being the difference?
[flexcoders] Oversized label
I have a label (inside an itemRenderer being used for a List) whose styling and text are set dynamically. For some reason, the label reports itself as being over 700 px wide, even though its textWidth is only 60 px or so. Any idea what could cause such a huge disparity between these two numbers? Thanks; Amy
[flexcoders] Re: Oversized label
--- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote: I have a label (inside an itemRenderer being used for a List) whose styling and text are set dynamically. For some reason, the label reports itself as being over 700 px wide, even though its textWidth is only 60 px or so. Any idea what could cause such a huge disparity between these two numbers? Nevermind. Sorted.
[flexcoders] Re: Restrict the number of records viewable in a managed arraycollection
--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: In the result handler, just select the desired items, and assign them to the DG.dataProvider. You could also use a filterFunction on the ArrayCollection if you have anything in the record object that identifies the row number. HTH; Amy
[flexcoders] Re: Splitting FlexCoders in smaller, focused groups
--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: That's a really useful thing, why isn't it pimped here more often? I've been here 10 months, and I'd never heard of it before that Brazilian fellow (sorry I forgot your name dude) mentioned it in the original thread earlier today... Because some people find that this makes the results less useful rather than more useful. If you're trying to search within LiveDocs and you get the whole world, it's a pain.
[flexcoders] Re: string to actual actionscript code?
--- In flexcoders@yahoogroups.com, David Pariente [EMAIL PROTECTED] wrote: Wow, that answer will really help me! :) What if it's not movies, but some other object that i wanna create 20 times? I thought it should get inside some kind of Array, but not sure if its this way too. i.e. var MyTextBox:TextBox=new textBox(); what if i need N instances of that MyTextBox? Should i create an Array before that? What's the right way to put those textBoxes into the Array? I'm sorry for the basic of my questionbut im quite new to AS3 and OOP, and i did use and misuse of evals a lot in AS1 and AS2. Thanx a lot for the help :) If you use a repeater, this will happen automatically: mx:Repeater dataProvider={yourArrayColl} mx:TextBox id=MyTextBox / /mx:Repeater will give you an array of TextBoxes that you can access with MyTextBox[0] - MyTextbox[n], where n is the number of items in your data source. You can also do this manually var MyTextBox:Array; for (i=0;i=numLoops;i++){ MyTextBox.push(new TextBox()); } You'd refer to them the same as above. HTH; Amy
[flexcoders] Re: Need Source code for Character Limit for TextArea....
--- In flexcoders@yahoogroups.com, Doug McCune [EMAIL PROTECTED] wrote: Posting twice, demanding source code for a solution, and telling us you need it ASAP isn't going to do much besides piss people off. We're not here to do your work. If you're in over your head and are going to miss your deadline because you committed to developing with a technology you haven't learned then this is the wrong place to look for someone to bail you out. Sorry for the rant, as we've been discussing on this list lately there have been more and more questions like this. I certainly don't want to come off as being condescending or arrogant, but saying give me source code, I need it now for my deadline gets me a little riled up :) I interpreted it that he wanted to know where in the Framework to look for this functionality so he can learn from the example...
[flexcoders] Re: Repeater items with two states and dataProvider binding resetting state
--- In flexcoders@yahoogroups.com, dave_defusion [EMAIL PROTECTED] wrote: I have a Repeater which is repeating an item with two states (an open state and a closed state), when I open one one of the items I then load some extra data in. When the extra data is loaded the item in the data provider (an array collection) is replaced - that way everything is updated via the bindings. The problem I have is that when the array collection binding fires the Repeater recreates/refreshes each of the items so any that were open close, which is, of course, not what I want. I'll probably have to code this all up myself without using the Repeater, but I wondered if anyone else had any thoughts before I start down that path. One thing that can help in this kind of situation is not to bind, but to explicitly set the dataProvider.
[flexcoders] Re: Repeater items with two states and dataProvider binding resetting state
--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: So, within a repeated component, you are modifying the underlying dataProvider item? You can probably find a way to update the DP without triggering the update events. If the DP is an ArrayCollection, then just setting a property value on the item should not cause the repeater to re-render. (This is the case where you need to call itemUpdated() to force the refresh.) Amy's suggestion is sound. If you do not bind to the dataProvider, but rather assign the Repeater.dataProvider explicitly, then no changes to the DP will automatically cause the Repeater to re-render. My experience is that whenever the ArrayCollection's source changes, the repeater will update, but there doesn't seem to be so much of a cascading ripple effect--when you bind it seems to me like it refreshes way more times. So if you don't bind, the refresh might not be as visible. HTH; Amy
[flexcoders] Re: Is an event dispatched when an AIR app is closing?
--- In flexcoders@yahoogroups.com, Daniel Gold [EMAIL PROTECTED] wrote: Nevermind. Didn't find it right away because my AIR app is based off mx:Application and is chromeless, but I can listen for the closing event on the main Window I spawn and cache the data there. On Sun, Jun 22, 2008 at 12:31 AM, Daniel Gold [EMAIL PROTECTED] wrote: I'm working on an online/offline AIR app and was wondering if there was any way to detect that an AIR app is closing so I can cache my data models? If the user closes the app while online and then opens it later offline, I'd like them to have access to the last data set. I could achieve this by constantly mirroring the remote data but was hoping to avoid that since the majority of the time the users will be online and it won't be necessary. Even though it is tempting to use Application instead of WindowedApplication because of the lack of documentation on how to make WindowedApplication chromeless (http://flexdiary.blogspot.com/2007/07/application-vs- windowedapplication.html), if you read the first comment to this post http://technoracle.blogspot.com/2007/07/air-apple-shaped- application.html, you will see that it is actually possible to use WindowedApplication with this in AIR as was intended. I thing you're probably better off using AIR as Adobe designed it if a workaround is avaialable instead of using a hack like the wrong tag. HTH; Amy
[flexcoders] Re: Here's a great idea for flex 4 - simple color pallette utility
--- In flexcoders@yahoogroups.com, Doug McCune [EMAIL PROTECTED] wrote: I'd vote for this too, especially if it was something that came up in the IDE as part of the code hinting for color style tags. I'd like to see a color picker with swatches like you see in other tools. The continuous tone color picker Flex has means you wind up with colors like #ACF2C1. -Amy
[flexcoders] Re: htmlText - CDATA without the whitespace mangling?
--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: Hey guys, Is it possible to do use htmlText![CDATA![ Without all your spaces being converted to nbsp; and your newlines being converted to br/? Can I pass in an mx:XML tree or something? It's really no solution having to choose between mangled CDATA and using lt; and gt; around all tags, so I assume there is something better I just don't know what it is :) I think I read somewhere that there is a property that is something like pretty printing that might help in this situation if you set it to false, but I don't have time to look it up right now. Maybe this will point you in the right direction anyway. HTH; Amy
[flexcoders] Re: Here's a great idea for flex 4 - simple color pallette utility
--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: On Tuesday 24 Jun 2008, Amy wrote: I'd like to see a color picker with swatches like you see in other tools. The continuous tone color picker Flex has means you wind up with colors like #ACF2C1. I just use the Style Explorer web site. You're right, Tom. How could I not see how user friendly it is to need to go out to other tools for basic functionality? smacks head ;-)
[flexcoders] Re: htmlText - CDATA without the whitespace mangling?
--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: Ah, what I was looking for was condenseWhite=true :) Cheers! Glad you found it :-)
[flexcoders] ViewStack sizing problem
I have a ViewStack that contains a TileList and some other components that have a variable number of children and thus a variable height. It seems that the ViewStack decides how big it will be before all the children are finished sizing. I've tried adding logic in my override to commitProperties, updateDisplayList, and measure that set the height of the ViewStack directly based on the height (and I've also tried measuredHeight) of the VBox I have in the first child of the ViewStack. I've also tried setting a bindable variable in these places that sets the height and binding to that. My results are this: commitProperties--never gets to the full height updateDisplayList--stalls out (infinite loop?) measure--stalls out (infinite loop?) with bound variable, never reaches full height with setting the property directly Is there any way to use a ViewStack to simply change out the view without _having_ any height? Alternatively, is there a way to persuade it to wait until the children are sized to decide how big it is or to look at the size again when the children are done sizing? Thanks; Amy
[flexcoders] Re: ViewStack sizing problem
--- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote: Hi Amy, Try setting resizeToContent=true on the ViewStack tag. ever have one of those duh moments?
[flexcoders] Re: help me
--- In flexcoders@yahoogroups.com, Kumaran Raj [EMAIL PROTECTED] wrote: in my project remote java object return xml as string than i convert it into xml than bind it to the datagrid it didn't loaded.any one can help me plzz Did you ever notice that the word please actually needs fewer keystrokes than the letters plzz, which don't form a word? Granted, most of them are the same key, but still...