So I have noticed that there is a lot of animosity towards Objective-C among programmers. What's your take? Is it a vendor lock-in thing against Apple? General antipathy towards Apple? The syntax? What's your view on this?
With the advent of the iPhone SDK, Obj-C has gotten a lot more attention lately, and I am curious what people on SO...
I wonder if is possible in obj-c to acces the parent instance from a property, like:
@interface AObject : NSObject {
}
-(void) sample{
NSLog("%@", [[self parentInstance] Id]);
}
@interface DbObject : NSObject {
NSInteger Id;
AObject* ob;
}
...
For my brand new ORM (chibi-ORM) I face a desing decision.
I'm building the API for relationships, like:
@interface SamplePerson : DbObject {
NSString *name;
DbObjectRelation *cities;
}
Now, for DbObjectRelation I have this mockup:
@interface DbObjectRelation : NSObject {
NSMutableArray *childRows;
DbObject *pare...
I am eventually wanting to program in Objective-C to write programs for OS X and possibly the iPhone. I do not have any direct experience with C and I come from a web programming background. I am much more familiar with java syntax than C and Objective C.
I am just looking for suggestions on how to get started. It looks like I need t...
Hi, I'm triying to find leaks in my project chibi-ORM using the tool of scan-build as suggested in other threads.
But when run from the terminal:
/Users/mamcx/Downloads/checker-0.138/scan-build -k -V xcodebuild
I get this:
009-01-13 10:33:18.296 xcodebuild[14025:4213] Warning: Couldn't discover the 'ccc-analyzer' compiler's built-...
What are the differences between #import and #include in Objective-C and are there times where you should use one over the other? Is one deprecated?
I was reading the following tutorial: http://www.otierney.net/objective-c.html#preamble and its paragraph about #import and #include seems to contradict itself or at least is unclear.
...
In Delphi, is normal do this:
ob = TObject.create;
try
//code
finally
ob.free;
end;
I wonder if that is similar in Obj-c.
...
I wonder if already exist a generic library of validator suitable for a iPhone project (or better, bussines objects) for obj-c.
Things like:
Validator.IsNotEmpty..
Validator.IsValidEmail..
Validator.IsValidZipCode..
Validator.IsValidRegex..
Validator.IsInRange..
...
Hi,
I'm inserting a hook in the MFC message loop so that the Qt events are treated, without running ->exec() on qApp (because it's blocking):
LRESULT CALLBACK myHookFn(int ncode, WPARAM wparam, LPARAM lparam) {
if (qApp) qApp->sendPostedEvents();
return CallNextHookEx(0, ncode, wparam, lparam);
}
and
int argc = 0;
new QAppli...
The documentation for -hash says it must not change while a mutable object is stored in a collection, and similarly the documentation for -isEqual: says the -hash value must be the same for equal objects.
Given this, does anybody have any suggestions for the best way to implement -hash such that it meets both these conditions and yet is...
I am fairly new to Objective-C, but experienced in Java. Is there the equivalent concept of Objective-C "delegation" in Java, so that I may understand this notion better? Would there be a way to emulate the delegation concept in Java?
...
I am currently trying out this code:
# NSString *path = [[NSBundle mainBundle] pathForResource:@"dream" ofType:@"m4a"];
# AVAudioPlayer* theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
# theAudio.delegate = self;
# [theAudio play];
However, the SDK says that the ViewController does...
Hi, I'm confused about the regex librarys that can be available for the iphone. For example RegexLite look like need a dinamyc link, nad as I understood this is not possible for the sdk on the iPhone.
I wanna a regex library for do data validation... which one is the best available?
...
My company is starting a new branch with IPhone development and we need to hire a developer.
I like to test this person in his/her skills in iPhone developement (Objective-C etc) and general programming skills.
iPhone programming skills is not a must to apply for this job but I still like a have a iPhone/Obj-c theme on the questions...
Hello,
I am developing a 2d iphone game by using cocos2d. I need a countdown timer.
Plz tell me, How can I create a count down Timer in cocos2d ?
...
I'd like to give Objective-C a try in game programming. The problem is I'd need some tools and libraries for this.
First thing that comes into mind I need is the GUI and graphics library.
What choices do I have?
...
I'm having some problems displaying the contents of one NSArrayController in two windows defined in different XIBs.
In my main window (in MainMenu.xib), I have an NSTableView which is bound to an NSArrayController
In my second XIB, I have another window that contains an NSTableView. I created a new NSArrayController, and bound the tabl...
In my question "How do I get -[NSString sizeWithFont:forWidth:lineBreakMode:] to work?", I learned that -[NSString sizeWithFont:constrainedToSize:lineBreakMode:] was actually what I needed.
The documentation for -[NSString sizeWithFont:forWidth:lineBreakMode:] states explains it doesn't actually wrap the text to additional lines. So ho...
I am building a class that handles NSURLConnection requests. To allow other classes to use this class, I would like to allow the main class to call a delegate when connectionDidFinishLoading is fired.
I've looked through lots of documentation, but I can't find anything that gives any clear examples, and the code that I have doesn't cal...
When I build in Xcode, any errors or warnings are being duplicated. So in the IDE, I get twice the number near the icons in the status bar, and where the yellow or red bubbles show up in the editor, there are two warning lines (or error lines) below the line where the warning (or error) occurred. Anyone else have this problem, or know ...