Cocoa is Apple's application-development framework for Mac OS X, consisting of Foundation, Application Kit, and Core Data. Use the "cocoa-touch" tag for iOS questions.

learn more… | top users | synonyms

0
votes
0answers
6 views

How to release CGImageRef if required to return it?

I have a method to resize a CGImageRef and return CGImageRef. The issue is the last few lines, where I need to somehow release but return it after. Any ideas? Thanks ...
0
votes
0answers
5 views

nsarraycontroller - nstableview add: method not working

I have an NSMutableArray populated with instances of a "student" class I wrote that is bound to an NSArrayController, which in turn is bound to an NSTableView. The data in the tableview is displayed ...
1
vote
1answer
46 views

iPhone app error Expected identifier or '('

I have been looking around, haven't come up with much tho. Says there is an expected identifier error. This is the only error. Any help would be greatly appreciated. Im just getting a little ...
0
votes
0answers
8 views

How to use kCGImagePropertyGIFImageColorMap or create a color table?

I'm trying to tinker with a couple GIF properties such as kCGImagePropertyGIFImageColorMap and kCGImagePropertyGIFHasGlobalColorMap (reference) in Core Graphics. I'm creating animated GIFs and I'd ...
0
votes
0answers
26 views

Parent child relationships - my parent knows its children, but the children don't know the parent when they should

I'm working on an app that has book objects (RSEBook), each of which has an NSMutableArray of keyword objects (Keyword). The mutable array in the books is called 'keywords' The method to add a child ...
0
votes
2answers
24 views

Non-space space

This seems rather odd to me, but here is my problem: I want to strip all spaces down to one space. When I try the regex [ ]{2,} it should match correctly. In my data I unfortunately seem to have ...
0
votes
0answers
6 views

NSAttributed String shows in simulator but not on iPad device

My app works perfectly on the simulator, but not on my iPad. I have a UILabel (created programatically) that displays an NSAttributedString. The label itself appears, but the string won't display on ...
0
votes
1answer
11 views

stretching a patternimage to the right

I've a UITextField that has a custom background image. The image is 37px H and 3px W. The last pixel to the right has a border of 1px that I want to display at the end of the UITextField how could I ...
0
votes
1answer
23 views

Cocoa application contains no menu bars, according to AppleScript

I am creating a mac app that needs to start dictation (OSX 10.8) by itself. Because there is no way to initiate dictation "directly" the best way to do this is through the menu bar "Edit"/"Start ...
0
votes
0answers
17 views

Sandboxing Application: Partially Failing to Reading XML Plist

I have an NSMutableArray of NSMutableDictionary. The application allows the user to save the array as an XML project file with plist. Everything works fine before the application is sandboxed. The ...
0
votes
0answers
18 views

Cocoa Multiple Window Controllers

I have a Cocoa app that uses automatic reference counting and does not use core-data (not document-based) and I want to be able to create multiple instances of a window I have defined in a nib file. ...
0
votes
0answers
16 views

NSTableview and core data selection / selectionIndex. incorrect index using nsbutton. action invocation

I have the standard NSTableView backed by an array of managed objects. All controlled by NSArrayController. A button was added in one column and linked to an IBOutlet method. If the user 'clicks' on ...
0
votes
1answer
25 views

How to cancel a UILocalNotification based on time

I'm writing an application based on UILocalNotifications. I having the user input a time on a date picker and that time will represent when the last UILocalNotification will fire. After the user hits ...
0
votes
1answer
12 views

Open Spotify main window from another app when closed

Iam working on an application that tries to extend some Spotify functionality (not another client). I would like to show Spotify's main window when my icon is clicked on the dock - even if the main ...
0
votes
0answers
14 views

Using NSWorkspace openURL to launch helper app in sandbox

Is using [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"helperapp://open"]] a valid way to launch a helper app from inside the (Mac App Store required) OS X sandbox? I have tried using ...
0
votes
1answer
30 views

