User |
Post |
1:05 pm
September 26, 2008
|
bobcubsfan
iCoder
|
|
Los Angeles
|
|
|
posts 54
|
|
|
code looks like this:
[self vtest];
-(void) vtest {
}
error generated:
Line Location mintViewController.m:42: (Messages without a matching method signature will be assumed to return 'id' and accept '…' as arguments.)
Also, got sqlite errors
Line Location Tool:0: “_sqlite3_prepare_v2″, referenced from:
Line Location Tool:0: symbol(s) not found
Line Location Tool:0: “_sqlite3_close”, referenced from:
Line Location Tool:0: “_sqlite3_open”, referenced from:
|
|
2:13 pm
September 26, 2008
|
Admin
|
|
brandontreb
|
|
|
posts 88
|
|
|
bob,
First, is vtest declared in the .h file? All methods must be declared in the .h. The sql errors look like you forgot to import the sqlite3 libraries into your project. Let me know if that helps…
|
If debugging is the process of removing bugs, then programming must be the process of putting them in.
-Edsger Dijkstra
|
|
2:54 pm
September 26, 2008
|
bobcubsfan
iCoder
|
|
Los Angeles
|
|
|
posts 54
|
|
|
Hi Brandon,
thanks for the quick response.
Yes, when I include vtest in the “h” it works, but you used (private) to declare the methods and your code works.
I did #import <sqlite3.h> in the appdelegate.h file.
|
|
3:40 pm
September 26, 2008
|
bobcubsfan
iCoder
|
|
Los Angeles
|
|
|
posts 54
|
|
|
Hi Brandon,
I uploaded a small test that illustrates the problem. Doing a build generates the errors.
|
|
2:03 pm
September 29, 2008
|
bobcubsfan
iCoder
|
|
Los Angeles
|
|
|
posts 54
|
|
|
Never mind. I found out what I did wrong.
|
|
3:11 pm
September 29, 2008
|
Admin
|
|
brandontreb
|
|
|
posts 88
|
|
|
Glad to hear it. Sorry I didn't respond in time…It's been a long weekend.
|
If debugging is the process of removing bugs, then programming must be the process of putting them in.
-Edsger Dijkstra
|
|
11:02 pm
September 30, 2008
|
bobcubsfan
iCoder
|
|
Los Angeles
|
|
|
posts 54
|
|
|
In this line of code:
Todo *td =[[Todo alloc] initWithPrimaryKey:primaryKey database:database];
I don't understand how Todo and td can be used since I cannot find any declaration of either.
In the project I am working on, I get errors saying both are undeclared, first use in this function. Obviously the variables are not Todo and td, but still, in Apple's Books example, Book and book are used without a problem.
What am I missing?
|
|
10:24 am
October 1, 2008
|
Admin
|
|
brandontreb
|
|
|
posts 88
|
|
|
Todo *td; is declaring td as an object of type Todo. We can do this because in the .h file, we did a #import “Todo.h”.
So by importing the Todo.h file, this allows us to build new instances of Todo objects (ie calling their init functions). td is simply an instance of a Todo.
Does this make sense?
|
If debugging is the process of removing bugs, then programming must be the process of putting them in.
-Edsger Dijkstra
|
|
11:43 am
October 1, 2008
|
bobcubsfan
iCoder
|
|
Los Angeles
|
|
|
posts 54
|
|
|
So, we can call Todo because of the definitons in its .h file and .m files. I got confused because every other variable in the project was defined as NSString *mystring; with its property and synthesize statements.
Thanks for the help.
|
|