Menu

Exclusive Acess

Help
2007-08-21
2013-04-23
  • Bruno Sampayo

    Bruno Sampayo - 2007-08-21

    How and where (in which scripts of gizmod) I must call the method grabExclusiveAccess()?
    For example we try to include called of this method in this script 150-Keyboard-Amarok.py
    that it comes as example in GizmoDaemon installation package version v3.3 (gizmod)
    - = - (c) 2007, Tim Burrell <tim.burrell@gmail.com>

    With the following error:
    TypeError: unbound method Boost.Python.function object must be called with
    GizmoLinuxInputDevice instance first argument (got bool instance instead)

    Do you have some example how to use grabExclusiveAccess method? 

    Thanks for help,
    Bruno Sampayo

     
    • Tim Burrell

      Tim Burrell - 2007-08-23

      Hey Bruno,

      Sorry it took me a bit!

      At any rate I would put this in GizmoRegistrar.py under the keyboard section like so:

      if self.DeviceType == DeviceType.Keyboard:
          Gizmod.printNiceScriptRegister(0, "Keyboard", self.Device.DeviceName, self.Device.FileName, hex((self.Device.DeviceIDVendor)), hex((self.Device.DeviceIDProduct)))
          Gizmod.Keyboards.append(self.Device)
          self.Device.grabExclusiveAccess(True)

      Does that do the trick?

       

Log in to post a comment.