| 
														
															@@ -33,7 +33,6 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															    | 
														 | 
														
														 | 
														
															    | 
														 | 
													
												
											
												
													
														| 
														 | 
														
															    ==================================================================== */ 
														 | 
														
														 | 
														
															    ==================================================================== */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 /* Smalltalk constructors definition */ 
														 | 
														
														 | 
														
															 /* Smalltalk constructors definition */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 function SmalltalkObject(){}; 
														 | 
														
														 | 
														
															 function SmalltalkObject(){}; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -213,20 +212,24 @@ function Smalltalk(){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	/* Handles JS method calls. Assumes that a single array or single argument was passed from Jtalk. 
														 | 
														
														 | 
														
															 	/* Handles JS method calls. Assumes that a single array or single argument was passed from Jtalk. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	   Example: someJSObject foo: #(1 2 3) -> someJSObject.foo(1,2,3); */ 
														 | 
														
														 | 
														
															 	   Example: someJSObject foo: #(1 2 3) -> someJSObject.foo(1,2,3); */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	var jsSelector = selector.replace(/_/g, ''); 
														 | 
														
														 | 
														
															 	var jsSelector = selector.replace(/_/g, ''); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	var jsFunction = receiver[jsSelector]; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	var jsProperty = receiver[jsSelector]; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	var jsArguments; 
														 | 
														
														 | 
														
															 	var jsArguments; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	if(receiver.klass === undefined && typeof jsFunction === "function") { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	    if(args[0] && args[0].constructor === Array) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		jsArguments = args[0] 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	    } else { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		jsArguments = [args[0]] 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	if(receiver.klass === undefined) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	    if(typeof jsProperty === "function") { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		if(args[0] && args[0].constructor === Array) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		    jsArguments = args[0] 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		} else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		    jsArguments = [args[0]] 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		return jsProperty.apply(receiver, jsArguments); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	    } else if(jsProperty !== undefined) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		return jsProperty 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	    } 
														 | 
														
														 | 
														
															 	    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	    return jsFunction.apply(receiver, jsArguments); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	} 
														 | 
														
														 | 
														
															 	} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	/* Handles not understood messages. Also see the Jtalk counter-part  
														 | 
														
														 | 
														
															 	/* Handles not understood messages. Also see the Jtalk counter-part  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	   Object>>doesNotUnderstand: */ 
														 | 
														
														 | 
														
															 	   Object>>doesNotUnderstand: */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	if(!receiver.klass) {throw(receiver + ' is not a Jtalk object and ' + jsSelector + ' is not a function')} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	if(!receiver.klass) {throw(receiver + ' is not a Jtalk object and ' + jsSelector + ' is undefined')} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	 
														 | 
														
														 | 
														
															 	 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	return receiver._doesNotUnderstand_( 
														 | 
														
														 | 
														
															 	return receiver._doesNotUnderstand_( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	    st.Message._new() 
														 | 
														
														 | 
														
															 	    st.Message._new() 
														 |