From 7a3eef9678043d333ca14a262fe7018ee40eefc3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Wed, 26 Aug 2015 15:08:09 -0400 Subject: [PATCH] contrib/objcwrapper: comment out properties depending on types availability MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- contrib/objcwrapper/src/objc_generator.nit | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/objcwrapper/src/objc_generator.nit b/contrib/objcwrapper/src/objc_generator.nit index 9dd29f0..f28a49e 100644 --- a/contrib/objcwrapper/src/objc_generator.nit +++ b/contrib/objcwrapper/src/objc_generator.nit @@ -133,6 +133,7 @@ extern class {{{classe.name}}} in "ObjC" `{ {{{classe.name}}} * `} # Methods for method in classe.methods do + if not model.knows_all_types(method) then method.is_commented = true if not opt_init_as_methods.value and method.is_init then continue @@ -162,6 +163,8 @@ end for method in classe.methods do if not method.is_init then continue + if not model.knows_all_types(method) then method.is_commented = true + write_method_signature(method, file) write_objc_init_call(classe.name, method, file) @@ -170,6 +173,8 @@ end private fun write_attribute(attribute: ObjcAttribute, file: Writer) do + if not model.knows_type(attribute.return_type) then attribute.is_commented = true + write_attribute_getter(attribute, file) # TODO write_attribute_setter if there is no `readonly` annotation end -- 1.7.9.5