X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FReaction%2FUI%2FViewPort%2FObject.pm;h=da45c23431618c0df785b89f510cd1297dde93e2;hb=8deea8aae8207bc3fbbd88ce4408858aa6387437;hp=326394f261334bf79d18146a6efc2130d2a2e450;hpb=c03f75a7322e8194591d2f8bd02fb3f83df8833f;p=catagits%2FReaction.git diff --git a/lib/Reaction/UI/ViewPort/Object.pm b/lib/Reaction/UI/ViewPort/Object.pm index 326394f..da45c23 100644 --- a/lib/Reaction/UI/ViewPort/Object.pm +++ b/lib/Reaction/UI/ViewPort/Object.pm @@ -25,8 +25,8 @@ class Object is 'Reaction::UI::ViewPort', which { has field_order => (is => 'ro', isa => 'ArrayRef'); has builder_cache => (is => 'ro', isa => 'HashRef', lazy_build => 1); - has ordered_fields => (is => 'ro', isa => 'ArrayRef', lazy_build => 1); has excluded_fields => (is => 'ro', isa => 'ArrayRef', lazy_build => 1); + has computed_field_order => (is => 'ro', isa => 'ArrayRef', lazy_build => 1); implements BUILD => as { my ($self, $args) = @_; @@ -42,7 +42,7 @@ class Object is 'Reaction::UI::ViewPort', which { my $obj = $self->model; my $args = $self->has_field_args ? $self->field_args : {}; my @fields; - for my $field_name (@{ $self->ordered_fields }) { + for my $field_name (@{ $self->computed_field_order }) { my $attr = $obj->meta->find_attribute_by_name($field_name); my $meth = $self->builder_cache->{$field_name} ||= $self->get_builder_for($attr); my $field = $self->$meth($attr, ($args->{$field_name} || {})); @@ -51,7 +51,7 @@ class Object is 'Reaction::UI::ViewPort', which { return \@fields; }; - implements _build_ordered_fields => as { + implements _build_computed_field_order => as { my ($self) = @_; my %excluded = map { $_ => undef } @{ $self->excluded_fields }; #treat _$field_name as private and exclude fields with no reader @@ -61,7 +61,7 @@ class Object is 'Reaction::UI::ViewPort', which { }; override child_event_sinks => sub { - return ( shift->fields, super()); + return ( @{shift->fields}, super()); }; #candidate for shared role!