View Single Post
  #1  
Old 06-27-2010, 12:12 AM
renama renama is offline
Member
 
Join Date: Jun 2010
Posts: 15
Unhappy OO programing in vizard?

I tried to create a class to put an icon on the screen. When the icon is clicked, the music will be truned on or off.

In the class, I used callback viz.MOUSEDOWN_EVENT to capture the mouse clicked event. The class works fine. The problem is: I can not use viz.MOUSEDOWN_EVENT in main program or in other classes anymore once this class is used. That is a disaster. How to solve this problem while keeping the OO programing structure? Is there any other way to encapsulate the event operation in the class?

Thanks so much if anyone can help.

My class like this:
Attached Files
File Type: doc Class_MusicOnOff.doc (27.0 KB, 907 views)
Reply With Quote