eerolanguage / eero

Eero was a fully binary- and header-compatible dialect of Objective-C, implemented with a modified version of the Apple-sponsored LLVM/clang open-source compiler. It featured a streamlined syntax, Python-like indentation, and other features that improve readability and code safety. It was inspired by languages such as Smalltalk, Python, and Ruby.
https://web.archive.org/web/20171101134337/http://eerolanguage.org/
288 stars 7 forks source link

Inserting Outlet or Action #40

Open xixixao opened 10 years ago

xixixao commented 10 years ago

I tried to "automatically" insert outlet/action from the Interface Builder, but XCode can't find the implementation for given header (well, it's written in eero). Is there a workaround?

Also (maybe related) I was trying to follow https://github.com/eerolanguage/eero/tree/master/xcodesupport/Xcode4+ but there is no Register Eero File Types.app file and I can't run the Register Eero File Types project (no MainMenu).

andyarvanitis commented 10 years ago

Unfortunately since Xcode doesn't truly have an open plugin framework, there's no good way to get Interface Builder to recognize or directly deal with eero headers. The workaround is to create standard ObjC headers when dealing with IBActions/Outlets, since Eero source files can still use them directly. I hope to come up with a way to automate the process at some point, probably using the source-source translator built into the compiler.

As for the "Register File Types.app", you just need to build it, copy it somewhere, and just run it from the Finder once. Please let me know if that helps!

xixixao commented 10 years ago

I do have standard headers, but Xcode is trying to insert the implementation snippets and I have that in eero, so it fails.

I ran the Register File Types.app, it might have actually worked out of Xcode and I just didn't notice, didn't have an effect on the other issue.

andyarvanitis commented 10 years ago

Ah, I'm sorry, I misunderstood. I don't know of a good workaround for that right now, but I will give it some thought.

Yeah, I should have clarified about the Register File Types -- it won't make any difference here, and technically you don't even need it for anything but file icons anymore.

aral commented 10 years ago

Giving Eero a spin (awesome, awesome work, by the way — love your approach to design) and hit this right away. Was trying to drag an outlet connection into the private interface (class extension) in my implementation file (as that is where I believe outlets should belong, not in the public interface in the header) and there’s — as was stated earlier — no support in the IDE.

Do you have any thoughts about the feasibility of adding this, Andy? (I read your earlier comment but I mean in terms of impossible vs. really hard but worth pursing vs. I do not believe it is worth the effort :)

Thanks again for your amazing work with Eero. In awe :)

andyarvanitis commented 10 years ago

Thanks Aral! It's hard to say how much work it will be, given the nature of reverse-engineering Xcode. However, with the new eero plugin design and the work that other people have done with their plugins, it's probably worth another look.