Hi, I have an NSView in a window with core animation layer turned on.
I use this view to display images with animation from time to time. I need the entire view to be the back layer not only the images. Behind this view which I call AnimationBaseView are other views which the user interacts to.
Everything is ok except the AnimationBase...
I'm sure I'm just a few letters away from getting this to work, but maybe not...
On the server-side, I've got this (Java);
ServiceInfo info = ServiceInfo.create("_mjdj._tcp.local.", "foo", 1268, 0, 0, "path=index.html");
jmdns.registerService(info);
This works perfectly with my Java client or a Bonjour Browser (service shows as "_mjd...
Hello,
I have a program that composites the pages of a PDF into a single image with each page stacked on top of each the previous one. The program works fine, but the font rendering quality is much lower when run from anything but a Snow Leopard system. In Leopard, the text looks jagged and not antialiased properly. Does anyone know ...
Hi!
I am struggling with very simple thing:
I receive some ids by http request as a string. I know they represent 64bit integer id numbers.
How can I convert them to the 64 bit Integers (NSNumber or NSInteger)?
Functions like:
[nsstring integerValue],
[nsstring intValue]
seems to be 32bit limited (max value:2147483647).
Any Hints?
...
I have a text file having data as given
e.g.
PUFGUjVRallYZDNaazFtVjVObU1zWm5ZcUJUYU5ORk4zbGthNHNDVUdSMlFVQmpSVEoxUUNSallYaFhkanBITXBGR1NTQnpZRTltZE1OalVzSkdXQ0Z6WXR0V2RpTmpTdXgwTWs5V1lZSkZiWjFXT29OV2JSVlhaSTUwYUpwR040UUZXTzVHVXFoWFVRcFdWNHdVTUJ0Q1VHSmxXVlJVTlJCMVE1VTFWV
PUFGUjVRallYZDNaazFtVjVObU1zWm5ZcUJUYU5ORk4zbGthNHNDVUdSMlFVQmpSV...
What's your preference with naming ObjC classes? I'm a little uncertain what would be the most reasonable approach on this so it would be nice to hear some other opinions.
Apple recommends prefixing cocoa classes, because ObjC doesn't support namespaces. The Google ObjC styleguide (which i mostly aim for) does away with them, unless you...
I'm loading two different views with this IBActions
- (IBAction)showFirstView:(id)sender{
theDetailViewController = [DetailViewController new];
[theDetailViewController initWithNibName:@"DetailView" bundle:nil];
NSView *splitRightView = [[theSplitView subviews] objectAtIndex:1];
NSView *aDetailView = [theDetailViewCont...
My question, in brief: Is there any way to make mutable collection KVO accessors thread-safe with the same lock that the @synthesized methods are locked?
Explanation: I have a controller class which contains a collection (NSMutableArray) of Post objects. These objects are downloaded from a website, and thus the collection changes from t...
At the bottom of this post I included an example project that has my code in it. I have a Cocoa Application that uses a main default window, and another window nib I created. When the program starts, I want it to load the window nib and show it in front of the default 'MainMenu' nib window. How can I do this? I've tried the following co...
Settting up the observer code:
NSNotificationCenter *defaultCenter = [[NSWorkspace sharedWorkspace] notificationCenter];
[defaultCenter addObserver:self
selector:@selector(updateLog:)
name:@"Update Log"
object:nil];
Sending the notification code:
[[NSNotificationCenter defaultCenter] postNotificationName:@"Update Log" object:se...
I am reading tutorial book now. When I see an example, I get some confused.
The following codes show a way for lazy loading. Does this motivations array be released after instance deallocated ? or will it occupy this memory block until application terminates.
+ (NSArray *)motivations
{
static NSArray *motivations = nil;
if (!mot...
I am looking for a cocoa example that illustrates how to create a multi-window app. Two windows, two nibs. Clicking a button in one window shows another window.
How can I do this?
...
I am just planning to implement some features like "Look up in Dictionary" when the mouse hovers over some text/words on the screen on the Mac OS X platform.
How can I get the displaying text/words nearby the mouse on the screen, even if they're not in my own application.
What I can do is:
Using WorkSpace to know what applications ar...
How do I store a NSUInteger using the NSCoding protocol, given that there is no method on NSCoder like -encodeUnsignedInteger:(NSUInteger)anInt forKey:(NSString *)aKey like there is for NSInteger?
The following works, but is this the best way to do this? This does needlessly create objects.
@interface MYObject : NSObject <NSCoding> {
...
Is it possible to create a custom controller key for an NSArrayController? There are keys for "arrangedObjects", "selection" etc... Is it possible to implement your own? I can't seem to find any info on this anywhere.
My reason for wanting to do this (besides it seeming like a useful thing to be able to do) is:
I have Entity "Car", wit...
new problem:
I am receiving this error: '-[__NSCFArray insertObject:atIndex:]: mutating method sent to immutable object'
In the ViewDidLoad I initialized my array:
id object = [[NSUserDefaults standardUserDefaults] objectForKey:@"array"];
if (object)
{
locationArray = object;
NSLog(@"retrieved", object);
...
Can I use the Spotlight APIs (they exist, right?) in Cocoa to determine if Spotlight (in the upper-right corner) would match a given filePath with a given string?
In other words, given a filePath such as "/Users/enchilada/Desktop/MapOfUSA.pdf", and a string such as "Virginia", how would I tell if Spotlight would show this file when "Vir...
Greetings,
Recently I faced a big problem (as it seems to me) with NSCalendar class.
In my task I need to work with a large time periods starting from 4000BC to 2000AD (Gregorian calendar). In some place I was forced to increment some NSDate by 100 year interval. When incrementing the years in AD timeline (0->...) everything worked fin...
Hello,
Is there a way to render the font of a PDF document in a different colour using the PDFKit library in Cocoa?
If not, is there another technology that I should explore?
Thanks.
...
I have an NSWindow, and I'm using this code to add a bottom-metal-bar at the bottom.
[MyWindow setContentBorderThickness:40.0 forEdge:NSMinYEdge];
That works fine. But, once I use this:
[MyWindow setBackgroundColor: [NSColor redColor]];
The red covers the bar at the bottom. The bar shows correctly without the background color.
...