Title: actions for TextEdit Post by: . on April 10, 2008, 01:46:56 pm we want to add some functionality to our "texteditor" and so we need some action during the usage of TextEdit:
1. if the user activates a part of the text and calls an ON ACTION "bold" we need the information of the first and last activated character (perhaps a new Dialog.getPosActiveFirst("textedit") Dialog.getPosActiveLast("textedit"). There are a lot of more function we could use these new methods 2. after/beforre inserting/deleting parts of the text some new actions (before_insert_textedit, after_insert_textedit, before_delete_textedit, after_delete_textedit) should be thrown. there we can save with the help of the new methods the text to make multiple redo possible Title: Re: actions for TextEdit Post by: Bernard M. on April 16, 2008, 10:10:33 am 1. You can achieve this by getting the values of the 'cursor' and 'cursor2' attributes of the TextEdit form field:
Code
Attached is a basic application which shows this. 2. What you ask is that before inserting "parts of the text" an action should be executed. The same after inserting. And the same for deleting... But what do you mean exactly by "parts"? Should this be done for every character typed in the TextEdit? If not, how to determine when a "part" begins and when a "part" ends? And what would this mean as network traffic between the front end and the DVM if an action is thrown before/after every insert/delete? I can create a new feature request for this, but you need to clearly describe your needs. Title: Re: actions for TextEdit Post by: Reuben B. on April 16, 2008, 11:59:43 am For part 2 of the question, 2.10 introduced ON ACTION dialogtouched , see https://4js.com/online_documentation/fjs-fgl-2.10.01-manual-html/User/InteractionModel.html#DIRTY (https://4js.com/online_documentation/fjs-fgl-2.10.01-manual-html/User/InteractionModel.html#DIRTY)
thus something like... Code
...is possible. Title: Re: actions for TextEdit Post by: . on April 16, 2008, 12:56:16 pm thanks a lot for your help
Ralph |