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.
0
votes
1answer
12 views
iOS - Reading crash report about Navigation Animation
I hate to simply post a crash report for my iOS app here, but I am in some dire need of help to understand it. It looks to me like something is crashing in a view or navigation animation, but I can't ...
1
vote
1answer
20 views
NSMenuDelegate methods not called for contextual menu
I have a Document based application. I want to add a contextual menu that displays context-sensitive info when the user right-clicks selected text in an NSTextView.
I have followed the advice in the ...
0
votes
2answers
60 views
Variable losing its allocation
I cant figure out why I am getting this error and would appreciate some guidance.
I am setting a variable in the viewDidLoad method and the NSLog returns the expected result from _myUser.email and ...
0
votes
1answer
15 views
iOS Facebook FQL problems
I'm trying to get the follow FQL statement working in my iOS app
SELECT comment_info,likes,share_count FROM stream WHERE post_id
For some reason i keep getting an error from the graph API saying
...
0
votes
1answer
16 views
Get Current Caret Position Cocoa
I'm building a desktop mac app that runs in the background. Right now when a user pushes a keyboard shortcut a window appears in the top right with several options of what to insert at the Current ...
1
vote
1answer
28 views
Search in an NSArray whose content are fetched CoreData objects by an specific object atribute
I've a NSArray that contains different Exercise objects that were fetched from CoreData.
In another method in my program I need to find an object whose property matches a criteria eg: ...
0
votes
0answers
5 views
Track mouseMove event when the context menu is displaying
When user right click on the cell of NSTableView, I show the context menu. While the context menu is showing, I want to track the mouse move event to highlight the cell when the mouse is over it.
...
1
vote
1answer
14 views
How to create a bundle programmatically in Cocoa?
I tried to create a bundle like
CFBundleRef bundleRef = CFBundleCreate(kCFAllocatorDefault, (CFURLRef)@"/Users/MyUser/source/Mybundle.component");
but got SIGABRT
and
NSBundle* myBundle = ...
0
votes
2answers
10 views
Get Week Day Name for the first of the month from an NSDate
I have an NSDate and I want to find out the Week Day Name for the FIRST of the month from that NSDate. So for example I get given "15th of May 2013" and I want to return "Wednesday" as "1st of May ...
0
votes
0answers
19 views
What's the difference between setPrimitiveValue:forKey and setValue:forKey in Core Data?
What's the difference between setPrimitiveValue:forKey and setValue:forKey in Core Data?
When should I use setPrimitiveValue:forKey?
When should I use setValue:forKey?
Thanks for advance.
1
vote
4answers
84 views
Difference between array initializers
I am creating an array in C of known size that doesn't ever change. What is the difference between the following two initializers?
1.
GLuint boxArray[36];
for (GLuint i=0; i<36; i++)
{
...
0
votes
1answer
15 views
Scaling drawing done in drawRect when view resizes
I'm still learning some of the ins and outs of custom view drawing in Cocoa.
I have a custom view where I draw lines and points based on the corresponding points in a larger rect elsewhere of a fixed ...
0
votes
1answer
22 views
How do I clear a textfield when dragging and dropping?
I have an NSTextField in my app. I want to be able to drag text into the field from other apps. When this happens, I want my text field to erase anything that's already in it, and then show the text ...
0
votes
0answers
13 views
Scale down NSBitmapImageRep
Given a NSBitmapImageRep, which is the most efficient way to obtain another NSBitmapImageRep which is the scaled down version (say 50%) of the original?
2
votes
2answers
29 views
When calling dealloc from a UIView with ARC, can I assume ivars are still retained?
I am adding a KVO observer on a subclass of UIView to one of its subviews. I also have a strong reference to the subview. When I call removeObserver on the subview in dealloc, can I assume that the ...
0
votes
2answers
48 views
How to determine when an application becomes active and in-active?
How can you determine when a particular application becomes active and in-active?
Example, the user opens chrome, then switches to textmate, then switches back to chrome.
I want to be able to track ...
0
votes
0answers
30 views
Applying attributes to text in NSTextView
I've extended NSTextView to do a number of things for me and am now in the process of adding syntax highlight to it.
I've stumbled into a problem I can neither explain or fix. If I paste a large body ...
0
votes
1answer
22 views
AFNetworking - Stream 0x96c93c0 is sending an event before being opened
I am trying to send some data to AFNetworking to my server but when I want to send the data the following error appear in the console log and the server never received the data.
Does anyone know why ...
0
votes
1answer
27 views
How to keep privilege like Dropbox to inject Finder
I can inject Finder to put a button on toolbar and add a custom context menu. But my app ask me to input password to do this. How to keep privilege like dropbox, only need to input password one time ...
0
votes
1answer
59 views
Cocoa App booting splash screen
My Mac app connects to a remote db which takes about 10 seconds to connect and pull data. This time cannot be shortened due to framework initialisation and network latency etc.
I want put a splash ...
0
votes
0answers
19 views
Accessibility broken with Preview.app in OS X 10.8.4?
We have an application that integrates with different programs (among which is the Preview.app) using accessibility. We use the AXUIElementSetAttributeValue function to programmatically select some ...
0
votes
1answer
21 views
Add multiple NSSlider to view programmatically
I'm new to objective C and Cocoa, but I have managed to add a slider into some views etc. I got that.
I want to add multiple sliders with code, and I tried it with a for loop and a array. It didnt ...
3
votes
1answer
41 views
Embedding a Java runtime into a sandboxed Cocoa Mac app
Does anybody know how to embed a Java runtime into a Mac Cocoa (sandboxed) app so that the app can run a .jar file without the user having to install Java separately?
We have a Cocoa application that ...
1
vote
1answer
34 views
Bad pointer returned by [NSDate distantPant]
Why does this program:
#include <stdio.h>
#include <Foundation/NSDate.h>
int main() {
printf("%p\n", [NSDate distantPast]);
return 0;
}
return a bad pointer on 64-bit machines? ...
0
votes
1answer
17 views
NSButton is focus but don't have focus ring
I used default NSButton (Push) in Mac 10.8. It is focused (press space key, the action is done) but the focus ring doesn't show. I don't know why? Please shed me a light. Thanks
0
votes
0answers
6 views
Release and move child window by dragging it
I am trying to implement an edge-docking feature between two NSWindows. When the user moves the window I that can be docked just below the main window I snap it into position and add it as a child ...
0
votes
0answers
11 views
NSShareServicePicker for deployment target as 10.6
NSSharingServicePicker is Available only for 10.8 .Is there any custom picker like this for deployment taget as 10.6 , If not what is the best way to implement Picker like NSShareServicePicker.
0
votes
1answer
19 views
File browser-like element in Mac OS programming of Xcode
Sorry that my title is not clear enough. What I wanted to ask is based on a screen capture:
I want to make an app like this. But there are two elements I do not know what the classes are: A and B (C ...
0
votes
0answers
27 views
Service launches my application again and hangs the requesting application
I'm trying to make my program provide a service to look up words. It works when I drag some text onto the icon but when I try to use the menu item it opens another instance of the application, freezes ...
0
votes
0answers
28 views
Cocoa Core Data Document Based Application underlying or read/write file type
I am writing a data editor tool for some of our mobile apps. Right now, I'm setting it up as a Document-based Core Data application. We're going to want to save the data as plain JSON or XML for ...