Monday, November 08, 2010 at 12:05 AM.


on newScriptObject (s, adr) {
		<<9/29/10; 11:57:09 AM by DW
			<<Code cleanup.
		<<04/09/00; 12:02:58 PM by PBS
			<<(Try to) compile the script that's been created. This prevents unwanted compile-changes dialogs from showing up.
		<<3/7/99 by AR
			<<New verb for 6.0, creates a new script object at the specified address.
			<<This is a clone of op.newOutlineObject.
	if defined (adr^) {
		if typeof (adr^) != scriptType {
			new (scriptType, adr)}}
	else {
		new (scriptType, adr)};
	local (oldtarget = target.set (adr));
	op.wipe ();
	op.insert (s, down);
	op.firstSummit ();
	op.deleteLine ();
	try {script.compile (adr)}; //04/09/00
	try {target.set (oldtarget)};
	return (true)}
<<bundle //test code
	<<newscriptobject ("return (false)", @scratchpad.testscript)

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.