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

[REBOL] Re: specifiv position in area

From: moeller_thorsten:gmx at: 25-Feb-2002 9:45

Hi Brett, your new sample avoids the crash of the window. During the weekend i found some time to work on the code and found out what "system/view/caret" is for (previously i didn't know that). So, the problem was that when i type some extra lines and then want to insert some text in or behind the new lines, a debug printout for "system/view/caret" returns none and gives an error for the insert function. Your new code avoids this crash problem, but still lacks the functionality of inserting text right after the new textlines. I found out that just refocussing the area solves the problem like: view layout [ a: area "place your cursor then click button" button "insert" [ focus a ;--a/line-list: none ; *Forces recalculation of line offsets. system/view/caret: insert system/view/caret "<inserted>" show a ] ] This solves the problem, but is not very nicefor a user, cause the window is blinking due to setting the focus. Is there a way that when the area is active it has the same color as being not active? Perhaps you, as a more advanced Rebol-Programmer, have a more elegant way to solve this. Thorsten