Compiler error “expected method not found” when using subscript on NSArray

You’ve got to be compiling with the iOS 6 or OS X 10.8 SDKs — otherwise Foundation objects don’t have the necessary methods for the subscripting bit of the literal syntax.* Specifically in this case, the subscripting expects objectAtIndexedSubscript: to be implemented by NSArray, and that’s a new method that was created to interact with … Read more

Is there some literal dictionary or array syntax in Objective-C?

With this change to the LLVM codebase, Apple has added a new syntax for literals in upcoming versions of the Clang compiler. Before, arrays were created using a C-based array and were converted on the fly into Objective-C objects, such as: NSArray* array = [NSArray arrayWithObjects: @”One”, @”Two”, @”Three”, nil]; Note that since this is … Read more

What are the details of “Objective-C Literals” mentioned in the Xcode 4.4 release notes?

Copied verbatim from http://cocoaheads.tumblr.com/post/17757846453/objective-c-literals-for-nsdictionary-nsarray-and: Objective-C literals: one can now create literals for NSArray, NSDictionary, and NSNumber (just like one can create literals for NSString) NSArray Literals Previously: array = [NSArray arrayWithObjects:a, b, c, nil]; Now: array = @[ a, b, c ]; NSDictionary Literals Previously: dict = [NSDictionary dictionaryWithObjects:@[o1, o2, o3] forKeys:@[k1, k2, k3]]; Now: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)