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

[REBOL] Re: Bug in Area

From: brett:codeconscious at: 2-Nov-2001 15:51

Excuse the butt in on this thread. I was drawn by the "big problem" phrase ;-) No major disagreements from me, but I don't think it is a bug. Perhaps just a design issue or choice. I performed the following write clipboard:// mold get in ctx-text 'edit-text I believe edit-text is the function that handles quite a bit of the text manipulationbehaviour of VID. Here's an except from that: paste-text [ delete-selected-text face/line-list: none face/dirty?: true view*/caret: insert view*/caret read clipboard:// ] This is obviously the bit of code that handles a paste operation. As you can see, the line-list is deliberately cleared. Also a dirty flag is set. I've no idea what parts of View or Vid use these two variables, but if VID is doing it perhaps you should too. For me, reflecting on this little bit of code, I'd say that VID does not have some support for programmers to update VID elements programmatically. An example of support might be an "update" function on the face that when called by a programmer would do all the necessary housekeeping for the VID element. VID has focus. It targets a specific need. VID I think is meant as a simple yet expressive way to create graphical interfaces quickly and as a showoff for dialects. Not as a complete programmer level framework. The needs of some programmers goes beyond what VID provides. You could create your own type of GUI dialect instead of using VID (haven't seen one yet ;-) ). However, VID does so damn well, why would a programmer ignore all that wonderful functionality? The good news is you can drop to a lower level when needed. I think that at the moment, if a programmer needs to do more than VID gives then the onus is on the programmer to learn how VID has been created using the view machinery and to work within that system. Knowing that it may change especially if these sorts of issues are pointed out as being important for using Rebol (a good thing). No doubt, if necessary VID's target could be readjusted by RT and I believe they intend more work on it too. Sorry about the ramble. Just wanted to put out a possible context for these types of discussions. BTW, My road to edit-text started with these two lines at the console: layout [a: area "test"] print mold get in a/feel 'engage Brett.