Skip to content

Issue with %init and objc_getClass() #1

@strejda603

Description

@strejda603

Hello!

Thank you for this script, it is VERY useful!

I just found one issue: When I have some objc_getClass() functions inside %init and I format it, the script splits every function on new line and Theos then throws an error "warning: tried to set expression for unknown class or function SomeClass1 in group _ungrouped". If I want to get rid of this error, I need to revert formatting of this %init to one line.

Could you please update your script to prevent new lines for this case?

This is what I get after formatting (gives me an error):

%ctor {
  %init(
      SomeClass1 = objc_getClass("Some.Class1"),
      SomeClass2 = objc_getClass("Some.Class2"),
      SomeClass3 = objc_getClass("Some.Class3"));
};

This is what it should looks like (compiles correctly):

%ctor {
  %init(SomeClass1 = objc_getClass("Some.Class1"), SomeClass2 = objc_getClass("Some.Class2"), SomeClass3 = objc_getClass("Some.Class3"));
};

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions