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

[REBOL] dirty editor

From: hijim:pronet at: 28-Jun-2002 8:01

I've solved the dirty problem. I'm not sure this will work very well when I get all the keys put into code. It may slow down data entry. Anyway, using the code below does not set the dirty flag. I can go between buttons and keys now and not lose focus on the text area. The keys now work just like the buttons. put: func [str num][ if my-area <> system/view/focal-face [return] if not system/view/caret [return] insert system/view/caret str system/view/caret: skip system/view/caret num show my-area ] key #"a" [put "a" 1] key #"A" [put "A" 1] key #"b" [put "b" 1] key #"B" [put "B" 1] button "P" #"^P" [put "<P>" 3] My question is, can I get this into a block or series? Or do I have to repeat this statement for each key? I'm sure Rebol wouldn't make me do that. Can someone tell me how to get the key statments into a single statement that will put"A" when I press"A", and all the other keys too. (Also, how do I see the code for the editor built into Rebol. I've been away from Rebol for almost a year, and I've forgotten how. I seem to remember the word dirty from that code. Maybe it shows how to turn dirty off. That would be even easier. I just can't remember how to list that code.) Thanks for the help, Jim