Objective-C Help - Ignacio Cabero Can't Figure It Out

  • Thread starter Thread starter ignaciocabero
  • Start date Start date
AI Thread Summary
The discussion revolves around troubleshooting an Objective-C coding issue related to syntax errors. The initial problem involved an unmatched bracket in the code snippet [[hero addChild:rightEye], which was identified and corrected. However, further errors persisted in additional lines of code. Participants highlight that when one error is fixed, it can often resolve subsequent errors, as the compiler may misinterpret later lines due to earlier mistakes. Additionally, they note that errors may not always be on the indicated line but could originate from the preceding line, suggesting that missing elements there can cause confusion for the compiler. Despite attempts to follow suggestions, the user continues to encounter issues, particularly with adding parentheses as advised.
ignaciocabero
Messages
10
Reaction score
0
I've tried to figure out the problem all night, but I can't figure it out.
ImageUploadedByPhysics Forums1408135774.004256.jpg
Sorry if it's hard to see.
Thank you so much,
Ignacio Cabero.
 
Technology news on Phys.org
I've never used Objective-C, but even I can see there's something wrong with
Code:
         [[hero addChild:rightEye];
I'm pretty sure every "[" needs to be matched by a "]".
 
Thanks so much, that helped for the hero addChild, but there is still the three other ones that I need help with (the ones under the hero addChild
 
Welp, I actually fixed that problem by adding some brackets, but now this shows up.
ImageUploadedByPhysics Forums1408140714.136093.jpg
 
ignaciocabero said:
Thanks so much, that helped for the hero addChild, but there is still the three other ones that I need help with (the ones under the hero addChild

ignaciocabero said:
Welp, I actually fixed that problem by adding some brackets, but now this shows up. View attachment 72194
Some hints about errors.

  1. When one error occurs, often the following lines don't make sense to the compiler; fixing the first error may make the other errors go away.
  2. Sometimes the error isn't on the line identified by the compiler, but on the line before (e.g. something is missing from the line before, so the compiler can't make sense of the current line).
That second hint applies to the error you have now.
 
Thanks, but when I put a '( ' like it tells me to, it doesn't work.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...
Back
Top