diff options
author | edenc <edenc@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-02-19 02:18:22 +0000 |
---|---|---|
committer | edenc <edenc@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-02-19 02:18:22 +0000 |
commit | 6729a1a0ff568739850e3cee373ff8810c8be008 (patch) | |
tree | 210127461623da25da0b3d6349513332cbe6fe7e /lib/Reaction/UI/ViewPort/Field | |
parent | 160cad9e87ded8dc4146fd1aa82189496afe738c (diff) | |
download | reaction-6729a1a0ff568739850e3cee373ff8810c8be008.tar.gz reaction-6729a1a0ff568739850e3cee373ff8810c8be008.zip |
fixed ChooseOne value_string
Diffstat (limited to 'lib/Reaction/UI/ViewPort/Field')
-rw-r--r-- | lib/Reaction/UI/ViewPort/Field/Mutable/ChooseOne.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Reaction/UI/ViewPort/Field/Mutable/ChooseOne.pm b/lib/Reaction/UI/ViewPort/Field/Mutable/ChooseOne.pm index 92a4f2e..35ed397 100644 --- a/lib/Reaction/UI/ViewPort/Field/Mutable/ChooseOne.pm +++ b/lib/Reaction/UI/ViewPort/Field/Mutable/ChooseOne.pm @@ -32,8 +32,14 @@ around _value_string_from_value => sub { my $orig = shift; my $self = shift; my $value = $self->$orig(@_); - return $self->obj_to_name($value->{value}) if Scalar::Util::blessed($value); - return $self->obj_to_name($value) if blessed $value; + +# what's up with $value->{value} ?! +# and why are we calling obj_to_name here, shouldn't it be obj_to_str +# return $self->obj_to_name($value->{value}) if Scalar::Util::blessed($value); +# return $self->obj_to_name($value) if blessed $value; + + return $self->obj_to_str($value) if Scalar::Util::blessed($value); + return "$value"; # force stringify. might work. probably won't. }; sub is_current_value { |