parent directory of folderItem

Trying to find the parent directory of a folderItem (using the new framework), but unsure of the syntax used to retrieve it. Everything I’ve tried, I get a “there is more than one item with this name and it’s not clear to which this refers”, which means I’m using something wrong (of course). It’s likely really simple, but I’m overlooking it and making way more complicated than it need be and spending too much time in the process. Appreciate the help…

http://developer.xojo.com/xojo-io-folderitem

whats wrong with Parent ?

dim f as xojo.IO.FolderItem
dim p as xojo.IO.FolderItem

// code to set up f

p = f.parent

Here’s what I have:

[code]using xojo.core
using xojo.io

dim projectSource as new folderItem(focusedNativePath)
msgbox projectSource.parent[/code]

I get the ‘there is more than one item with this name and it’s not clear to which this refers’ (on the last line w/ the msgbox command)…

Parent is a folderitem not a string
Try
msgbox projectSource.parent.NativePath (or something that IS a string/text)

Try
msgbox projectSource.parent.Name
or
msgbox projectSource.parent.Path
?

Ah, sorry… that was a mistype. That’s what I’m doing.

.nativePath gave me a “type 'xojo.io.folderitem” has no member named “nativePath”
.shellPath gave me the similar error

.path worked; however, it doesn’t show up as a function/property when you use the TAB to propagate a list. I think that’s what threw me off. Thanks guys…

2.2 has some issues with autocomplete

[quote=192429:@Eric Brown]Ah, sorry… that was a mistype. That’s what I’m doing.

.nativePath gave me a “type 'xojo.io.folderitem” has no member named “nativePath”
.shellPath gave me the similar error

.path worked; however, it doesn’t show up as a function/property when you use the TAB to propagate a list. I think that’s what threw me off. Thanks guys…[/quote]

If you intend to use the new framework, you definitely want to check the new LR to see the differences with the older one :
http://developer.xojo.com/xojo-io-folderitem

Xojo.Io.FolderItem has no NativePath or ShellPath. Path and URLPath are the only ones available, Path replacing ShellPath and NativePath.