Hi:
I want to first apologize for insisting so much on the hooks, but the
bodyclick1 and 2 hooks are not working.
Before posting this, I have tried the following solutions, each more
desperate, since I am aware I already asked too much help for this issue.
*Adding g.doHook("bodyclick1",c=c) in several parts of leopyref.leo:*
Tried to put it on "bodyWantsFocus" , "set_focus" functions.
Did several tests with them, nothing worked. Tested with and without g = g
as arguments (previously properly defining them) etc. All I could think of.
*Manually adding a Qt hook:*
- Looped through all the g.app.gui.qtApp.children() and connected them to
clicked signal + test function
def test():
g.es("test")
for child in g.app.gui.qtApp.children():
child.connect(child,QtCore.SIGNAL("clicked()"),test)
Did as many tests as I could come up with, again,no success.
- Further trying to find the active Qt widgets, I reached this
post<https://groups.google.com/forum/#!searchin/leo-editor/get$20gui$20object$20qt/leo-editor/cekOXNaGU1o/bjN0RqI87HcJ>,
which confuses me, since it states that:
The actual Qt widgets are::
> c.frame.body.bodyCtrl
> c.frame.log.logCtrl
> c.frame.tree.treeCtrl
But they have no "connect" method, and type(c.frame.body.bodyCtrl) doesnt
return a QtObject:
AttributeError: 'leoQTextEditWidget' object has no attribute 'connect'
Im desperate and would welcome any pointer on what to try next. Just a
global "mouseclick" hook could also do it, because
through "c.frame.getFocus()" we could get where did the user click.
The objective is to know the current focus and the previous ones as soon as
it changes, for the interactive Leo helper / Tutorial
pane<http://i.imgur.com/PS5vixd.png>to be able to offer customized commands and
options depending on that
history and the actions that were performed under each of them.
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.