-- ViewRecScript.tioga cd; cd ViewRecDemo; addd /cedar/cedar6.0/viewers/ Bringover -p [Cedar]Top>ViewRec.DF _ ViewRec.ViewInterface[name: "Rope", otherStuff: NIL, viewerInit: [name: "Rope", iconic: FALSE]] -- Try Cat, Concat, Compare, &etc. -- Demo the IO interface: Bringover -p [Cedar]Top>StatementInterpreter.DF EQT { ioType: TYPE = AMMiniModel.AcquireIRType["IO"]; ViewStream: PROC [s: IO.STREAM, name: ROPE] RETURNS [rv: ViewRec.RecordViewer] = {bl: ViewRec.BindingList = ViewRec.BindAllOfATypeFromTVs[CODE[ioType], CODE[IO.STREAM], NIL, [Value[NIL, &up[s]]]]; rv _ ViewRec.ViewInterface[name: "IO", specs: bl, otherStuff: NIL, viewerInit: [name: name]]}; NULL} _ &vio _ ViewerIO.CreateViewerStreams["IO.STREAM demo"] _ ViewStream[&vio.out, "out"] _ ViewStream[&vio.in, "in"] -- Do out.GetInfo, PutRope, PutChar, Flush, EraseChar -- Do in.GetInfo, EndOf, CharsAvail, PeekChar, GetChar, Backup, GetCedarTokenRope, -- GetInt, GetReal, GetRopeLiteral, SkipWhitespace, others that work (GetUnpackedTime doesn't) -- N.B.: &vio.in is an edited stream -- Don't worry about things that fail most of them you can simply abort. I think the worst you can do is close a stream and to fix that you can simply create a new one and start over. -- Demo the FS interface: -- Bind the BasicTime.GMT's, because ViewRec doesn't have default handling for TYPE[2]'s: _ ViewRec.ViewInterface[name: "FS", specs: &bl, otherStuff: NIL, viewerInit: [name: "FS"]] -- Do ExpandName, ConstructFName, FileInfo, Copy, Delete, Rename, SetKeep Êê˜Jšœ˜Jšœ˜Jšœ˜J˜Jšœ1˜1Jšœa˜aJ˜J˜"J˜J˜J˜J˜Jšœ>˜>Jšœ˜Jšœ Ïkœ$Ïn œœœœœœWœ œœœœ œKœœ˜ÛJšœ7˜7Jšœ˜Jšœ˜J˜J˜5J˜RJ˜^J˜$J˜¹J˜J˜J˜J˜YJšœ<œ˜ZJ˜IJ˜—…—