powered by Jive Software

XIFF Whiteboard


I am building an XIFF chat client with a whiteboard for a school networking project and I’ve run into some problems utilizing the Path class serializeSegments() method. Each time it attempts to serialize I get the following error:

Error #1009: Cannot access a property or method of a null object reference.
Fault, serializeSegments() at Path.as:124

I am trying the following simple example to construct the message as stated in a previous post, however, I made a modification since it would not compile using the WhiteboardExtension object as a parent XMLNode for p.serialize( wb );

// Construct a XIFF message
var message:Message = new Message(whiteboardEvent.getJID(), null, null, null, Message.CHAT_TYPE);
var a:XMLNode = new XMLNode(1, null);
var wb:WhiteboardExtension = new WhiteboardExtension();

        var p:Path = new Path();
        p.addPoints(5, 5, 7, 7);



If anyone could point out anything I might be doing wrong or point me to a more concrete example it would be greatly appreciated.

Thank you,


Alas, I’ve still never toyed with the whiteboarding extension. It’s on my to-do list for example building though. Let me know if you get anywhere. I will try to get to it in the coming weeks.

I have seemed to have fixed the error with serializeSegments(). It turns out there was a bug with lastSeg being undefined in Path.as so I initialized it as lastSeg = seg; before it checks the segment values in the for loop. Could you please confirm that this would be an appropriate solution.

The message sends and now I am attempting grab the extension on the other end but I’m a little lost on how to go about it. Would you have any examples of how you go about grabbing extensions from messages?

Thank you,