[orca-list] Error while adding new feature In Orca



Hi all,


I am New To python and orca ,sorry for long question and bad English . I am trying to understand working of orca and its code . while I am trying to understand Orca , I make small changes for testing that , How to add new feature in Orca. So I did following steps.

1) add line in orca/desktop_keyboardmap.py --->

    ("KP_Add", defaultModifierMask, NO_MODIFIER_MASK,
    "demoTestHandler"),


2) Then added lines in orca/scripts/default.py -------->
   
i )  added demoTesthandler ----->

self.inputEventHandlers["demoTestHandler"] = \
        input_event.InputEventHandler(
        Script.demoTest,
        #demo Test purpose
        _("Demo Test . . . "))



ii )  added demoTest function ----->

def demoTest(self, inputEvent):
    print "This is Demo Test . . . . "



But after running  orca I Got Following errors. . . . . >


Function is ->>>  <unbound method Script.demoTest>
Description is ->>>  Demo Test . . .
Function is ->>>  <unbound method Script.leftClickReviewItem>
Description is ->>>  Performs left click on current flat review item.
Function is ->>>  <unbound method Script.rightClickReviewItem>
Description is ->>>  Performs right click on current flat review item.
Function is ->>>  <unbound method Script.sayAll>
Description is ->>>  Speaks entire document.

TypeError: 'str' object is not callable
Killed

like this . . . . So , is that correct way to add new feature in orca ? It tells me that unbound method , means that where I Have to specify , i.e bound that new method ?



Regards,
Dhairyashil.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]