DIRECTORY Rope, ViewerTools, ViewerClasses, TEditOps, TextNode, Buttons, IO; ShowPosition: PROGRAM IMPORTS ViewerTools, TEditOps, TextNode, Buttons, IO = BEGIN showPositionButton: Buttons.Button _ Buttons.Create[info: [name: "Position 000000"], proc: ShowPositionButton, documentation: "Posts the position of the current input focus"]; loc: INT _ 0; ShowPositionButton: Buttons.ButtonProc = TRUSTED { IF mouseButton=blue THEN { destViewer: ViewerClasses.Viewer _ ViewerTools.GetSelectedViewer[]; stuff: Rope.ROPE _ IO.PutFR["%06d", IO.int[loc]]; IF destViewer # NIL THEN destViewer.class.notify[destViewer, LIST[stuff]]; } ELSE loc _ TextNode.LocNumber[at: TEditOps.CaretLoc[TEditOps.GetSelData[]], skipCommentNodes: TRUE] - 1; Buttons.ReLabel[NARROW[parent], IO.PutFR["Position %06d", IO.int[loc]]]; }; END. xShowPosition.mesa Michael Plass, December 15, 1982 10:38 am Last Edited by: Ramshaw, September 24, 1983 12:41 pm ÊÓ˜J™J™)J™4šÏk ˜ Jšœ?œ˜BJ˜—šœ˜Jšœ+˜4Jšœ˜Jšœ¯˜¯Jšœœ˜ šœ)œ˜2šœœ˜J˜CJšœœœ ˜1Jšœœ2˜JJ˜—JšœZœ˜hJšœœ œœ ˜HJ˜—Jšœ˜——…—,w