tags:

views:

43

answers:

2

My project is a doc based application. I'd like to use an NSPathControl object to display the path of the opened document at startup.

I'd insert the code here:

  • (void)windowControllerDidLoadNib:(NSWindowController *)windowController

Can someone point me to an example?

thx.

+2  A: 

Assuming you have an outlet to the path control and you are calling this from your NSDocument subclass, you can just do this:

[pathControl setURL:[self fileURL]];

If you are calling this from your NSWindowController subclass then of course it would look like this:

[pathControl setURL:[[self document] fileURL]];
Rob Keniger
Thanks Rob. Worked perfectly.
paul
A: 

There are three examples listed in the documentation for NSPathControl

Could you be more specific about the problem you're having?

Abizern