Skip to content

Instantly share code, notes, and snippets.

@cupuyc
Created September 13, 2011 14:25
Show Gist options
  • Save cupuyc/1213922 to your computer and use it in GitHub Desktop.
Save cupuyc/1213922 to your computer and use it in GitHub Desktop.
kickFms replacements
//fasade.asc
// First place that accept incoming RPC from client side.
// ---------------------------------------------------------------------------------
Client.prototype.__resolve = function(ctype) {
// Check if a component class corresponding to ctype exists if so
// return a new facade factory for ctype components
if ( gFrameworkFC.components[ctype] != null )
return this[ctype] = new FCFactory(this, ctype);
// else do nothing, forcing a NetConnection.Call.Failed
}
// component.asc
// Component inside
// ---------------------------------------------------------------------------------
FCComponent = function( derivedTypeName, derivedType ) {
..........
derivedType.instances = new Object();
// Provide a create method so non-dynamic classes can be created manually
derivedType.create = function(name) { return this.instances[name] = new this(name); }
..........
gFrameworkFC.registerComponent( derivedTypeName, derivedType );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment