search for: tut_express

Displaying 2 results from an estimated 2 matches for "tut_express".

2005 Dec 23
10
Extending model
Hi, I''m looking for a way to extend one of my models to allow some level of abstraction between what goes into it and how it is stored. For example, say I have a Product and I want to set it''s price. A person using the website will type the price in euros. Internally, I''d like to store the price as an integer value of cents. I can currently do this with some ugly code
2006 Mar 28
11
setting widget attributes
I''m trying to set attributes of widgets in subclasses like the following. class PersonTable < FXTable def initialize(owner) options = TABLE_COL_SIZEABLE super(owner, nil, 0, options) visibleRows = 5 ... end end visibleRows doesn''t get set. However, if I do this self.visibleRows = 5 then it does. Shouldn''t it work without "self."?