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

Rebol Editor

 [1/24] from: louisaturk::coxinet::net at: 11-Mar-2002 13:34


Hi rebols, Whatever happened to the text editors that were being written in rebol? One was called Reb Edit, if I remember correctly. Is anyone still using them? Are they still being developed? Louis

 [2/24] from: louisaturk:eudoramail at: 11-Mar-2002 14:56


Hi rebols, Whatever happened to the text editors that were being written in rebol? One was called Reb Edit, if I remember correctly. Is anyone still using them? Are they still being developed? Louis

 [3/24] from: ryanc:iesco-dms at: 11-Mar-2002 12:48


Mine is on hold until I resolve some design delimas imposed by color text and graphical editing. My last experimental hack job is at: http://www.sonic.net/~gaia/projects/reb-editor.r Its not really usable yet. --Ryan Dr. Louis A. Turk wrote:
> Hi rebols, > Whatever happened to the text editors that were being written in
<<quoted lines omitted: 5>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Note: When sending me email directly, always make sure to include my name

 [4/24] from: louisaturk:eudoramail at: 11-Mar-2002 21:09


Ryan, I'll look forward to seeing what you eventually come up with. I always learn from your posts. We really need an editor written in rebol specifically for rebol programming. Louis At 12:48 PM 3/11/2002 -0800, you wrote:

 [5/24] from: al:bri:xtra at: 24-Jun-2002 15:31


I, too, would like a Rebol editor written in Rebol that was at least equal to my Metapad or CREdit programs. At the moment, I can't see how to do the following (which I think are essential): * Scroll text vertically using mouse wheel; * Menu bars seem to be difficult to do; * Fast update of text from keyboard to screen. I also think that a project like this, just like the RebMail project, will need module support in Rebol. They're still to arrive in Rebol. Andrew Martin ICQ: 26227169 http://valley.150m.com/

 [6/24] from: hijim:pronet at: 23-Jun-2002 20:02


I'm don't work as a programmer. I just do it for fun and to have programs that do exactly what I want. I wrote a few (3) editors. I had help from this list with many of the routines. And some of them still don't work as I would like them to. I've posted the code for my html editor at http://www.clatfelter.net/a-a-edit.r. I know the Codes button needs better Rebol, but it works (and fast) for German, French and Spanish text. If anyone wants to work on a Rebol editor, maybe some of this script could be used as a start. Maybe some of you know how to improve what I've done. I've used several html editors, but only this one lets me work so fast coding web pages to the pattern I select. Just add a button for a new pattern of html coding. One problem is that the buttons don't always work on the first try after using the keyboard. I have to use the mouse to place the cursor and then click the buttons. They work until I use the keyboard again. I wish that couild be fixed. I could work much faster if I could use the buttons and the keyboard without losing the caret. Can anyone solve this one? I know most of you are professional programmers, so if this is worthless, I'll accept your conclusion. If any of it can be used, I'd like to see a really good editor attempted in Rebol. Sincerely, Jim Clatfelter

 [7/24] from: gschwarz:netconnect:au at: 24-Jun-2002 14:59


Jim, I have just used your a-a-edit.r and it looks good. I like the right/left mouse clicks for open/close tags. :-) Regards, Greg Schwarz. On Sun, 23 Jun 2002 20:02:20 -0700 Jim Clatfelter <[hijim--pronet--net]> wrote:
> I'm don't work as a programmer. I just do it for fun and to have programs that do exactly what I want. I wrote a few (3) editors. I had help from this list with many of the routines. And some of them still don't work as I would like them to. I've posted the code for my html editor at http://www.clatfelter.net/a-a-edit.r. I know the Codes button needs better Rebol, but it works (and fast) for German, French and Spanish text. >
snip

 [8/24] from: atruter:hih:au at: 24-Jun-2002 15:22


Jim,
> I'm don't work as a programmer.
With code like that you should! ;) Regards, Ashley P.S. I like your solution to the whole "Print" problem.

 [9/24] from: g:santilli:tiscalinet:it at: 24-Jun-2002 12:30


