From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,31849c839c76fbc5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-25 14:50:19 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!ppp-1-160.cvx6.telinco.NET!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: editors - open source - written in ADA? Date: Sun, 25 Nov 2001 22:44:56 -0000 Message-ID: <9trsj5$4jgf9$2@ID-25716.news.dfncis.de> References: <20011115154401.6637e73f.tonygair@btinternet.com> <1fLkmUwU74fK@eisner.encompasserve.org> <9tbdvi$4cv$1@nh.pace.co.uk> NNTP-Posting-Host: ppp-1-160.cvx6.telinco.net (212.1.156.160) X-Trace: fu-berlin.de 1006728614 4833769 212.1.156.160 (16 [25716]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:16958 Date: 2001-11-25T22:44:56+00:00 List-Id: "Marin David Condic" wrote in message news:9tbdvi$4cv$1@nh.pace.co.uk... > What about making a subprogram that takes an Unbounded_String as a parameter > and allows the user to edit the content of that string? A system dependent > or user selectable editor could underly it - or perhaps some > semi-standardized editor could be built under it and made in flavors that > would work on popular platforms? Would this be a useful thing to have as a > standard component? > > I could imagine two useful versions: One that just dealt with standard > character data and one that dealt with XML. THere might need to be some > other options as well with respect to how the editor is displayed & > interacted with, but it seems like as nice utility to have around in some > standard context. In a GUI environment, this would be a widget? What might be pretty handy would be for Ada implementations to add something like: procedure Text_IO.Edit_Line ( File : in File_Type; Item : in out String; Last : in out Natural); If File is an interactive terminal (or equivalent), this procedure would initialise the line to Item(first..Last) and then allow the user a reasonable set of editing facilities (e.g. cursor left/right, insert, delete), before returning the result in Last and Item(first..Last). If File is not interactive, the procedure would simply behave as Get_Line(File,Item,Last). I don't suppose this is a new idea. Are there any open-source 'screen' packages (which allow at least clear screen, cursor addressing, and restricted-field data entry), written in Ada? -- Best wishes, Nick Roberts