Daniel, you made my week! That was it!!! AAAAAAAAAAAAAAAAAAAHHH :-)
On 10/24/07, Daniel Freiman <[EMAIL PROTECTED]> wrote: > > Ok, I'm stretching into unknown territory here, so if Alex says I'm way > off just ignore me, but here's my thoughts: > > You have the line: > _cables = new ArrayCollection( k.toArray() ); > > This means that you now have two identical ArrayCollections. The internal > arrays are different, but the data inside those arrays might be the same. > Since the class of the values of the arrays are bindable, editing the values > in the array might effect both ArrayCollections. I could see something > going on wrong with. I'm not really sure how to test this theory except for > making an explicit deep copy function instead of using toArray(). That > might be more time than it's worth considering that this is guesswork right > now. > > - Dan Freiman > > On 10/24/07, Webdevotion <[EMAIL PROTECTED]> wrote: > > > > Daniel and Alex, I am truely thankfull for your help! > > > > This is the complete code: > > > > package be.webdevotion.connguide.model > > { > > [Bindable] > > public class ConnectorModel > > { > > public var id : String; > > public var color : Number; > > public var image : String; > > public var alt : String; > > public var minimum : Number; > > public var maximum : Number; > > public var value : Number = 0; > > public var glossaryID : Number = -1; > > public var source : String = ""; > > public function ConnectorModel ( o : Object = null ) : void > > { > > if( o != null ) > > { > > for( var prop : String in o ) > > { > > if( this.hasOwnProperty( prop ) ) > > { > > this[ prop ] = o[ prop ]; > > } > > } > > } > > } > > public function toString () : String > > { > > var s : String = ""; > > for( var prop : String in this ) > > { > > s+= prop + ": " + this[ prop ] + " / "; > > } > > return s; > > } > > } > > } > > > > > > > > > > > > > > On 10/24/07, Daniel Freiman <[EMAIL PROTECTED]> wrote: > > > > > > What is connectorModel? Does it implement IEventDispatcher? Does it > > > throw PropertyChangeEvent or have any Bindable properties? Some of these > > > questions are a shot in the dark. > > > > > > > > > - Dan Freiman > > > > > > On 10/24/07, Webdevotion < [EMAIL PROTECTED]> wrote: > > > > > > > > > > > > If found that I do not get the error when I leave this > > > > filterfunction out: > > > > > > > > public function set cables ( k : ArrayCollection ) : void > > > > > > > > { > > > > _cables = new ArrayCollection( k.toArray() ); > > > > //_cables.filterFunction = filterCables; // generates error > > > > // _cables.refresh(); > > > > } > > > > > > > > private function filterCables( item : ConnectorModel ) : Boolean > > > > { > > > > return item.value > 0; > > > > } > > > > > > > > > > > > > > > > > > > > On 10/24/07, Alex Harui <[EMAIL PROTECTED] > wrote: > > > > > > > > > > > > Are you doing a reset or remove? Are you removing rows that are > > > > > > locked? > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > *From:* [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] > > > > > > * On Behalf Of *Webdevotion > > > > > > *Sent:* Wednesday, October 24, 2007 7:43 AM > > > > > > * To:* [EMAIL PROTECTED] ups.com > > > > > > *Subject:* Re: [Flexcoders] Error from > > > > > > mx\controls\listClasses\ListBase.as > > > > > > > > > > > > > > > > > > > > > > > > That's a good question ... The application is quite big, I'll > > > > > > have to look into that. > > > > > > But yes, it occurs when I go back some screens and reset the > > > > > > dataprovider. > > > > > > > > > > > > Thanks for that fresh insight. > > > > > > > > > > > > > > > > > > On 10/24/07, *Daniel Freiman* < [EMAIL PROTECTED]> wrote: > > > > > > > > > > > > This appears to be happening when you remove an item from the > > > > > > dataProvider. Is there anything unique about the dataProvider or > > > > > > how you're > > > > > > removing the item from the dataProvider? > > > > > > > > > > > > - Dan Freiman > > > > > > > > > > > > On 10/24/07, * Webdevotion * < [EMAIL PROTECTED] > wrote: > > > > > > > > > > > > Hey everyone, > > > > > > > > > > > > I've been hunting a bug down for a while now in a Flex project: > > > > > > > > > > > > *This is the generated error: * > > > > > > TypeError: Error #1009: Cannot access a property or method of a > > > > > > null object reference. > > > > > > *at mx.controls.listClasses::ListBase/collectionChangeHandler() > > > > > > [C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\listClasses\ListBase.as:6496] > > > > > > * > > > > > > at > > > > > > mx.controls.listClasses::TileBase/collectionChangeHandler()[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\listClasses\TileBase.as:1981] > > > > > > at flash.events::EventDispatcher/dispatchEventFunction () > > > > > > at flash.events::EventDispatcher/dispatchEvent() > > > > > > at > > > > > > mx.collections::ListCollectionView/dispatchEvent()[C:\dev\flex_201_gmc\sdk\frameworks\mx\collections\ListCollectionView.as:833 > > > > > > ] > > > > > > at > > > > > > mx.collections::ListCollectionView/moveItemInView()[C:\dev\flex_201_gmc\sdk\frameworks\mx\collections\ListCollectionView.as:1316 > > > > > > ] > > > > > > at > > > > > > mx.collections::ListCollectionView/handlePropertyChangeEvents()[C:\dev\flex_201_gmc\sdk\frameworks\mx\collections\ListCollectionView.as:1124] > > > > > > > > > > > > > > > > > > > > > > > > at > > > > > > mx.collections::ListCollectionView/listChangeHandler()[C:\dev\flex_201_gmc\sdk\frameworks\mx\collections\ListCollectionView.as:1042 > > > > > > ] > > > > > > at flash.events::EventDispatcher/dispatchEventFunction () > > > > > > at flash.events::EventDispatcher/dispatchEvent () > > > > > > at > > > > > > mx.collections::ArrayList/internalDispatchEvent()[C:\dev\flex_201_gmc\sdk\frameworks\mx\collections\ArrayList.as:518] > > > > > > > > > > > > at > > > > > > mx.collections::ArrayList/itemUpdateHandler()[C:\dev\flex_201_gmc\sdk\frameworks\mx\collections\ArrayList.as:544] > > > > > > at flash.events::EventDispatcher/dispatchEventFunction() > > > > > > at flash.events::EventDispatcher/dispatchEvent() > > > > > > > > > > > > > > > > > > *The rule that throws the error * > > > > // RULE 6493 in ListBase.as > > > > //( found at : C:\Program Files\Adobe\Flex Builder 2 Plug-in\Flex > > > > SDK 2\frameworks\source\mx\controls\listClasses ) > > > > // make sure we've generated rows for the actual data > > > > // at startup time we might just have blank rows > > > > if (listItems.length && listItems[lockedRowCount].length ) > > > > > > > > *Screenshot* > > > > For those interested, this is the dump of listItems: screenshot > > > > <http://content.screencast.com/media/d25bbc5a-9b36-42ee-8393-b2e2f48929f8_8373bf5e-323c-46b9-94a3-68ac1e9fbb8f_static_0_0_image.png> > > > > > > > > > > > > Any thought are greatly appreciated! > > > > Bram > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >