calling handler in loaded script

I can’t even get the following to work.

my script lib


on TestHandle()
	return {gotnum:true, returnedresult:1.0}
end TestHandle

my script


property myLib : load script (alias "path to my script lib")

on run
set theResult to tell myLib to TestHandle() -- doesn't work
set theResult to (tell myLib to TestHandle() -- also doesn't work
end run

Any thoughts on what is wrong. It wont compile in Smile. What can I do to make it work.

Kevin

This might work.

property myLib : load script (alias "path to my script lib")

on run
	set theResult to myLib's TestHandle()
end run

Thanks

That’s done the trick.

Kevin

The other way to do it is:

property myLib : load script (alias "path to my script lib") 

on run 
   tell myLib to set theResult to TestHandle() 
end run

Jon