Nice, I''m excited for the next release!
On 9/3/07, Alex Fenton <alex at pressure.to>
wrote:> Thanks to everyone who voted in the API style survey. We had 10 votes
> altogether - we''re not electing the prime minister, after all -
but it
> was decisively a yes. 90% (9/10) supported adding keyword constructors,
> and 77% (7/9) ruby-style accessors. The changes are summarised at the
> bottom of the email.
>
> We hope to have a 1.9.1 release incorporating these in the next week or
> two. 1.9.1 will also add StyledTextCtrl (Scintilla) support, as well as
> BitmapComboBox and RendererNative. Lastly it has some useful bugfixes to
> methods - eg TreeCtrl#on_compare_items; Choice#append;
> ListCtrl#get_item_rect
>
> cheers
> alex
>
> 1) All widgets and frames can be created using keyword args. This is
> really handy, for example, if you mainly use Sizers to manage layouts,
> and so rarely need to set an explicit size or position for a window. So,
> for a multiline TextCtrl, before, this was necessary
>
> Wx::TextCtrl.new(parent, -1, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
> Wx::TE_MULTILINE)
>
> now this is enough:
>
> Wx::TextCtrl.new(parent, :style => Wx::TE_MULTILINE)
>
> 2) One of the keyword constructor aspects is to allow a shorter notation
> for Size and Position arguments, using a two-element array:
>
> Wx::TextCtrl.new(parent, :size => [200, 100])
>
> For consistency, this shorthand will be made available to all methods
> which accept point or size arguments:
>
> textctrl.set_size [200, 100]
> # or
> textctrl.size = [200, 100]
>
> 3) Getter and setter methods can be accessed using the naming style more
> common in Ruby as well as that more common in C++/Java:
>
> * Instance methods like get_foo can be accessed as foo
> * Instance methods like set_foo can be accessed as foo> * Instance
methods like is_foo can be accessed as foo?
>
> _______________________________________________
> wxruby-users mailing list
> wxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
>