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

HFRepresenter's view is untyped, making it relatively difficult to use from Swift #206

Closed
jverkoey opened this issue Aug 3, 2019 · 1 comment
Labels

Comments

@jverkoey
Copy link

jverkoey commented Aug 3, 2019

The view method on HFRepresenter is typed as an id:

https://github.com/ridiculousfish/HexFiend/blob/104c9f740ca113628e5d027102bc8d97707724a6/framework/sources/HFRepresenter.h#L45

Swift code then need to look like this (in Cocoa):

let view = (layout.view() as! NSView)

Would it be possible to add type information to the view API? It may also improve Swift readability if the API were declared as a property.

@jverkoey jverkoey changed the title HFRepresenter's view is untyped, making it clunky to use from Swift HFRepresenter's view is untyped, making it relatively difficult to use from Swift Aug 4, 2019
@kainjow kainjow closed this as completed in d6aa6af Sep 8, 2019
@kainjow kainjow added the Feature label Sep 8, 2019
@kainjow
Copy link
Member

kainjow commented Sep 8, 2019

Added. Although it's using an HFView preprocessor definition. I think Swift should be able to pick that up though.

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

No branches or pull requests

2 participants