Parsing unsupported date formats in via Cocoa's NSDate
With the Cocoa framework how can I parse @"2008-12-29T00:27:42-08:00" into an NSDate object? The standard -dateWithString: doesn't like it. ...
With the Cocoa framework how can I parse @"2008-12-29T00:27:42-08:00" into an NSDate object? The standard -dateWithString: doesn't like it. ...
For a scripting utility I need to be able to record a series of keyboard and mouse events that occur when an application has focus. The second part is being able to later send those events to the active window. I do not need to worry about menus or tracking the identifier of which window receives input. I know how to do this under Wind...
I'm working on a Cocoa Mac app where I need to display a window/view on a secondary monitor, full-screen. I know how to create a window that could be dragged onto the secondary monitor, but I was wanting to programatically create the window and make it full screen on the external monitor. Thanks for the help. ...
I have the following example class: Test.h: @interface Test : UIButton { NSString *value; } - (id)initWithValue:(NSString *)newValue; @property(copy) NSString *value; Test.m: @implementation Test @synthesize value; - (id)initWithValue:(NSString *)newValue { [super init]; NSLog(@"before nil value has retain count of %d...
I have a case where the child view sends notification to parent view. Now i'm calling addObserver in viewWillAppear and remove Observer in viewWillDisappear. But, i'm guessing this is not correct since viewWillAppear calls when view is refreshed. [[NSNotificationCenter defaultCenter] addObserver:<#(id)observer#> selector:<#(SEL)aSelect...
Hey All, I have an application in which I'm trying to capture the shift key modifier to perform an action, however when I run the program and press and normal key without the shift key modifier I get a beep and the modifier and key are not sent to my keyDown event. The relevant code is: NSString* eventChars = [theEvent charactersIgnori...
I am looking for more iPhone developers who are actively posting to their blog and/or Twitter. I have been learning a lot from books but the online resources beyond Apple's developer site have been hard to find. Please let me know if you are doing iPhone development. You can see my comment on Twitter here... http://twitter.com/offwhite...
I've been learning Objective-C and Cocoa by working my way through the Hillegass book and it occurs to me that I might be better off using Objective-C++. Objective-C seems like the clear choice for developing UIs but I have a very strong C++ background and would love to develop application back-ends in C++ and use Objective-C++ to do the...
This problem has been kicking my butt for a few days now. I have a web service that serves XML that looks like this: <levels> <level>Level 1</level> <level>Level 2</level> <level>Consulting</level> <level>Office Support</level> <level>Learning</level> </levels> This data needs to go into an entity in my Core Data ...
Documentation simply states that setting setAutosavingDelay to anything > 0 on the shared doc controller should do it, but after calling [[NSDocumentController sharedDocumentController] setAutosavingDelay:2.0]; in my controller, autosave doesn't seem to work: I neither see anything in ~/Library/Autosave Information/, nor is [[[NSDoc...
Is there a way in Cocoa that is currently considered best practice for creating a multi-tier or client server application? I'm an experienced web developer and I really love Python. I'm new to Cocoa though. The application I'm toying with writing is a patient management system for a large hospital. The system is expected to store huge a...
I'm trying to write a program that uses sockets to connect with other instances of itself over the network. Since eventually I'd like to write a Windows version as well, I'm currently using BSD sockets on the OS X side so that I can ensure that it will be compatible with the (eventual) Windows version. The only way that I've been able t...
Here is my setup. In my application delegate, I have a property called currentFoo. The currentFoo property is set to the currently selected Foo instance. The Foo instances each have a property which is a NSMutableArray called results. The objects in results can be of various types, NSNumber, NSString, etc... I have an NSTableView that...
I am current writing an application and need to show the current days of the week. So, for the coming week I need to generate the follow dates. Monday, 5 January 2009 Tuesday, 6 January 2009 Wednesday, 7 January 2009 Thursday, 8 January 2009 Friday, 9 January 2009 I have already coded the application to generate five dates from the cu...
I'm converting an algorithm I wrote in Java to Objective-C. In java the BigDecimal class handles base-10 numbers and can take the primitive double as a constructor arg. In Cocoa's NSDecimalNumber class, however, there is no direct way to construct an instance using a primitive double. Currently I'm using this (smelly) hack: [NSDe...
My iphone app has several text fields. The "Did End on Exit" event on each text field calls a single action. How can I tell which text field called the action? Can I detect this from the sender object which is passed to the action? ...
I have a wizard application for MS Windows which is a typical Next-Next-Finish type. The application has a default vendor specific window background theme which persists through all the windows of the application (i.e Vendor logo and background color for each screen). I want to develop a similar application wizard for Mac. I noticed that...
Hi How can I execute a terminal command (like grep) from my Objective-C Cocoa application? Thanks. ...
I have two projects, a Cocoa application and a static c library which it uses. Then didn't in the same folder.For example:the name of c static library is libXXX.a,it in the XXXcore folder.the cocoa application in another folder that is the same level with the XXXcore folder. When I try to compile the cocoa application,I have the link er...
In IB it is easy to bind a label or text field to some controller's keyPath. The NSDockTile (available via [[NSApp dockTile] setBadgeLabel:@"123"]) doesn't appear in IB, and I cannot figure out how to programmatically bind its "badgeLabel" property like you might bind a label/textfield/table column. Any ideas? ...