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

system.verbs.apps.FinderClassic.makeWindow

on makeWindow (path, wtype, adrwindow) { <<build a FinderWindowType parameter from the path
	<<make one of these:
		<<finderWindowRec = RECORD
			<<windowType : LongInt;
			<<aliasType : DescType; { set to typeAlias }
			<<aliasLength : LongInt;  { set to length of alias record }
			<<alias : aliasRecord;
			<<END;
	local (file, wdata);
	if wtype == 0 { <<zero is main window; path must be to a folder
		if not file.isfolder (path) { <<non-folders can't have their own window
			scripterror ("This verb operates on a Finder window; the path must be to a folder");
			return (false)}};
	file = alias (path);
	wdata = binary (wtype); <<zero is main window for folder; 11 is Info; 13 is Sharing
	wdata = wdata + typeOf (file) + sizeof (file);
	adrwindow^ = wdata + file;
	setbinarytype (adrwindow, 'fwin');
	return (true)}



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.