I am attempting to implement a macro/scripting language used with TvEdit
at Stanford back circa 1974.
I do not see a good way to let a "program" enter and edit text in a document.
That is, rather than having a command originate from the keyboard or mouse it
originates from a program (toolDialog hovering over a document).
How would you do that?
-Doug
Robot editor
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: Robot editor
If I understand you task correctly I would recommend to make a wrapper around TextView. I did this for one of my project.
There is the example.
http://gitlab.molpit.org/molpit/blackbo ... Insert.odc
There is the example.
http://gitlab.molpit.org/molpit/blackbo ... Insert.odc
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
Re: Robot editor
Thanks, Ivan.Ivan Denisov wrote:If I understand you task correctly I would recommend to make a wrapper around TextView. I did this for one of my project.
There is the example.
http://gitlab.molpit.org/molpit/blackbo ... Insert.odc
I have already done that and can indeed capture characters and mouse clicks.
What I am missing is to be able to send those back to the view but I realize
now that all I need to do is analyze how Ctrl-F works (search and replace).
That should show me what is necessary.
-Doug
Re: Robot editor
I don't immediately see why this topic is Center buisness- would this discussion be more appropriate on the community board?
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
Re: Robot editor
Robert,Robert wrote:I don't immediately see why this topic is Center buisness- would this discussion be more appropriate on the community board?
You are right. Its just that I feel more comfortable with the Center people.
I'll try and use the community board more often.
-Doug
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: Robot editor
Doug, I am not sure if I understand your requirements correctly butDGDanforth wrote:I am attempting to implement a macro/scripting language used with TvEdit
at Stanford back circa 1974.
I do not see a good way to let a "program" enter and edit text in a document.
That is, rather than having a command originate from the keyboard or mouse it
originates from a program (toolDialog hovering over a document).
How would you do that?
-Doug
if you want to modify the "focus" text from a command of a toolDialog, you use
c := TextControllers.Focus();
within the command implementation to get access to the controller of the focus text.
Then you use c.text to get access to the text model and you use readers and writers
(or TextMappers) to read and write the text.
Whatever the requirements are, I agree with Robert that such questions should be
discussed in the community forum.
- Josef
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
Re: Robot editor
Thanks, Josef. That is very close to what I need.Josef Templ wrote:
Doug, I am not sure if I understand your requirements correctly but
if you want to modify the "focus" text from a command of a toolDialog, you use
c := TextControllers.Focus();
within the command implementation to get access to the controller of the focus text.
Then you use c.text to get access to the text model and you use readers and writers
(or TextMappers) to read and write the text.
Whatever the requirements are, I agree with Robert that such questions should be
discussed in the community forum.
- Josef
-Doug