I can manipulate all controls , enter text, handle keystrokes,
create text cursors, etc.
There is one thing i cannot do: create a view cursor
for a richtextcontrol (RTC). I need a view cursor to be able to parse text
at the current cursor location.
Pressing f12 opens the non modal window and populates the RTC (txt.c)
I position the cursor in the RTC and hit ctl-F12 (there are KeyListeners for all controls) which runs code similar to:
Code: Select all
'''
zt.c # non modal window control
zt.frame # non modal window frame (zt,txt are class objects)
txt.m # rich text model
txt.c # rich text control
'''
txt.c.setText('wwww') # 'wwww' is seen in the richtextcontrol
## i thought this would work:
ctlr = zt.frame.getController()
txt.c.setText(repr(ctlr)) ## returns: None in the richtextcontrol
cv = ctlr.getViewCursor()
non-modal window, not the controller of the Writer document, to get a ViewCursor here.
I have used MRI and
reviewed API Reference & Developers Guide & Basic Guide & have A. Pitonyak's book
all to no avail.
I would appreciate any assistance at all on this.