on 03-12-2010 2:42 PM
Hi @all!
How can change the values of an ArrayCollection during initialization?
Here is my code-snippet(this is just an example):
[Bindable]
public var dataSource:ArrayCollection = new ArrayCollection();
public function initApp():void{
FlashIsland.register(this);
showMessage();
}
public function showMessage():void{
for (var j:uint = 0; j < dataSource.length; j++) {
Alert.show(dataSource[j].ID;
}
}
The error message is: Error #1009: Cannot access a property or method of a null object reference
Is it posible to access a dataSource with a timer-method? Or how can I change the properties of a dataSource without using click-Events?
Thanks for your help,
Dirk
Edited by: D.Sorgatz on Mar 12, 2010 3:48 PM
Edited by: D.Sorgatz on Mar 12, 2010 3:58 PM
by the time your showMessage() called the datasource is empty.
data passed to flash island from web dynpro is asynchronous in nature.
create a public set and get functions for the variable dataSource in the set Function call showMessage() method
http://www.adobe.com/devnet/sap/xml/popup_vid_07.html
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.