On Mar 02, 2007, at 12:31 PM, Keith DeLong wrote:
> Consider this test:
>
> dim f as new FolderItem
> dim origpath as String = f.AbsolutePath
>
> dim newpath as string = TemporaryFolder.Child("Test").AbsolutePath
>
> f.AbsolutePath = newpath
>
> if f.AbsolutePath = newpath then
> MsgBox "Updated to new path"
> Elseif f.AbsolutePath = origpath then
> MsgBox "Update failed. Error = "+ str( f.LastErrorCode )
> else
> MsgBox "Unexpected result. Path is now:" + EndOfLine +
> f.AbsolutePath
> end if
>
> break
>
> I tried this on Vista (and OS X just to confirm). The folderitem still
> points to the original path and no error is reported.
>
> I'm using the Windows registry and have found using getsaveinfo to
> store
> folderitems inconvenient. I thought Absolute path would be a legit
> alternative for Windows apps but it appears to fail silently.
>
> Am I missing something?
Have you tried creating the new folder item with the new absolute
path to see if there's something special about just altering the
absolute path of an existing one ?
something just slightly different than what you have like
dim f as FolderItem
dim origpath as String = f.AbsolutePath
dim newpath as string = TemporaryFolder.Child("Test").AbsolutePath
f = new Folderitem(newpath, Folderitem.PathTypeAbsolute)
if f.AbsolutePath = newpath then
MsgBox "Updated to new path"
Elseif f.AbsolutePath = origpath then
MsgBox "Update failed. Error = "+ str( f.LastErrorCode )
else
MsgBox "Unexpected result. Path is now:" + EndOfLine +
f.AbsolutePath
end if
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>