cocoa

Updating App with Web Information

Hey everyone, I am sorry if this question has already been asked/answered But I have a Cocoa program that has different arrays of models. Each model hold just Strings and one Image. Archiving and Loading works great. Each model represents a web account, that is, it holds the username and password, and some other information related to ...

AppDelegate or AppController

Hi all While reading cocoa tutorials i've noticed that some of the tutorials use AppDelegate and some AppController for defining IBActions that open various windows that use subclasses of NSWindowController. Is there some sort of rule of thumb for this? ...

Examples of Metadata Editing

I'm working on a new application that is basically a "library" type app similar to iPhoto or iTunes, i.e. the user enters data into the app and it handles storage rather than the user storing files himself. [Skip to last para for the meat of the question.] What is different about my approach is that I want the user to define the fields ...

NSDocument architecture pros and cons

Does anybody have any NSDocument pros and cons they'd like to share? In particular: Once you depend on the NSDocument architecture, is it difficult to refactor it out if you need to? Are there performance implications? Does it limit you in certain/many ways? ...

Is "English" or "en" the preferred .lproj folder name now?

In Apple's documentation and example code, I see lproj folders both named with the name of the language, such as "English", and with an ISO 639 code, such as "en". What is the definitive naming requirement? I have not been able to find it. If there isn't one, what are the advantages and disadvantages of each type of name? ...

Setting one side of an NSSplitView programmatically

I've got an NSSplitView and on the left side I've got a tableView (like a source list) and depending on row selection, I want to change the the right side of the split view. I can't quite figure out how to do this. When I add my desired subview to the splitview, it adds another split (so now there's 3 views total... not what I wanted). ...

how do you display an NSMenu programatically?

I wrote a little app that lives in the NSStatusBar. I want to have a global shortcut that when hit, the menu bar's content is displayed, exactly like the behavior of spotlight. I have added a global key shortcut to my application, but I am unable to get the meun bar to display. How can I do this? I tried with "popUpContextMenu" , but th...

How to "pass on" a variable number of arguments to NSString's +stringWithFormat:

I would like to write a function in Objective-C such as the one below, that takes a variable number of arguments, and passes those arguments on to +stringWithFormat:. I know about vsnprintf, but that would imply converting the NSString 'format' to C and back (and would also mean converting the formatting placeholders within it as well......

How to send message from iphone/touch to server(tomcat) ?

Hi, I have native iphone/ipod touch application.After enter the infomation on that application it will store into server database,again send message to iphone/ipod.Using objective c how to do ? Please help me out... ...

XCode Debugger: Why is it only showing me assembler?

I'm just starting out with Cocoa development in xcode, doing the hello world example. I'm up to step 6 of the section "runtime debugging", which is Using the Step Over button in the debugger toolbar, begin stepping through the code. As each line of code executes, you can examine the program’s state. The value of a variable is someti...

Remove documentation popup in Xcode 3.2

When I alt(option) double-click a keyword in Xcode 3.2, I get the following popup: I absolutely hate it. Is there a way to go back to searching the documentation (as in Xcode 3.0) rather than popping up this dialog? ...

Any reason to use NSViewAnimation over CoreAnimation techniques?

I'm working on a Snow Leopard app and I'm doing some view animations (swapping them) and I've seen some older examples using NSViewAnimation. I'm wondering if these are completely obsoleted by Core Animation? It seems fairly simple for me to use [[myView animator] setFrame:newSwapFrame]; But I'm just wondering if I'm missing somethin...

Browser Plug-ins Not Loading in WebView Implementation

I have a Cocoa app that I'm trying to write which displays a webpage. This webpage has an embedded quartz composition in the background that plays and works when in Safari, but it does show in my Cocoa application (it just shows the missing plugin icon in the background instead). The weird thing is that it works on another computer that...

Build same RubyCocoa application version for Leopard and Snow Leopard

I have RubyCocoa 0.13.2 based application. It works on 10.5.8 and earlier versions. When i try to run it on 10.6 it crashes on infinite loop. 10.6 has 0.13.2 built in, but it's not same binary as for 10.5. When i tried to build my application's Xcode 3.1.3 project with 0.13.2 framework from 10.6, it gave a link error - malformed object o...

iPhone-SDK: Remove uneccessary white spaces from big paragraph string?

I want to remove unnecessary white spaces from the big paragraph string mentioned below. I tried removing it by stringByTrimmingCharactersInSet and using replaceOccurrencesOfString and all. No success. Can someone please see my paragraph string and provide me the code snippet which can replace all the unnecessary white spaces and make i...

How to convert pdf and doc files to html using Cocoa

Hi everybody, I would like to convert pdf, doc files to html files using Cocoa Please help me in this. Thanks in advance, ...

Retrieving the selected object in an NSOutlineView.

I am looking to retrieve the selected object in an NSOutlineView so I can see if the selected object has any children. How would I do this? ...

NSLog 10b meaning?

Whenever I use NSLog(), it always shows this mysterious "10b" next to the process ID. I know that this is tied somehow to the thread where the NSLog() call was made, but what exactly does it mean? When I try NSLog() from a different thread in the same process, I will get values like 1003, 1103, and 1403. Here is the "Hello, World!" outpu...

CGPathRef encoding

Is it possible to encode CGPathRef variables? I mean is there an encodeObject:forKey like method for CGPathRef variables? ...

How do I compile a GNUstep application that uses NSApplication on Windows?

I am exploring with compiling an application with GNUstep on Windows. This is my main.m file: #import <???/???.h> int main(int argc, const char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [NSApplication sharedApplication]; [pool release]; } I realize this is an incomplete fragment to say the le...