Questions tagged [nspathcontrol]
24 questions
7
votes
1 answer
Convert NSString containing URL to POSIX path
I'm working on retrieving a POSIX path to a folder or file from an NSPathControl after dropping the file or folder onto it.
I'm a beginner, but I was able to get the value from the control (called Destination) in my code this way:
NSString…

opoloko
- 347
- 5
- 13
7
votes
2 answers
NSPathControl with popups for each component of the path?
From Apple's sample code and reading the docs I can see no way configuring the NSPathControl to behave similarly to e.g. the 'jump bar' in the Xcode Editor window:
I.e. have it represent a path (or other kind of hierarchy) and make each component…

Jay
- 6,572
- 3
- 37
- 65
4
votes
1 answer
Use of NSPathControl to represent virtual path
When NSPathControl is used to represent path on local machine is fine!
The problem rise when I try to represent a virtual path of a remote server; in such case I have to change the icons accordingly.
The picture represents what I obtain that is not…

Francesco Piraneo G.
- 882
- 3
- 11
- 25
3
votes
1 answer
NSPathControl will not display placeholderString when bound to a value
Subject says is all.
I created an NSPathControl with a placeholder message in IB. Ran app, placeholder text appears.
I then bound the value of the control to an NSURL* property of my controller. Now, the placeholder text never appears, even when the…

James Bucanek
- 3,299
- 3
- 14
- 30
3
votes
2 answers
How to change color of NSPathControl
Please take a look at this picture:
I know how to change the text color:
NSPathComponentCell *cell = [_pathControl pathComponentCells].firstObject;
cell setTextColor:[NSColor redColor];
But i'd also like to change the color of the arrows,…

jimwan
- 1,086
- 2
- 24
- 39
3
votes
0 answers
NSPathControl to navigate through data structure
I am programming in Obj-C an application which aim to plot scientific chart. The data which I used are structured like a tree. I would like to use a NSPathControl (or something equivalent) to navigate through the data structure and select the chart…

William GILLARD
- 107
- 9
3
votes
2 answers
NSPathControl set path
I am looking for a way to set the path of an NSPathControl to be "~/Desktop".

k4lls
- 141
- 3
- 12
2
votes
1 answer
Get full path to a NSPathControl selected file
I have a NSPathControl in my app for the user to select a file on his hard disk.
I am trying to use
-(IBAction) clickedPath:(id) sender {
NSString *string=[[NSString alloc] initWithFormat:[[pathControl clickedPathComponentCell]…

Knodel
- 4,359
- 8
- 42
- 66
2
votes
0 answers
Is the fact that NSPathControl does not escape percent ('%') characters when bound to a string a bug?
Steps:
Environment:
OS X 10.6.4
Xcode 3.2.1
Create a new "Application" project.
Open the supplied application delegate.
Add an NSString * property.
In -applicationDidFinishLaunching: set the string property to @"/TestString%".
Open up the NIB.
Drag…

Redwood
- 66,744
- 41
- 126
- 187
2
votes
2 answers
Are NSPathControl and NSPathControlItem full of bugs or is it me? (yosemite)
Apple changed NSPathControl to work with NSPathControlItem's in Yosemite.
But from where I am sitting, these new classes don't work at all.
I am trying to display a custom path in my data structures, but I have similar problems with a regular file…

user965972
- 2,489
- 2
- 23
- 39
2
votes
2 answers
NSPathControl and Auto Layout
I'm having some issues with NSPathControl and Auto Layout.
I want the path control to resize with the window. Which means, if I expand the width of the window, the NSPathControl should expand too. This works.
Now the problem is, that if I change the…

IluTov
- 6,807
- 6
- 41
- 103
2
votes
3 answers
Customise NSPathControl
I would like to make a custom NSPathControl.
NSPathCell has the method + pathComponentCellClass, where you can return the custom class of the component cells.
I have a NSPathComponentCell subclass, which I return right there, but it doesn't work.…

IluTov
- 6,807
- 6
- 41
- 103
2
votes
1 answer
NSPathControl problems
I have an application I'm developing in cocoa, and I have a problem with NSPathControl.
I set the style of the control to Popup, and when I launch my App and click on the path control, it shows me a popup menu with the components of the URL I set.…

Uniqus
- 564
- 1
- 5
- 21
1
vote
0 answers
Getting clicked item index in NSPathControl with pathItems instead of pathComponentCells
Since NSPathControl.setPathComponentCells(_:) and .clickedPathComponentCell() are deprecated, I'm trying to use pathItems and clickedPathItem instead. Since I'm representing a virtual path, I cannot use the NSPathControl.url setter, but instead set…

Nickkk
- 2,261
- 1
- 25
- 34
1
vote
2 answers
How do I make an NSPathControl look like other dropdown boxes?
I'm wrestling with NSPathControl. Specifically, I have a dialog (generated by a NIB) which asks the user for a title and a path. The path is supposed to be a local path on the user's hard drive. So, in Xcode 4, I dragged in an NSPathControl. In the…

Luke Sneeringer
- 9,270
- 2
- 35
- 32