Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001412 [Croquet] Any trivial always 07-05-05 22:11 07-05-05 22:32
Reporter elenzil View Status public  
Assigned To
Priority normal Resolution open  
Status new  
Summary 0001412: redundant code in TeapotMorph: initializaeActiveCamera and makeCamera
Description .. it seems that initializeActiveCamera should probably be calling makeCamera instead of duplicating its functionality.

making discrete methods for the camera creation is great.
i'd love to see something similar for the avatar.
Additional Information current code:
-------------------------------------------------------------------------
initializeActiveCamera
"makes it easy for subclasses to have different cameras w/out messing w/full init code"

    activeCamera _ TUserCamera new initializeWithViewPort: self.
    activeCamera addOverlays.
    activeCamera viewClip: false.
-------------------------------------------------------------------------
makeCamera
    activeCamera _ TUserCamera new initializeWithViewPort: self.
-------------------------------------------------------------------------
Attached Files

- Relationships

- Notes
(0001715 - 903 - 925 - 925 - 925 - 925 - 925)
howardstearns
07-05-05 22:32

FWIW, I _think_ I remember creating makeCamera when I needed to customize the TeapotMorph in a new way. I just cut and pasted what I needed, rather than fixing all callers or looking for similar problems (e.g., with avatars). I _do_ remember thinking, "Gosh, there's an awful lot of stuff that requires code duplication in order to customize." I imagined that the idea was to get things working and useable without introducing a lot of hooks and indirection that might need to be rewritten if basic stuff changed. In other words, if things are still pretty fluid, then it's better to keep the code base small and risk forcing folks to duplicate some code on occasion.

My opinion then is that it isn't worth making such enhancements to Jasmine. Only David would know if it's worth putting such hooks into Hedgehog. (E.g., it might be fair to go through one iteration of Hedgehog without the hooks.)
 

- Issue History
Date Modified Username Field Change
07-05-05 22:11 elenzil New Issue
07-05-05 22:32 howardstearns Note Added: 0001715


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
32 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker