Your bug is that you did not check the return value of g.Child; it can return nil, as you have learned. Then the question is why did it return nil?

First, is g = GetFolderItem(app.MyFolderPath) a directory? If so, what are the permissions for it?

Charles Yeomans

On Jan 2, 2007, at 1:17 PM, Youri wrote:


Sorry Charles,


I didn't manage it with your explanation.


I tried :

        dim f, g as FolderItem
        f = new FolderItem("C001")
        g = GetFolderItem(app.MyFolderPath)
        f = g.Child("C001")
        f.createAsFolder


But I get a Nil exception on f.

Could you explain where is my bug?

Thanks,


Youri



Charles Yeomans wrote:
GetFolderItem(app.MyFolderPath) will return a FolderItem corresponding to the path. Note that GetFolderItem takes an optional second parameter specifying the path format. Once you have this FolderItem, use the Child function to get a FolderItem representing an item (which may or may not exist) inside this folder.
Charles Yeomans
On Jan 2, 2007, at 5:20 AM, Youri wrote:

Hi,


I hope you had a good time for the New Year ev'...

I am breaking my teeth on this (certinaly very easy) problem :

I have a string in which I store the location of a Folder on my Hard drive as a string.

I want to create afterward a folder inside this folder. How do I pass this path to indicate where I want to create my folder?

I have done :

        dim f as FolderItem
        f = new FolderItem("C001")
        dossier.AbsolutePath = app.MyFolderPath
        dossier.createAsFolder

But it doesn't work. I also tried to do :

        dim s as string
        s = app.MyFolderPath + "C001"
        f = new FolderItem(s)


It creates a folder with the Name "s" at the root...


Best regards,


Youri
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to