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

system.verbs.apps.FinderMenu.cards.closeType

on closeType (typestring, creatorstring) {
	<<called from the type/creator card when the OK button is hit
		<<we save the fields and close the card if the data is valid
	on check4chars (s, msg) {
		if sizeof (s) == 4 {
			return (true)}
		else {
			msg = "File " + msg + " must be exactly four characters long. “";
			msg = msg + s + "” has " + sizeof (s) + " characters.";
			dialog.alert (msg);
			return (false)}}; <<don't get rid of dialog
	if not check4chars (typestring, "Type") {
		return (false)};
	if not check4chars (creatorstring, "Creator") {
		return (false)};
	findermenu.cards.data.ok = true;
	findermenu.cards.data.typestring = typestring;
	findermenu.cards.data.creatorstring = creatorstring;
	card.close ();
	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.