Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix autocomplete for block arguments in TyphoonDefinition factory methods not including a variable name #31

Merged
merged 2 commits into from
Jul 20, 2013

Conversation

rhgills
Copy link
Contributor

@rhgills rhgills commented Jul 20, 2013

No description provided.

jasperblues added a commit that referenced this pull request Jul 20, 2013
Fix autocomplete for block arguments in TyphoonDefinition factory methods not including a variable name
@jasperblues jasperblues merged commit 83bfd6f into appsquickly:master Jul 20, 2013
@jasperblues
Copy link
Member

Thanks Robert. What IDE is this for? What was not working before? . . . I actually inlined the blocks a while back for AppCode. . . but the latest build of AppCode doesn't seem to like those.

@rhgills
Copy link
Contributor Author

rhgills commented Jul 20, 2013

You're welcome. For Xcode (both 4.6.3 and redacted). I haven't had a chance to take a look at AppCode yet. Maybe it doesn't have as many problems with block autocomplete as it seems Xcode does.

Before, after triggering autocomplete and tabbing to and hitting enter to expand the block argument, you'd get this:

return [TyphoonDefinition withClass:<#(__unsafe_unretained Class)#> initialization:^(TyphoonInitializer *) {
    <#code#>
}];

You'd then have to manually add in a variable name for the TyphoonInitializer parameter.

Now, you get this:

return [TyphoonDefinition withClass:<#(__unsafe_unretained Class)#> initialization:^(TyphoonInitializer *initializer) {
    <#code#>
}];

The problem wasn't fixed by adding the typedefs per se, but instead by simply adding a default name for the TyphoonInitializer and TyphoonDefinition parameters in the blocks. Does AppCode currently have problems with typedef'd or inlined blocks? Xcode is fine with either. Obviously typedef is a bit more DRY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants