|  | @@ -725,3 +725,92 @@ smalltalk.Importer);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +smalltalk.addClass('PackageLoader', smalltalk.Object, [], 'Importer-Exporter');
 | 
	
		
			
				|  |  | +smalltalk.addMethod(
 | 
	
		
			
				|  |  | +"_initializePackageNamed_prefix_",
 | 
	
		
			
				|  |  | +smalltalk.method({
 | 
	
		
			
				|  |  | +selector: "initializePackageNamed:prefix:",
 | 
	
		
			
				|  |  | +category: 'not yet classified',
 | 
	
		
			
				|  |  | +fn: function (packageName,aString){
 | 
	
		
			
				|  |  | +var self=this;
 | 
	
		
			
				|  |  | +var $1,$2;
 | 
	
		
			
				|  |  | +smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Package || Package),"_named_",[packageName]),"_classes",[]),"_do_",[(function(each){
 | 
	
		
			
				|  |  | +smalltalk.init(each);
 | 
	
		
			
				|  |  | +;
 | 
	
		
			
				|  |  | +return smalltalk.send(each,"_initialize",[]);
 | 
	
		
			
				|  |  | +})]);
 | 
	
		
			
				|  |  | +$1=smalltalk.send((smalltalk.Package || Package),"_named_",[packageName]);
 | 
	
		
			
				|  |  | +smalltalk.send($1,"_commitPathJs_",[smalltalk.send(smalltalk.send("/","__comma",[aString]),"__comma",["/js"])]);
 | 
	
		
			
				|  |  | +$2=smalltalk.send($1,"_commitPathSt_",[smalltalk.send(smalltalk.send("/","__comma",[aString]),"__comma",["/st"])]);
 | 
	
		
			
				|  |  | +return self},
 | 
	
		
			
				|  |  | +args: ["packageName", "aString"],
 | 
	
		
			
				|  |  | +source: "initializePackageNamed: packageName prefix: aString\x0a\x0a\x09(Package named: packageName) classes do: [ :each |\x0a    \x09<smalltalk.init(each)>.\x0a        each initialize. ].\x0a        \x0a    (Package named: packageName) \x0a    \x09commitPathJs: '/', aString, '/js';\x0a        commitPathSt: '/', aString, '/st'",
 | 
	
		
			
				|  |  | +messageSends: ["do:", "initialize", "classes", "named:", "commitPathJs:", ",", "commitPathSt:"],
 | 
	
		
			
				|  |  | +referencedClasses: ["Package"]
 | 
	
		
			
				|  |  | +}),
 | 
	
		
			
				|  |  | +smalltalk.PackageLoader);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +smalltalk.addMethod(
 | 
	
		
			
				|  |  | +"_loadPackage_prefix_",
 | 
	
		
			
				|  |  | +smalltalk.method({
 | 
	
		
			
				|  |  | +selector: "loadPackage:prefix:",
 | 
	
		
			
				|  |  | +category: 'not yet classified',
 | 
	
		
			
				|  |  | +fn: function (packageName,aString){
 | 
	
		
			
				|  |  | +var self=this;
 | 
	
		
			
				|  |  | +var $1;
 | 
	
		
			
				|  |  | +var url;
 | 
	
		
			
				|  |  | +url=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("/","__comma",[aString]),"__comma",["/js/"]),"__comma",[packageName]),"__comma",[".js"]);
 | 
	
		
			
				|  |  | +smalltalk.send(jQuery,"_ajax_options_",[url,smalltalk.HashedCollection._fromPairs_([smalltalk.send("type","__minus_gt",["GET"]),smalltalk.send("dataType","__minus_gt",["script"]),smalltalk.send("complete","__minus_gt",[(function(jqXHR,textStatus){
 | 
	
		
			
				|  |  | +$1=smalltalk.send(smalltalk.send(jqXHR,"_readyState",[]),"__eq",[(4)]);
 | 
	
		
			
				|  |  | +if(smalltalk.assert($1)){
 | 
	
		
			
				|  |  | +return smalltalk.send(self,"_initializePackageNamed_prefix_",[packageName,aString]);
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +})]),smalltalk.send("error","__minus_gt",[(function(){
 | 
	
		
			
				|  |  | +return smalltalk.send(window,"_alert_",[smalltalk.send("Could not load package at:  ","__comma",[url])]);
 | 
	
		
			
				|  |  | +})])])]);
 | 
	
		
			
				|  |  | +return self},
 | 
	
		
			
				|  |  | +args: ["packageName", "aString"],
 | 
	
		
			
				|  |  | +source: "loadPackage: packageName prefix: aString\x09\x0a\x09| url |\x0a    url := '/', aString, '/js/', packageName, '.js'.\x0a\x09jQuery \x0a\x09\x09ajax: url\x0a        options: #{\x0a\x09\x09\x09'type' -> 'GET'.\x0a\x09\x09\x09'dataType' -> 'script'.\x0a    \x09\x09'complete' -> [ :jqXHR :textStatus | \x0a\x09\x09\x09\x09jqXHR readyState = 4 \x0a                \x09ifTrue: [ self initializePackageNamed: packageName prefix: aString ] ].\x0a\x09\x09\x09'error' -> [ window alert: 'Could not load package at:  ', url ]\x0a\x09\x09}",
 | 
	
		
			
				|  |  | +messageSends: [",", "ajax:options:", "->", "ifTrue:", "initializePackageNamed:prefix:", "=", "readyState", "alert:"],
 | 
	
		
			
				|  |  | +referencedClasses: []
 | 
	
		
			
				|  |  | +}),
 | 
	
		
			
				|  |  | +smalltalk.PackageLoader);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +smalltalk.addMethod(
 | 
	
		
			
				|  |  | +"_loadPackages_prefix_",
 | 
	
		
			
				|  |  | +smalltalk.method({
 | 
	
		
			
				|  |  | +selector: "loadPackages:prefix:",
 | 
	
		
			
				|  |  | +category: 'not yet classified',
 | 
	
		
			
				|  |  | +fn: function (aCollection,aString){
 | 
	
		
			
				|  |  | +var self=this;
 | 
	
		
			
				|  |  | +smalltalk.send(aCollection,"_do_",[(function(each){
 | 
	
		
			
				|  |  | +return smalltalk.send(self,"_loadPackage_prefix_",[each,aString]);
 | 
	
		
			
				|  |  | +})]);
 | 
	
		
			
				|  |  | +return self},
 | 
	
		
			
				|  |  | +args: ["aCollection", "aString"],
 | 
	
		
			
				|  |  | +source: "loadPackages: aCollection prefix: aString\x0a\x09aCollection do: [ :each |\x0a    \x09self loadPackage: each prefix: aString ]",
 | 
	
		
			
				|  |  | +messageSends: ["do:", "loadPackage:prefix:"],
 | 
	
		
			
				|  |  | +referencedClasses: []
 | 
	
		
			
				|  |  | +}),
 | 
	
		
			
				|  |  | +smalltalk.PackageLoader);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +smalltalk.addMethod(
 | 
	
		
			
				|  |  | +"_loadPackages_prefix_",
 | 
	
		
			
				|  |  | +smalltalk.method({
 | 
	
		
			
				|  |  | +selector: "loadPackages:prefix:",
 | 
	
		
			
				|  |  | +category: 'not yet classified',
 | 
	
		
			
				|  |  | +fn: function (aCollection,aString){
 | 
	
		
			
				|  |  | +var self=this;
 | 
	
		
			
				|  |  | +var $1;
 | 
	
		
			
				|  |  | +$1=smalltalk.send(smalltalk.send(self,"_new",[]),"_loadPackages_prefix_",[aCollection,aString]);
 | 
	
		
			
				|  |  | +return $1;
 | 
	
		
			
				|  |  | +},
 | 
	
		
			
				|  |  | +args: ["aCollection", "aString"],
 | 
	
		
			
				|  |  | +source: "loadPackages: aCollection prefix: aString\x0a\x09^ self new loadPackages: aCollection prefix: aString",
 | 
	
		
			
				|  |  | +messageSends: ["loadPackages:prefix:", "new"],
 | 
	
		
			
				|  |  | +referencedClasses: []
 | 
	
		
			
				|  |  | +}),
 | 
	
		
			
				|  |  | +smalltalk.PackageLoader.klass);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 |