cocoa

Do you know of any Key-Value-Coding and Key-Value-Observing session videos on the net?

I know Apple is not the only ressource out there, and many people create great videos in conferences and presentations. If someone knows a great video or podcast on the topics KVC or KVO, please let me know. I would be glad about it! Edit: Changed Title so it's more clear this is indeed programming related. KVO / KVC / MVC != KFC ...

How to get metadata from video-movie file with using Objective-c?

Any help? Now can get NSSize, duration and its all. ...

Are there more Cocoa and Cocoa Touch videos which are worth looking at?

To gain a better understanding, I think it would be great to watch every video available on the net. For me, training videos became sort of entertaining. I love them! And at the same time, it's the most productive form of "watching movies". Unfortunately, I tend to find videos from conferences or podcasts only by accident, so maybe you ...

Binding to a relations property in Core Data

I'm new in Core Data, and i got a problem i can't get my head around how to do "the right way" I'll try and examplify my problem. I got a entity Car. And a list of all the cars in my program. The cars have some attributes, but they are not predefined. So for each car i want to be able to define some properties. Therefore i have define...

add a custom view/windows in the mac os X dock

Hello, I would like to add a custom view (a pager) in the dock, just before the trash and was wondering on how to perform a such task. Do you have any pointer to help me to start? Thanks in advance for your help :) regards, ...

Convert NSData to primitive variable with ieee-754 or twos-complement ?

Hi every one. I am new programmer in Obj-C and cocoa. Im a trying to write a framework which will be used to read a binary files (Flexible Image Transport System or FITS binary files, usually used by astronomers). The binary data, that I am interested to extract, can have various formats and I get its properties by reading the header of...

Per-Process Network Monitor in Obj-C?

I want to write a program that monitors packets in and packets out, or in other words, network statistics. Is there any useful class in cocoa? I know there are some existed tools, but it will be a sub-routine of my program. So I must implement on my own. Thanks a lot! P.S. I only want to calculate one program / process 's statistics r...

How to make controls "tabable" when loaded from plugin in Cocoa app?

I have an application thad loads in plugins that have their own UI. There is an IBOutlet called ContainerView in my AppDelegate. When the plugin loads, it puts its own view (that is stored in a xib in the plugin bundle) into the Container view like so [ContainerView addSubview:viewFromPlugin]; When the view loads, everything is fine ...

load particular .icns size

In my cocoa app, how can I load/scale my .icns file? In this case, I want to load up my 16x16 image. ...

How to pass variables in options.nib to myOtherController?

Hi, I have a typical app with some settings in my options.nib. I can choose to turn on or off for the slideshow in options.nib. But how do I pass this variable to myOtherController? What is the typical method to solve this problem? ...

Difference between mutableArrayValueForKey and calling insertObject:inEmployeesAtIndex: directly

I have a question regarding using KVO-compliant methods to insert/remove objects from an array. I'm working through Aaron Hillegass' Cocoa Programming for Mac OS X and I saw the following line of code (in the insertObject:inEmployeesAtIndex: method: [[undoManager prepareWithInvocationTarget:self] removeObjectFromEmployeesAtIndex:index];...

Objective-C partial implementation of classes in separate files

I am using core data and am generating classes from my data model. I implement custom methods in these classes, however when i regenerate i generate over the top so i end up copying and pasting a bit. What i would like to do is split my implementation files ('.m') so i can have one header file with multiple '.m' files. then i can keep m...

how to show avg of employees salary in a NSTextField using NSArrayController and cocoa bindings

Hi all, I am new to cocoa bindings so I tried to make a simple application which will simply calculate avg of employees salary and display it in a text field, using cocoa bindings. I followed these steps: Made the model class : Person with one property for now - @property (readwrite, assign) int salary; In the application delegate cl...

Mac, PDFKit, PDF/X

I'm in need of generating and viewing PDF/X-1a. After spending quite some time I came to the conclusion that the only way (hopefully someone will prove me wrong) to achieve this is to use Cocoa. More context: I need to generate PDF/X-1a, that is, all the fonts embeded, spot colors, overprint, ... preferably from Python. But the only lib...

How do I use Core Data with the Cocoa Text Input system?

Hobbyist Cocoa programmer here. Have been looking around all the usual places, but this seems relatively under-explained: I am writing something a little out of the ordinary. It is much simpler than, but similar to, a desktop publishing app. I want editable text boxes on a canvas, arbitrarily placed. This is document-based and I’d real...

Analyzing bitmaps produced by NSAffineTransform and CILineOverlay filters

I am trying to manipulate an image using a chain of CIFilters, and then examine each byte of the resulting image (bitmap). Long term, I do not need to display the resulting image (bitmap) -- I just need to "analyze" it in memory. But near-term I am displaying it on screen, to help with debugging. I have some "bitmap examination" cod...

Can NSTask safely be used outside the main thread?

Yesterday I read somewhere that NSTask isn't thread safe and that bothers me a lot, because I'm running a NSTask within a NSThread and is so far not experiencing any threading issues with it. My code is organized like this A: main thread -> B: worker thread -> C: worker task C: The worker task is a commandline program. B: The worker t...

Generating a list of Strings in Obj C

Hi It seems that Objective C jumps thru hoops to make seemingly simple tasks extremely difficult. I simply need to create a sequence of strings, image1.jpg, image2.jpg, etc etc ie in a loop var imgString:String='image'+i+'.jpg; I assume a best practice is to use a NSMutableString with appendString method? What am I doing wrong?? NSM...

How can I do something when a runloop event is done processing?

I have some processing in my Cocoa app that sometimes ends up calling through a hierarchy of data to do a bunch of work as the result of an event. Each small piece creates and destroys some resources. I don't want those resources around most of the time, but I would like to find a smart way of creating them before all the work and killin...

Double-click an NSImageCell subclass

I have a table of draggable rows. I'm subclassing NSImageCell to render an image, mapped via bindings. How do I get a double-click event from this cell? ...