Ver código fonte

Fixed some defining attribute functions: were refering to the own
attributes to check wheter it existed or not

Yentl Van Tendeloo 7 anos atrás
pai
commit
25a9fba8e6
1 arquivos alterados com 4 adições e 4 exclusões
  1. 4 4
      bootstrap/mini_modify.alc

+ 4 - 4
bootstrap/mini_modify.alc

@@ -142,7 +142,7 @@ String function cmd_define_attribute(write : Boolean, model : Element, element_n
 		if (dict_in(model["model"], element_name)):
 			if (dict_in(model["model"], type)):
 				Element attrs
-				attrs = getAttributeList(model, element_name)
+				attrs = getInstantiatableAttributes(model, element_name, "AttributeLink")
 				if (bool_not(set_in(dict_keys(attrs), attr_name))):
 					model_define_attribute(model, element_name, attr_name, False, type)
 					return "Success"!
@@ -210,7 +210,7 @@ String function cmd_attr_name(write : Boolean, model : Element, element_name : S
 	if (write):
 		if (dict_in(model["model"], element_name)):
 			Element attrs
-			attrs = getAttributeList(model, element_name)
+			attrs = getInstantiatableAttributes(model, element_name, "AttributeLink")
 			if (set_in(dict_keys(attrs), attr_name)):
 				//TODO this can be more interesting if we keep the IDs in the model, thereby preventing problems with language evolution
 				if (set_in(dict_keys(attrs), attr_name)):
@@ -239,7 +239,7 @@ String function cmd_attr_type(write : Boolean, model : Element, element_name : S
 	if (write):
 		if (dict_in(model["model"], element_name)):
 			Element attrs
-			attrs = getAttributeList(model, element_name)
+			attrs = getInstantiatableAttributes(model, element_name, "AttributeLink")
 			if (set_in(dict_keys(attrs), attr_name)):
 				//TODO this can be more interesting if we keep the IDs in the model, thereby preventing problems with language evolution
 				if (set_in(dict_keys(attrs), attr_name)):
@@ -265,7 +265,7 @@ String function cmd_attr_optional(write : Boolean, model : Element, element_name
 	if (write):
 		if (dict_in(model["model"], element_name)):
 			Element attrs
-			attrs = getAttributeList(model, element_name)
+			attrs = getInstantiatableAttributes(model, element_name, "AttributeLink")
 			if (set_in(dict_keys(attrs), attr_name)):
 				//TODO this can be more interesting if we keep the IDs in the model, thereby preventing problems with language evolution
 				if (set_in(dict_keys(attrs), attr_name)):