Hi Andrew, On Monday, June 24, 2002, 5:31:27 AM, you wrote: AM> * Scroll text vertically using mouse wheel; You just need to DETECT the event, I think it was scroll-line or scroll-page. AM> * Menu bars seem to be difficult to do; Have you seen Nenad's Win95 skin? Other skins have menu bars too. Also, menu bars are not the only way to do GUIs. ;-) AM> * Fast update of text from keyboard to screen. This is more important. Also, you won't be able to do serious coloring, so that might reduce the appeal of the editor (what? no syntax coloring?). However, it could introduce new ways of editign REBOL code... Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [10/24] from: al:bri:xtra at: 24-Jun-2002 23:58


> AM> * Scroll text vertically using mouse wheel; > > You just need to DETECT the event, I think it was scroll-line or
scroll-page. I haven't found out how to do this yet.
> AM> * Menu bars seem to be difficult to do; > > Have you seen Nenad's Win95 skin? Other skins have menu bars too. Also,
menu bars are not the only way to do GUIs. ;-) OK, it's important that command keystrokes be recognised appropriately. :) (Like the arrow keys...)
> AM> * Fast update of text from keyboard to screen. > > This is more important. Also, you won't be able to do serious
coloring, so that might reduce the appeal of the editor (what? no syntax coloring?). However, it could introduce new ways of editing REBOL code... Colours aren't really important to me as long as there's black text and off-white background. It's fairly important to me that there be very little delay between typing several characters and seeing the resulting changes on the screen. Andrew Martin ICQ: 26227169 http://valley.150m.com/

 [11/24] from: dada:gecko:verizon at: 24-Jun-2002 8:41


Andrew Martin wrote:
> I haven't found out how to do this yet.
I was playing with this last night. Looks easier than it is (for me, anyhow) and I didn't get it right.
> OK, it's important that command keystrokes be recognised appropriately. :) > (Like the arrow keys...)
Setting up DETECT or ENGAGE to recognize emacs-like commands (C-x-v, M-x-v). Yeah yeah :)
> Colours aren't really important to me as long as there's black text and > off-white background. It's fairly important to me that there be very little > delay between typing several characters and seeing the resulting changes on > the screen.
I think the ideal editor would allow the user to easily modify look and feel, syntax highlighting, tag-completion, etc ... This is fun :) sd -- --------------------------------- : sabin densmore : www.onegecko.com : [sabin--onegecko--com]

 [12/24] from: greggirwin:mindspring at: 24-Jun-2002 11:20


Hi Andrew, <<
> AM> * Scroll text vertically using mouse wheel; > > You just need to DETECT the event, I think it was scroll-line or
scroll-page. I haven't found out how to do this yet.
>>
IOS Messenger uses it. Just FYI. << Colours aren't really important to me as long as there's black text and off-white background. It's fairly important to me that there be very little delay between typing several characters and seeing the resulting changes on the screen. >> I agree. Syntax coloring and checking can be very nice features, but I think the display/rendering should be separated from the text manipulation engine anyway, so you can start off with a very simple display scheme. I hacked a simple Intellisense kinda' thing a while back, which is another feature people are getting used to. --Gregg

 [13/24] from: g:santilli:tiscalinet:it at: 24-Jun-2002 21:17


Hi Andrew, On Monday, June 24, 2002, 1:58:31 PM, you wrote: AM> I haven't found out how to do this yet. I think IOS Conference supports the mouse wheel... Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [14/24] from: jim:clatfelter at: 24-Jun-2002 18:15


I wonder if anyone knows how to keep the focus in a text area when you click on a button. If I am entering text using the key board, when I click a button that is supposed to enter more text, all that happens is that I lose the caret and the focus in the text area. I have to click back into the text area to get the focus and caret back. http://www.clatfelter.net/ed-64.r You can see the focus problem using the DATE button. It doesn't work after using the keyboard. http://www.clatfelter.net/ed-70.r This one needs a text file called send-to.lst to run. It's just a list of addresses you want to send email to. http://www.clatfelter.net/a-a-edit.r This one has all the html buttons. It would really be nice to solve the problem on this one. Is there a way to fix this? I'd be grateful for any help. Thanks, Jim

 [15/24] from: al:bri:xtra at: 25-Jun-2002 15:55


