[flexcoders] Re: Could not resolve * to a component implementation.

2010-07-01 Thread turbo_vb
Glad that you were able to resolve the problem. The AS file IS a class, and if it lives in the same package as the mxml component, the compiler will balk; because it doesn't know which one to import elsewhere. Adobe best practice would have you use Uppercase for the first letter of all classes

[flexcoders] flexTasks.jar for Flex 2.0

2010-07-01 Thread arpan srivastava
Hi All, Is there a different flexTasks.jar for Flex 2.0 ? I am trying to build my project in Flex 2.0 with jar I downloaded from http://www.adobe.com/devnet/flex/articles/flex_ant_pt2.html and it is giving me error: "Unable to run compc", but runs fine for Flex 3.0 projects. Thanks Arpan

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Warren
Yup -- I'm using AMF. What you say makes good sense. Using the bytearray coould be risky especially since I can't depend on the property order always being the same. I haven't done much OO yet but I see your point about long term maintenance. The valueOf trick reminds me a lot of what I w

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Oleg Sivokon
Well, then my take would be this: since you are sending them from CF, you are probably using AMF, and since you do so, you can use strongly typed objects, and (again, I'm not sure but...) I think that strongly typed objects are written accordingly to their describeType - this means objects are goin

[flexcoders] getting added values out of a combobox

2010-07-01 Thread Andrew
Hi: My form has a number of fields, and I use the Change event to trigger event handlers to see whether enough fields have been populated that I should enable the Submit button. I am using a combobox for one of the fields, so users can type in a value if I have not included it in the list. Howe

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Warren
well isn't that interesting. Wonder why that is. I wish things were consistent. I guess I could normalize things by looping over the array and creating a new array array of literal objects. What I have is an array of objects coming from a cold fusion query so those objects will be consistent

[flexcoders] Custom Tree Renderer for ADG in Flex 4

2010-07-01 Thread mregert
Is it possible to override the Advanced Data Grid's tree renderer with a custom tree renderer? I have created a customized tree renderer, and have not found a way to override the default tree renderer for the ADG. This is in Flex 4.

[flexcoders] Use custom tree renderer on ADG

2010-07-01 Thread mregert
I have extended the Flex 4 tree control to add new functionality, components. I'd liketo use this new tree inside of an AdvancedDataGrid. I can get the regular tree to render in the ADG, but how do I use my new tree? I've tried setting the ItemRenderer for the ADG to my tree, no luck. I have

[flexcoders] Re: Is there a way to reach into a skinClass of a component and update a property?

2010-07-01 Thread dorkie dork from dorktown
I think I found the answer in "myComponent.skin". i wish there was a skin properties object on UIComponents. if i want to set a property in a skin there's no way to do that without extending the component and adding the property to the subclass. it's not a far fetched idea. in HTML there is a style

[flexcoders] Re: How to remove duplicate objects from an array of objects

2010-07-01 Thread Amy
Both Array (which is the source of the AC) and ArrayCollection have methods that allow you to filter based on characteristics. HTH; Amy --- In flexcoders@yahoogroups.com, "Warren" wrote: > > nope -- problem is that indexOf, contains, etc is not matching the object > itself. seems to be match

[flexcoders] Is there a way to reach into a skinClass of a component and update a property?

2010-07-01 Thread dorkie dork from dorktown
I have a RadioButton component that uses a custom skin. This skin has a text field on it that contains the number of items that can change over time. Is there a way to access this property and update the value? JP

[flexcoders] Re: Issue related to Drag and Drop rows between Datagrid when using ItemRenderer...

2010-07-01 Thread shahjitesh
Help please... I had datachanged event to capture row# and column#. So I added initializeComponent method over there which is invoked by CreateionComplete and things are working now. But now issue is it does exactly same stuff it does when it is rendered for the first time that is goes to DB a

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Oleg Sivokon
Woops, sorry, it appears that objects created using new Object syntax are sorted differently from objects created using literal... var o:Object = new Object(); o.bar = "345"; o.foo = "123"; var result:Array = this.removeDuplicates( [ { foo:"123", bar:"345" }, { foo:"123", bar:"345", foobar:"789" }

RE: [flexcoders] how to filter our a column in datagrid?

2010-07-01 Thread Scott
You could set the column width to 0... From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of coder3 Sent: Thursday, July 01, 2010 1:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] how to filter our a column in datagrid?

[flexcoders] Re: data-specific createChildren() question

2010-07-01 Thread djbrown_rotonews
thanks, Alex. Those were my initial thoughts, just wasn't sure if there was a best practices method that would apply here. --- In flexcoders@yahoogroups.com, Alex Harui wrote: > > There is no right answer, it will depend. If tearing down and building up > the other sets in the 5% case is ext

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Oleg Sivokon
ObjectUtils sorts them on purpose, that's a bit different ;)

Re: [flexcoders] data-specific createChildren() question

2010-07-01 Thread Alex Harui
There is no right answer, it will depend. If tearing down and building up the other sets in the 5% case is extremely time-consuming, you may wish to just hide them, but if you end up hiding tons of stuff you’ll be wasting memory as well. The profiler and testing scrolling visually will tell yo

Re: [flexcoders] Multiple instances of a module with different styles

2010-07-01 Thread Alex Harui
Basicallly, you can’t do exactly that because you are still trying to use type selectors (Button is a type selector). Also, I don’t think you can load two CSS style SWFs with the same selector name/path. One thing you can do is to define class selectors in each style module with a computable p

[flexcoders] data-specific createChildren() question

2010-07-01 Thread djbrown_rotonews
I've got a custom item renderer extending UIComponent that can have 3 base 'states' depending on the nature of the data that it is displaying. Each of these states have minor UI tweaks re: the children that are added to the display list etc.. (# of UITextFields, icons etc...) Am I better off cr

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Warren
so far everything I've tried indicates properties are written out in a fixed order no matter how much i fool around with them. Same thing with the objectUtils stuff. Always writes out in the same order - Original Message - From: Oleg Sivokon To: flexcoders@yahoogroups.com S

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Oleg Sivokon
Hey, you are welcome so far it works! :) I'm only afraid of the situation when properties are not written in the same order. To be honest, I need to read up the AMF specs to see if that was by chance, or was that the how AMF is supposed to work. (I tried to initialize the properties in different or

RE: [flexcoders] Re: datagrid column sorting

2010-07-01 Thread Scott
Ah, I read it wrong then... The problem is that the component/object will be created/completed well before the data is populated. I've also removed the header from the function (header="0") and I actually only have one "visible" column in the datagrid. I'm using the dataGrid as sort of an ad

Re: [flexcoders] how to filter our a column in datagrid?

2010-07-01 Thread Bill Sahlas
Filtering a copy of the ArrayCollection and set the dataProvider to that filtered copy is one way. On 7/1/10 2:36 PM, "coder3" wrote: Hi it's a little complicated. i have a datagrid with student info: name | class | grade what i want is, if the row has no class and grade data, i want

[flexcoders] how to filter our a column in datagrid?

2010-07-01 Thread coder3
Hi it's a little complicated. i have a datagrid with student info: name | class | grade what i want is, if the row has no class and grade data, i want to remove this row from the datagrade. I don't want to change the object in the datagrid dataprovider array, because the array needs to be us

Re: [flexcoders] Multiple instances of a module with different styles

2010-07-01 Thread Haykel BEN JEMIA
Hi Alex, ok it's clear with the factory. But how can I handle the following scenario with class selectors : Module 'MyModule': * Module has a button with style name 'myButton' * Module gets a url for a style file from main application and loads it with styleManager.loadStyleDeclarations(mystyle)

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Warren
This routine is very sweet. And very clever. So much better than using the objectUtil and Dict concept. Oleg, I can't thank you enough. I never would have went down this path. I really appreciate the code and especially the insight into a different method.. Warren - Original Messag

[flexcoders] transition in child component to trigger transition in parent

2010-07-01 Thread tex_learning_flex
I have an event in a component that triggers a transition. I now need the same event to initiate a transition in the component's parent. Any ideas on how to accomplish this? many thanks, Tex

[flexcoders] Symbian on Elips

2010-07-01 Thread gabriela.perry
Hi. First, sorry for posting a not-flex-question, but I thought that maybe here there are some elips users. So: did someone here managed to create self-signed apps for symbian using elips? Elips seems to create only sis files, which I cant install (i dont own a certificate of any kind) Thanks

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Warren
wow. You just impressed the heck out of me and made my head hurt. I'm going to have to chew on this for a bit. - Original Message - From: Oleg Sivokon To: flexcoders@yahoogroups.com Sent: Thursday, July 01, 2010 11:49 AM Subject: Re: [flexcoders] How to remove duplicate o

Re: [flexcoders] Multiple instances of a module with different styles

2010-07-01 Thread Alex Harui
A module is a factory for multiple instances of a class(es). Type selectors map to a class. Per-instance styles are often done with class selectors via the styleName property On 7/1/10 9:37 AM, "Haykel BEN JEMIA" wrote: Hi, I have a Flex 4 application that loads modules dynamically. T

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Oleg Sivokon
Actually, here it is: package { import flash.display.Sprite; import flash.utils.ByteArray; /** * ... * @author wvxvw */ public class RemoveDuplicatesThroughByteArray extends Sprite { private var _patternA:ByteArray = new ByteArray(); private var _patternB:ByteArray = new ByteArray(); public f

[flexcoders] Multiple instances of a module with different styles

2010-07-01 Thread Haykel BEN JEMIA
Hi, I have a Flex 4 application that loads modules dynamically. The modules load style files dynamically based on their configuration files, so that every module can load different style files. If multiple instances of a module are created (with multiple ModuleLoader instances having the same url)

Re: [flexcoders] Re: Could not resolve * to a component implementation.

2010-07-01 Thread Brian J. Ackermann
Here's what the problem was. I had originally had a file called "Foo.mxml" which contained a lot of ActionScript Code. I decided to create a new ActionScript FILE to contain that script code. I named the file "Foo.as", to indicate the correlation with the mxml file. Renaming this new as file to

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Oleg Sivokon
Duh! Gmail isn't the best place to write the code! :) var ba0:ByteArray = new ByteArray(); var ba1:ByteArray = new ByteArray(); var len:int; for ( ... ) { ba0.writeObject( ... ); ba1.writeObject( ... ); if (ba0.length !== ba1.length) // objects are different len = (ba0.length >>>

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Oleg Sivokon
var ba0:ByteArray = new ByteArray(); var ba1:ByteArray = new ByteArray(); var len:int; var tail:int; for ( ... ) { ba0.writeObject( ... ); ba1.writeObject( ... ); if (ba0.length !== ba1.length) // objects are different len = (ba0.length >>> 2) << 2; while (ba0.position < len)

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Oleg Sivokon
You can do pretty well with only two ByteArrays, var ba0:ByteArray = new ByteArray(); var ba1:ByteArray = new ByteArray(); var len:int; var tail:int; for ( ... ) { ba0.writeObject( ... ); ba1.writeObject( ... ); if (ba0.length !== ba1.length) // objects are different len = (ba0.len

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Warren
I haven't messed with ByteArrays. Are you saying to create a bytearray for each object in the array and use it as a key in the dict? - Original Message - From: Oleg Sivokon To: flexcoders@yahoogroups.com Sent: Thursday, July 01, 2010 9:50 AM Subject: Re: [flexcoders] How t

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Oleg Sivokon
If those are simple dynamic objects you can write them to ByteArray and compare them, it will be faster than using ObjectUtils. Everything in AS, except for numeric types (but not Date), strings and booleans are references, Array.indexOf() uses strict equality (compares references), so even if ther

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Warren
nope -- problem is that indexOf, contains, etc is not matching the object itself. seems to be matching references which means that everything is "unique" - Original Message - From: Oleg Sivokon To: flexcoders@yahoogroups.com Sent: Thursday, July 01, 2010 2:53 AM Subject: Re

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Warren
two or more separate instances with the same property values. I did get it to work using ObjectUtils.toString as the key for the dict object but i'm still not sure this is the best way... - Original Message - From: Alex Harui To: flexcoders@yahoogroups.com Sent: Thursday, Ju

[flexcoders] Arraycollections

2010-07-01 Thread b.martinelli
Hi, I looking for informations about extraction data from an arraycollection name {myTotals}. Data in arraycollection come from MySQL Database with ZendAMF. For example : I want something like that Thanks

[flexcoders] Re: Insert Record directly from dataGrid

2010-07-01 Thread flexcoderpt
Perhaps you should be a little more specific, but if i understand correctly, you should check Adobe references on item editors and renderers. Taht should give you a start into what you need (i think). --- In flexc

[flexcoders] Re: datagrid column sorting

2010-07-01 Thread valdhor
Are you expecting the datagrid to sort when first shown or when you click on the column header? The code you have will only be called when you click on the column header. To sort when first shown you will need a creation complete function where you would create a new sort and refresh. --- In f

[flexcoders] Re: flashlog.txt on Mac?

2010-07-01 Thread mitchgrrt
Thanks, copying mm.cfg to home directory does seem to work. It's not what's documented. - Mitch --- In flexcoders@yahoogroups.com, Peter Coppens wrote: > > I have mm.cfg (also) in my home dir. Seems to work fine. > > > Peter > > On 30 Jun 2010, at 16:57, mitchgrrt wrote: > > > How do I se

[flexcoders] Re: Could not resolve * to a component implementation.

2010-07-01 Thread valdhor
One other thing to check. Make sure you are not using a reserved name for your component. --- In flexcoders@yahoogroups.com, "turbo_vb" wrote: > > A couple things that you can check that might help: > > • Make sure that you have an import statement for the component > in the parent

[flexcoders] datagrid column sorting

2010-07-01 Thread Scott
Take this scenario: . [Bindable] public var acAppts:ArrayCollection = new ArrayCollection(); private function sortDate(itemA:Object, itemB:Object):int { return ObjectUtil.dateCompare( itemA.dtCreated,itemB.dtCreated); } ...

Re: [flexcoders] Re: datagrid checkbox selection

2010-07-01 Thread Akshar Kaul
i guess using the folowing renderer you can achieve you thing. Akshar Kaul On Thu, Jul 1, 2010 at 16:15, sunfast_kid wrote: > > > Thanks Akshar, but

[flexcoders] Re: datagrid checkbox selection

2010-07-01 Thread sunfast_kid
Thanks Akshar, but don't I need a click event on the checkbox to update the dataprovider? The problem is adding a click event to a dynamic checkbox in the datagrid. Richard --- In flexcoders@yahoogroups.com, Akshar Kaul wrote: > > add a boolean field to the data provider and link it to the ch

Re: [flexcoders] Re: httpservice.lastresult completes but theres no data.

2010-07-01 Thread Oleg Sivokon
E4X always reduces the kind of nodes to because first is redundant and ambiguous. It is not clear whether the first kind is in fact two nodes - an element node with a child text node with the value of empty string, or is it a single element node. It is also longer than needed, if it is meant to b

Re: [flexcoders] Re: httpservice.lastresult completes but theres no data.

2010-07-01 Thread Clark Stevenson
Thanks for your help Oleg, Appreciated. I think your solution makes sense although i think i also may have been uneducated with the root node. The server returns as And since data is the root node, it appears to be ignored (or an empty string like you say). will turn into

[flexcoders] New Datagrid announced...

2010-07-01 Thread Gregor Kiddie
Deepa announced that the Spark version of the Datagrid would be in Hero. Are we talking a direct replacement for the MX Datagrid, or the ADG? Let's hope it's more a direct replacement rather than redoing the ADG... that really was rubbish. Saying that, what additional feature are people

RE: [flexcoders] TimeZone issue

2010-07-01 Thread Keith Reinfeld
Ivan, > Is there any way we can get the Timezone selected by the user in the operating system from running Flex application? The short answer is no. > 720 minutes after UTC can mean "Auckland, Wellington" or "Fiji" The above is only true when "Auckland, Wellington" is not on Dayligh

Re: [flexcoders] Re: httpservice.lastresult completes but theres no data.

2010-07-01 Thread Oleg Sivokon
E4X prints the content of self closing nodes as an empty string (if it's not the root node). You may want to use toXMLString() to print the structure of the node.

[flexcoders] Re: httpservice.lastresult completes but theres no data.

2010-07-01 Thread Clark Stevenson
It seems e4x is the problem. If i change the httpservice class to "xml" The lastResult property is shown. There must be some special rule where this isnt acceptably in e4x: It only shows under the xml format. Why is this? Clark. On 1 July 2010 00:23, Clark Stevenson wrote: > > Hi everyon

Re: [flexcoders] How to remove duplicate objects from an array of objects

2010-07-01 Thread Oleg Sivokon
var i:int = myArray.length; var obj:Object; while (i--) { obj = myArray[i]; if (myArray.indexOf(obj) !== myArray.lastIndexOf(obj)) myArray.splice(i, 1); } Anything like this?

[flexcoders] Re: Issue related to Drag and Drop rows between Datagrid when using ItemRenderer...

2010-07-01 Thread shahjitesh
I really appreciate for your response. At least I see some hope to get the issue resolved. I saw very interesting articles on your blog but i would appreciate, if you can direct me to look at specific example related to my issue. I just changed creationComplete to dataChange and immediately sta