[wxruby-development] [ wxruby-Bugs-27558 ] Wx Colour.set changes more than 1 variable

noreply at rubyforge.org
Sat, 12 Dec 2009 19:37:35 -0000

Bugs item #27558, was opened at 2009-12-12 13:37
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=218&aid=27558&group_id=35

Category: Incorrect behavior
Group: current
Status: Open
Resolution: None
Priority: 3
Submitted By: Philip Stephens (plusgforce)
Assigned to: Nobody (None)
Summary: Wx Colour.set changes more than 1 variable

Initial Comment:
require ''wx''

# col_sample4.rb

BLACK = Wx::Colour.new(0,0,0)
RED = Wx::Colour.new(128,0,0)

@background_colour = BLACK
@symbol_colour = BLACK
temp_colour = BLACK
temp2_colour = RED

@symbol_colour = Wx::Colour.set(1, 0, 0)

puts "@background_colour : #{@background_colour}"
puts "@symbol_colour     : #{@symbol_colour}"
puts "temp_colour        : #{temp_colour}"
puts "temp2_colour       : #{temp2_colour}"

=begin

Hypothetical Values:

@background_colour : #<Wx::Colour: (0, 0, 0 *255)>
@symbol_colour     : #<Wx::Colour: (1, 0, 0 *255)>
temp_colour        : #<Wx::Colour: (0, 0, 0 *255)>
temp2_colour       : #<Wx::Colour: (128, 0, 0 *255)>

Actual Values:

@background_colour : #<Wx::Colour: (1, 0, 0 *255)>
@symbol_colour     : #<Wx::Colour: (1, 0, 0 *255)>
temp_colour        : #<Wx::Colour: (1, 0, 0 *255)>
temp2_colour       : #<Wx::Colour: (128, 0, 0 *255)>


=end

----------------------------------------------------------------------

You can respond by visiting: