Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Text Editors?

 [1/18] from: izkata:aol at: 11-May-2002 14:14


-- Attached file included as plaintext by Listar -- Return-Path: <[rebol-bounce--rebol--com]> Received: from rly-xh04.mx.aol.com (rly-xh04.mail.aol.com [172.20.115.233]) by air-xh05.mail.aol.com (v84.16) with ESMTP id MAILINXH53-0427104344; Sat, 27 Apr 2002 10:43:44 -0400 Received: from cobalt.reboltech.com (cobalt.reboltech.com [208.201.243.114]) by rly-xh04.mx.aol.com (v84.15) with ESMTP id MAILRELAYINXH44-0427104311; Sat, 27 Apr 2002 10:43:11 -0400 Received: from cobalt.reboltech.com (localhost [127.0.0.1]) by cobalt.reboltech.com (8.9.3/8.9.3) with ESMTP id HAA16303; Sat, 27 Apr 2002 07:39:10 -0700 Received: with LISTAR (v0.129a; list rebol); Sat, 27 Apr 2002 07:39:10 -0700 (PDT) Received: from holt.mail.atl.earthlink.net (holt.mail.mindspring.net [207.69.200.187]) by cobalt.reboltech.com (8.9.3/8.9.3) with ESMTP id HAA16294 for <[rebol-list--rebol--net]>; Sat, 27 Apr 2002 07:39:09 -0700 From: [Izkata--aol--com] Received: from antoninus-z.mspring.net ([207.69.231.70] helo=antoninus.mspring.net) by holt.mail.atl.earthlink.net with smtp (Exim 3.33 #1) id 171TNl-0006uC-00 for [rebol-list--rebol--net]; Sat, 27 Apr 2002 10:41:01 -0400 X-MindSpring-Loop: [rebol-list--rebol--com] Received: from imo-d10.mx.aol.com ([205.188.157.42]) by antoninus.mspring.net (Earthlink Mail Service) with ESMTP id ucle3q.qjd.37kbpq6 for <[rebol-list--rebol--com]>; Sat, 27 Apr 2002 10:40:58 -0400 (EDT) Received: from [Izkata--aol--com] by imo-d10.mx.aol.com (mail_out_v32.5.) id i.170.cc4e96c (3948) for <[rebol-list--rebol--com]>; Sat, 27 Apr 2002 10:40:47 -0400 (EDT) Message-ID: <[170--cc4e96c--29fc126f--aol--com]> Date: Sat, 27 Apr 2002 10:40:47 EDT Subject: [REBOL] text-editor/word-processer To: [rebol-list--rebol--com] MIME-Version: 1.0 Content-type: text/plain X-Mailer: AOL 6.0 for Windows US sub 10560 X-archive-position: 19442 X-listar-version: Listar v0.129a X-original-sender: [Izkata--aol--com] Precedence: bulk Reply-to: [rebol-list--rebol--com] X-list: rebol Sorry about that empty E-mail, I accidentally pressed the Send hotkey. I've seen and used a type of text editor: ctx-edit: [ prefs: view-root/edit-prefs.r dirty-edit: false this-file: none this-app: none t1: s1: h1: f1: none edit-prefs: context [ offset: 40x40 size: 640x480 wrap: on ] ed-lo: layout/offset [ style tx vtext bold 40x22 font [colors: [255.255.255 200.200.200]] middle center size 640x320 origin 0 space 0 across tx "Open" [open-as] tx "New" [new-file] tx "Find" [find-text] tx "Save" [save-file] tx "Save-As" 60 [save-as] tx "Do" [if error? try [do t1/text] [alert "There was an error somewhere."]] tx "Print" [write %printer.html rejoin [{<HTML> <HEAD> <TITLE> AutoPrinter </TITLE> </HEAD> <BODY> <PRE> } t1/text { </PRE> <SCRIPT LANGUAGE="JavaScript"> self.print(); self.close(); </SCRIPT> </BODY> </HTML>}] browse %printer.html] tx "Quit" [quit-edit] pad 8 text "File:" bold black right middle 30x22 h1: at f1: info 300x22 base-color + 40.40.40 return t1: area 624x320 font [name: font-fixed] para [tabs: 28 origin: 4x4] [dirty-edit: any [dirty-edit face/dirty?]] with [color: snow feel: make feel [redraw: none]] s1: slider 16x320 [scroll-para t1 s1] ] 0x0 ed-lo/color: base-color t1/flags: [] save-lo: layout [ origin 10x10 space 8x4 style btn button 140 vtext bold "Edit Save Options" 140 center pad 0x4 btn "Save" [hide-popup save-file result: true] btn "Save As..." [hide-popup result: save-as] btn "Quit - No Save" [hide-popup quit-now] btn "Cancel" [hide-popup] ] save-lo/color: base-color ff: fb: fc: fp: none find-lo: layout [ space 4x4 across origin 16x16 label "Find:" ff: field [search ff/text fc/data false] pad 4 fb: button 80 "Find" [search ff/text fc/data false] return at ff/offset + 0x32 fc: check vtext "Match case" at fb/offset + 0x32 button 80 "Cancel" [unview/only find-lo] ] find-lo/color: base-color deflag-face ff tabbed resize: func [size] [ ed-lo/size: size t1/size: size - (s1/size * 1x0) - (f1/size * 0x1) s1/offset/x: t1/offset/x + t1/size/x s1/size/y: t1/size/y f1/size/x: size/x - h1/x t1/line-list: none ] refresh: does [ show ed-lo s1/redrag t1/size/y / max 1 second size-text t1 ] save-prefs: has [str] [ str: copy "" edit-prefs/offset: ed-lo/offset edit-prefs/size: ed-lo/size foreach w next first edit-prefs [ append str rejoin [w ": " edit-prefs/:w newline] ] write prefs str ] open-as: has [file] [ if not save-edit [exit] file: request-file/keep/file/title this-file "Select a file to open:" Open if not all [file file: pick file 1] [return false] open-file file ] new-file: does [ if not save-edit [exit] open-file none ] save-as: has [file] [ file: any [this-file %temp.txt] file: request-file/keep/file/title file "Select a file or enter a file name:" "Save" if not all [file file: pick file 1] [return false] this-file: file save-file true ] save-file: has [file] [ if not this-file [save-as exit] f1/text: this-file f1/color: gold show f1 write this-file t1/text wait 0.2 f1/color: base-color + 40.40.40 show f1 dirty-edit: t1/dirty?: false true ] open-file: func [file /local txt] [ if file = 'same [file: this-file] either f1/text: this-file: file [ if error? try [txt: read file] [ request/ok reform ["Cannot read file:" file] f1/text: this-file: none txt: "" ] ] [ txt: "" ] dirty-edit: false t1/dirty?: false s1/data: 0 t1/para/scroll: 0x0 t1/text: t1/data: copy txt t1/line-list: none unfocus refresh focus t1 system/view/caret: t1/text ] result: none ask-save: does [result: none inform save-lo result] save-edit: does [either any [dirty-edit t1/dirty?] [ask-save] [true]] do-file: does [save-edit launch/secure-cmd this-file] quit-edit: does [if save-edit [quit-now]] quit-now: does [ if viewed? find-lo [unview/only find-lo] unview/only ed-lo dirty-edit: false t1/dirty?: false ] caret: none start: none last-str: last-case: last-pat: none find-text: does [ caret: system/view/caret view/new/title find-lo "Find" find-lo/changes: 'activate show find-lo focus ff ] search: func [str case pat] [ unview/only find-lo start: any [caret t1/text] last-str: str last-case: case last-pat: pat find-str str case pat ] find-str: func [str case pat] [ if not find-next str case pat [ start: none if not find-next str case pat [system/view/caret: caret] ] ] find-again: does [ start: any [system/view/caret t1/text] if last-str [find-str last-str last-case last-pat] ] find-next: func [str case pat /local txt] [ if txt: find' any [start t1/text] str case pat none [ focus t1 system/view/caret: txt if not pat [ system/view/highlight-start: txt system/view/caret: system/view/highlight-end: start: find' txt str case pat true ] scroll-to txt true ] ] find': func [txt str case pat tal /local code p] [ code: copy [find txt str] if any [case pat tal] [ change/only code p: make path! [find] if case [insert tail :p 'case] if pat [insert tail :p 'any] if tal [insert tail :p 'tail] ] do code ] scroll-to: func [txt /local xy] [ xy: (caret-to-offset t1 txt) - t1/para/scroll t1/para/scroll: min 0x0 t1/size / 2 - xy s1/data: (second xy) / max 1 second size-text t1 show [s1 t1] ] keymap: [ #"^S" [save-file] #"^W" [quit-edit] #"^Q" [quit-edit] #"^O" [open-as] #"^N" [new-file] #"^E" [do-file] #"^F" [find-text] #"^G" [find-again] F3 [find-text] F5 [do-edit] page-up [scroll-edit true -1] page-down [scroll-edit true 1] ] scroll-edit: func [page n] [ s1/data: s1/data + (n * (either page [t1/size/y] [t1/font/size]) / max 1 second size-text t1 ) show s1 scroll-para t1 s1 ] init: does [ ed-lo/feel: make ed-lo/feel [ detect: func [face event] [ switch event/type [ offset [save-prefs] scroll-line [scroll-edit false event/offset/y] scroll-page [scroll-edit true event/offset/y] resize [ resize max 100x64 ed-lo/size refresh save-prefs return true ] key [switch event/key keymap] close [quit-edit] ] event ] ] ] view-file: func [file] [ if not save-edit [exit] t1/text: none t1/line-list: none either viewed? ed-lo [ ed-lo/changes: 'activate show ed-lo ] [ if exists? prefs [edit-prefs: make edit-prefs load/all prefs] t1/para/wrap?: edit-prefs/wrap ed-lo/offset: edit-prefs/offset if outside? system/view/screen-face/size ed-lo/offset + 20x20 [ ed-lo/offset: 40x40 save-prefs ] resize edit-prefs/size view/new/title/options ed-lo "Editor" [resize] init center-face/with save-lo ed-lo center-face/with find-lo ed-lo ] open-file file if 1 = length? system/view/screen-face/pane [do-events] ] ] editor: func [file /local tmp][ either exists? tmp: view-root/desktop/scripts/edit.r [do/args tmp file] [ if block? ctx-edit [ctx-edit: context ctx-edit] ctx-edit/view-file file ] ] editor none But, I've never seen a word processor for REBOL. As long as it uses rebol script in the save file, I'll use it. I don't have any idea on how to make one myself, because I'm only 14, and can't even do simple parsing very easily. Daniel S.

 [2/18] from: ethanak:interclub:pl at: 11-May-2002 23:33


On May 11 at 14:14 [Izkata--aol--com] wrote:
> -- Attached file included as plaintext by Listar --
[cut] Grrrr.....
> But, I've never seen a word processor for REBOL.
Do you know the magic word "notepad"? -- Namari=EB ethanak

 [3/18] from: izkata:aol at: 12-May-2002 15:36


Hello? Notepad IS a text editor. I'm looking for a REBOL type of Microsoft Word. Daniel S.

 [4/18] from: jason:cunliffe:verizon at: 12-May-2002 20:48


Hi Daniel I don't really understand what you mean by "REBOL type of Microsoft Word." What do you want it to do? Please try to explain again .. Do you mean you want a sophisticated word processor like MSWord, with stylesheets, WYSIWYG font control, graphics embedding etc. But you want one which is written in REBOL? Something you can control, study and also extend in REBOL yourself? If so, I then I believe it surely does not exist... But perhapsyou do not want ALL of that functionality or conmplexity. Robert Muench has been developing an excellent tool called make-doc-pro.r http://www.robertmuench.de/ It's a great tool to study, and experiment with. Very useful too! best wishes ./Jason

 [5/18] from: greggirwin:mindspring at: 12-May-2002 21:09


Hi Daniel, << Hello? Notepad IS a text editor. I'm looking for a REBOL type of Microsoft Word. >> What you're probably after is a programmer's editor for REBOL, like CodeWright, VIM, SlickEdit, etc. A word processor generally makes for a very bad programmer's editor. Many of the programmer's editors out there already have at least one REBOLer using them who has cooked up a syntax file for them (to do syntax highlighting and such). The trouble with recommending editors is that they are a very subjective area. There are a number of free ones out there (e.g. ConText for Windows) that you might download to get a feel for the possibilities. --Gregg

 [6/18] from: info::id-net::ch at: 13-May-2002 10:15


I like EditPlus. It doesn't take a lots of ressources, you can find a color parser for rebol and you got a lots of functions within. Powerful!

 [7/18] from: izkata:aol at: 13-May-2002 20:10


Sorry, I guess I should've explained more... You know how MSWord has different font sizes and Bold/Italic/Underline? All I'm looking for is a text editor/word processer written in REBOL that does that. Daniel S.

 [8/18] from: greggirwin:mindspring at: 13-May-2002 21:53


Hi Daniel, << You know how MSWord has different font sizes and Bold/Italic/Underline? All I'm looking for is a text editor/word processer written in REBOL that does that. >> No such luck. Some people have made some pretty neat text colorization examples here and there. Cyphre, in particular, has done some great stuff. No complete word processor though. --Gregg

 [9/18] from: rebolek:seznam:cz at: 14-May-2002 8:04


><< You know how MSWord has different font sizes and
Bold/Italic/Underline? All I'm looking for is a text editor/word processer written in >>REBOL that does that. >>
>No such luck. Some people have made some pretty neat text colorization
examples here and there. Cyphre, in particular, has done some
>great stuff. No complete word processor though.
And with this version of View is not possible. If you're thinking about writing one, please forget it. You run in numerous problems with allign fonts, 'size-text giving strange results, you cannot find where's font's baseline etc etc etc... REBOL/View will need some native support for rich text (and unicode) to do that kind of thing. Me and Cyphre spend lots of nights on this and each one made cca 3 totally different versions of some different color/size/style text-editors, but every was far from perfect. If you forget different size of fonts you can do that with some problems. Bye, Bolek(re)

 [10/18] from: izkata:aol at: 14-May-2002 8:59


Alright, forget the font sizes - how about an example for the other stuff? Daniel S.

 [11/18] from: greggirwin:mindspring at: 14-May-2002 10:45


Hi Bolek, How did the demo contest every turn out? I didn't see any results posted anywwhere. --Gregg

 [12/18] from: rebolek:seznam:cz at: 15-May-2002 7:59


I've never published my results but Cyphre's colour-text can be found in color version of RIM. b

 [13/18] from: rebolek:seznam:cz at: 16-May-2002 8:00


Well, REBOL/Demo... I've been expecting that question... :) When I started RDC I thought I receive some demos or no demos at all. In the first case I'll publish them on dedicated REB, in the second case I'll make a hoax REB with my demos. But...I received one demo. So I was doubtful about RDC. Is the autor of the demo winner when there is no competition? Or should I release my demos as hoax to make some competition? How to solve this? And I made...nothing (well not the best solution at all - I know and sorry about that) So, Gregg, I'm glad to say that the winning demo is FIREWORKS and YOU - as the author - ARE THE WINNER! And no, ther is no second prize, so the winner takes it all ;) Cheers, Bolek(re)

 [14/18] from: greggirwin:mindspring at: 16-May-2002 10:40


