Jump to content
  • Advertisement
Sign in to follow this  

Copy/paste fail

This topic is 1401 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts



...what kind of function declaration syntax is that though? o_O

Isn't that Objective-C?



Yes, it is Objective-C.  I originally mentioned that, but my browser crashed in the middle of editing, so I had to rewrite and forgot to mention that again.

Share this post

Link to post
Share on other sites

Proof that I know nothing about Objective C >.<


Lol, my little mistake taught me something new about Obj-C too biggrin.png  I know those things are resolved at runtime, and that opens for a lot of weirds stuff, but I didn't know that the definition would override the implementation.


Edit: And it was hard to start with Objective C with a C/C++ background.  If you don't come up with good names, things may look  like this:

- (void)myMethod:(NSString)theString withSomething:(NSInteger)withSomething {

Calling this thing:

[self myMethod:@"weird" withSomething:42];

Yes, it is weird, and it still feels weird and unnatural even after 2-3 years of Obj-C-ing...  And you are sending messages, not calling methods.  That is a whole world of difference, since sending messages means that everything is determined at run time.  Calling methods are determined at compile time.

Edited by aregee

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!