I am using SLAs bundled with my DMGs as described here.
However, I want to support SLAs for languages (for example Catalan) beyond those given in the SLAResources file provided by Apple.
Is this possible?
...
I have an NSDocument which has the following structure:
@interface MyDocument : NSDocument
{
NSMutableArray *myArray;
IBOutlet NSArrayController *myArrayController;
IBOutlet MyView *myView;
}
@end
I instantiate the NSArrayController and the MyView in MyDocument.xib, and have made the connections to the File's Owner (MyDoc...
Hi All,
I have few views aligned in grids in parent view (All being NSView's )
I am overriding
-(void)mouseDown:(NSEvent *)event
- (void)mouseDragged:(NSEvent *)theEvent for some custom drawing in child view subclass
To be specific, I draw some rectangle boxes during mouse drag in child view's.
Problem: when cursor moves ou...
According to this guide, I can use NSPredicate to do regex matching on strings, i.e., the perl equivalent of $my_string =~ m/[some regex]/
But can I do regex replace, i.e. the equivalent of this perl expression: $my_string =~ s/[pattern]/[replacement]/g ?
...
Hi all,
I'm working on tracking down some difficult to find memory leaks in my iPhone program. I'm running a quick test on an app which leaks an NSString object with the following intentionally -incorrect- code:
-(void)applicationDidFinishLaunching:(NSNotification *)notification;
{
NSMutableString *test = [[NSMutableString alloc] i...
What are the differences between debug and release builds for a Cocoa application?
I know the debug version contains additional information for debugging but what else is different?
...
My current plan is to draw the rectangles by subclassing NSView, but that seems like a very inefficient way for what I'm trying to do, which is to draw a bunch of fixed, non-overlapping rectangles that changes colors once in a while. Is there a better way? Thanks.
...
I'm not sure if the following is possible, but can one retrieve the name of a symbol that a memory address points to in GDB? For instance, I know that 0x46767f0 belongs to an NSString*, is there any way I can find out what NSString it is to help me find some bugs I'm after?
Thanks!
...
I want to be notified when the current application will change. I looked at NSWorkspace. It will send notifications only when your own application becomes active or loses the activity.
I want to be informed about every application. How can I do this in Cocoa?
...
I have an NSInvocationOperation that would download and parse a series of NSXMLDocuments in the background to my UI responsive.
My attempt at stopping the Invocation operation is to call my NSOperationQueue's cancellAllOperations. But it seems that this won't stop the invocation's execution.
Any ideas on how would I go about this probl...
I have created an NSScrollView in interface builder that has a variable number of semi-unique NSViews that can be programmatically added and removed from it. When I add subViews to the documentView, they appear in the lower-left hand corner instead of the upper-left hand corner. I see that you can check the isFlipped bool to figure out i...
I have a NSTextField and I want to set its content if I klick on a button and than set the cursor on this textfield at the end of the text so if someone klicks the button he could just begin to type.
Until now I use [NSTextField selectText] it selects this textfield but it selects the whole text so if someone just begins to type he'd lo...
This code is pretty simple, is it correct? I don't know if I should be retaining the delegate passed in via the init method.
@interface SomeClass : NSObject {
SomeClassDelegate *someClassDelegate;
}
-(id)initWithDelegate:(SomeClassDelegate *)delegate;
@end
@implementation SomeClass
-(id)initWithDelegate:(SomeClassDelegate *)delega...
I have a NSAttributedString that I'm using in a NSTextFieldCell. It makes several clickable url links and puts a big NSAttributedString inside the NSTextFieldCell. Whenever I am viewing the NSTextFieldCell normally and it's highlighted, I cannot click on the links.
If I set the TableView so I can edit each column or row, when I click tw...
Is it possible to use an image as a background for a Text Field in Cocoa?
If so, how?
...
I have a Cocoa application that displays an application-modal alert using the NSAlert class. I'd like the alert window to float above all other applications' windows. Can this be done with NSAlert, or do I need to implement my own window?
I don't know if any of this matters, but the application is an agent application (LSUIElement is t...
I'm experimenting with creating a custom scope bar that uses recessed-style NSButtonCell objects. However, I'm having trouble drawing the bezel when the mouse is hovering. I can make it work by creating tracking areas and setting showsBorderOnlyWhileMouseInside to NO while the mouse is inside, and YES when it moves outside, but this fe...
This is a very newbie questions, but does the iPhone API provide any data structures to work with (i.e. linked list, hash map, etc.)?
...
I am writing an application which is continuously sending and receiving data. My initial send/receive is running successfully but when I am expecting data of size 512 bytes in the recvfrom I get its return value as -1 which is "Resource temporarily unavailable." and errno is set to EAGAIN. If I use a blocking call i.e. without Timeout th...
Hello!
Does anyone know if it’s possible to change the text cursor (aka caret) colour in Cocoa? I need to create a textfield which would change its caret colour depending on something.
Please notice that I’m not talking about the mouse pointer picture, but the blinking vertical line which helps you understand where you are typing :-)
...