Class Fox::FXDataTarget
In: FXDataTarget.rb
../lib/fox/core.rb
../lib/fox/responder2.rb
Parent: FXObject

A data target allows a valuator widget such as an FXSlider or FXTextField to be directly connected with a variable in the program. Whenever the valuator control changes, the variable connected through the data target is automatically updated; conversely, whenever the program changes a variable, all the connected valuator widgets will be updated to reflect this new value on the display. Data targets also allow connecting FXRadioButtons, FXMenuCommands, and so on to a variable. In this case, the new value of the connected variable is computed by subtracting FXDataTarget::ID_OPTION from the message identifier.

Events

The following messages are sent by FXDataTarget to its target:

SEL_COMMAND:Sent after the data target processes a SEL_COMMAND message itself
SEL_CHANGED:Sent after the data target processes a SEL_CHANGED message itself

Message identifiers

ID_VALUE:Causes the FXDataTarget to ask sender for value
ID_OPTION:ID_OPTION+i will set the value to i, where -10000 <= i <= 10000
Methods
new    to_s   
Attributes
selector  [RW] 

The message identifier for this data target [Integer]

target  [RW] 

The message target object for this data target [FXObject]

value  [RW] 

The data target's current value [Object]

Included modules
Responder2
Public Class methods
new(value=nil, tgt=nil, sel=0) {|theDataTarget| ...}

Initialize with this value

Public Instance methods
to_s()

Returns the stringified representation of this data target's value.