From 1587b16d91c69932470dc74284b2f615bda74032 Mon Sep 17 00:00:00 2001 From: dakkar Date: Fri, 28 Jul 2023 12:09:50 +0100 Subject: probably fix exposing attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit now they're aliases… still completely untested, because: * we're not exposing attributes on direct dispatch (`bos-dispatch/invoke`) * we don't have a decent way to add attributes to classes (`bos-sugar/*`) --- bos-meta-attribute.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'bos-meta-attribute.sh') diff --git a/bos-meta-attribute.sh b/bos-meta-attribute.sh index 9d7a4dd..1153d3a 100644 --- a/bos-meta-attribute.sh +++ b/bos-meta-attribute.sh @@ -6,6 +6,20 @@ function bos/meta/attribute/store-for-into() { local bos_meta_attribute_class bos_meta_attribute_objid bos-object/unpack-self-into bos_meta_attribute_class bos_meta_attribute_objid "$2" + # meta-look! we can't depend on bos-dispatch/invoke or + # bos/meta/class/invoke to set these up + + # the `if` is there because bos-meta-bootstrap.sh sets these manually + if [[ -z "$attribute_name" ]]; then + local bos_meta_attribute_get_name; $self get-attribute-name-into bos_meta_attribute_get_name + local bos_meta_attribute_get_type; $self get-attribute-type-into bos_meta_attribute_get_type + local bos_meta_attribute_get_class; $self get-associated-class-into bos_meta_attribute_get_class + + local attribute_name="$bos_meta_attribute_get_name" + local attribute_type="$bos_meta_attribute_get_type" + local associated_class="$bos_meta_attribute_get_class" + fi + "bos-namespaces/store-${attribute_type}-for-into" "$1" attribute "$attribute_name" "$associated_class" "$bos_meta_attribute_class" "$bos_meta_attribute_objid" } -- cgit v1.2.3