How would I assign a column of a TableView to be a specific entry in a Core Data entity that is linked to the NSArrayController via a to-many relationship?
For example
Entity: MovieEntity
Attributes: title(NSString), releaseDate(NSDate)
Relationship: posters<-->> PosterEntity
Entity:PosterEntity
Attributes: imageLocation(NSURL), defau...
What is the best way to remember the Windows position between application loads using Obj-C? I am using Interface Builder for the interface, is it possible to do this with bindings.
What is the recommended method? Thank you.
...
I'm struggling with trying to find an elegant way of displaying the column headers for a table view in a vertical fashion (rotated 90 deg counter clockwise from traditional). I'm not married to doing this as an actual NSTableHeaderCell, I figured it might be easier to do it by overriding NSTextFieldCell or NSCell.
The cells only contai...
Hi,
I have problems with NSScrollView, It is not displayed the way I want.
Yes I know there is a lot of post about it around the web, I need to override the isFlipped, in order to make it return YES, in my NSView subclass.
Ok, it's done, so now, my scrollView scroll from top to bottom, and not in the reverse way, as it was before overr...
Hi, here's the scenario, I have this array of Person objects. copyWithZone is implemented on Person and works as expected.
I have an array of Person objects, however when I create a copy of the array and modify things in original array (change attributes of a Person) it changes the copy as well. So my best guess is that when I call copy...
Hi,
How to create a rounded corners black window in cocoa? Is it standard and can be created by IB? Can somebody provide an example?
Thanks in advance
...
The translation tool isn't able to translate this working code. I copied it out of a working script.
set pathToTemp to (POSIX path of ((path to desktop) as string))
-- change jpg to pict
tell application "Image Events"
try
launch
set albumArt to open file (pathToTemp & "albumart.jpg")
save albumArt...
Hi
I am new iphone development. In my app, i am using two textfield and i want to save the text on the dada base which is entered in textfield then i want to display it. Here i am using CoreData base. I am feeling difficult to understand all classes on the coreData base. Here i am created view based application. What are the classes req...
I have an array of arrays with objects and now want to get all objects for a certain date (which is an object property).
what's the best way to query it?
...
Using the plethora of drawing functions in Cocoa or Quartz it's rather easy to draw paths, and fill them using a gradient. I can't seem to find an acceptable way however, to 'stroke'-draw a path with a line width of a few pixels and fill this stroke using a gradient. How is this done?
Edit: Apparently the question wasn't clear enough. T...
I'm looking to choose a namespace for a library I'm writing and I'd like to avoid conflicts with other namespaces.
Does anyone know of a website that lists all of the class prefixes in use?
...
At my day job I've been spoiled with Mockito's never() verification, which can confirm that a mock method is never called.
Is there some way to accomplish the same thing using Objective-C and OCMock? I've been using the code below, which works but it feels like a hack. I'm hoping there's a better way...
- (void)testSomeMethodIsNeverCal...
When my application is closed, the main controller class removes itself as Observer from the model and then releases the model. Like this:
- (void)dealloc {
[theModel removeObserver:self
forKeyPath:@"myValue"];
[theModel release];
[super dealloc];
}
And right after that, the debugger says:
2010-04-29 ...
I get this error when I try to run my app:
2010-04-29 13:49:01.355 MyApp[56123:207] *** Terminating app due to uncaught
exception 'NSUnknownKeyException', reason: '[<MyViewController 0x5112b10>
setValue:forUndefinedKey:]: this class is not key value coding-compliant for
the key toolbar.'
MyViewController used to have an IBOutlet call...
I'm looking for a way to use NSPredicate to set a LIKE condition to fetch objects. In addition to that, an OR would be useful as well. I'm trying to do something where if a user searches "James" I can write an NSPredicate that will do the equivalent of:
select * from users where firstname LIKE '%James%' OR lastname LIKE '%James%';
...
I have a Cocoa app which interacts with a server and displays a GUI. If there is a fatal error, I display an alert and exit. I'd like to set the exit status to a non-zero value to reflect that an error occurred, for ease of interaction with some other UNIX based tools.
Unfortunately I've been unable to find a good way to do so - NSAppli...
Hi,
A little background on the question: I am developing a RedDwarf(http://reddwarfserver.org/) client on iphone, for the client/server communication I use idarkstar. I had to make minor modifications to make it work till now.
So here's the question, if the server is taking to long to respond or the network is very slow, how do I add a...
My encoded string from the server looks like this: "it-strategy%20RZ%20U%20texas".
How is it possible to decode this string back to "it-strategy RZ U texas"?
I have tried the method stringByReplacingPercentEscapesUsingEncoding: , but I have still the percentages.
...
We're distributing a Cocoa framework with regular updates. We'll be updating the version numbers with each release. The Apple documentation appears to suggest that version numbers should be consecutive incrementing integers. We are distributing output in several formats, and the framework is only one of them. We would rather not have to ...
I want to send a notification from a UITableViewController-A to UITableViewController-B.
I was adding the observer in the initwithCoder of the UITableViewController that is supposed
to catch the notifications.
The classes are correlated as folows
RootViewController
===NavigationController-A
=====UITableViewController-A
===Navigati...