Is there a way to pass arbitrary struct via XPC?

I would like my Cocoa app to communicate with a database server. Following the principle in the app sandbox design, it would make sense for the DB communications to be split out into an XPC service. ...
0
votes
0answers
7 views

addGlobalMonitorForEventsMatchingMask not working on some computers

I'm using this code to capture Global Keyboard Shortcuts in my app. This works great on almost every computer I run it on. I tried it on a brand new Retnia Macbook Pro this week and it ...
0
votes
1answer
17 views

Cocoa server with user friendly automatic port forwarding or external ip lookup

I am coding a mac app, which will be a server that serve files to each user's mobile device. The issues with this of course are getting the actual ip/port of the server host, as it will usually be ...
0
votes
0answers
9 views

Mac OS X Webview low density images load when running on a Retina Display… How to fix?

When I load google.com in Safari I get a nice crisp retina friendly google logo but when I use a WebView from within my Mac app the Google logo that gets loaded and displayed is the low density ...
1
vote
0answers
20 views

PDFDocument removePageAtIndex for 10.8.4 Exception Raised

I got a strange bug using PDFDocument with Mountain Lion 10.8.4, I cannot use the method removePageAtIndex. It will always crash. The code is quite straight forward PDFDocument* theOldPDF = ...
0
votes
0answers
11 views

how to update shared core data store between apps?

My Usecase: For an automatic export running once in a while I build an HelperApp, while the configuration of still is made in the MainApp. My Setup: MainApp (writes data) HelperApp (mostly ...
2
votes
1answer
42 views

Command-Key-Up Cocoa

I'm trying to mimic the functionality of the cmd-tab keyboard shortcut where the user can switch between applications hitting a certain key and then when they release command something happens. I'm ...
0
votes
0answers
8 views

Create group rows in NSTableView using CoreData backed NSArrayController

Say I have a bunch of Article objects stored within the core data model. Each article maintains, a reading progress attribute which denotes how much of the article has been read by the user. Once the ...
1
vote
0answers
25 views

Change NSWindow bacground color with FadeIn Animation

I'm trying to build a Mac App (for the second time) and want to change the background color of my NSWindow with a fadein animation. Right now, I've set the background image in this way: NSImage ...
1
vote
2answers
34 views

Observing changes in the properties of an NSManagedObject: how to avoid looping?

In my application, I observe the properties of a managed object. A change may lead to adjustments in some of its other properties, so the managed object itself receives a message of a changed ...
0
votes
1answer
21 views

Why an infinite loop with: while ( [managedObjectContext hasChanges] ) [managedObjectContext processPendingChanges]

Should the following while statement not exit after a maximum of one execution? while ( [self.managedObjectContext hasChanges] ) [self.managedObjectContext processPendingChanges];
0
votes
0answers
8 views

QTCaptureSession Threading Issue

I'm currently working on a project that involves opening and receiving data from a webcam. On OS X we use the QTKit along with QTCaptureSession to access the webcam. The module we are developing is ...
0
votes
0answers
12 views

popover view have a little flicker when loading multiple times

- (void)loadPopoverView:(PopoverMode)popMode{ if([[self.contentview subviews]ObjectAtIndex:0] != nil && [[[self.contentview subviews]ObjectAtIndex:0] count] != 0) { ...
0
votes
1answer
19 views

cocoa: how to create single column table view with checkboxes and labels

I have a fixed number of text items I want to display with checkboxes to select/deselect in a cocoa tableview. Exactly like a listbox of items with checkboxes in Microsoft MFC. If I drop the ...
0
votes
1answer
38 views

Why does NSTableView use NSCell instead of NSView?

This may be a general discussion instead of a real question. When I started using NSTableView and NSOutlineView, I thought : oh, a instance of NSView may do almost everything. So I return a NSView ...

1 2 3 4 5 846
15 30 50 per page