openamf/src/web/examples recordsetTest.as,NONE,1.1 recordsetTest.fla,1.1,1.2 recordsetTest.swf,1.1,1.2

[email protected] Mon, 01 Dec 2003 17:13:03 -0800
Newsgroups gmane.comp.java.openamf.cvs
Message-ID <[email protected]>
Update of /cvsroot/openamf/openamf/src/web/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv11943/src/web/examples

Modified Files:
	recordsetTest.fla recordsetTest.swf 
Added Files:
	recordsetTest.as 
Log Message:
Moved AS source to external file for non Flash programmer viewing.

Note it would be good to do this for all future test clients and examples as
many OpenAMF Java developers do not have access to the Flash IDE.



--- NEW FILE: recordsetTest.as ---

#include "NetServices.as"

pbClickHandler=function(){
	ws = gatewayConnection.getService( "org.openamf.examples.RecordSetTest", this );
	//var op=_root.operation.text;
	//var args=_root.args.text;
	//ws[op](args);
	trace(sql.text+dbURL.text+driver.text);
	ws.getData(sql.text,dbURL.text,driver.text);
}

getData_Result=function(result){
	rc = new RecordSet(["firstname", "lastname", "alias", "securitycode", "country", "pokes"]);
	rc.addItem({firstname:"Tim", lastname:"Chung", alias:"CrudDog", securitycode:"A", country:"UK", pokes:5});

	trace(result);
	var temp1=rc;
	
	
	for(var i in temp1){
	
		trace(i+" = "+temp1[i]);
		output.text+=i+" = "+result[i]+"\n";
		
		if(i=="items"){
			trace("ITEMS");
			var temp=temp1;
			for (var j in temp){
				trace(j+" = "+temp[j]);
				for(var k in temp[j]){
					trace("data?");
					trace(k+" = "+temp[j][k]);					
				}
			}
		}
	}
	
	trace(rc instanceof RecordSet);
	trace(result instanceof RecordSet);
	mydatagrid.setRecordSet(result);
	mydatagrid.refresh();	
}

NetServices.setDefaultGatewayURL( "http://localhost:8080/openamf/gateway" );

gatewayConnection = NetServices.createGatewayConnection();


Index: recordsetTest.fla
===================================================================
RCS file: /cvsroot/openamf/openamf/src/web/examples/recordsetTest.fla,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
Binary files /tmp/cvsHeOtvT and /tmp/cvsNpmhC3 differ

Index: recordsetTest.swf
===================================================================
RCS file: /cvsroot/openamf/openamf/src/web/examples/recordsetTest.swf,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
Binary files /tmp/cvs9qFDNf and /tmp/cvssOiO6k differ




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/