-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
As I am working through converting one of my applications to Flex/FMS
I have one small issue which does not produce the same results for the
1st person that enters the application. Within my viewStack I have a
textArea and a List which is being populated from information that is
retrieved from a Remote Shared Object.

When I run the application from FlexBuilder sometimes I get an
TypeError: Error #1009: Cannot access a property or method of a null
object reference which occurs on line 163 of my application. When I
get this error message, then the mx:List is populated with all
usernames of the users who are connected to the application and the
mx:TextArea is blank. If I do not get the Error Message then the
mx:List box does not have any usernames within it however the
mx:TextArea has the correct information within it.

The mx:List has a dataProvider of {chatPeopleListDP} and a labelField
of UserName

below is the code sections:

[Bindable] private var chatPeopleListDP:Array = new Array();


private function NetStatusHandler(event:NetStatusEvent):void {
    switch (event.info.code) {
      case "NetConnection.Connect.Success":
        HomeworkChatViewStack.selectedChild=ChatWindow;
        UsersListSO = SharedObject.getRemote("ChatUsers",
ChatServer_nc.uri, false);
        UsersListSO.addEventListener(SyncEvent.SYNC, SyncUserList);
        UsersListSO.connect(ChatServer_nc);

        ChatHistorySO = sharedObject.getRemote("ChatHistory",
ChatServer_nc.uri, false);
        ChatHistorySO.addEventListener(SyncEvent.SYNC,
SyncClientMsgHistory);
        ChatHistorySO.connect(ChatServer_nc);
        break;
      {Other Case Statements for NetConnection.Connect.Rejected,
Closed, Failed}
}

private function SyncClientMsgHistory(event:SyncEvent):void {
    TextChatWindow.htmlText += event.target.data['ChatSession'];
}

private function SyncUserList(event:SyncEvent):void {
    var tempList:Object = new Object();
    for (var i:String in event.target.data) {
        tempList.UserName = event.target.data[i]['UserName'];
       tempList.IP = event.target.data[i]['ip'];
       chatPeopleListDP.push(tempList);
    }
}


Can anyone see why only one of these Sync Method is executing when a
user enters the application.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iQEVAwUBRxTpWnnjLHMPlkANAQLJMgf+MeHdle3N9p/KRvOENghZgzMcRtB92GWt
3xfWo6UH5hxIOvRzmJomXJXzrUESqn56Xp53ezBW4syPzuMXG2DrVGUNWdglHeWy
q0rRSKHAp+PpxNl1AYnNO3mDhV8cYeKtnLGONyaRcXADqplcKVVCwXvGqK+fA807
IGheQPXzT2Wp6soe3+Oc3fwfpVNqTjwQp6aC6Ayv8GBO3ihfgn/yESHkuCuIUjkk
3wHVgUTIiUdu2lGdAp8OIblHJ/5+Kw1HAfg1eURwvoI+az6Yroq35kvMeVrTepiP
pRVJ6SqEccr0fBOGKmZo9/ojCkaQoE2gWX4X/Elle/y80473UAwNxA==
=ISl/
-----END PGP SIGNATURE-----


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4683
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to