The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Problem with AddSubfolder

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
EastWestTrav Posted - 01/30/2007 : 1:51:10 PM
Origin Version (Select Help-->About Origin): 7.5G SR6
Operating System: win xp


Following code doesn't work:

void NewDirForme()
{
Folder fld = Project.GetPath();
fld.AddSubfolder("mydir");
}


Compiling goes well, but executing the code I get the message (translated):
Runtime error in Origin C function, object could not find method
5   L A T E S T    R E P L I E S    (Newest First)
EastWestTrav Posted - 02/02/2007 : 07:06:17 AM
I understand. The main point is that I mixed up disk folder and Origin's internal folder structure. I didn't read the description of the class "folder", but only the one for .AddSubfolder
Mike Buess Posted - 02/01/2007 : 10:23:53 AM
OK, I understand now. Folder fld declares a Project folder and has nothing to do with disk folders. Similarly, fld.AddSubfolder() creates a Project folder whereas CheckMakePath() creates a disk folder (if it doesn't already exist). Your original code works if the project has not been saved so that Project.GetPath() is empty. It fails as you describe if you try it in a saved project.

Mike Buess
Origin WebRing Member
Deanna Posted - 02/01/2007 : 12:00:40 AM
I tried your code on 7.5G SR6.., It works fine. I don't know what happens. If this problem persists or there is other problems, please consider reinstalling Origin.

Deanna
OriginLab Technical Services
EastWestTrav Posted - 01/31/2007 : 05:28:48 AM
pe_mkdir creates a new folder inside the project own folder structure.

I don't know what's wrong but following code works for me:

quote:
void NewDirForme()
{
string c=Project.GetPath() + "mydir";
printf("%s \n", c);
CheckMakePath(c);
}
Mike Buess Posted - 01/30/2007 : 2:27:41 PM
Works fine for me in same Origin version. This function is essentially the same as pe_mkdir in LT_PE.c. Does that function work for you?

Mike Buess
Origin WebRing Member

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000