Hey Bolek, Well, that's both sad and funny. I'm sorry more people didn't send in at least a little something. Thanks for trying anyway. I will gladly donate my winnings back to be used for the next round. :) --Gregg

 [15/18] from: rebolek:seznam:cz at: 17-May-2002 8:44


Hi Greg, I really appreciate that, but who knows, maybe you win next year too ;) At least, you're the HISTORICALLY FIRST WINNER OF RDC ;) bye, bolek

 [16/18] from: nitsch-lists:netcologne at: 17-May-2002 21:55


Am Freitag, 17. Mai 2002 08:44 schrieb Boleslav Brezovsky:
> Hi Greg, > > I really appreciate that, but who knows, maybe you win next year too ;) > > At least, you're the HISTORICALLY FIRST WINNER OF RDC ;) >
Congratulations, Greg! Hmm, when is the next Conest?
> bye, bolek > -----Original Message-----
<<quoted lines omitted: 8>>
> I will gladly donate my winnings back to be used for the next round. :) > --Gregg
greetings Volker

 [17/18] from: laplace::worldnet::fr at: 17-May-2002 21:25

Re: Text Editors? I found this one


I didn't try yet it seems very promising: http://www.fixedsys.com/context/

 [18/18] from: rebolek:seznam:cz at: 18-May-2002 23:03

Re: Text Editors?


>> I really appreciate that, but who knows, maybe you win next year too ;) >> >> At least, you're the HISTORICALLY FIRST WINNER OF RDC ;) >> > >Congratulations, Greg! >Hmm, when is the next Conest?
Hmm, good question...I don't know... Maybe next year? Or this autnum? Do you have some demos to contribute? If yes it can be sooner than next year ;-) Well, it depends just on me,so... ;-) bye, bb

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted