• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Good design or should I try something else

 
David Patrzeba
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this a good way of creating the window or is there a different design I should try. I like breaking everything up for organization but that means that I need to create all the containers as static variables.




 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It only means that because that's how you've coded it; you could also be returning a menu, or returning menu items, etc.
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as everything having to be static, I would recommend rewriting your code to look like this:

Now that you have an object of the Snippet29 class, you can call its methods (which are the formerly static methods of the class) and use its variables (which are the formerly static variables).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic