Hi
I have a Core Data Entity that needs to hold onto the NSManagedObjectID of some other Entity. To do so I was considering converting the ObjectID to a string that is an approved type of an NSManagedObject attribute.
I can read from the documentation that I can get a URI representation of the ID by:
NSURL *uriID = [[myEntity objectID...
I'm trying to integrate the MCPKit MySQL framework available at http://mysql-cocoa.sourceforge.net/ into my cocoa application. I've added the framework and included the header file but when I try to define my first MCPConnection variable it says "MCPConnection undeclared". Is anyone successfully using MCPKit on leopard ? Or is there anot...
This is something I found myself spending hours to figure out and therefor wants to share with you.
So the question was, How do i determine the day of the year for a specific date?
e.g. January 15 is the 15'th day and December 31 is the 365'th day when it's not leap year.
...
Is there a StringGrid in the Cocoa Framework or has anybody implemented one that would be like the one in Delphi?
...
I'm trying to implement my own version of NSViewController (for backwards compatibility), and I've hit a problem with bindings: Since bindings retain their target, I have a retain circle whenever I bind through File's owner.
So I thought I'd just explicitly remove my view from its superview and release the top level objects, and that wo...
Hello. I am trying to condense my code for a method and was wondering how I would achieve the following:
I have a bunch of variables that differ only in their number such as:
int intVariable1
int intVariable2
UILabel Label1
UILabel Label2
BOOL bool1
BOOL bool2
etc.
So I want to call a method and pass in an int. That int would dete...
I have a question.
You can export an NSManagedObject subclass from xcode xcdatamodel file when you create an Entity.
Is there a way to import NSManagedObject subclass to the xcdatamodel diagram???
Thanks
...
Is the best way of doing what i'm doing? goodThingX, badThingX and nothin are UILabels.
NSString *todayNothing = [[todayArray objectAtIndex:0] objectForKey: @"nothing"];
if (todayNothing!=NULL) {
goodThing1.hidden = YES;
goodThing2.hidden = YES;
goodThing3.hidden = YES;
badThing1.hidden = YES;
badThing2.hidden = YES;...
Hello,
I have a UITableView with Cells that are filled with the Objects of an NSArray. I´m using the MGTwitterEngine to get Tweets from users. I want to show this tweets in the TableView. Here is the method that is called when the MGTwitterEngine has received all tweets ("namen" and "nachricht" are NSArrays):
- (void)statusesReceived:(N...
Dear folks,
I've got an objective-c/cocoa based application that I'm working on. This app is client<->server. Currently, the communcation protocol is based upon some fairly simple XML. While XML works for this task, it is not ideal in any aspect. It's a pain to serialize data to XML, it's not particularly light-weight, and difficult to i...
Hi all,
I am having trouble deciphering a "passing argument ... from distinct Objective-C type warning".
I have a constant string declared as:
extern NSString * const URL_1;
and defined as:
NSString * const URL_1 = @"http://someurl";
If I, say, assign that constant to an NSString as follows:
NSString *URL = nil;
...
URL = [[NSSt...
Reference to pre-answered question at: http://stackoverflow.com/questions/1625098/getting-first-and-last-days-of-current-week
There are two answers in the above link. One of them is theoretical and the other is in a language called as PyObjC (Python-Objective C bridge language), and a quick google search confirms that PyObjC does not w...
I am trying to upload a profile image to twitter using their API. I found some good examples on the web on how to format the URLRequest, however I just can't seem to get this to work. Any help would be appreciated. The URL that I am using from Twitter API is http://twitter.com/account/update_profile_image.json
-(void)uploadImageForAccou...
When I try to invoke an instance of a class that implements a particular protocol, I get warnings about the method not being found in the protocol's signature.
warning:
'-requestCompleted:requestType:' not
found in protocol(s) warning:
'NSObject' may not respond to
'-requestCompleted:requestType:'
I couldn't see the reason...
What is the significance of the positioning of the
const
keyword when declaring a variable in Objective-C, for example:
extern const NSString * MY_CONSTANT;
versus
extern NSString * const MY_CONSTANT;
Using the first version in assignments produces warnings about "qualifiers from pointer target type" being discarded so I'm assum...
Hi, I need to compare an enum as a whole to one string, so the whole contents of the enum is checked.
Wanted something like:
NSString *colString = [[NSString aloc] initWithString:@"threeSilver"];
typedef enum {
oneGreen,
twoBlue,
threeSilver
}numbersAndColours;
if (colString == numbersAndColours) {
//Do cool stuff
}
But obviousl...
How would I use a tableView as a value selector?
So I have a series of input fields and what I want is when you select a cetian field it opens a tableview of options that you can pick from as a value for that field.
Upon selecting an option it returns to the previous View with the selected value filling that field.
...
Hi,
This is probably a simple problem for the high skilled Cocoa programmers, but I can't find how to control the graph in a separate window. I read carefully the Cocoa related books, go through many web notes,but I can't find a solution to my problem. The purpose is to use a dedicated window to draw the I=F(Vg) curves extracted by the ...
I am new to CoreData and am struggling to work out the correct way to model a particular relationship. I have an entity called 'Friend' with a few attributes such as 'name', 'age', 'sex' etc.
I would like to be able to model a score between two instances of Friend and am having trouble getting my head around the best way to do this.
Fo...
Hi,
I have an NSDate and I want to tell if it occurs on a particular day of any year. How do I do that?
For instance, I want to see if NSDate's day and month are 25 and 12.
I want to go:
NSDate *today = [NSDate date];
int day = [today day];
int month = [today month];
Is there a way of doing that?
...