Stereo setup for visad

I'm trying to add stereo to visad as was discussed here:  
http://www.unidata.ucar.edu/staff/russ/visad/msg15790.html 
and I'm having some problems making it work as part 2 of that email indicated, 
extending FancySSCell and SpreadSheet.

The problem I am having is that the only time you can call super() is on the 
first line of the constructor.  Therefore, the only time I can call 
setSSCellClass() is after I call super() in my extension.  However, calls to 
setSSCellClass() that are performed after the constructor appear to be ignored. 
 I verified this by directly modifying my copy of SpreadSheet.java to call 
setSSCellClass() at the very beginning of StereoSSCell's constructor, with my 
extension of FancySSCell.  When I did this, the code I added to setup stereo 
was called.  I then put that call on the last line of the constructor, and 
tried again.  This time my code was not executed (the constructor does not get 
called).

One possible workaround that I am aware of is simply copying the entire 
constructor from SpreadSheet.java into my extension of SpreadSheet, but that 
would obviously not be considered proper OO programming, and I would like to 
know if there is another way to do it.

Thanks,
-Tim Costa

_____________________________________________________________
<a href="http://www.gamedev.net";>GameDev.net Email Service</a> - "Plenty of 1's 
and 0's"

_____________________________________________________________
Select your own custom email address for FREE! Get you@xxxxxxxxxxxxxx w/No Ads, 
6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: