I’m writing a HTML editor, I have some code that inserts some HTML code in the textview, the code is this “” but it says I have all these undeclared functions.
That is one of the most insightful and interesting questions I have ever seen on General/CocoaDev. :)
I just ran into this last night and I thought it was great, so I’ll have to post it here now.
Ok, let me try this again. My code looks like this General/NSString *image; image = @””; [textView insertText:image]; And my errors are this
*error: invalid operands to binary / *‘htmledit’ undeclared *error: parse error before string constant
I really need help with this.
You really need to brush up on your basic C programming skills. String assignments and string formating are topics you need to understand before even thinking about working with HTML. I guess you don’t know what an escape sequence is. This is the root of your problem.
Read the first 10 pages of “The C Programming Language” by Kernighan & Ritchie (ISBN 0131103709). In fact buy this book and keep it near your computer at all times.
Here’s a link to get you started:
http://www.juicystudio.com/tutorial/c/basic.asp —- I sort of /n escape thing is, but how do I implement it in the code in question? —-
[textView insertText:@”<img src="/images/htmledit.gif">”]; <– you really didn’t help him with this
I’m surprised you haven’t run into this a dozen times by now if you’re writing an HTML editor.
Thank you so much for all of you help! It works! : )
Don’t you enjoy making fun of me! : P
One of them does; the other is more interested in helping.
I’m not asking you to write my code, I’m just asking things that I need help with.