Article View: borland.public.cppbuilder.nativeapi
Article #14302Re: FileCreate function problem
From: Remy Lebeau (TeamB)
Date: Thu, 14 Aug 2003 17:56
Date: Thu, 14 Aug 2003 17:56
16 lines
1759 bytes
1759 bytes
<Paul> wrote in message news:3f3a4507$1@newsgroups.borland.com...
> Try the following:
Why even bother trying to call LoadFromFile() when you know the new file is
going to be empty anyway? LoadFromFile() will result in an empt list, so
just call Clear() instead when the file doesn't already exist, and call
LoadFromFile() only when it actually does, ie:
if( !FileExists("c:\\CProjects\\test.txt") )
Sample1->Clear();
else
Sample1->LoadFromFile("c:\\CProjects\\test.txt");
Gambit
Technical Details
Message-ID:
<3f3bcba7$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f3989ee@newsgroups.borland.com> <3f398d1f$1@newsgroups.borland.com> <3f398d79@newsgroups.borland.com> <3f39f7a6$1@newsgroups.borland.com> <3f3a1241@newsgroups.borland.com> <3f3a343e$1@newsgroups.borland.com> <3f3a3802@newsgroups.borland.com> <3f3a4507$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,5967b7894a1d3380 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-14 11:11:15 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f3989ee@newsgroups.borland.com> <3f398d1f$1@newsgroups.borland.com> <3f398d79@newsgroups.borland.com> <3f39f7a6$1@newsgroups.borland.com> <3f3a1241@newsgroups.borland.com> <3f3a343e$1@newsgroups.borland.com> <3f3a3802@newsgroups.borland.com> <3f3a4507$1@newsgroups.borland.com> Subject: Re: FileCreate function problem Date: Thu, 14 Aug 2003 10:56:06 -0700 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3f3bcba7$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1060883367 207.175.226.26 (14 Aug 2003 10:49:27 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail