(FILECREATED "24-Apr-85 01:15:02" {PHYLUM}<NOTECARDS>RELEASE1.2>NCSEARCHCARD.;3 5315 changes to: (FNS NC.MakeSearchCard) previous date: "13-Mar-85 00:56:32" {PHYLUM}<NOTECARDS>RELEASE1.2>NCSEARCHCARD.;2) (* Copyright (c) 1985 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT NCSEARCHCARDCOMS) (RPAQQ NCSEARCHCARDCOMS ((E (SETQ NC.SystemDate (DATE)) (UNMARKASCHANGED (QUOTE NC.SystemDate) (QUOTE VARS))) (VARS NC.SystemDate) (P (UNMARKASCHANGED (QUOTE NC.SystemDate) (QUOTE VARS))) (* * Stuff for the Notecards search card.) (FILES NCTEXTSUBSTANCE NCTEXTCARD) (FNS NC.MakeSearchCard NC.SearchForCards NC.AddSearchCard) (P (NC.AddSearchCard)))) (RPAQQ NC.SystemDate "24-Apr-85 01:15:03") (UNMARKASCHANGED (QUOTE NC.SystemDate) (QUOTE VARS)) (* * Stuff for the Notecards search card.) (FILESLOAD NCTEXTSUBSTANCE NCTEXTCARD) (DEFINEQ (NC.MakeSearchCard (LAMBDA (ListCardID Title NoDisplayFlg) (* rht: "24-Apr-85 01:07") (* Search for cards with specified characteristics and create a list card containing pointers to these cards. For now search is limited to cards whose title contains a specified string.) (* * rht 11/8/84: Fixed some confusion between ListCardID and ID variables.) (PROG (SearchString IDs WindowOrID Window) (SPAWN.MOUSE) (SETQ WindowOrID (NC.MakeTEditCard ListCardID (OR Title "SearchCard") NoDisplayFlg)) (NC.ActivateCard ListCardID) (SETQ Window (AND (WINDOWP WindowOrID) WindowOrID)) (SETQ SearchString (NC.AskUser "Please enter the search string" " -- " NIL T Window)) (COND ((OR (EQUAL SearchString "") (NOT SearchString)) (RETURN WindowOrID))) (NC.SetTitle ListCardID (SETQ Title (OR Title (CONCAT "Cards with %"" SearchString "%" in title")))) (AND Window (WINDOWPROP Window (QUOTE TITLE) Title)) (RESETLST (RESETSAVE (CURSOR WAITINGCURSOR)) (NC.PrintMsg Window T "Searching for cards ...") (SETQ IDs (bind Title ID for ID# from 1 to (SUB1 (SUBATOM (NC.GetNewID PSA.Database T) 3)) when (AND (SETQ Title (NC.FetchTitle (SETQ ID (NC.IDFromNumber ID#)))) (STRPOS SearchString Title)) collect ID)) (TEDIT.INSERT (NC.FetchSubstance ListCardID) (CONCAT " List compiled on: " (DATE) (CHARACTER 13)) 1) (for ID in IDs unless (EQ ListCardID ID) do (NC.InsertLinkBeforeMarker ListCardID ID NC.ListContentsLinkLabel NIL NIL PSA.Database)) (NC.PrintMsg Window NIL "Done!" (CHARACTER 13))) (BLOCK 250) (NC.ClearMsg Window T) (RETURN WindowOrID)))) (NC.SearchForCards (LAMBDA NIL (* rht: "31-Jan-85 21:23") (* Search for cards with specified characteristics and create a list card containing pointers to these cards. For now search is limited to cards whose title contains a specified string.) (PROG (SearchString ListCardID IDs Window) (SPAWN.MOUSE) (SETQ SearchString (NC.AskUser "Please enter the search string" " -- " NIL T)) (COND ((OR (EQUAL SearchString "") (NOT SearchString)) (RETURN))) (SETQ Window (NC.MakeNoteCard (QUOTE TEXT) (CONCAT "Cards with %"" SearchString "%" in title"))) (SETQ ListCardID (NC.IDFromWindow Window)) (RESETLST (RESETSAVE (CURSOR WAITINGCURSOR)) (NC.PrintMsg Window T "Searching for cards ...") (SETQ IDs (bind Title ID for ID# from 1 to (SUB1 (SUBATOM (NC.GetNewID PSA.Database T) 3)) when (AND (SETQ Title (NC.FetchTitle (SETQ ID (NC.IDFromNumber ID#)))) (STRPOS SearchString Title)) collect ID)) (TEDIT.INSERT (NC.FetchSubstance ListCardID) (CONCAT " List compiled on: " (DATE) (CHARACTER 13)) 1) (for ID in IDs unless (EQ ListCardID ID) do (NC.InsertLinkBeforeMarker ListCardID ID NC.ListContentsLinkLabel (QUOTE Title) NIL PSA.Database)) (NC.PrintMsg Window NIL "Done!" (CHARACTER 13))) (BLOCK 250) (NC.ClearMsg Window T) (RETURN)))) (NC.AddSearchCard (LAMBDA NIL (* fgh: "15-Feb-85 13:14") (NC.AddCardType (QUOTE Search) (QUOTE Text) (QUOTE TEXT) (BQUOTE ((MakeCardFn , (FUNCTION NC.MakeSearchCard)))) (BQUOTE ((LinkDisplayMode Title) (CardDisplayedInMenuFlg , T)))))) ) (NC.AddSearchCard) (PUTPROPS NCSEARCHCARD COPYRIGHT ("Xerox Corporation" 1985)) (DECLARE: DONTCOPY (FILEMAP (NIL (929 5213 (NC.MakeSearchCard 939 . 3074) (NC.SearchForCards 3076 . 4853) ( NC.AddSearchCard 4855 . 5211))))) STOP