Caret in objective C
What does the caret in objective C mean? ie. void (^handler)(NSInteger); from Mac Dev Center ...
What does the caret in objective C mean? ie. void (^handler)(NSInteger); from Mac Dev Center ...
How does Objective C on the iPhone compare to Objective C on the Mac and what version of objective C is the various iPhone versions? ...
Hi, I have a TableView who display the name of some Categories by executing this simple query "select * from category" so my object contain id_category and name. When I click on a row, a new tableView will display somes names inside thoses different categories. "Select * from fiche_Category where id_category = ?" My only probl...
Hi, I'm using NSXMLParser on an iPhone App to parse HTML Files for a RSS or Atom Feed Link. Everything works fine until the parser find a <script> element that includes Javascript code without the CDATA Declaration, this causes a Parse Error. Is possible to tell the parser to skip all the elements named <script>? ...
I am using the following code to perform drag operation on NSTextView object. - (BOOL)performDragOperation:(id )sender { NSPasteboard *pboard = [sender draggingPasteboard]; if ( [[pboard types] containsObject:NSURLPboardType] ) { NSURL *fileURL = [NSURL URLFromPasteboard:pboard]; if ([[fileURL path] hasSuffi...
Hi all, Is it possible to make system call in Objective-C? I have the following code: if (!system("ls -l")) { NSLog(@"Successfully executed"); } else { NSLog(@"Error while executing the command"); } How to get the output? Thanks ...
Can anyone give a brief explanation of how to use message forwarding? Links Apple documentation: Apple documentation tends to be good as a reference, but lengthy enough to not be the best as an introduction. ...
hey i'm able to create hash table in Objective-C which stores data in XML format... but how to launch the application which i've specified in the string tag in XML file...My application name is in the bundle format... For Example: <key>HelloWordl<key> <string>HelloWorld.bundle<string> How to launch this HelloWorld.bundle?? ...
Hi, I trying to use OpenBase SQL in my code to save large amount of data. But I have one difficulty regarding this, I am not able to find the frameworks required for using OpenBase SQL in my code. I have found some coding part from the net but that is not working since no framework for OpenBase is added. Can anyone help me with this......
How could I change the background of each row of a NSTableView? ...
I'm new to Objective-C and Cocoa programming, so in my first sample projects I've always adopted the statement of releasing/autoreleasing all my allocated and copied objects. But what about local objects allocated inside methods? Let me write some sample code, here is my object interface: @interface MySampleObject : NSObject { NSMe...
Hi, there is something strange in my code. I'm sure to forget something but i don't know what. I try to handle phone, sms mailto and http links in an UIWebView. This is how i try : 1/ instantiate the UIWebView : webview = [[UIWebView alloc] initWithFrame:CGRectMake(0,0,320,460)]; webview.opaque = NO; webview.backgroundColor = [UIColo...
Can anyone tell me what the arrow brackets "<…>" in an Obj-C class interface do? Like this… http://snipt.net/robhawkes/cocoa-class-interface @interface MapMeViewController : UIViewController <CLLocationManagerDelegate, MKReverseGeocoderDelegate, MKMapViewDelegate, UIAlertViewDelegate> { I've previous programming experience with web la...
Hello! I want to use the JSon library in my iPhone project, and went to this site: JSON And there I choosed the Cocoa JSON Framework, but the site don't want to load for me. Any ideas how to fix this problem? Or suggestions for a place where I can get the JSon for objective-c? ...
Hi! I have a class named MyClass. And in the file MyClass.m I start the coding with this line: extern MyClass *gMyClass; and I got this error: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token What's the problem? What do you think? ...
I have been trying to write a delegate to a view controller which has a method which will call back the sender when it is done -(void) doSomething:(id)target action:(SEL)action object:(id)object{ //Do Some work //Produce an NSArray* called array object = array; if([target respondsToSelector:action]) { [target action]; ...
I've come across a strange scenario related to class inheritance in Objective-C. Let's say i have three classes A, B and C that inherit from a base class X. Classes A, B and X have the constructor: - (id)InitWithString:(NSString*)someString andDelegate:(id<SomeProtocol>)aDelegate the only difference being that every class uses a diff...
I am allocating myMDD in main which contains an NSMutableArray instance variable (alloc/init-ed in init). When I add items to the NSMutableArray (frameList) I release after adding. The array and the objects it now contains are released at the bottom of main. int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSA...
Apple apps like Mail, Contacts, and SMS make the UIKeyboard appear as part of the view. The UIKeyboard slides in with the view instead of appearing as a separate animation. I have tried to recreate the same behavior calling [myTextField becomeFirstResponder] in different places like viewWillAppear:animated, viewDidLoad, loadView, naviga...
I want to pass a struct within a method so i can change it's value within, but I am not too sure on it's syntax: struct qsTracker { int points; BOOL flagged; } myCurrentQs; [self calculateScore:myCurentQs]; -(void) calculateScore:(struct qsTracker) currentQs { currentQs.points++; currentQS.flagged = YES;...