Forum: wxRuby Validator problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ccd9e79557e77acf430ee63804737067?d=identicon&s=25 Luciano Zanotto (Guest)
on 2009-04-15 13:27
(Received via mailing list)
Hi everubody, I'm new to wxRuby and I have a problem with
Validator/TextValidator object. I'm actually trying to develop an
extension to OpenStudio, a plugin for Google SketchUp. When I create a
Validator or a control using a Validator (I'm using the TextValidator)
anything seems to work fine. But I don't get to have the changes in the
variables bound to the controls transferred to the window. From the
wxWidgets documentation it seems I should call the TransferDataToWindow
method of the Window object, but this method is not listed in the wxRuby
port. Has anyone faced the problem before? Could anyone help me? It just
seems that wxWidgets has not been fully ported yet.
Thanks in advance
Ciao Luciano
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2009-04-15 14:15
(Received via mailing list)
Luciano Zanotto wrote:
> ported yet.
Validators in wxRuby only do the "validating" stuff, they don't do
transferring data to and from variables - you can see if you look at the
Ruby docs for Validator:

This is a deliberate omission not an oversight - variables in Ruby are
always references, just names for things, so the semantics of assignment
are not the same as in C++. To retrieve values from controls in dialogs,
just do normal assignment in an event handler (eg when the 'OK' button
is pressed).

There are some parts of wxWidgets not in wxRuby, but these are with a
few exceptions deliberate decisions reflecting the differences in the
target languages.

This topic is locked and can not be replied to.