(FILECREATED "11-Dec-86 12:30:22" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH171.;2 5214
changes to: (VARS RHTPATCH171COMS)
(FNS NC.OpenPropListEditor))
(* Copyright (c) 1986 by Xerox Corporation. All rights reserved.)
(PRETTYCOMPRINT RHTPATCH171COMS)
(RPAQQ RHTPATCH171COMS ((* * Fixes bug #318: prop values that are lists, but not lists of links, no
longer get broken out by prop list editor.)
(* * Change to NCCARDS)
(FNS NC.OpenPropListEditor)))
(* * Fixes bug #318: prop values that are lists, but not lists of links, no longer get broken
out by prop list editor.)
(* * Change to NCCARDS)
(DEFINEQ
(NC.OpenPropListEditor
(LAMBDA (WindowOrTextStream PropList Title ShowOnlyFlg MakeImageObjFlg ShowLinksFlg)
(* rht: "11-Dec-86 12:26")
(* Open a property list editor above the card
specified by TextStream , which is either a TextStream
or a Window)
(* * rht 8/11/86: Now takes ShowLinksFlg arg and passes to NC.PropListEditorOpenP so that we don't bail out if
there's an open proplist not of our type.)
(* * rht 11/13/86: Now hangs Card object off prop list editor's window so that we can get to the card from the
proplist editor at close time.)
(* * rht 12/11/86: Now only breaks out list if we're under ShowLinks.)
(PROG ((Window (WINDOW.FROM.TEDIT.THING WindowOrTextStream))
(SystemProperties (QUOTE (ID Updates ItemDate LinksDate PropsDate TitleDate)))
EditWindow CardUID Card) (* Make sure there is no prop list editor already
there)
(AND (NC.PropListEditorOpenP Window ShowLinksFlg)
(RETURN))
(SETQ CardUID (fetch (Card UID) of (SETQ Card (NC.CoerceToCard Window))))
(* FOR each prop/value pair with LISTP value.
Make a series of individual prop/value pairs
corresponding to the elements of the LISTP)
(SETQ PropList (for Item on PropList by (CDDR Item)
join (COND
((AND (LISTP (CADR Item))
(type? Link (CAADR Item)))
(for Element in (CADR Item)
collect (create PropListItem
PropertyName ←(CAR Item)
Value ← Element
OriginalListFlg ← T
AllowEditFlg ← NIL
AllowSelectFlg ← NIL
ButtonFn ← NIL)))
(T (LIST (create PropListItem
PropertyName ←(CAR Item)
Value ←(CADR Item)
OriginalListFlg ← NIL
AllowEditFlg ← NIL
AllowSelectFlg ← NIL
ButtonFn ← NIL))))))
(* If specified, translate all NOTECARDLINK values
into Image Objects for display.)
(AND MakeImageObjFlg (for Item in PropList bind LinkIcon
when (type? Link (fetch (PropListItem Value)
of Item))
do (replace (PropListItem Value) of Item
with (SETQ LinkIcon (NC.MakeLinkIcon
(fetch (PropListItem Value) of Item)))
(IMAGEOBJPROP LinkIcon (QUOTE
InsidePropListEditor)
T))))
(* Indicate which properties can be edited by user.)
(for Item in PropList do (COND
((FMEMB (fetch (PropListItem PropertyName)
of Item)
SystemProperties)
(replace (PropListItem AllowEditFlg) of Item
with T)
(replace (PropListItem AllowSelectFlg) of Item
with T))
(ShowOnlyFlg (replace (PropListItem AllowEditFlg)
of Item with NIL)
(replace (PropListItem AllowSelectFlg)
of Item with T))
(T (replace (PropListItem AllowEditFlg) of Item
with NIL)
(replace (PropListItem AllowSelectFlg)
of Item with NIL))))
(* Call the prop list editor)
(ATTACHWINDOW (SETQ EditWindow (CREATEW (CREATEREGION 1000 2000 100 100)
(OR Title "Edit Property List")
NIL T))
Window
(QUOTE TOP)
(QUOTE JUSTIFY)
(QUOTE LOCALCLOSE))
(WINDOWADDPROP EditWindow (QUOTE CLOSEFN)
(FUNCTION FREEATTACHEDWINDOW)
T)
(WINDOWPROP EditWindow (QUOTE PropListEditor)
(COND
(ShowOnlyFlg (QUOTE ShowOnly))
(T T)))
(WINDOWPROP EditWindow (QUOTE SavedCardObject)
Card)
(NC.EditPropList PropList EditWindow ShowOnlyFlg)
(RETURN EditWindow))))
)
(PUTPROPS RHTPATCH171 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
(FILEMAP (NIL (646 5132 (NC.OpenPropListEditor 656 . 5130)))))
STOP