Re: Rookie ArrayCollection Question

2016-09-28 Thread Justin Mclean
Hi, > So I am setting the dataArrayCollection in my Comps component to the values > in my compArrayCollection in the main app. What is weird though is that > whenever I change any values in the dataArrayCollection, they are also > changing back in my compArrayCollection back in the main app. Not

Re: Rookie ArrayCollection Question

2016-09-28 Thread Deepak MS
var arr:Array = ObjectUtil.copy(compArrayCollection.toArray()) as Array; Comps.dataArrayCollection = new ArrayCollection(arr); On Thu, Sep 29, 2016 at 12:01 PM, Deepak MS wrote: > try this: > > Comps.dataArrayCollection = (ObjectUtil.copy(compArrayCollection.toArray()) > as Array); > > On Thu, S

Re: Rookie ArrayCollection Question

2016-09-28 Thread Deepak MS
try this: Comps.dataArrayCollection = (ObjectUtil.copy(compArrayCollection.toArray()) as Array); On Thu, Sep 29, 2016 at 11:41 AM, bilbosax wrote: > Thanks again for the help Justin. Have another question for you regarding > ArrayCollections. My main app loads an ArrayCollection from a servic

Re: Rookie ArrayCollection Question

2016-09-28 Thread bilbosax
Thanks again for the help Justin. Have another question for you regarding ArrayCollections. My main app loads an ArrayCollection from a service. I then pass it to an ArrayCollection in a component by a simple assignment: Comps.dataArrayCollection = compArrayCollection; So I am setting the data

Re: Rookie ArrayCollection Question

2016-09-28 Thread Justin Mclean
Hi, Helps if I read all the email. Code wise I would just do this: origArray = compArrayCollection.source; for each(var o:Object in origArray) { o.newProperty = true; } > My compArrayCollection is populated by a PHP service and I think that is why > I am having trouble with this. Corre

Re: Rookie ArrayCollection Question

2016-09-28 Thread Justin Mclean
Hi, > var origArray:Array = new Array(); > var newArray:Array = new Array(); > > origArray = compArrayCollection.source; > for each(var o:Object in origArray) { > o.newProperty = true; > newArray.push(o); > } No need for the push. All that does is duplicate the original object at the

Re: Rookie ArrayCollection Question

2016-09-28 Thread Kyle McKnight
You can only add new properties to a class if it is declared as dynamic. You can also add new properties to generic Objects. You might have to give more info as to what "CustomDatatype" is and how it's created. Kyle McKnight Senior UI Engineer - Accesso 602.515.1444 (M) On Wed, Sep 28, 2016 at 9

Re: Rookie ArrayCollection Question

2016-09-28 Thread Justin Mclean
Hi, Is it possible to add the extra element when initially crating the 2D array collection. If the AC help a named object then all that would be required is adding a new property to that object. > for(i=0; irecord = src.getItemAt(i) as ArrayCollection; >record.addItem( new MyElement() )

Re: Rookie ArrayCollection Question

2016-09-28 Thread bilbosax
If I understand correctly, your "addItem" method will only add a record to the bottom of the arrayCollection, I don't believe that it will add a property to the end of each record. I am looking for something like this I think, where compsArrayCollection is my original dataset: var origArray:Array

Re: Rookie ArrayCollection Question

2016-09-28 Thread Nemi
Lets say src is 2d collection, is this what you want: var record:ArrayCollection; for(i=0; ihttp://apache-flex-users.246.n4.nabble.com/Rookie-ArrayCollection-Question-tp13649p13650.html Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Rookie ArrayCollection Question

2016-09-28 Thread Kyle McKnight
Are you meaning you have an array of arrays? As far as I know you'd just create a loop to go through them and add it. Because of the number of items in the array and the size of the data you're working with you might have to do it in chunks. Pass a start and end index into a function to run thoug

Rookie ArrayCollection Question

2016-09-28 Thread bilbosax
So I have a 2D ArrayCollection that has about 40k records in it with about 40 elements in each record. I need to add an element or property to the end of each record so that each record now contains 41 elements, but have no idea how to do this. Any suggestions? -- View this message in context:

Re: Custom skin based on SDK version

2016-09-28 Thread Kyle McKnight
Thanks I'll take a look at themes! On Sep 28, 2016 1:26 PM, "Alex Harui" wrote: > > > On 9/28/16, 10:07 AM, "Kyle McKnight" wrote: > > >So I'd like to conditionally create the skin based on which SDK is being > >used to compile. Is that possible? > > It is probably "possible" to have a single f

Re: Custom skin based on SDK version

2016-09-28 Thread Alex Harui
On 9/28/16, 10:07 AM, "Kyle McKnight" wrote: >So I'd like to conditionally create the skin based on which SDK is being >used to compile. Is that possible? It is probably "possible" to have a single file that does different things based on version. I think you'd have two copies of the skin ele

Re: Custom skin based on SDK version

2016-09-28 Thread Kyle McKnight
Ok so as a specific example in my case, I'd like to make a skin for the DataGrid that works for both versions 4.9 and below but also 4.10 and above. In 4.10, The DataGridSkin in the SDK was changed to have extra components but it was never documented. I'd like to make a single skin that would succ

Re: Custom skin based on SDK version

2016-09-28 Thread OK
kamcknig wrote > I want to change the MXML in the skin file based upon whether we are > working in the old adobe 4.6 or the new apache 4.15. Probably I don't understand your question but you could just replace the origin SDK skins by custom skins. Could you try to specify more precisely what you'd

Re: Custom skin based on SDK version

2016-09-28 Thread Kyle McKnight
Isn't that what I'm asking how to do? Design a skin that acts differently based on SDK version. Or has different elements based on SDK version. Kyle McKnight Senior UI Engineer - Accesso 602.515.1444 (M) On Wed, Sep 28, 2016 at 9:24 AM, Scott Mathewson wrote: > Would you not use skins and make

Re: Custom skin based on SDK version

2016-09-28 Thread Scott Mathewson
Would you not use skins and make the design conditional ? Sent from my iPhone > On 28 Sep 2016, at 12:33, Kyle McKnight wrote: > > Is there a standard way to edit a skin based upon the SDK version? > > I want to change the MXML in the skin file based upon whether we are > working in the old ad

Custom skin based on SDK version

2016-09-28 Thread Kyle McKnight
Is there a standard way to edit a skin based upon the SDK version? I want to change the MXML in the skin file based upon whether we are working in the old adobe 4.6 or the new apache 4.15. Is this possible and if so can someone point me in the right direction? Kyle McKnight Senior UI Engineer -