[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test-[jscocoa] 008 zero arg autocall

Code

#OSX = TargetOS ifFalse: [self cancelFileIn]!
self javascriptCodeFollows!

	var appName1 = NSWorkspace.sharedWorkspace.activeApplication.objectForKey('NSApplicationName');
	var appName2 = NSWorkspace.sharedWorkspace.activeApplication.objectForKey('NSApplicationName');
print("appName1="+appName1);
print("appName2="+appName2);

	var numBundles1 = NSBundle.allBundles.count;
	var bundles = NSBundle.allBundles;
	var numBundles2 = bundles.count;
	
	if (String(appName1) != String(appName2))	throw 'zeroarg caller failed 1'
	if (String(appName1) != String(appName2))	throw 'zeroarg caller failed 2'
	if (numBundles1 != numBundles2)			throw 'zeroarg valueOf caller failed'

References