cocoa

Dynamically lay out a Window in Cocoa using Core Animation and populate it

What I'm looking for is a way with CA to dynamically lay out a window. Imagine the following SQL query in a window, each name between +PLUSSIGNS+ being a NSPopUpButton, rest is static text. Select * from +BURRITOS/TACOS1+ +AND/OR1+ +BURRITOS/TACOS2+ +AND/OR2+ Where +TOPPING1+ +EQUALS/LT/GT1+ +TOPPINGLIST1+ +AND/OR3+ +TOP...

how to implement split pdf functionality in cocoa application?

I have implemented one desktop application in which i want to implement split pdf functionality .How it possible please advice me. Thanks in advance ...

How to Activate Breakpoints in a Dependent Project (a framework) in XCode

I have an Xcode project that has an other project as a dependent project. My main Xcode project links agains a framework in that dependent project. Now I want to track down something in my framework. How can I set break points in that dependent project so that when I'm starting my main Xcode project they stop in the dependent project? ...

C-code (class/framework/library) in Objective-C

How can I reference a class/framework/library like libusb in an Objective-C class? Currently I have tried to initiate an enum/struct-function from the library inside my @interface in my .h-file. But that doesn't work, apparently. :/ I have it "installed" (it's in /usr/local), and tried adding both the files and as framework. Doesn't hel...

CoreData customize mapping model

Hi, I have a problem mapping the following situation from v1 to v2 of a core data model. In v1 of the model I had an entity named book with an attribute author. There I saved the first and last name of the author and even first and last names of several authors. Very poor design I know, but that's how it was. In v2 of the model I made...

For reopening the autosaved documents the method - (id)initForURL: withContentsOfURL: ofType: error:, gets not call for me

Hi, I have saved my document using autosave functionality at default path (~/Library/Autosave Information/). but while launching the application the autosaved documents are not opening. Even the control does not go this method: - (id)initForURL:(NSURL *)absoluteDocumentURL withContentsOfURL:(NSURL *)absoluteDocumentContentsURL ofType:(...

Debugging NSFetchedResultsController

Hi guys, I've come into a strange situation with my NSFetchedResultsController. I've set it up with a predicate, and the sqlite3 table contains no entries when the app is loaded. Yet my controller sais that the one section in it contains two rows! One section is fine: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {...

Mixing Qt and Cocoa via QMacNativeWidget- I'm having trouble showing a QDialog over an NSWindow.

Hi all, I am working on a plugin for a Cocoa application, and in order to use existing cpp code we decided to marry the Cocoa plugin with our existing Qt project via Objective-C++, which has been a lot to learn on the fly but is coming along well. Anyways, I am stumped by my current problem. The design of this plugin is such that the a...

Automatically capture the video with iPHone OS 3.x

Hi, I have just view the iPhone application Touch Cam (http://itunes.apple.com/us/app/touch-cam-video-recording/id337848815?mt=8) which provides the capturing video automatically. There is no api provided for this in iPHone OS 3.x. Is there any hidden API (Undocumented ) is available for this. or how can we start the capturing of vide...

Copy rows in NSTableView?

I can' copy selected rows from the table when app is running. Therefore, I try to implement my own method. I get all data into a NSArray and use writeToFile method It works but is very inefficient... Is there a better way to do this? Or there's a built-in method to do so? Such that when I push command-C, I can copy the value o...

Premade Cocoa component for a UI control like this? (rounded rectangle showing a stack of items)

Update Luckily, the code that WebKit uses to make this control draws onto a canvas using basic drawing operations, so it shouldn't be too hard to convert into a Cocoa control. This is what I have so far: I'll update here again once I get it finished. Original question I don't know what to call this sort of control, so I'll show pictu...

Using TTPhotoViewController without the Three20's URL crap?

Whenever I add the TTPhotoViewController to my window , it appears without a top navigation bar and once I tap the image, the bottom navigation overlay and the status bar (the springboard one) will disappear permanently. How do I create a top navigation bar so I can add a button to hide the view after it was shown and how do I restore th...

is NSDateFormatter dateFromString: supposed to return nil for an invalid string?

According to the class reference, dateFromString method returns "A date representation of string interpreted using the receiver’s current settings". Using the following code: NSDateFormatter * formatter = [[[NSDateFormatter alloc] init] autorelease]; [formatter setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]...

Why does combining PDF pages with CGContextDrawPDFPage create very large output files?

I ran into this trying to throw together a simple Automator script to combine several one-page PDF files. I had 88 files to combine, each just about exactly 300KB, so I expected the final product to be about 30MB; the resulting PDF file, using the Combine PDFs Automator action, was 300+MB. Poking around, the Automator action uses a Pyth...

Memory Leak the second time the view loads.

i been cracking my head over this memory leak.. my datasource is mutabledictionary..that i load in the viewdidload. if i dont retain it. i dont have access it it in cellforrowatindexpath. but when i retain it.. it shows up as a memory leak in instruments. i have tried so many different variations.. doesnt seem to get it right. here is...

Listening for events

Hi guys, i wish to PUSH an XML File from a windows PC to the iPad, how and what should i do so that the app can "listen" for events like that. ...

is it possible to maintain an authorization reference indefinately (cocoa)

Hello, i'm using AuthorizationExecuteWithPrivileges to run a shell script with elevated privileges. After some time i am required to reauthorize again in order for this to work. Is there a way to set a custom (veeery long) timeout on the authorization so that i would only get a password dialog for my application once and would be able to...

How to Store MPMediaItemCollection object in NSUserDefault?

Hi All, In My Application i access ipod Library and choose the song. i want store that Song in NSUserDefault for save that song for reuse. But when i reload the application i get error and application get crashed. I use NSData to store that MPMediaItemCollection object. I use following code... Save collection is my MPMediaItemColl...

Should I avoid creating lots of variables?

Hi, I have two possibilities: 1) Store an object in a variable and use that variable in my code. But this uses memory to store the object right? NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; BOOL bool1 = [userDefaults boolForKey: key1]; BOOL bool2 = [userDefaults boolForKey: key2]; 2) Don't store it in a vari...

iPhone Checkboxes à la Mail

After reading the iPhone Human Interface Guidelines, I notice there's little mention of checkboxes in the style that one may encounter them on the desktop or web. Checkboxes are generally handled by UISwitchs on the iPhone, but for an app I'm presently working on, they're really not the right control. Instead, the control you'll see in ...