WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-12-2005, 04:07 PM
dominic dominic is offline
Member
 
Join Date: Aug 2005
Posts: 8
gamepad

Hi,

I want to use input from a gamepad, so in my main class I have:
-----------
#main class
from Joystick import *

import viz
import sid

viz.go()
oh = Joystick()

sid.callback(sid.BUTTONDOWN_EVENT,oh.sayhello)
-------------
and in my Joystick.py file / class, I have:
--------------
class Joystick(object):
def sayhello(self, num):
print "hello world ", num

So, everything works but the line "oh = Joystick()" is highlighted in yellow. Any ideas, how I can fix that or what I am doing wrong?

Dominic
Reply With Quote
  #2  
Old 08-15-2005, 10:14 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

I tried out your sample code and I didn't get any highlighted lines. This ususally happens when you are editing/changing a module. It is more of a python issue. I believe reloading the module fixes this. To reload your module you would type the following in the interactive window:
Code:
reload(Joystick)
Also, restarting Vizard should get rid of it.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:34 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC