Questions tagged [arraycollection]

The ArrayCollection class is a wrapper class that exposes an Array as a collection in Flex which can be accessed and manipulated. Use this tag for questions related to arraycollection.

The ArrayCollection class is a wrapper class that exposes an Array as a collection that can be accessed and manipulated using the methods and properties of the ICollectionView or IList interfaces. Operations on a ArrayCollection instance modify the data source; for example, if you use the removeItemAt() method on an ArrayCollection, you remove the item from the underlying Array.

Reference

340 questions
2
votes
1 answer

doctrine2 find methods returns array instead of ArrayCollection

I have a problem with Doctrine2 find methods. They all return as array instead of ArrayCollection. Is there any away to force them to return a ArrayCollection? I remember this also happened with a custom repository query. I had to do: new…
brpaz
  • 3,618
  • 9
  • 48
  • 75
2
votes
2 answers

Watching an ArrayCollection's length property in AS3/Flex

I would like to put an eventListener on an ArrayCollection's length proprety, but I don't know how to go about this. I want to do this because I only want code to execute when a certain number of things are in a certain ArrayCollection. I want Flex…
jeffcook2150
  • 4,028
  • 4
  • 39
  • 51
2
votes
1 answer

Embedded forms of inherited doctrine's entities

I'm building a form generator using Symfony 2.2 with Doctrine. The base principle is that the user create a new form by filling its name and selecting the widgets he'd likes to have in a select menu. We can think of WidgetInputText, WidgetSelect,…
2
votes
1 answer

ArrayCollection of objects extending an abstract MappedSuperClass

I'm building a form generator using Symfony 2.2 with Doctrine. My entities are the following: Form WidgetText WidgetSelect All my widgets extend the following class: /** * Widget * * @ORM\MappedSuperclass */ abstract class Widget { /** …
DevAntoine
  • 1,932
  • 19
  • 24
2
votes
0 answers

Doctrine2, Check entity in an Arraycollection with queryBuilder

I have just a simple question about the query builder but I haven't find any answers... I make a filter for product's list and I want to check if my selected attributes are in the arrayCollection "attributes" of my Items ( items of products…
2
votes
1 answer

arraycollection error in flex4.6

I'm having difficulty passing json to a datagrid. I get the following error: TypeError: Error #1034: Type Coercion failed: cannot convert mx.collections::ArrayCollection@bc292a9 to Array. at Function/()[C:\Users\Birger\Dropbox\Rich…
2
votes
1 answer

Validating arraycollection in symfony2

I'm new to Symfony2 + Doctrine and I´m looking for a way to validate the uniqueness in an Arraycollection. May be it is already answered question but I can´t figure how resolve it. I`ve a Relevamientosserviciosprestador class with a…
2
votes
1 answer

Doctrine2 findby on a Many-to-One mapping

I have two entities with a Unidirectional Many-to-One mapping. Here's Product: use Doctrine\Common\Collections\ArrayCollection; /** * @Entity * @Table(name="Product") *…
Michael De Keyser
  • 787
  • 1
  • 17
  • 45
1
vote
1 answer

Symfony2 Relation two entity, arraycollection

I have created 2 entities User and Photo Now I want to create one-to-many relation. Suppose I have this code in the User entity class: // User.php /** * @ORM\OneToMany(targetEntity="Photo", mappedBy="user") */ protected $photos; …
Mark Cibor
  • 2,737
  • 4
  • 21
  • 23
1
vote
4 answers

possible to display an arrayCollection of Sprites in a List component?

I have an arrayCollection of objects that extend Sprite, and have bitmaps within them. I want to display these in a list (or some other component that would allow a user to scroll through them, and see their associated data.) When I do:…
Martholomew
  • 89
  • 1
  • 8
1
vote
1 answer

Merge data into filtered ArrayCollection (maybe by using IViewCursor or localIndex?)

I have a Flex question, which isn't as easy as it seems at first. At least I'm struggling since 1 week with it. I have prepared a test case and a screenshot. The question is: how do you merge data (coming repeatedly from server) into a filtered…
Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
1
vote
1 answer

Sending ArrayCollections via P2P Flex

I have a question regarding P2P with flex. When passing data between two applications using P2P. I get the following error: warning: unable to bind to property 'piece' on class 'Object' (class is not an IEventDispatcher) I've spent a few days…
jao
  • 1,194
  • 1
  • 11
  • 17
1
vote
2 answers

Actionscript 3: reordering an array collection based on another array collection hierarchy

I have an array, crewPositionsAC that contains a list of position abreviatations - EP, PR, DR, WR, and so on. These positions are read in through an XML file each time my flex application loads. Also being populated from an XML is a project. …
Brds
  • 1,035
  • 3
  • 17
  • 37
1
vote
0 answers

Symfony/Doctrine ambiguity's regarding to ArrayCollection usage

I have two approaches and I need your expertise on the matter... Let's say we call a certain API and store every request data into RequestEntity. And let's say that API call we made initiates some long-run process on a remote server. So as to have…
1
vote
1 answer

Memory difference between arraycollection and dictionary in Flex

To optimize my application dictionary is a better option or arraycollection where both satisfy my needs. Please let me know. Thank you in advance.
Kishor Kumar
  • 543
  • 1
  • 12
  • 33