The folder class

The use of specific JADE features and proposals for new feature suggestions
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

The folder class

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:46 am

by JADE Kid - Ray Hidayat >> Sun, 14 Jan 2001 3:27:22 GMT

The folder class should have a method which can recall its name and set the name property of the fileFolder object. Don't you often find that you just want the name of the file, and not the full path?

--
Ray Hidayat
JADE Kid - 2000
www.jadekids.com

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: The folder class

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:46 am

by Abduhl >> Sun, 14 Jan 2001 9:56:09 GMT
The folder class should have a method which can recall its name and set the name property of the fileFolder object. Don't you often find that you just want the name of the file, and not the full path?

Take a look at the attribute FileNode::name, it should do the job.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: The folder class

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:47 am

by JADE Kid - Ray Hidayat >> Sun, 14 Jan 2001 10:19:08 GMT

That property only works when using the FileFolder::files method. It says that in the help file.

--
Ray Hidayat
JADE Kid - 2000
www.jadekids.com

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: The folder class

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:47 am

by Robert Barr >> Sun, 14 Jan 2001 21:18:28 GMT
That property only works when using the FileFolder::files method. It says that in the help file.


How about this mapping method on FileNode? If FileNode.name() does not return the unqualified filename (without the path), then it is derived from the fileName property.


name(set: Boolean; _value: String io) mapping;

vars
idx : Integer;begin

if _value = "" and fileName <> "" then
idx := fileName.reversePos("\");
if idx <> 0 then
_value := fileName[idx+1:end];
endif;
endif;
end;

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: The folder class

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:47 am

by Richard Mitchell >> Mon, 15 Jan 2001 0:49:08 GMT

or if you have CardSchema, use the cnGetSimpleFileName method.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: The folder class

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:47 am

by JADE Kid - Ray Hidayat >> Mon, 15 Jan 2001 5:07:45 GMT

I haven't got CardSchema yet. I should soon. I just keep on forgetting about it.

--
Ray Hidayat
JADE Kid - 2000
www.jadekids.com


Return to “Feature Discussions”

Who is online

Users browsing this forum: No registered users and 4 guests

cron