Hi All,

Can someone help me understand the useage of the implementation of the
MXMLObject in MXML componen class based in Actionscript?

I've been trying since this morning but the hardest part is finding
documentation on the subject ( I waen to livedocs, MM site & documentation that
came with flex/fb first ) & I still can't find the info I'm looking for.


I'm using:
class MyClassName implements mx.core.MXMLObject
{
//my constructor, member, pub/priv code here.
}

My problem is I don't really know what are the proper members, functions, etc.
to use when I'm building a Codless mxml document and a AS Class controler for
that mxml document.

I'm trying to build a class that adds/removes children from a viewstack &
navigate through it too. all w/ simple click functions.

my code is posted below, can someone give me a little more insight?

thanks,
-Art

===================================================
CODE:
===================================================
// IciPostItNotes class
class IciPostItNotes implements mx.core.MXMLObject
{
// Arrays that receive data to populate component
public var iciPostItNotesArray:Array;   // receives array of multible notes
w/properties for each note
public var iciQuickNotesArray:Array;    // ignore this propery
public var iciNotesArrayHasData:Boolean; // indicates if iciPostItNotesArray
has data or not

// Invisible Note properties
public var iciCurrentNoteInView:Number; // gets current selected viewstack
child
public var iciNotesAreEditableEditable:Boolean; // indicates if note is
editable or not
public var iciNotesArrayChangeFlag:Boolean;     // indicates if note array has
changed

// Visible Note Properties
public var iciNotesID:Number; // note id #
public var iciNoteTitle:String; // Note title ( noteAuthor+noteDate )
public var iciNoteAuthor:String // Author of note
public var iciNoteDate:Date; // Date note was created
public var iciNoteIndex:String; // [n] of (sum of childern) displays like: 1 of
5
public var iciNoteText:String; // contains note text


public var view;

function initialized(doc : Object, id: String) : Void
{
view = doc;
}

function setupListener() : Void
{
view.add_pb.addEventListner("click", this);
view.remove_pb.addEventListner("click", this);
view.edit_pb.addEventListner("click", this);

view.first_pb.addEventListner("click", this);
view.previous_pb.addEventListner("click", this);
view.next_pb.addEventListner("click", this);
view.last_pb.addEventListner("click", this);

view.quickNotes_cb.addEventListner("change", this);
}

public function click(event_obj:Object):Void
{
switch(event_obj.target)
{
case add_pb:
view.iciNotes_ViewStack_vs.createChild."smth" // Need to set up code
trace("create child in viewstack");
break;

case remove_pb:
view.iciNotes_ViewStack_vs.destroyChild."smth" // Need to set up code
trace("do child in viewstack");
break;

case edit_pb:
view.iciNotes_PostItNotes_txt.editable = true;
trace("do edit current tf in viewstack");
break;

case first_pb:
view.iciNotes_ViewStack_vs.selectedIndex = 0;
trace("goto first child in view stack");
break;

case previous_pb:
view.iciNotes_ViewStack_vs.selectedIndex = "previous"; // Need to set up
code
trace("goto previous child in viewstack");
break;

case next_pb:
view.iciNotes_ViewStack_vs.selectedIndex = "next"; // Need to set up code
trace("goto next child in viewstack");
break;

case last_pb:
view.iciNotes_ViewStack_vs.selectedIndex = "last"; // Need to set up code
trace("goto last child in viewstack");
break;
}
}

}





Reply via email to