I'm trying to use the select and copy feature of the IKImageView. If all you want to do is have an app with an image, select a portion and copy it to the clipboard, it's easy. You set the copy menu pick to the first responder's copy:(id) method and magically everything works.
However, if you want something more complicated, like you wan...
I have an int* of rgb data,width, height, and scanlinestride where i would like to create an NSImage.
i have looked around and found that i need to use NSData?
what is the ideal way of doing this?
...
I'm trying to get ZSync to work between a desktop and iPhone app. I've got my schemas set up and all info matches between my MOM and my schema so I should be good to go. When I initiate my sync, however, I get this error.
|Miscellaneous|Error| SyncServices
precondition failure in [ISyncSession
_validateClient:entityNames:beforeD...
I've run into the same problem as found in this question. However, I have a follow-up question. I seem to be in the same situation as the original asker: I have a plist with a hierarchy of dictionaries that define a configuration screen. These are not mutable and will stay the same throughout the application. Since the original discussio...
How can I draw a slight white 'glow' around a button or label in 10.5 and later? I have seen some apps do it, but I am still confused how I should do this.
...
Hi there!
I'm using two entities A and B with to-many-to-many relationship. Lets say I got an entity A with attribute aAttrib and a to-many relationship aRelat to another entity B with attribute bAttrib and a to-many relationship bRelat with entity A.
Now I am building an interface with two tables one for entity A and another for entit...
I want to use the following code to login to a website which returns its cookie information in the following manner:
Set-Cookie: 19231234
Set-Cookie: u2am1342340
Set-Cookie: owwjera
I'm using the following code to log in to the site, but the print statement at the end doesn't output anything about "set-cookie".
On Snow leopard, the li...
I have a task that takes a rather long time and should run in the background. According to the documentation, this can be done using an NSOperationQueue. However, I do not want to keep a class-global copy of the NSOperationQueue since I really only use it for that one task. Hence, I just set it to autorelease and hope that it won't get r...
My understanding of printf-like format strings is that you can prefix any conversion specifier with a minimum field width. This does not seem to work for Cocoa’s %@ specifier.
Example:
NSLog(@"'%5@'", @"foo");
NSLog(@"'%5s'", [@"foo" UTF8String]);
Output:
… 'foo'
… ' foo'
Is this the intended behavior?
...
I have set it before but I cannot find the option any more...
...
Hi
I'm trying to write an NSDictionary to a plist but when I open the plist no data has been written to it.
From the log my path looks correct and my code is pretty standard.
Any ideas?
NSArray *keys = [NSArray arrayWithObjects:@"key1", @"key2", @"key3", nil];
NSArray *objects = [NSArray arrayWithObjects:@"value1", @"value2", @"value3...
I have a method which needs to run in its own thread 88 times per second (it's a callback for an audio unit.) Should I avoid creating an NSAutoreleasePool each time it's called?
...
User preferences for my app is store in NSUserDefaults. This includes a "theme" preference, which needs to be accessed frequently by multiple classes. I would prefer not to call "[[NSUserDefaults standardUserDefaults] objectForKey:..." repeatedly as it makes for inconcise code and I assume will incur overhead. What is the preferred and m...
Hi, as a Mac outsider it seems that two popular programming languages on the Mac appear to be Objective C and Ruby.
From what I understand the main API Cocoa seems to be written in and optimized for Objective C, but it is also possible to use Ruby for that.
Are there different areas where each language is ideal, for example, I could im...
I'm currently testing a new version of an app of mine on OSX 10.5
An user reported some weird crashes during use of the application, sadly not reproducible by me. At first sight it seems to happen randomly, once he had the crash while opening an NSOpenPanel and once during focusing an NSTextField and once during NSView switch in a parent...
Hello,
I've got a short question.
I have an NSArray filled with Cars (inherits from NSObject)
Car has the @property NSString *engine (also regarded @synthesize ...)
Now I want tu filter the array using NSPredicate
predicate = [NSPredicate predicateWithFormat:[NSString stringWithFormat:@"(engine like %@)", searchText]];
newArray = [Arra...
Hi, im working on a nstableview that contains information for some properties that are dynamicly created. Each row contains some cells that are common (name for example), but in one column they have different cells. Some properties will have NSSliderCell, other NSButtonCell etc. All of this is binded up to a NSDictionaryController. I've ...
Hi,
I've got a while loop, that runs for many seconds and that's why I want to update a progress bar (NSProgressIndicator) during that process, but it updates only once after the loop has finished. The same happens if I want to update a label text, by the way.
I believe, my loop prevents other things of that application to happen. Ther...
Are there any race condition issues when using NSNotifications within a single thread? Here is a sample method:
- (void) playerToggled: (NSNotification *) notification {
if (timerPane.playing && ! timerPane.paused) {
[playerPane toggleCurrentPlayer];
[timerPane toggleTimer];
[mainPane playerToggled];
}
}
The first two ca...
I want to programmatically (without Lightweight Migration) create a mapping model between two models that are exactly the same, except one of the entities (there are a bunch of entities) has different attributes. Let's call this entity "Person". And let's say the destination model has
1) added a new attribute called "address"
2) delete...