[fxruby-users] Multiple feeds to one data target

Don Wilde dwilde1 at gmail.com
Tue Sep 30 21:57:49 EDT 2008


Lyle -

Bingo, you've got it.

On Tue, Sep 30, 2008 at 8:17 PM, Lyle Johnson <lyle at lylejohnson.name> wrote:

>
> On Sep 26, 2008, at 9:09 PM, Don Wilde wrote:
>
>  Please see extracted example in DATA following __END__. I'm constructing a
>> tab page of a block of TextFields plus sliders in construct_slider, but I
>> don't have the info-passing correct yet. I can trigger the puts with any
>> SEL_COMMAND, but I'm not getting data back. I don't get the value from the
>> #{@in_vals[ targ ].value }, nor do I get updated screen contents.
>>
>
> I've had to make some substitutions since the code you sent doesn't run
> (missing classes VMImage and VMImageFrame), but I think the main


 Apologies. I stripped a lot more, should have left enough to let it run.

problem is that you never initialized the data target to any particular
> value. The main change I made was just to initialize it to 0.5 (arbitrarily
> picked):
>
>        @in_vals = {
>                :u_1 => FXDataTarget.new(0.5)
>        }
>

You bet, that did it. Thank you!!! :D

>
> When I do this, both the text field and the slider start out with this
> value, and changing either the text field or slider value updates the data
> target's value as expected.
>
> Hope this helps,
>
> Lyle
>
> ---
> "FXRuby: Create Lean and Mean GUIs with Ruby"
> Now available from the Pragmatic Bookshelf!
> http://www.pragprog.com/titles/fxruby
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20080930/bc7fa99c/attachment.html>


More information about the fxruby-users mailing list