| 
     
      
      
      From: Nathan D. <na...@ch...> - 2002-11-01 17:36:23
      
     
   | 
Sean asks: > > > <field > > name="featured" > > label="Featured?" > > type="org.bacfug.modus.fields.yesno" > > default="no"> > > Ugh! We have a perfectly good boolean type in the language and you want > to invent a new one? :) Well, once again the nature of "field" is the issue here. The yesno field exists because to just say "this is a boolean" value does not seem to have any advantage of just defining a column in a table in a database. The yesno field, in this case, knows how to render itself into a yes/no radio button. This is why there is probably a more philosophical discussion to be had before moving forward -- what is a "field" in Modus? I had not envisioned a field as merely a data type, but as a functional unit that can do useful things for someone who wants to make HTML-based applications in CFML. This brings up another question I have: should fields be rule aware? That is, should a "yesno" field automatically run a boolean rule check, or should the developer need to specify that separately in the descriptor? - n  |