Hi, Gabriele. You wrote:
> I think IOS Conference supports the mouse wheel...
Yes. It's one of the very, very few that do. I haven't worked out how to transfer that feature to other windows, like lists and editors and so on. Or how to make arrow keys work with it. Andrew Martin ICQ: 26227169 http://valley.150m.com/

 [16/24] from: ingo:2b1 at: 25-Jun-2002 8:43


Hi Jim, [jim--clatfelter--net] wrote:
> I wonder if anyone knows how to keep the focus in a text area when > you click on a button. If I am entering text using the key board, > when I click a button that is supposed to enter more text, all that > happens is that I lose the caret and the focus in the text area. I > have to click back into the text area to get the focus and caret > back.
I changed the "date" button in your ed-64.r (btw, does this mean, that you have at least 70 specialized editors?) to the following: btn green / 1.8 "Date" #"" [ focus my-area put to-string now/date length? to-string now/date ] Now the button works as expected - but only a few times. After 3 to 10 times it doesn't do anything at all. I'm using REBOL/View 1.2.5.4.2 6-May-2002, anyone seeing the same problem? I hope that helps, Ingo

 [17/24] from: g:santilli:tiscalinet:it at: 25-Jun-2002 11:10


Hi Jim, On Tuesday, June 25, 2002, 3:15:27 AM, you wrote: jcn> I wonder if anyone knows how to keep the focus in a text area when you click on a button. That happens when the area hase the DIRTY? flag on; to avoid that, you should either disable the event function installed by RT:
>> print mold system/view/screen-face/feel/event-funcs
[func [face event /local fac][ if all [ system/view/focal-face event/type = 'down not within? event/offset win-offset? system/view/focal-face system/view/focal-face/size system/view/focal-face/dirty? ] [ fac: system/view/focal-face unfocus do-face fac none fac/dirty?: none ] event ]] or maybe just patch it so that it saves the caret position for you. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [18/24] from: g:santilli:tiscalinet:it at: 25-Jun-2002 11:15


Hi Andrew, On Tuesday, June 25, 2002, 5:55:05 AM, you wrote: AM> I haven't worked out how to transfer that feature to other windows, like AM> lists and editors and so on. Or how to make arrow keys work with it.
>> win: layout [t: text 200 "this is a text..."] >> view/new win >> win/feel: make win/feel [detect: func [f e] [if e/type = 'scroll-line [t/text: join "scrolled " e/offset show t] e]] >> do-events
HTH, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [19/24] from: jason:cunliffe:verizon at: 25-Jun-2002 5:43


> btn green / 1.8 "Date" #"" [ > focus my-area > put to-string now/date length? to-string now/date > ]
This works.. btn green / 1.8 "Date" #"" [ focus my-area append my-area/text to-string now/date ] ./jason

 [20/24] from: jim:clatfelter at: 25-Jun-2002 18:20


Thanks to all for the suggestions. Here are the problems with using focus my-area. This places the caret at the end of the file instead of where it actually is in the text. It also works only for short pieces of text. Once the text gets to about 7 lines, Rebol creates a line-list. Once it does that, the button stops working at all. Try loading a text file and using the Date button. It does nothing if focus my-area is in there. It works okay as it is. The only problem is that it doesn't work the first time after using the keyboard. The caret disappears. You have to then use the mouse and click to place the cursor. Then the button works, all the buttons work in the html editor. But they stop working again (just once) after you press a key. It's annoying, and it really makes the editor not very worth sharing. To answer the question of whether I have 70 editors, no I don't. ed-70.r has 70 characters per line on the screen and the printer. ed-64.r has 64. a-a-edit has 99 on the screen and 80 on the printer. It wraps the line at 80 characters. Those are the only three I have so far. I use them for different purposes, ed-70 to send email, a-a-edit to edit html files, and ed-64 to print pages of text with nice margins. I'd still be glad if someone can figure this one out. everything else works correctly. Thanks, Jim http://www.clatfelter.net/ed-64.r You can see the focus problem using the DATE button. It doesn't work after using the keyboard. http://www.clatfelter.net/ed-70.r This one needs a text file called send-to.lst to run. It's just a list of addresses you want to send email to. http://www.clatfelter.net/a-a-edit.r This one has all the html buttons. It would really be nice to solve the problem on this one.

 [21/24] from: g:santilli:tiscalinet:it at: 26-Jun-2002 13:04


Hi Jim, On Wednesday, June 26, 2002, 3:20:18 AM, you wrote: jcn> It works okay as it is. The only problem is that it doesn't work the first jcn> time after using the keyboard. The caret disappears. You have to then use Did you get my post about the event func? Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [22/24] from: jim:clatfelter at: 26-Jun-2002 6:52


Hello Gabriele, Yes, but I don't know how to use it or where to put it. Should it be called by the put function? I'll give that a try. I'd really like it to work. I tried it like this: put: func [str num][ if my-area <> system/view/focal-face [return] if not system/view/caret [return] cursor insert system/view/caret str system/view/caret: skip system/view/caret num show my-area ] ;your function cursor: func [face event /local fac][ if all [ system/view/focal-face event/type = 'down not within? event/offset win-offset? system/view/focal-face system/view/focal-face/size system/view/focal-face/dirty? ] [ fac: system/view/focal-face unfocus do-face fac none fac/dirty?: none ] event ] I got this: ** Script Error: Invalid path value: type ** Where: cursor ** Near: if all [ system/view/focal-face event/type = 'down not within? event/offset win-offset? system/view/focal-face system/view/focal-face/size system/view/focal-face/dirty? ] [ fac: system/view/focal-face unfocus do-face fac none fac/dirty?: none ] event
>>
I'm sure I haven't put your function into the program correctly. Can you see how? Thanks, Jim

 [23/24] from: eillag:worldnet:att at: 26-Jun-2002 19:51


this is a hack: <code> REBOL [ title: "example" file: %example.r date: "24-Jun-2002/21:37:47-7:00" comment: {paste to a window at caret position } ] paste: func [ "pastes to caret" ][ if not equal? system/view/focal-face a1 [focus a1] if not series? system/view/caret [ system/view/caret: offset-to-caret a1 caret-xy ] if series? system/view/caret [ insert system/view/caret copy b1/text ] system/view/caret: skip system/view/caret length? b1/text show a1 ] main: layout[ text "timer hanger" rate .1 feel[ engage: func [face action event][ caret-xy: caret-to-offset a1 system/view/caret ] ] b1: button "paste" [paste] b2: button "open" [a1/text: read to-file request-file show a1] a1: area "" return my-slider: slider [scroll-para a1 my-slider] ] focus a1 system/view/caret: head a1/text view main <code> Gabrielle's post got me to thinking. I tried months ago to get this to work for at least 40 hours. all I could do is paste at the position of the click when the other way failed. the caret disappears so you need to put it back where it was. timer hanger does nothing so redefining its feel wont break any other face. it saves the caret position in caret-xy. (line 25) then in line 14 you put it back. there may be a problem with fast entrys. the rate (line 23) can be made faster or use if error? try [this][too bad-do this] to avoid crashing. now you need to update the slider in the timer hanger so when you show the field it doesen't reset at the beginning. search the list for update-slider.r, I think. use copy. see the list and rebolforces for more info. text: a1/text IS a1/text but text: copy a1/text is not. caret-to-offset face object! offset STRING! offset-to-caret face object! offset PAIR! confused? i sure was. Rebol is frustrating and (I think) getting too complicated and ahead of itself. Gabrielle's post gave me the hint I needed. I have struggled with this fix since december. I paint houses for a living and this is my first post and e-mail. i will unsuscribe when finished but will continue to follow the list. thanks to all for the brain exersize. please remember that people like us are interested. discussion is good, code is better (even eye candy, although it does not display too good on win 95 256color) and explained code is great.

 [24/24] from: hijim:pronet at: 26-Jun-2002 18:19


Hi Gabriele, What a dunce I am! I thought that was a function you wrote. I see it's in Rebol. I assume the dirty word means that the text has changed (by means of the keyboard). How do I disable this event function, as you suggest? Jim

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