zmx-cvs-commit Mailing List for ZMX Framework (Page 3)
Brought to you by:
sspickle
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(7) |
Aug
(19) |
Sep
(1) |
Oct
(4) |
Nov
(9) |
Dec
(4) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
|
Feb
(4) |
Mar
(7) |
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
(6) |
Aug
(3) |
Sep
|
Oct
(12) |
Nov
(3) |
Dec
|
| 2005 |
Jan
(4) |
Feb
(6) |
Mar
(9) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(4) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Steve S. <ssp...@us...> - 2004-10-29 11:45:20
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19673 Modified Files: Tag: refactor_zmx_app_clip_branch ZMX_XML.as Log Message: added target_id check to onAsync sender Index: ZMX_XML.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_XML.as,v retrieving revision 1.34.2.4 retrieving revision 1.34.2.5 diff -C2 -d -r1.34.2.4 -r1.34.2.5 *** ZMX_XML.as 13 Aug 2004 16:58:46 -0000 1.34.2.4 --- ZMX_XML.as 29 Oct 2004 11:44:30 -0000 1.34.2.5 *************** *** 465,474 **** var argObj = loads( theXML ) // get the arguments... if (argObj.methodCall) { ! var funcResult = this.invokeMethod( argObj, this.parentObj.proxy ); ! var theReply = Arg_To_XML({sender_id:this.parentObj.config.sender_id, result:funcResult}); ! ! if (theReply != null) { ! this.send( theReply ); } } else --- 465,490 ---- var argObj = loads( theXML ) // get the arguments... if (argObj.methodCall) { ! if (argObj.params[0].target_id != null) { ! if (argObj.params[0].target_id == this.parentObj.config.sender_id) { ! var funcResult = this.invokeMethod( argObj, this.parentObj.proxy ); ! var theReply = Arg_To_XML({sender_id:this.parentObj.config.sender_id, result:funcResult}); ! ! if (theReply != null) { ! trace("Sending non null reply back.."); ! this.send( theReply ); ! } ! } ! } ! else ! { ! var funcResult = this.invokeMethod( argObj, this.parentObj.proxy ); ! var theReply = Arg_To_XML({sender_id:this.parentObj.config.sender_id, result:funcResult}); ! ! if (theReply != null) { ! trace("Sending non null reply back.."); ! this.send( theReply ); ! } } + } else *************** *** 476,480 **** if (argObj != null) { if (argObj.params.isFault == null) { ! this.parentObj.proxy.onAsync( argObj.params ); } else { --- 492,504 ---- if (argObj != null) { if (argObj.params.isFault == null) { ! trace("got some xml.... " + _global.serializeObject( argObj.params[0] )); ! if (argObj.params[0].target_id != null) { ! if (argObj.params[0].target_id == this.parentObj.config.sender_id) { ! this.parentObj.proxy.onAsync( argObj.params ); ! } ! } ! else { ! this.parentObj.proxy.onAsync( argObj.params ); ! } } else { |
|
From: Steve S. <ssp...@us...> - 2004-10-29 11:44:48
|
Update of /cvsroot/zmx/zmx/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19673/examples Modified Files: Tag: refactor_zmx_app_clip_branch asyncTest.fla Log Message: added target_id check to onAsync sender Index: asyncTest.fla =================================================================== RCS file: /cvsroot/zmx/zmx/examples/asyncTest.fla,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 Binary files /tmp/cvsm0qcR2 and /tmp/cvsT9XdRO differ |
|
From: Steve S. <ssp...@us...> - 2004-10-04 12:39:53
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12060 Modified Files: Tag: refactor_zmx_app_clip_branch ZMX_Application.as Log Message: forget screen cache optimization.. too tricky Index: ZMX_Application.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_Application.as,v retrieving revision 1.19.4.4 retrieving revision 1.19.4.5 diff -C2 -d -r1.19.4.4 -r1.19.4.5 *** ZMX_Application.as 18 Jul 2004 05:03:40 -0000 1.19.4.4 --- ZMX_Application.as 4 Oct 2004 12:39:43 -0000 1.19.4.5 *************** *** 128,145 **** _global.gTrace("comparing current screen URL: " + this.currScrURL + " with new screenURL: " + screenURL); ! if (this.currScrURL != screenURL) { ! // ! // This is a different screen! ! // ! this.spinHourGlass(); ! this.notifyWait("screen",screenURL); ! load_mc.loadMovie(screenURL); ! } else { ! // loading same screen again.. ! // simulation load by calling 'init' and 'onLoad' for the existing screen. ! // ! this.currentScreen.init(); // force a reload/reset of screen UI. ! this.currentScreen.onLoad(); // force a reload/reset of screen UI. ! } } } --- 128,134 ---- _global.gTrace("comparing current screen URL: " + this.currScrURL + " with new screenURL: " + screenURL); ! this.spinHourGlass(); ! this.notifyWait("screen",screenURL); ! load_mc.loadMovie(screenURL); } } |
|
From: Steve S. <ssp...@us...> - 2004-08-30 18:15:19
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22300 Modified Files: Tag: refactor_zmx_app_clip_branch ZMXScreenClass.as Log Message: fixed up sendcheckboxes to be more consistent. Index: ZMXScreenClass.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMXScreenClass.as,v retrieving revision 1.30.4.2 retrieving revision 1.30.4.3 diff -C2 -d -r1.30.4.2 -r1.30.4.3 *** ZMXScreenClass.as 18 Jul 2004 05:03:40 -0000 1.30.4.2 --- ZMXScreenClass.as 30 Aug 2004 18:15:07 -0000 1.30.4.3 *************** *** 419,425 **** var cBoxes = this.getCheckboxes(comp, comp.needsChecks); ! var other = this.getCompProxy( comp ); ! this.doSendXML(comp, {objects:cBoxes, other:other}); } --- 419,425 ---- var cBoxes = this.getCheckboxes(comp, comp.needsChecks); ! var screenObj = this.getCompProxy( comp ); ! this.doSendXML(comp, {checkboxes:cBoxes, screenObject:screenObj}); } |
|
From: Steve S. <ssp...@us...> - 2004-08-13 16:58:57
|
Update of /cvsroot/zmx/zmx/InstantXML In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv947/InstantXML Modified Files: Tag: refactor_zmx_app_clip_branch IXML_Client.py Log Message: safe Index: IXML_Client.py =================================================================== RCS file: /cvsroot/zmx/zmx/InstantXML/IXML_Client.py,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** IXML_Client.py 19 Apr 2004 12:30:51 -0000 1.1 --- IXML_Client.py 13 Aug 2004 16:58:46 -0000 1.1.2.1 *************** *** 43,46 **** --- 43,48 ---- class XML_Monitor( Thread ): + running = 0 + def __init__(self, client): Thread.__init__(self) *************** *** 51,61 **** wait on xml... """ self.currData = '' while 1: try: data = self.client.sck.recv(BUFSIZE) # collect a chunk of the response if not data: break # if we got an empty string, that's all there is. except timeout: ! continue self.currData += data --- 53,69 ---- wait on xml... """ + self.running = 1 self.currData = '' while 1: try: + #print "listening for data.. " data = self.client.sck.recv(BUFSIZE) # collect a chunk of the response if not data: break # if we got an empty string, that's all there is. except timeout: ! #print "got timeout interrupt... ", self.running ! if self.running: ! continue ! else: ! break self.currData += data *************** *** 70,73 **** --- 78,83 ---- print "Ack.. can't handle:", item + #print 'Finishing loop' + CONNECT_STRUCT = {'sender_id': 'c1: IXML_Client'} *************** *** 107,110 **** --- 117,124 ---- pass + def stop(self): + #print "setting running to false.. " + self.readThread.running = 0 + from time import sleep *************** *** 128,137 **** client.connect() while 1: ! d = client.get() ! if d: ! print '\n --- item --- \n',d ! else: ! sleep(0.1) ! if __name__=='__main__': --- 142,155 ---- client.connect() while 1: ! try: ! d = client.get() ! if d: ! print '\n --- item --- \n',d ! else: ! sleep(0.1) ! except: ! #print "Got interrupt.. calling stop" ! client.stop() ! break if __name__=='__main__': |
|
From: Steve S. <ssp...@us...> - 2004-08-13 16:58:54
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv947 Modified Files: Tag: refactor_zmx_app_clip_branch ZMX_XML.as Log Message: safe Index: ZMX_XML.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_XML.as,v retrieving revision 1.34.2.3 retrieving revision 1.34.2.4 diff -C2 -d -r1.34.2.3 -r1.34.2.4 *** ZMX_XML.as 18 Jul 2004 05:03:40 -0000 1.34.2.3 --- ZMX_XML.as 13 Aug 2004 16:58:46 -0000 1.34.2.4 *************** *** 192,195 **** --- 192,196 ---- this.callDepthLimit = 10; // if we can't communicate after 10 tries... forget it. this.intervalDelay = 100; // how many milliseconds to wait for the next try? + this.configured = false; this.proxy = proxy; *************** *** 244,247 **** --- 245,249 ---- } else { + this.configured = true; this.proxy.trace("XMLRPC Config: " + _global.serializeObject( this.config )); //this.proxy.trace("System Config: " + _global.serializeObject( System.capabilities )); *************** *** 257,260 **** --- 259,264 ---- this.config[attr] = result[attr]; } + + this.configured = true; this.proxy.configSuccess(); this.proxy.trace("XMLRPC ConfigSuccess: " + _global.serializeObject( this.config )); |
|
From: Steve S. <ssp...@us...> - 2004-07-26 16:05:30
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3784 Modified Files: Tag: refactor_zmx_app_clip_branch ZMX_ClipClass.as Log Message: accidental global Index: ZMX_ClipClass.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_ClipClass.as,v retrieving revision 1.5.4.4 retrieving revision 1.5.4.5 diff -C2 -d -r1.5.4.4 -r1.5.4.5 *** ZMX_ClipClass.as 19 Jul 2004 17:37:51 -0000 1.5.4.4 --- ZMX_ClipClass.as 26 Jul 2004 16:05:12 -0000 1.5.4.5 *************** *** 207,210 **** --- 207,211 ---- var control; // alloc vars for the control and the point.. + var controls; // and the list of controls var point; // current point.. |
|
From: Steve S. <ssp...@us...> - 2004-07-19 17:38:00
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9914 Modified Files: Tag: refactor_zmx_app_clip_branch ZMX_ClipClass.as Log Message: use getAttr where we can.. Index: ZMX_ClipClass.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_ClipClass.as,v retrieving revision 1.5.4.3 retrieving revision 1.5.4.4 diff -C2 -d -r1.5.4.3 -r1.5.4.4 *** ZMX_ClipClass.as 18 Jul 2004 05:03:40 -0000 1.5.4.3 --- ZMX_ClipClass.as 19 Jul 2004 17:37:51 -0000 1.5.4.4 *************** *** 501,505 **** var val = defaultValue; ! var field=this[attr]; if (field != null) { --- 501,505 ---- var val = defaultValue; ! var field=this.getAttr( attr ); if (field != null) { *************** *** 510,516 **** val =field.text; } - else if (field.html != null) { - val=field.html; - } else { val = field; --- 510,513 ---- |
|
From: Steve S. <ssp...@us...> - 2004-07-18 23:10:57
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15006 Removed Files: Tag: refactor_zmx_app_clip_branch TextInputClass.as Log Message: should never have been a zmx class --- TextInputClass.as DELETED --- |
|
From: Steve S. <ssp...@us...> - 2004-07-18 05:03:49
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23312 Modified Files: Tag: refactor_zmx_app_clip_branch TextInputClass.as ZMXScreenClass.as ZMX_Application.as ZMX_ClipClass.as ZMX_XML.as Log Message: add invokeMethod/s capability to clip/screen classes Index: ZMX_ClipClass.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_ClipClass.as,v retrieving revision 1.5.4.2 retrieving revision 1.5.4.3 diff -C2 -d -r1.5.4.2 -r1.5.4.3 *** ZMX_ClipClass.as 17 Jul 2004 21:52:25 -0000 1.5.4.2 --- ZMX_ClipClass.as 18 Jul 2004 05:03:40 -0000 1.5.4.3 *************** *** 134,140 **** var args = cmd.args; ! var theObject = this[ objID ]; var theMethod = theObject[ method ]; ! theMethod.apply( theObject, args); } } --- 134,142 ---- var args = cmd.args; ! var theObject = objID != null ? this[ objID ] : this; var theMethod = theObject[ method ]; ! if (theMethod != null) { ! theMethod.apply( theObject, args); ! } } } *************** *** 142,145 **** --- 144,148 ---- p.xmlFailed = function( result ) { _global.gTrace("XML Failed! -> " + result); + this.clipMessage({message:result}); } *************** *** 432,436 **** } ! p.getFieldValue = function ( attr, defaultValue) { // // take a stab at getting a sensible value for a field.. --- 435,494 ---- } ! p.getAttr = function( attrName, defaultValue) { ! if (attrName.slice(0,5) == 'this.') { ! attrName = attrName.slice(5); ! } ! var attrList = attrName.split('.'); ! var currVal = this; ! for (var j=0; j<attrList.length; j++) { ! var currAttr = attrList[j]; ! var nextVal = currVal[ currAttr ]; ! currVal=nextVal; ! if (currVal == null) { ! break; ! } ! } ! return currVal != null ? currVal : defaultValue; ! } ! ! p.invokeMethods = function( xmlInfo ) { ! var results = [] ! for (var i=0; i<xmlInfo.methodlist.length; i++) { ! results.push(this.invokeMethod( xmlInfo.methodList[i])); ! } ! return results; ! } ! ! p.invokeMethod = function( xmlInfo ) ! ! { ! // ! // very generic method to call most any method of any object with any args... ! // cool! ! // ! ! var argList = []; ! ! if (xmlInfo.args != null) { ! for (var i=0; i<xmlInfo.args.length; i++) { ! var currArg = xmlInfo.args[i]; ! if (currArg.slice(0,5) == 'this.') { ! currArg = this.getAttr(currArg); ! } ! argList.push( currArg ) ! } ! } ! ! var theObject = this.getAttr(xmlInfo.theObject, this); ! var method = theObject[xmlInfo.method]; ! ! if (method != null) { ! result = method.apply( theObject, argList ); ! } ! ! return result; ! } ! ! p.getFieldValue = function( attr, defaultValue) { // // take a stab at getting a sensible value for a field.. *************** *** 493,496 **** --- 551,565 ---- } + p.genericFailure = function( faultObj ) { + + var msgInfo = {buttonLabel:"OK", message:"Sorry.. that didn't work." + _global.serializeObject(faultObj), + resizable:true, isScrolling:true}; + var ckWin = this.clipWindow(msgInfo); + if (ckWin == null) { + msgInfo.message = "Sorry.. that didn't work."; + this.clipMessage(msgInfo); + } + } + delete p; delete c; Index: TextInputClass.as =================================================================== RCS file: /cvsroot/zmx/zmx/TextInputClass.as,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** TextInputClass.as 12 Jun 2003 04:25:56 -0000 1.4 --- TextInputClass.as 18 Jul 2004 05:03:40 -0000 1.4.4.1 *************** *** 32,35 **** --- 32,36 ---- this.input.onSetFocus = TextInputClassFieldOnSetFocus; this.input.onKillFocus = TextInputClassFieldOnKillFocus; + //this.input.onChanged = TextInputClassFieldOnChanged; this.input.background=false; *************** *** 46,50 **** this.label.textColor = this.activeLabelColor; - this.input.onChanged = TextInputClassFieldOnChanged; } --- 47,50 ---- |
|
From: Steve S. <ssp...@us...> - 2004-07-17 21:52:34
|
Update of /cvsroot/zmx/zmx/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1496/examples Modified Files: Tag: refactor_zmx_app_clip_branch demoClip.as Log Message: added some new features... Index: demoClip.as =================================================================== RCS file: /cvsroot/zmx/zmx/examples/demoClip.as,v retrieving revision 1.2.4.1 retrieving revision 1.2.4.2 diff -C2 -d -r1.2.4.1 -r1.2.4.2 *** demoClip.as 23 Jun 2004 22:16:25 -0000 1.2.4.1 --- demoClip.as 17 Jul 2004 21:52:25 -0000 1.2.4.2 *************** *** 18,34 **** } - p.xmlResponse = function( xmlInfo ) { - - var cmdList = xmlInfo.cmdList; - - for (var i=0; i<cmdList.length; i++) { - var cmd = cmdList[i]; - var objID = cmd.id; - var method = cmd.method; - var args = cmd.args; - - var theObject = this[ objID ]; - var theMethod = theObject[ method ]; - theMethod.apply( theObject, args); - } - } --- 18,19 ---- |
|
From: Steve S. <ssp...@us...> - 2004-07-17 21:52:34
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1496 Modified Files: Tag: refactor_zmx_app_clip_branch ZMXScreenClass.as ZMX_Application.as ZMX_ClipClass.as ZMX_XML.as Log Message: added some new features... Index: ZMX_ClipClass.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_ClipClass.as,v retrieving revision 1.5.4.1 retrieving revision 1.5.4.2 diff -C2 -d -r1.5.4.1 -r1.5.4.2 *** ZMX_ClipClass.as 1 Jun 2004 12:08:00 -0000 1.5.4.1 --- ZMX_ClipClass.as 17 Jul 2004 21:52:25 -0000 1.5.4.2 *************** *** 117,122 **** } ! p.xmlResponse = function( result ) { ! _global.gTrace("XML Call result: " + _global.serializeObject( result )); } --- 117,141 ---- } ! p.xmlResponse = function( xmlInfo ) { ! ! //_global.gTrace("XML Call result: " + _global.serializeObject( xmlInfo )); ! // ! // the default behavior is to look for an attribute named cmdList, which is ! // expected to be a list of mappings with 'id' (movieClip id), 'method' (method to ! // call, and 'args' (a list of arguments to apply to the method). ! // ! ! var cmdList = xmlInfo.cmdList; ! ! for (var i=0; i<cmdList.length; i++) { ! var cmd = cmdList[i]; ! var objID = cmd.id; ! var method = cmd.method; ! var args = cmd.args; ! ! var theObject = this[ objID ]; ! var theMethod = theObject[ method ]; ! theMethod.apply( theObject, args); ! } } *************** *** 208,232 **** var init = {_x:point._x, _y:point._y}; var controlName = control.name; var controlClip; ! if (controlName == null) { ! if (control.url != null) { ! controlClip = this.createEmptyMovieClip(controlName+this.controlLevel, this.controlLevel++); ! controlClip._x = init._x; ! controlClip._y = init._y; ! controlClip.loadMovie( control.url ); } else { return point; } - } else { - controlClip = this.attachMovie(controlName, controlName+this.controlLevel, this.controlLevel++, init); - } - - if (controlClip != null) { - this.dynamicControls.push(controlClip); - } - else { - return point; } --- 227,259 ---- var init = {_x:point._x, _y:point._y}; var controlName = control.name; + var controlID = control.id; + + if (controlID == null) { + controlID = controlName+this.controlLevel; + } var controlClip; ! controlClip = this[controlID]; ! ! if (controlClip == null) { ! if (controlName == null) { ! if (control.url != null) { ! controlClip = this.createEmptyMovieClip(controlName+this.controlLevel, this.controlLevel++); ! controlClip._x = init._x; ! controlClip._y = init._y; ! controlClip.loadMovie( control.url ); ! } ! else { ! return point; ! } ! } else { ! controlClip = this.attachMovie(controlName, controlID, this.controlLevel++, init); ! } ! if (controlClip != null) { ! this.dynamicControls.push(controlClip); } else { return point; } } *************** *** 278,281 **** --- 305,310 ---- if (componentClip['set' + attr] != null) { componentClip['set' + attr](componentInits[attr]); + }else if (componentInit[attr].slice(0,5) == 'this.') { + componentClip[attr] = componentClip[componentInits[attr].slice(5)]; }else if (componentClip._name.slice(0,5) != 'comp_') { componentClip[attr] = componentInits[attr]; Index: ZMXScreenClass.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMXScreenClass.as,v retrieving revision 1.30 retrieving revision 1.30.4.1 diff -C2 -d -r1.30 -r1.30.4.1 *** ZMXScreenClass.as 4 Dec 2003 22:22:33 -0000 1.30 --- ZMXScreenClass.as 17 Jul 2004 21:52:25 -0000 1.30.4.1 *************** *** 324,328 **** // ! _global.gTrace("registering checkbox " + comp.myRowMC.itemNum); this.checkClips[ comp.myRowMC.itemNum ] = comp; --- 324,328 ---- // ! trace("registering checkbox " + comp.myRowMC.itemNum + ":" + this); this.checkClips[ comp.myRowMC.itemNum ] = comp; *************** *** 380,383 **** --- 380,384 ---- var proxy = []; var dt = this[tableInfo.tableName]; + trace("trying to get checkboxes for: " + tableInfo.tableName + ":" + dt + ":" + this); var checkedRow; var obj; *************** *** 400,403 **** --- 401,405 ---- } } + trace("Returning checked rows: " + _global.serializeObject( proxy )); return proxy; } *************** *** 416,420 **** } ! this.doSendXML(comp, {objects:this.getCheckboxes(comp, comp.needsChecks), other:this.getCompProxy( comp )}); } --- 418,425 ---- } ! var cBoxes = this.getCheckboxes(comp, comp.needsChecks); ! var other = this.getCompProxy( comp ); ! ! this.doSendXML(comp, {objects:cBoxes, other:other}); } *************** *** 426,430 **** this.clearCheckboxes(); this.refreshControls(); ! this.screenMessage( xmlInfo ); } --- 431,437 ---- this.clearCheckboxes(); this.refreshControls(); ! if (xmlInfo.message != null) { ! this.screenMessage( xmlInfo ); ! } } *************** *** 445,451 **** - - - // ----------------- Screen Response Stuff -------------------------// --- 452,455 ---- Index: ZMX_Application.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_Application.as,v retrieving revision 1.19.4.2 retrieving revision 1.19.4.3 diff -C2 -d -r1.19.4.2 -r1.19.4.3 *** ZMX_Application.as 2 Jun 2004 02:25:00 -0000 1.19.4.2 --- ZMX_Application.as 17 Jul 2004 21:52:25 -0000 1.19.4.3 *************** *** 99,103 **** // ! _global.gTrace("in application's xmlSuccess: " + _global.serializeObject(result)); var pData = _global.findAttribute(result, 'PrimaryData'); --- 99,103 ---- // ! //_global.gTrace("in application's xmlSuccess: " + _global.serializeObject(result)); var pData = _global.findAttribute(result, 'PrimaryData'); *************** *** 191,204 **** } - p.setUsername = function( username ) { - _global.gTrace("Setting username to: " + username); - if (this.zmx_SetUsername != null) { - this.zmx_SetUsername( username ); - } - else { - this.usernameField.text = username; - } - } - p.setStatusText = function( msg ) { _global.gTrace("Setting status text to: " + msg); --- 191,194 ---- |
|
From: Steve S. <ssp...@us...> - 2004-06-23 22:16:40
|
Update of /cvsroot/zmx/zmx/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16158 Modified Files: Tag: refactor_zmx_app_clip_branch demoClip.as demoClipInfo demoZMXClip.fla Added Files: Tag: refactor_zmx_app_clip_branch testCmd Log Message: added some default xmlResponse behavior to ZMX_ClipClas.as Index: demoZMXClip.fla =================================================================== RCS file: /cvsroot/zmx/zmx/examples/demoZMXClip.fla,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 Binary files /tmp/cvsLPrhdZ and /tmp/cvsMJZtA7 differ --- NEW FILE: testCmd --- <?xml version='1.0'?> <methodResponse> <params> <param> <value><struct> <member> <name>cmdList</name> <value><array><data> <value><struct> <member> <name>id</name> <value><string>00</string></value> </member> <member> <name>method</name> <value><string>SetLabel</string></value> </member> <member> <name>args</name> <value><array><data> <value><string>*</string></value> </data></array></value> </member> </struct></value> <value><struct> <member> <name>id</name> <value><string>00</string></value> </member> <member> <name>method</name> <value><string>SetEnabled</string></value> </member> <member> <name>args</name> <value><array><data> <value><int>0</int></value> </data></array></value> </member> </struct></value> </data></array></value> </member> </struct></value> </param> </params> </methodResponse> Index: demoClip.as =================================================================== RCS file: /cvsroot/zmx/zmx/examples/demoClip.as,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** demoClip.as 8 Aug 2003 18:36:56 -0000 1.2 --- demoClip.as 23 Jun 2004 22:16:25 -0000 1.2.4.1 *************** *** 17,18 **** --- 17,34 ---- this.setupControls( xmlInfo.Controls ); } + + p.xmlResponse = function( xmlInfo ) { + + var cmdList = xmlInfo.cmdList; + + for (var i=0; i<cmdList.length; i++) { + var cmd = cmdList[i]; + var objID = cmd.id; + var method = cmd.method; + var args = cmd.args; + + var theObject = this[ objID ]; + var theMethod = theObject[ method ]; + theMethod.apply( theObject, args); + } + } Index: demoClipInfo =================================================================== RCS file: /cvsroot/zmx/zmx/examples/demoClipInfo,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** demoClipInfo 8 Aug 2003 18:21:45 -0000 1.1 --- demoClipInfo 23 Jun 2004 22:16:25 -0000 1.1.4.1 *************** *** 12,48 **** <value><struct> <member> <name>ClickHandler</name> ! <value><string>doCallInstantXML</string></value> </member> <member> ! <name>a</name> ! <value><int>3</int></value> </member> <member> [...1214 lines suppressed...] ! <value><string>x</string></value> ! </member> ! <member> ! <name>height</name> ! <value><int>20</int></value> ! </member> ! <member> ! <name>ClickHandler</name> ! <value><string>doCallXML</string></value> ! </member> ! </struct></value> ! </data></array></value> </member> </struct></value> *************** *** 99,101 **** </params> </methodResponse> - --- 1168,1169 ---- |
|
From: Steve S. <ssp...@us...> - 2004-06-02 02:25:09
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15151 Modified Files: Tag: refactor_zmx_app_clip_branch ZMX_Application.as Log Message: set up app protocol for setting status and username Index: ZMX_Application.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_Application.as,v retrieving revision 1.19.4.1 retrieving revision 1.19.4.2 diff -C2 -d -r1.19.4.1 -r1.19.4.2 *** ZMX_Application.as 1 Jun 2004 12:08:00 -0000 1.19.4.1 --- ZMX_Application.as 2 Jun 2004 02:25:00 -0000 1.19.4.2 *************** *** 192,200 **** p.setUsername = function( username ) { ! this.usernameField.text = username; } p.setStatusText = function( msg ) { _global.gTrace("Setting status text to: " + msg); ! this.statusText.text = msg; } --- 192,211 ---- p.setUsername = function( username ) { ! _global.gTrace("Setting username to: " + username); ! if (this.zmx_SetUsername != null) { ! this.zmx_SetUsername( username ); ! } ! else { ! this.usernameField.text = username; ! } } p.setStatusText = function( msg ) { _global.gTrace("Setting status text to: " + msg); ! if (this.zmx_SetStatusText != null) { ! this.zmx_SetStatusText( msg ); ! } ! else { ! this.statusText.text = msg; ! } } |
|
From: Steve S. <ssp...@us...> - 2004-06-01 12:08:08
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31414 Modified Files: Tag: refactor_zmx_app_clip_branch ZMX_Application.as ZMX_ClipClass.as ZMX_XML.as Log Message: refactoring ZMX_App and ZMX_ClipClass a bit Index: ZMX_ClipClass.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_ClipClass.as,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -C2 -d -r1.5 -r1.5.4.1 *** ZMX_ClipClass.as 4 Dec 2003 22:22:33 -0000 1.5 --- ZMX_ClipClass.as 1 Jun 2004 12:08:00 -0000 1.5.4.1 *************** *** 187,201 **** var point; // current point.. if ( controlData.control.length != null) { controls=controlData.control; for ( var i=0; i<controls.length; i++) { ! var control = controls[i]; ! ! if (i==0) { ! point = {_x:cdef(control._x,currX), _y:cdef(control._y,currY)}; ! } ! else { ! point = {_x:cdef(control._x,point._x), _y:cdef(control._y,point._y)}; } point = this.setupControl(control, point, deltaX, deltaY); } --- 187,202 ---- var point; // current point.. + point = {_x:currX, _y:currY}; // init point to (currX,currY) + if ( controlData.control.length != null) { controls=controlData.control; for ( var i=0; i<controls.length; i++) { ! control = controls[i]; ! if ((control.refClip != null) and (this[control.refClip] != null)) { ! point = {_x:this[control.refClip]._x, _y:this[control.refClip]._y}; } + + point = {_x:cdef(control._x,point._x), _y:cdef(control._y,point._y)}; + point = this.setupControl(control, point, deltaX, deltaY); } Index: ZMX_Application.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_Application.as,v retrieving revision 1.19 retrieving revision 1.19.4.1 diff -C2 -d -r1.19 -r1.19.4.1 *** ZMX_Application.as 4 Dec 2003 22:22:33 -0000 1.19 --- ZMX_Application.as 1 Jun 2004 12:08:00 -0000 1.19.4.1 *************** *** 191,196 **** } p.setStatusText = function( msg ) { _global.gTrace("Setting status text to: " + msg); ! _global.ZMX_Background.statusLine.text = msg; } --- 191,200 ---- } + p.setUsername = function( username ) { + this.usernameField.text = username; + } + p.setStatusText = function( msg ) { _global.gTrace("Setting status text to: " + msg); ! this.statusText.text = msg; } |
|
From: Steve S. <ssp...@us...> - 2004-05-22 13:26:36
|
Update of /cvsroot/zmx/zmx/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21139 Modified Files: asyncTest.fla Log Message: force save in MX (not MX04) format. Index: asyncTest.fla =================================================================== RCS file: /cvsroot/zmx/zmx/examples/asyncTest.fla,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 Binary files /tmp/cvskgUgW6 and /tmp/cvswt8E7H differ |
|
From: Steve S. <ssp...@us...> - 2004-04-19 12:31:00
|
Update of /cvsroot/zmx/zmx/InstantXML In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30429 Added Files: IXML_Client.py Log Message: first pass at python IXML client --- NEW FILE: IXML_Client.py --- # # IXML Client.. listen for instant XML on a channel... (for host:port combination) # This is just a beginning.. not quite there yet.. # import sys import string from socket import * PORT = 8518 HOST = '127.0.0.1' BUFSIZE = 8192 from threading import RLock, Thread from xmlrpclib import loads, dumps class ItemQueue: """ A simple Queue class for managing input in a thread safe way... """ def __init__(self): self.mon = RLock() self.queue = [] def put(self, item): self.mon.acquire() self.queue.append(item) self.mon.release() def get(self): item = None if len(self.queue): self.mon.acquire() item = self.queue[0] del self.queue[0] self.mon.release() return item class XML_Monitor( Thread ): def __init__(self, client): Thread.__init__(self) self.client = client def run(self): """ wait on xml... """ self.currData = '' while 1: try: data = self.client.sck.recv(BUFSIZE) # collect a chunk of the response if not data: break # if we got an empty string, that's all there is. except timeout: continue self.currData += data if '\0' in self.currData: items = self.currData.split('\0') item = items[0] self.currData = '\0'.join(items[1:]) try: dList = loads(item) self.client.queue.put(dList[0]) except: print "Ack.. can't handle:", item CONNECT_STRUCT = {'sender_id': 'c1: IXML_Client'} class IXML_Client: def __init__(self, host=HOST, port=PORT): self.host = host self.port = port self.sck = None self.queue = ItemQueue() self.readThread = None def connect(self): """ make an IXML connection to self.host at self.port. """ s = socket(AF_INET, SOCK_STREAM) # construct a socket s.settimeout(1.0) s.connect((self.host, self.port)) # connect socket on given host, to specified port. self.sck = s cString = dumps((CONNECT_STRUCT,)) + '\0' self.sck.send(cString) self.readThread = XML_Monitor( self ) self.readThread.start() def get(self): if self.readThread: result = self.queue.get() else: result = None return result def send(self, thing): """ send a single thing via instantXML. """ pass from time import sleep def main(): import pdb #pdb.set_trace() host = HOST if len(sys.argv) > 1: host = sys.argv[1] # get the host name from the command line port = PORT # set the default port value i = string.find(host, ':') # check for a port number on the command line if i >= 0: # if found, extract it. port = string.atoi(host[i+1:]) # convert port number host = host[:i] # strip port number from host name client = IXML_Client(host, port) client.connect() while 1: d = client.get() if d: print '\n --- item --- \n',d else: sleep(0.1) if __name__=='__main__': main() |
|
From: Steve S. <ssp...@us...> - 2004-04-19 11:17:35
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16827 Modified Files: ZMX_XML.as Log Message: force correct host header.. Index: ZMX_XML.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_XML.as,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** ZMX_XML.as 18 Apr 2004 13:25:39 -0000 1.33 --- ZMX_XML.as 19 Apr 2004 11:17:07 -0000 1.34 *************** *** 221,229 **** } ! if (this.config.CONTEXT_CONFIG == true) { ! ! if (this.config.configMethod == null) { ! this.config.configMethod = 'getXMLRPCConfig'; ! } // --- 221,225 ---- } ! if (this.config.configMethod != null) { // *************** *** 244,253 **** } ! this.configHelper = new _global.XMLRPCHelper( this.configProxy, {emulationMethod:this.config.emulationMethod}); this.configHelper.callMethod( this.config.configMethod, []); } ! ! this.proxy.trace("XMLRPC Config: " + _global.serializeObject( this.config )); ! //this.proxy.trace("System Config: " + _global.serializeObject( System.capabilities )); } --- 240,250 ---- } ! this.configHelper = new _global.XMLRPCHelper( this.configProxy ); this.configHelper.callMethod( this.config.configMethod, []); } ! else { ! this.proxy.trace("XMLRPC Config: " + _global.serializeObject( this.config )); ! //this.proxy.trace("System Config: " + _global.serializeObject( System.capabilities )); ! } } *************** *** 260,267 **** --- 257,267 ---- this.config[attr] = result[attr]; } + this.proxy.configSuccess(); + this.proxy.trace("XMLRPC ConfigSuccess: " + _global.serializeObject( this.config )); } p.configFailure = function( msg ) { trace("Config failure!" + msg); + this.proxy.configFailure(); } *************** *** 527,531 **** --- 527,533 ---- // Content-Type http header value 'text/xml' now carried in Call headers + this.methodCall.addRequestHeader('Host',Server.split('/').slice(0,3).join('/')) this.methodCall.sendAndLoad(this.Server,this.methodResponse); + return true; } |
|
From: Steve S. <ssp...@us...> - 2004-04-18 13:26:28
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9405 Modified Files: Tag: ActionScript_2-0_conversion AsyncSocket.as InstantXMLHelper.as XMLRPCHelper.as ZMX_Lib.as Added Files: Tag: ActionScript_2-0_conversion ZMX AS2 Settings.xml Log Message: fixed some url issues to work better in Director/Shockwave Index: AsyncSocket.as =================================================================== RCS file: /cvsroot/zmx/zmx/Attic/AsyncSocket.as,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** AsyncSocket.as 19 Feb 2004 21:19:27 -0000 1.1.2.1 --- AsyncSocket.as 18 Apr 2004 13:26:18 -0000 1.1.2.2 *************** *** 1,2 **** --- 1,4 ---- + import zmx.* + class zmx.AsyncSocket extends XMLSocket{ *************** *** 29,36 **** function onXML(theXML) { ! var argObj = _global.loads( theXML ) // get the arguments... if (argObj.methodCall) { var funcResult = this.invokeMethod( argObj, this.parentObj.proxy ); ! var theReply = _global.Arg_To_XML({sender_id:this.parentObj.config.sender_id, result:funcResult}); if (theReply != null) { --- 31,40 ---- function onXML(theXML) { ! var loader = new zmx.XML_Loader(); ! var argObj = loader.loads( theXML ) // get the arguments... if (argObj.methodCall) { var funcResult = this.invokeMethod( argObj, this.parentObj.proxy ); ! var util = new zmx.XMLRPCLib(); ! var theReply = util.Arg_To_XML({sender_id:this.parentObj.config.sender_id, result:funcResult}); if (theReply != null) { Index: InstantXMLHelper.as =================================================================== RCS file: /cvsroot/zmx/zmx/Attic/InstantXMLHelper.as,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** InstantXMLHelper.as 19 Feb 2004 21:19:27 -0000 1.1.2.1 --- InstantXMLHelper.as 18 Apr 2004 13:26:18 -0000 1.1.2.2 *************** *** 39,44 **** --- 39,54 ---- // + import zmx.* + class zmx.InstantXMLHelper { + var configured; + var proxy; + var config; + var xmlc; + var configHelper; + var configProxy; + var myLocalClient; + function InstantXMLHelper ( proxy, config ) { *************** *** 80,85 **** } ! this.configProxy = new Object(); this.configProxy.controller = this; this.configProxy.responseSuccess = function( result ) { --- 90,97 ---- } ! this.configProxy = {}; this.configProxy.controller = this; + this.configProxy._url = proxy._url; + this.configProxy.trace = proxy.trace; this.configProxy.responseSuccess = function( result ) { *************** *** 91,99 **** } - this.configHelper = new zmx.XMLRPCHelper( this.configProxy, {use_LC_server:this.config.use_LC_server}); this.configHelper.callMethod( this.config.configMethod, []); } ! function configSuccess( config ) { --- 103,114 ---- } + this.configHelper = new zmx.XMLRPCHelper( this.configProxy, {use_LC_server:this.config.use_LC_server, + emulationMethod:this.config.emulationMethod}); + + // this.proxy.trace("XMLRPC Config " + zmx.ZMX_Lib.serializeObject( this.configHelper.config )); this.configHelper.callMethod( this.config.configMethod, []); } ! function configSuccess( config ) { *************** *** 115,121 **** this.proxy.asyncConfigured( config ); ! this.xmlc = new AsyncSocket( this ); this.xmlc.connect(this.config.xmlhost,this.config.xmlport); ! this.xmlc.send(Arg_To_XML({sender_id:this.config.sender_id})); } --- 130,137 ---- this.proxy.asyncConfigured( config ); ! this.xmlc = new zmx.AsyncSocket( this ); this.xmlc.connect(this.config.xmlhost,this.config.xmlport); ! var util = new zmx.XMLRPCLib(); ! this.xmlc.send(util.Arg_To_XML({sender_id:this.config.sender_id})); } *************** *** 141,145 **** theArgs = [theArgs]; } ! this.xmlc.send(Args_To_XML(theArgs, theMethod)); } } --- 157,162 ---- theArgs = [theArgs]; } ! var util = new zmx.XMLRPCLib(); ! this.xmlc.send(util.Args_To_XML(theArgs, theMethod)); } } Index: ZMX_Lib.as =================================================================== RCS file: /cvsroot/zmx/zmx/Attic/ZMX_Lib.as,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** ZMX_Lib.as 2 Mar 2004 21:37:05 -0000 1.1.2.1 --- ZMX_Lib.as 18 Apr 2004 13:26:18 -0000 1.1.2.2 *************** *** 1 **** !  class zmx.ZMX_Lib { static function serializeObject( anObject, level ) { var simpleResults = []; var objResults = []; var space = ' '; var room = '' if (level == null) { level = 0; } else { for (var i=0; i<=level; i++) { room += space; } } if (level > 10) { return "recursion problem?"; } if ((typeof(anObject) == 'string') || (typeof(anObject) == 'number') || ((typeof(anObject) == 'object') && (anObject.getDate != null))) { return room + anObject; } var val; if (anObject.push != null) { for (var i=0; i<anObject.length; i++) { val = anObject[i]; objResults.push(room + "ListItem:" + i + " = " + "Object( \r" + zmx.ZMX_Lib.serializeObject( val, level + 1 ) + ")\r"); } } else { for (var attr in anObject) { var val=anObject[attr]; if (attr != 'children') { if (typeof(val) == 'object') { objResults.push(room + attr + " = " + "Object( \r" + zmx.ZMX_Lib.serializeObject( val, level + 1 ) + ")\r"); } else { simpleResults.push( attr + " = '" + val + "'"); } } else { var lResults = []; for (var i=0; i<val.length; i++) { var nVal = val[i]; lResults.push(room + "Object( \r" + _global.serializeObject( nVal, level + 1 ) + space + room + ")\r"); } objResults.push(attr + " = " + "List( \r" + room + space + lResults.join( room + space + ',\r') + '\r' + space + room + ")\r"); } } } var resultList = []; var sr = undefined; if (simpleResults.length > 0) { sr = simpleResults.join(',') + '\r'; resultList.push( room + sr); } var obr = undefined; if (objResults.length > 0) { obr = objResults.join(room + ',\r') + '\r'; resultList.push(room + obr); } var result = ''; if (resultList.length > 0) { result = resultList.join(room + ',\r'); } //_global.gTrace(result); return result; } } \ No newline at end of file --- 1,88 ---- ! ! class zmx.ZMX_Lib { ! ! static function serializeObject( anObject, level, limit ) { ! ! var simpleResults = []; ! var objResults = []; ! var space = ' '; ! var room = '' ! ! if (limit == null) { ! limit = 10; ! } ! ! if (level == null) { ! level = 0; ! } ! else { ! for (var i=0; i<=level; i++) { ! room += space; ! } ! } ! ! if (level > 10) { ! return "recursion problem?"; ! } ! ! if ((typeof(anObject) == 'string') || (typeof(anObject) == 'number') || ((typeof(anObject) == 'object') && (anObject.getDate != null))) { ! return room + anObject; ! } ! ! var val; ! ! if (anObject.push != null) { ! for (var i=0; i<anObject.length; i++) { ! val = anObject[i]; ! objResults.push(room + "ListItem:" + i + " = " + "Object( \r" + zmx.ZMX_Lib.serializeObject( val, level + 1, limit ) + ")\r"); ! } ! } ! else { ! for (var attr in anObject) { ! var val=anObject[attr]; ! if (attr != 'children') { ! if (typeof(val) == 'object') { ! objResults.push(room + attr + " = " + "Object( \r" + zmx.ZMX_Lib.serializeObject( val, level + 1, limit ) + ")\r"); ! } ! else ! { ! simpleResults.push( attr + " = '" + val + "'"); ! } ! } ! else ! { ! var lResults = []; ! for (var i=0; i<val.length; i++) { ! var nVal = val[i]; ! lResults.push(room + "Object( \r" + _global.serializeObject( nVal, level + 1, limit) + space + room + ")\r"); ! } ! objResults.push(attr + " = " + "List( \r" + room + space + lResults.join( room + space + ',\r') + '\r' + space + room + ")\r"); ! } ! } ! } ! ! var resultList = []; ! ! var sr = undefined; ! ! if (simpleResults.length > 0) { ! sr = simpleResults.join(',') + '\r'; ! resultList.push( room + sr); ! } ! ! var obr = undefined; ! ! if (objResults.length > 0) { ! obr = objResults.join(room + ',\r') + '\r'; ! resultList.push(room + obr); ! } ! ! var result = ''; ! if (resultList.length > 0) { ! result = resultList.join(room + ',\r'); ! } ! ! //_global.gTrace(result); ! return result; ! } ! } Index: XMLRPCHelper.as =================================================================== RCS file: /cvsroot/zmx/zmx/Attic/XMLRPCHelper.as,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** XMLRPCHelper.as 2 Mar 2004 21:37:05 -0000 1.1.2.2 --- XMLRPCHelper.as 18 Apr 2004 13:26:18 -0000 1.1.2.3 *************** *** 1 **** ! /* ** $Revision$ ** $State$ ** $Name$ ** $Date$ ** $Author$ ** ** ** 2/14/04 ** ** Moving all this mess to ActionScript 2.0 ** ** (whee!) ** ** 9/1/03 ** ** Rewrote all of this code to better suite my needs.. ** ** This code is inspired by two other efforts.. ** ** http://www.sourceforge.com/projects/xmlrpcflash/ ** ** and ** ** http://www.python.org's xml library: xmlrpclib.py ** ** The code the follows started more like the former, and ** ended up much more like the latter, but still has some ** decorations from the former. ** ** --------------------------------------------------- ** ** sjs ** */ // // An object that handles XMLSocket/RPC connections... // import zmx.* class zmx.XMLRPCHelper { // // XMLRPCHelper is used to call XMLRPC methods // // The "proxy" is an object to be notified when results come back from XMLRPC calls. // // The 'config' argument is an object with the following (optional) properties // // config.url = the url for the XMLRPC calls. // // config.use_LC_server Use a local connection rather than talking directly to // the host. // var callDepthLimit:Number; var intervalDelay:Number; var proxy:Object; var config:Object; function XMLRPCHelper( proxy:Object, config:Object) { this.callDepthLimit = 10; // if we can't communicate after 10 tries... forget it. this.intervalDelay = 100; // how many milliseconds to wait for the next try? this.proxy = proxy; if (config == null) { this.config = {}; } else { this.config = config; } if (this.config.url == null) { if (this.proxy._url != null) { this.config.url = this.proxy._url.split('/').slice(0,-1).join('/'); // get my folder URL.. if ((this.config.url.slice(0,4) == 'file')) { this.config.filesystemLoad = true; } } } } function responseSuccess( result ) { this.proxy.responseSuccess( result ); } function responseFailure( reason ) { this.proxy.responseFailure (reason ); } static function checkDef( x, defX ) { // shorthand.. // if x is null, return defX, otherwise, return x // return x == null ? defX : x; } function callMethod( theMethod, theArgs, theURL, theProxy, successMethod, failureMethod, callDepth) { if (callDepth == null) { callDepth = 0; } else if (callDepth > this.callDepthLimit) { trace("Ack... why can't we talk?"); } else { trace("in callMethod with callDepth = " + callDepth); } // // theArgs should be a *list* of arguments. If it doesn't smell like a list.. // let's put it in a list.. if (theArgs == null) { theArgs = []; } else if (theArgs.push == null) { theArgs = [theArgs]; } if (theURL == null) { if (this.config.url == null) { theURL = theMethod; theMethod = null; } else { if (this.config.filesystemLoad) { theURL = [this.config.url, theMethod].join('/'); theMethod = null; } else { theURL = this.config.url; } } } var cdef = checkDef; theProxy = cdef(theProxy, this); successMethod = cdef(successMethod, 'responseSuccess'); failureMethod = cdef(failureMethod, 'responseFailure'); var util = new zmx.XMLRPCLib(); util.XML_CallWithArgs( theURL, theMethod, theArgs, successMethod, failureMethod, theProxy); } function trace( msg:String ) { this.proxy.trace(msg); } } \ No newline at end of file --- 1,209 ---- ! /* ! ** $Revision$ ! ** $State$ ! ** $Name$ ! ** $Date$ ! ** $Author$ ! ** ! ** ! ** 2/14/04 ! ** ! ** Moving all this mess to ActionScript 2.0 ! ** ! ** (whee!) ! ** ! ** 9/1/03 ! ** ! ** Rewrote all of this code to better suite my needs.. ! ** ! ** This code is inspired by two other efforts.. ! ** ! ** http://www.sourceforge.com/projects/xmlrpcflash/ ! ** ! ** and ! ** ! ** http://www.python.org's xml library: xmlrpclib.py ! ** ! ** The code the follows started more like the former, and ! ** ended up much more like the latter, but still has some ! ** decorations from the former. ! ** ! ** --------------------------------------------------- ! ** ! ** sjs ! ** ! */ ! ! // ! // An object that handles XMLSocket/RPC connections... ! // ! import zmx.* ! ! class zmx.XMLRPCHelper { ! ! // ! // XMLRPCHelper is used to call XMLRPC methods ! // ! // The "proxy" is an object to be notified when results come back from XMLRPC calls. ! // ! // The 'config' argument is an object with the following (optional) properties ! // ! // config.url = the url for the XMLRPC calls. ! // ! // config.use_LC_server Use a local connection rather than talking directly to ! // the host. ! // ! ! var callDepthLimit:Number; ! var intervalDelay:Number; ! var proxy:Object; ! var config:Object; ! var configHelper:Object; ! var configProxy:Object; ! ! function XMLRPCHelper( proxy:Object, config:Object) { ! ! this.callDepthLimit = 10; // if we can't communicate after 10 tries... forget it. ! this.intervalDelay = 100; // how many milliseconds to wait for the next try? ! ! this.proxy = proxy; ! ! if (config == null) { ! this.config = {}; ! } ! else ! { ! this.config = config; ! } ! ! if (this.config.url == null) { ! if (this.proxy._url != null) { ! this.config.url = this.proxy._url.split('/').slice(0,-1).join('/'); // get my folder URL.. ! if ((this.config.url.slice(0,4) == 'file')) { ! this.config.filesystemLoad = true; ! } ! } ! } ! ! if (config.emulationMethod == null) { ! if (System.capabilities.playerType == 'DirectorXtra') { // automatically use doXMLRPC when in Director ! config.emulationMethod = 'doXMLRPC'; ! } ! } ! ! if (this.config.CONTEXT_CONFIG == true) { ! ! if (this.config.configMethod == null) { ! this.config.configMethod = 'getXMLRPCConfig'; ! } ! ! // ! // we need to allow for context based configuration. ! // ! ! this.configProxy = {}; ! this.configProxy.controller = this; ! this.configProxy._url = proxy._url; ! this.configProxy.trace = proxy.trace; ! ! this.configProxy.responseSuccess = function( result ) { ! this.controller.configSuccess( result ); ! } ! ! this.configProxy.responseFailure = function( result ) { ! this.controller.configFailure( result ); ! } ! ! this.configHelper = new zmx.XMLRPCHelper( this.configProxy, {emulationMethod:this.config.emulationMethod}); ! this.configHelper.callMethod( this.config.configMethod, []); ! } ! ! this.proxy.trace("XMLRPC Config " + zmx.ZMX_Lib.serializeObject( this.configHelper.config )); ! //this.proxy.trace("System Config " + zmx.ZMX_Lib.serializeObject( System.capabilities )); ! ! } ! ! ! function responseSuccess( result ) { ! this.proxy.responseSuccess( result ); ! } ! ! function responseFailure( reason ) { ! this.proxy.responseFailure (reason ); ! } ! ! static function checkDef( x, defX ) { ! // shorthand.. ! // if x is null, return defX, otherwise, return x ! // ! return x == null ? defX : x; ! } ! ! function callMethod( theMethod, theArgs, theURL, theProxy, successMethod, failureMethod, callDepth) { ! ! if (callDepth == null) { ! callDepth = 0; ! } ! else if (callDepth > this.callDepthLimit) { ! trace("Ack... why can't we talk?"); ! } ! else ! { ! trace("in callMethod with callDepth = " + callDepth); ! } ! ! // ! // theArgs should be a *list* of arguments. If it doesn't smell like a list.. ! // let's put it in a list.. ! ! if (theArgs == null) { ! theArgs = []; ! } ! else if (theArgs.push == null) { ! theArgs = [theArgs]; ! } ! ! if (theURL == null) { ! if (this.config.url == null) { ! theURL = theMethod; ! theMethod = null; ! } ! else { ! if (this.config.filesystemLoad) { ! theURL = [this.config.url, theMethod].join('/'); ! theMethod = null; ! } ! else ! { ! theURL = this.config.url; ! if (this.config.emulationMethod != null) { ! theURL += '/' + this.config.emulationMethod; ! } ! } ! } ! } ! else ! { ! if (this.config.emulationMethod != null) { ! theURL += '/' + this.config.emulationMethod; ! } ! } ! ! var cdef = checkDef; ! ! theProxy = cdef(theProxy, this); ! successMethod = cdef(successMethod, 'responseSuccess'); ! failureMethod = cdef(failureMethod, 'responseFailure'); ! ! var util = new zmx.XMLRPCLib(); ! ! util.XML_CallWithArgs( theURL, theMethod, theArgs, successMethod, failureMethod, theProxy); ! } ! ! function trace( msg:String ) { ! this.proxy.trace(msg); ! } ! ! } ! ! --- NEW FILE: ZMX AS2 Settings.xml --- (This appears to be a binary file; contents omitted.) |
|
From: Steve S. <ssp...@us...> - 2004-04-18 13:25:49
|
Update of /cvsroot/zmx/zmx/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9235/examples Modified Files: asyncTest.fla Log Message: fixed some url issues to work better in Director/Shockwave Index: asyncTest.fla =================================================================== RCS file: /cvsroot/zmx/zmx/examples/asyncTest.fla,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 Binary files /tmp/cvsYsay3v and /tmp/cvscFv9g0 differ |
|
From: Steve S. <ssp...@us...> - 2004-04-18 13:25:47
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9235 Modified Files: ZMX_XML.as Log Message: fixed some url issues to work better in Director/Shockwave Index: ZMX_XML.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_XML.as,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** ZMX_XML.as 14 Mar 2004 20:07:46 -0000 1.32 --- ZMX_XML.as 18 Apr 2004 13:25:39 -0000 1.33 *************** *** 82,87 **** } ! this.configProxy = new Object(); this.configProxy.controller = this; this.configProxy.responseSuccess = function( result ) { --- 82,89 ---- } ! this.configProxy = {}; this.configProxy.controller = this; + this.configProxy._url = proxy._url; + this.configProxy.trace = proxy.trace; this.configProxy.responseSuccess = function( result ) { *************** *** 92,99 **** this.controller.configFailure( result ); } ! ! ! this.configHelper = new _global.XMLRPCHelper( this.configProxy, {use_LC_server:this.config.use_LC_server}); this.configHelper.callMethod( this.config.configMethod, []); } --- 94,103 ---- this.controller.configFailure( result ); } ! ! this.configHelper = new _global.XMLRPCHelper( this.configProxy, {use_LC_server:this.config.use_LC_server, ! emulationMethod:this.config.emulationMethod}); ! this.configHelper.callMethod( this.config.configMethod, []); + } *************** *** 211,215 **** } ! if (this.config.NO_CONTEXT_CONFIG != true) { if (this.config.configMethod == null) { --- 215,225 ---- } ! if (config.emulationMethod == null) { ! if (System.capabilities.playerType == 'DirectorXtra') { // automatically use doXMLRPC when in Director ! config.emulationMethod = 'doXMLRPC'; ! } ! } ! ! if (this.config.CONTEXT_CONFIG == true) { if (this.config.configMethod == null) { *************** *** 221,226 **** // ! this.configProxy = new Object(); this.configProxy.controller = this; this.configProxy.responseSuccess = function( result ) { --- 231,238 ---- // ! this.configProxy = {}; this.configProxy.controller = this; + this.configProxy._url = proxy._url; + this.configProxy.trace = proxy.trace; this.configProxy.responseSuccess = function( result ) { *************** *** 232,238 **** } ! this.configHelper = new _global.XMLRPCHelper( this.configProxy, {NO_CONTEXT_CONFIG:true}); this.configHelper.callMethod( this.config.configMethod, []); ! } } --- 244,253 ---- } ! this.configHelper = new _global.XMLRPCHelper( this.configProxy, {emulationMethod:this.config.emulationMethod}); this.configHelper.callMethod( this.config.configMethod, []); ! } ! ! this.proxy.trace("XMLRPC Config: " + _global.serializeObject( this.config )); ! //this.proxy.trace("System Config: " + _global.serializeObject( System.capabilities )); } |
|
From: <ssp...@us...> - 2004-03-14 20:16:46
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7672 Modified Files: ZMX_XML.as Log Message: add ability to configure XMLRPC using method (getXMLRPCConfig). Index: ZMX_XML.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_XML.as,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** ZMX_XML.as 20 Feb 2004 16:04:18 -0000 1.31 --- ZMX_XML.as 14 Mar 2004 20:07:46 -0000 1.32 *************** *** 210,217 **** --- 210,254 ---- this.myLocalClient = new LConn_ClientClass( this ); // sign up for a local connection client } + + if (this.config.NO_CONTEXT_CONFIG != true) { + + if (this.config.configMethod == null) { + this.config.configMethod = 'getXMLRPCConfig'; + } + + // + // we need to allow for context based configuration. + // + + this.configProxy = new Object(); + this.configProxy.controller = this; + + this.configProxy.responseSuccess = function( result ) { + this.controller.configSuccess( result ); + } + + this.configProxy.responseFailure = function( result ) { + this.controller.configFailure( result ); + } + + this.configHelper = new _global.XMLRPCHelper( this.configProxy, {NO_CONTEXT_CONFIG:true}); + this.configHelper.callMethod( this.config.configMethod, []); + } } p = c.prototype = new Object(); + p.configSuccess = function( result ) { + trace("Config success!" + _global.serializeObject( result ) ); + + for (var attr in result) { + this.config[attr] = result[attr]; + } + } + + p.configFailure = function( msg ) { + trace("Config failure!" + msg); + } + p.responseSuccess = function ( result ) { this.proxy.responseSuccess( result ); *************** *** 252,255 **** --- 289,298 ---- if (theURL == null) { + if (this.config.baseURL != null) { + theURL = this.config.baseURL; + } + } + + if (theURL == null) { if (this.config.url == null) { theURL = theMethod; *************** *** 264,273 **** { theURL = this.config.url; ! if (this.config.emulationMethod != null) { ! theURL += '/' + this.config.emulationMethod; ! } } } } var cdef = _global.checkDef; --- 307,323 ---- { theURL = this.config.url; ! if (this.config.emulationMethod != null) { ! theURL += '/' + this.config.emulationMethod; ! } } } } + else + { + if (this.config.emulationMethod != null) { + theURL += '/' + this.config.emulationMethod; + } + } + var cdef = _global.checkDef; |
|
From: <xb...@us...> - 2004-03-08 20:50:47
|
Update of /cvsroot/zmx/zmx/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11858 Modified Files: asyncTest.fla Log Message: added emulation method to asyncTest.fla Index: asyncTest.fla =================================================================== RCS file: /cvsroot/zmx/zmx/examples/asyncTest.fla,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvscXII1m and /tmp/cvsWFm3wG differ |
|
From: <xb...@us...> - 2004-03-08 20:43:34
|
Update of /cvsroot/zmx/zmx/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10213 Modified Files: asyncTest.fla Log Message: pre-2004 format Index: asyncTest.fla =================================================================== RCS file: /cvsroot/zmx/zmx/examples/asyncTest.fla,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvsSo6mF1 and /tmp/cvsYieMv1 differ |
|
From: <ssp...@us...> - 2004-03-08 20:37:38
|
Update of /cvsroot/zmx/zmx/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8805 Modified Files: asyncTest.fla Log Message: save as Flash MX movie Index: asyncTest.fla =================================================================== RCS file: /cvsroot/zmx/zmx/examples/asyncTest.fla,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvsNYqr8R and /tmp/cvsC4BCZu differ |