Hey all. I've been reading up on Apple's suggestions for when/where/how to use NSError versus @try/@catch/@finally. Essentially, my impression is that Apple thinks it best to avoid the use of exception handling language constructs except as a mechanism for halting program execution in unexpected error situations (maybe someone could give...
Hey all, I'm pretty new to Cocoa and XCode, so I'm sorry if this is a dumb question.
How would I go about checking which window is in focus?
Additionally how would I go about checking if a certain window is in focus, if this is not the same as the previous solution.
Thanks for the help.
...
Hey there,
I'm using core-data and I have an entity that has an attribute called SID and another called ParentSID.
I'm trying to create a method where I can pass a fetched object from the set and it will return the lineage of that object by checking the ParentSID of each ancestor.
If the ParentSID is > 0 it should loop recursively u...
Hey there,
I have an NSMutableArray of objects. Each object has a property called "Name". I want to join them together in a string with a separator " > ".
So if the name property in each of the objects in my array is "one", "two" and "three" respectively, the result would be "one > two > three".
Thanks,
howie
...
Greetings!
I am working on a kernel extension driver for OSX. It is a simple keyboard filter. I have preferences that are set through a preference pane regarding how this filter will act. I need to take the preferences from this preference pane and load them in to the kernel extension.
I have googled all over and haven't found anything...
Is it possible to embed git in the iPhone app? Only in a passive mode, i.e. to be able to read commit messages (with date and user) and diffs given some online git repository in order to present it in some readable table views?
...
I'm trying to join an array of objects into a string that will ultimately be used to populate the detail label of a table cell. if the text is too long it will automatcally truncate and add an elipse at the end.
I want to avoid this by checking that the string is less than say 40 characters and adding an elipse in the middle instead.
...
I have added an NSOpenGLView to my MainMenu.xib file, and have implemented drawRect to draw to it, this works great, so far so good.
How do I detect touches on the screen? I imagine I could perhaps dump some transparent buttons or something over the NSOpenGLView area in Interface Builder?
The application is simple, i just need to know ...
through terminal you can make it with a command - "SetFile -a B filename"
programmatically i think i should set one of the attributes through
[[NSFileManager defaultManager] createDirectoryAtPath:dirPath withIntermediateDirectories:NO attributes:attributes error:nil];
but i can't find witch one.
thanks)
...
Hello all,
I am currently displaying a modal window by using this code:
[[NSApplication sharedApplication] runModalForWindow:mainWindow];
However, when I close this window, the other windows are still inactive. How do I run the stopModal method when the window is closed using the "red x"?
Thank you,
Michael
...
I have a core data application with two NIBs, the main window with a pair of NSTableViews and a form for adding content. The form has an NSTextView and an NSTextField. I have two entities in core data, and manage the content with two NSArrayControllers. With one NSArrayController, the following code in my AppDelegate works fine for ad...
Now I show a swf from web in my webview , but when I click the url address in the swf to show another page with my default web browser, I found the webveiw prevent to do it , Why ? How to allow it ?Thank you very much!
...
If I've created these two variables:
NSDecimalNumber *myNum;
NSString *myString;
how do I later test whether an object has been assigned to them yet or not?
Thanks
...
NSXMLTypeStore is used when starting Core Data backed application by default because it's good for debugging purposes. But practice dictates that developer should use either NSBinaryStoreType, NSInMemoryStoreType or NSSQLiteStoreType store types in release builds.
How do you manage changes between debug and release builds? I believe tha...
-(void)test
{
int i;
for (i=0;i < 1000000;i++)
{
//do lengthly operation
}
}
How to prevent its GUI from freezing ?
Thanks in advance.
...
I'm curious why a variable overtly assigned to nil, prints as (null) with NSLog:
NSString *myVar = nil;
NSLog(@"%@", myVar);
# RESULT: ' (null) '
This is of course quite confusing given all the different kinds of "nothingness" to figure out in Objective-C, and had me trying to test various IF NULL syntaxes.
...
Hi
I am using the Amazon Product Search WSDL in an objective-c project. Since Objective-c does not have any direct support for SOAP, I cannot just use the wsdl and leave all the other processing for my app.
I want to know what the service uri for the amazon product search is. This is the WSDL I am using
http://soap.amazon.com/schemas2...
Hello,
I would like to save a webpage programmatically with Cocoa to the hard disk as a webarchive like Safari.
I've searched for any example programs from Apple yesterday, but I've only found a class reference at Apple Developers page for a webarchive class. I play a little bit with the webarchive class and unfortunately my solution d...
Hi all,
I am just trying to design skype like message window , for this I have taken the NSDrawer element. It contains : a table view on left, menu items on top, text field on right bottom and text view at central portion on right side. Using text view I can play with string being displayed but I cannot draw the line between messages or...
Hi all,
Is it possible to print a doc file using cocoa application?
If possible please give some suggestions.
I printed pdf and image files.. But i didn't get any solution for doc files.
Thanks in advance,
Ramesh.P
...