As I try to write
NSLog(@"%d", myObject.myId);
where myId is int, console gives some hight number like 70614496. And when I use @"%@", I get exception -[CFNumber respondsToSelector:]: message sent to deallocated instance 0x466c910.
Why is it so?
Here's definition of myObject:
@interface myObject : NSObject {
int myId;
NSString *titl...
I have a simple little osx app that just starts up an IKPictureTaker and then saves the resulting picture as a .tiff file. It all seems to work fine but everytime I take the picture I get this error repeatedly:
2009-11-10 12:25:38.890 Take A Picture[855:9c23] *** QTCaptureSession warning: Session received the following error while de...
I have a small osx cocoa app that brings up an IKPictureTaker at start up, I would like for my application to quit after this picture taker is closed. I read that I need to add this code to my NSWindowController class but I have no idea how to access this class (it shows up no where in my class list in XCode):`
-(BOOL) applicationShoul...
I have an OSX cocoa app that is called from my java like so:
String cmd = "/Users/mike/ASJPictureTaker.app/Contents/MacOS/ASJPictureTaker";
Runtime run = Runtime.getRuntime();
Process pr;
pr = run.exec(cmd);
pr.waitFor();
The ASJPictureTaker app loads and works fine but when the exec is called it does not take focu...
I need to get a CGIImageRef from an NSImage. Is there an easy way to do this in Cocoa for Mac OS X?
...
Hi, erm, now I trying to do a messaging between both client instead of client to server. So if I'm not wrong we can't startup service individually but how to see whether is setting up individually or both connect to same service?
My Code for startup the service:
-(void)startService {
// Start listening socket
NSError *error;
...
For the life of me, I am being continually stumped with NSComboBox.
I created an object that conforms the NSComboBoxDataSource protocol, and implemented:
- (NSInteger)numberOfItemsInComboBox:(NSComboBox *)aComboBox;
- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)index;
I set the instance of my NSComboBox...
Hi everyone,
I am one of the great unwashed masses of .NET developers keen to try their hands at Mac OS X development. At the moment I am trying to figure out the various elements of Cocoa and getting a bit stuck on Core Data.
I noticed most of the documentation and resources available on the Web involve a broad end-to-end tutorial, be...
I'm reading pixels from an area of the main screen via NSOpenGLContext. Now I would like to draw a rect around that area to indicate where it actually is.
How would I do this?
My first thought was the "Cocoa way": create a transparent fullscreen NSWindow and a custom NSView to draw the rectangle path. But that feels a bit too complicated...
Hi,
I've a string that may or may not include C++ comments on it (multi-lin and single line) and I need to strip those comments out before being able to use that string. My current idea is to use an NSScanner to do that - find the position of opening and closing multi-line comments and delete that portion of the string and find the posi...
I may be missing something in the standard libs, but I don't think so. I have this current implementation:
int char2hex(unsigned char c) {
switch (c) {
case '0' ... '9':
return c - '0';
case 'a' ... 'f':
return c - 'a' + 10;
case 'A' ... 'F':
return c - 'A' + 10;
default:
WARNING(@"pa...
I have an NSBrowser with data being properly inserted. I would like to append each row to enable the user to easily add another row into that data set. Any ideas on how to accomplish this?
...
Any one knows how to write and read NSMutableArray or Dictionary data using AsycSocket Library ?
Clarification: I want a way to archive NSMuatbleArray and write this on the stream. seemed pretty forward but running in simulator I get this wierd error
[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive
...
I have downloaded a sample code of AA-Plot Chart.
One of the .h files:
@interface MainViewController : UIViewController <APYahooDataPullerDelegate, CPPlotDataSource> {
CPLayerHostingView *layerHost;
@private
APYahooDataPuller *datapuller;
CPXYGraph *graph;
}
@property (nonatomic, retain) IBOutlet CPLayerHostingView *la...
Xcode comes with a few templates (file templates, project template, etc.). If you don't know what I'm talking about, take a look.
After searching on Google for some time I couldn't find any other useful templates. So here it is: What are your most useful Xcode templates?
I'll start with a pretty boring Objcetive-C category file temple....
This may be a dumb question but it seems like activateIgnoringOtherApps: may be the only way to activate an app using Cocoa. I have a java app that loads up a Cocoa app and I want the Cocoa app to be activated when this happens. The problem is I do not want to have to launch an intermediate app (some sort of controller) and use this ap...
I'm parsing some HTML with NSXMLParser and it hits a parser error anytime it encounters an ampersand. I could filter out ampersands before I parse it, but I'd rather parse everything that's there.
It's giving me error 68, NSXMLParserNAMERequiredError: Name is required.
My best guess is that it's a character set issue. I'm a little fuz...
Hi
I'm developing my first Mac App have some issues with shell commands...
I'm trying to find out how to get the permission windows that the user can enter his password. I want to copy a picture in a system folder, and change the name of another picture too. I try to change the Login window background.
Command 1: "sudo mv DefaultDes...
I have a small OSX Cocoa app that just bring up an IKPicutreTaker and saves the picture to a file if one is set. I use applicationShouldTerminateAfterLastWindowClosed: to close the application when the pictureTaker is closed. This all works fine when I either set(this is done when you have picked the picture you want) or when you hit c...
I want to open an overlay window (pop up window) when a user selects a cell in my NSTableView similar to selecting an event in iCal. Selecting the event in iCal shows a Window to edit the event, but does so by smoothly animating the window open and adding an arrow pointing to the even in the underlying calendar. Does anyone know what is ...