cocoa

Hidden UINavigationController inside UITabBarController

I have an application with 5 UIViewControllers each inside a corresponding UINavigationController, all tucked inside a UITabBarController that displays 5 tabs at the bottom of the screen. I want to display another UIViewController (inside a UINavigationController) when a dialog button is pressed. This view should only be loaded and unl...

Avoiding @property-itis (i.e. overuse of properties, when are they appropriate)?

Objective-C 2.0 gave us @properties. They allow for introspection. They allow for declarative programming. The @synthesize and @dynamic mechanisms relieve use from having to write repetitive, stock accessors. Finally, there is the ‘dot’ property syntax, which some love, and some hate. That isn't what I'm hear to ask. Like any new fea...

Does a newly produced mac application need to support 10.4, and can I both support 10.4 and prepare for 64bit?

My company is in the process of rewriting our software from scratch, and I'm the one who is going to be doing most of the work in rewriting the Mac client (The core of our software is Windows based, and the Mac client communicates with it through a webservice). This isn't a real heavy app, mainly does some background work tracking stuff...

Changing font tracking in Cocoa

I'm doing some text rendering in Cocoa using NSAttributedString, and setting the font and underline properties and all that jazz. However, I can't figure out how I can change the text's tracking. Any suggestions? ...

Syntax for creating View delegate in Objective-C

I am trying to create a delegate protocol for a custom UIView. Here is my first attempt: @protocol FunViewDelegate @optional - (void) funViewDidInitialize:(FunView *)funView; @end @interface FunView : UIView { @private } @property(nonatomic, assign) id<FunViewDelegate> delegate; @end This doesn't work because the FunView inter...

Is there a method to generate a standard 128bit GUID (UUID) on the Mac?

Is there a built in function equivalent to .NET's Guid.NewGuid(); in Cocoa? My desire is to produce a string along the lines of 550e8400-e29b-41d4-a716-446655440000 which represents a unique identifier. ...

.Net guy needs some info on Cocoa

I want to do a little development in OSX and the iPhone. I've been a .Net/C# developer for years. I was wondering if there was anybody that had experience in both platforms that could tell me how they compare and contrast. I'd like to get an idea of what sort of learning curve I've got ahead of me. Thanks, Geoff ...

Sync Services Client and Schema Xcode Project Structure

I'm starting work on a project that will be primarily acting as a Sync Services client. Ideally, the project will have two components: a custom schema bundle and a preference pane. As a first step, I've created an Xcode project for the schema bundle. But now I find myself ready to start writing the code for the preference pane and the c...

NSAlert without bouncing dock icon

If you put up an NSAlert while your app is in the background your dock icon starts bouncing and keeps on bouncing until you switch back. I find this annoying. Does anyone know how disable that for a single app? ...

Unit Test to verify object getting deallocated

What I am looking for is a way to programmatically verify a target object has been deallocated. Currently I have an NSLog statement in the dealloc methods of the objects I wish to observe. The unit testing framework is from the Google Toolbox for the mac, and it working nicely. I am just not certain how to frame this particular test. ...

Error handling in Core Data

A few weeks ago I started using Core Data for the first time in a non-trivial application. One of the things that surprised and confused me was how error handling works. To give an example, one of the first things I tried was setting my data file as "locked" in Finder, to order to make sure I was properly handling the NSError object retu...

Fetching Core Data entities, but not sub-entities

Say I have entities organized in a hierarchy with Parent being the root entity and Child being a subclass of Parent. I'd like to setup an NSArrayController to fetch only entities of Parent, but not Child. If you set the Entity Name of the array controller in Interface Builder to Parent, it fetches all Parent and Child entities. I orig...

How do I customize an array controller's fetch request in Core Data?

In a previous question, I asked about how to filter out subentities from a Core Data fetch request on an array controller. The answer is to customize the fetch request used by the array controller. It seems I can easily do this in one of two ways. First, I could customize the fetch request in fetchWithRequest:merge:error: - (BOOL)fet...

Is there an Objective-C Wrapper for gSOAP?

I'm going to use gSOAP to interact with a WCF webservice in my Mac project. It does pretty much exactly what I need and it does it well (pretty much the exact opposite of WSMakeStubs;)). The only downside is that it's C/C++ only, meaning I either need to convert all my types into C types on the fly or write a complete wrappering solution...

Display hidden characters in NSTextView

I am writing a text editor for Mac OS X. I need to display hidden characters in an NSTextView (such as spaces, tabs, and special characters). I have spent a lot of time searching for how to do this but so far I have not found an answer. If anyone could point me in the right direction I would be grateful. ...

SSCrypto/OpenSSL to C# Crypto

Has anyone been able to use the SSCrypto Framework for Cocoa to encrypt text and then decrypt it in C#/.NET ? Or can someone offer some guidance? I'm pretty sure my issue has to do with getting the crypto settings correct but I am far from fluent in Cocoa so I can't really tell what settings are being used in the library. However my att...

In-memory mime-type detection with Cocoa (OS X)?

Hello everyone, My application is a viewer for a custom format, a zip file with a well defined XML manifest and resources, such as images and movies. I use zlib to open up the zip file in memory and then proceed to display said resources. One problem I've ran into is that I'm unable to properly display videos, apparently because QTMov...

How can I change the way NSButtonCell objects highlight when clicked?

I am using several NSButtonCell objects in an NSTableView. They are simple square buttons with custom images on them. These buttons draw properly when they are not highlighted: all that is visible is the image, and the rest of the button rectangle is transparent. However, when I click on them, the entire button rectangle is highlighted,...

Accessing Controller data member in Model class

I am using Xcode to develop a GUI application. I have a model class and a controller class. I have a NSTextView data member in my controller class. How do I access this variable from the model class? ...

Observing an NSMutableArray for insertion/removal

A class has a property (and instance var) of type NSMutableArray with synthesized accessors (via @property). If you observe this array using: [myObj addObserver:self forKeyPath:@"theArray" options:0 context:NULL]; And then insert an object in the array like this: [[myObj theArray] addObject:[NSString string]]; An observeValueForKey...