From: Karl Faller on 7 Aug 2010 12:19 Urs, it works here, EXCEPT for *.* ;-) Karl >Hi Roger, >In my tests File() never worked correctly! With SP1 it returns allways true, >with SP3 allways false (!?!?!?) > >Little workaround with Directory(): > >METHOD pbFile() CLASS dtaTest1 >? File("C:\CAVO28\EmptyDirectory\*.*") >? Directory( "C:\CAVO28\EmptyDirectory\*.*") >? ALen( Directory( "C:\CAVO28\EmptyDirectory\*.*") ) >? >? File("C:\CAVO28\NotEmptyDirectory\*.*") >? Directory( "C:\CAVO28\NotEmptyDirectory\*.*") >? ALen( Directory( "C:\CAVO28\NotEmptyDirectory\*.*") ) > >regards >Urs > > >"Roger Lawton" <nsproger(a)nspsomax.com> schrieb im Newsbeitrag >news:i3h8ir$jfg$1(a)speranza.aioe.org... >> Karl: >> >> Thanks for the reply. Thought I was going crazy for a while. >> >> >> -- >> Roger Lawton >> Product Manager >> SOMAX, Inc. >> >> >> "Karl Faller" <k.faller_withoutthat_(a)onlinehome.de> wrote in message >> news:cg8o565h99tqescib1ase9b0uh3c1kgsin(a)4ax.com... >>> Roger, >>> seems there's a problem - just tried and it finds all iterations of ? >>> and * with charakters, but not *.* >>> >>> Karl >>> >>>>I am (finally) implementing VO 2.8 SP3 and I am having a problem with the >>>>File() function. In our app we would check for the existance of (any) >>>>files >>>>in a directory using something like the following: >>>> >>>>cPath := "C:\MYDIRECTORY\*.*" >>>> >>>>If File( cPath ) >>>> // do something >>>>Else >>>> // do something else >>>>Endif >>>> >>>>However, with the update to SP3 I have found that File(cPath) never >>>>returns >>>>true when using *.* as the "template". Is there somehing I am missing or >>>>is >>>>this the case? >>>> >>>>Thanks >>
From: Roger Lawton on 7 Aug 2010 12:25 Urs: I (like Karl) have found that it works for me if I use something other than *.* for the template. -- Roger Lawton Product Manager SOMAX, Inc. "Urs Eggmann" <Urs.Eggmann(a)shinternet.ch> wrote in message news:8c5amsFtv8U1(a)mid.individual.net... > Hi Roger, > In my tests File() never worked correctly! With SP1 it returns allways > true, with SP3 allways false (!?!?!?) > > Little workaround with Directory(): > > METHOD pbFile() CLASS dtaTest1 > ? File("C:\CAVO28\EmptyDirectory\*.*") > ? Directory( "C:\CAVO28\EmptyDirectory\*.*") > ? ALen( Directory( "C:\CAVO28\EmptyDirectory\*.*") ) > ? > ? File("C:\CAVO28\NotEmptyDirectory\*.*") > ? Directory( "C:\CAVO28\NotEmptyDirectory\*.*") > ? ALen( Directory( "C:\CAVO28\NotEmptyDirectory\*.*") ) > > regards > Urs > > > "Roger Lawton" <nsproger(a)nspsomax.com> schrieb im Newsbeitrag > news:i3h8ir$jfg$1(a)speranza.aioe.org... >> Karl: >> >> Thanks for the reply. Thought I was going crazy for a while. >> >> >> -- >> Roger Lawton >> Product Manager >> SOMAX, Inc. >> >> >> "Karl Faller" <k.faller_withoutthat_(a)onlinehome.de> wrote in message >> news:cg8o565h99tqescib1ase9b0uh3c1kgsin(a)4ax.com... >>> Roger, >>> seems there's a problem - just tried and it finds all iterations of ? >>> and * with charakters, but not *.* >>> >>> Karl >>> >>>>I am (finally) implementing VO 2.8 SP3 and I am having a problem with >>>>the >>>>File() function. In our app we would check for the existance of (any) >>>>files >>>>in a directory using something like the following: >>>> >>>>cPath := "C:\MYDIRECTORY\*.*" >>>> >>>>If File( cPath ) >>>> // do something >>>>Else >>>> // do something else >>>>Endif >>>> >>>>However, with the update to SP3 I have found that File(cPath) never >>>>returns >>>>true when using *.* as the "template". Is there somehing I am missing >>>>or is >>>>this the case? >>>> >>>>Thanks >> >
From: Urs Eggmann on 7 Aug 2010 13:23 Hi Karl and Roger, Shure, File() works. I was a little unprecise with "never"! But, in my understanding Roger wanted to look for any file with *.* And for that, the length of the array, returned by Directory() does the job. Or? In "my very irrelevant opinion" *.* should work and return false with a empty and true with a not empty directory. regards Urs "Karl Faller" <k.faller_withoutthat_(a)onlinehome.de> schrieb im Newsbeitrag news:rq1r56t3mqabdq26dbfb5rbhornubr74g7(a)4ax.com... > Urs, > it works here, EXCEPT for *.* ;-) > > Karl > >>Hi Roger, >>In my tests File() never worked correctly! With SP1 it returns allways >>true, >>with SP3 allways false (!?!?!?) >> >>Little workaround with Directory(): >> >>METHOD pbFile() CLASS dtaTest1 >>? File("C:\CAVO28\EmptyDirectory\*.*") >>? Directory( "C:\CAVO28\EmptyDirectory\*.*") >>? ALen( Directory( "C:\CAVO28\EmptyDirectory\*.*") ) >>? >>? File("C:\CAVO28\NotEmptyDirectory\*.*") >>? Directory( "C:\CAVO28\NotEmptyDirectory\*.*") >>? ALen( Directory( "C:\CAVO28\NotEmptyDirectory\*.*") ) >> >>regards >>Urs >> >> >>"Roger Lawton" <nsproger(a)nspsomax.com> schrieb im Newsbeitrag >>news:i3h8ir$jfg$1(a)speranza.aioe.org... >>> Karl: >>> >>> Thanks for the reply. Thought I was going crazy for a while. >>> >>> >>> -- >>> Roger Lawton >>> Product Manager >>> SOMAX, Inc. >>> >>> >>> "Karl Faller" <k.faller_withoutthat_(a)onlinehome.de> wrote in message >>> news:cg8o565h99tqescib1ase9b0uh3c1kgsin(a)4ax.com... >>>> Roger, >>>> seems there's a problem - just tried and it finds all iterations of ? >>>> and * with charakters, but not *.* >>>> >>>> Karl >>>> >>>>>I am (finally) implementing VO 2.8 SP3 and I am having a problem with >>>>>the >>>>>File() function. In our app we would check for the existance of (any) >>>>>files >>>>>in a directory using something like the following: >>>>> >>>>>cPath := "C:\MYDIRECTORY\*.*" >>>>> >>>>>If File( cPath ) >>>>> // do something >>>>>Else >>>>> // do something else >>>>>Endif >>>>> >>>>>However, with the update to SP3 I have found that File(cPath) never >>>>>returns >>>>>true when using *.* as the "template". Is there somehing I am missing >>>>>or >>>>>is >>>>>this the case? >>>>> >>>>>Thanks >>>
From: Karl Faller on 7 Aug 2010 14:27 Urs, >In "my very irrelevant opinion" *.* should work and return false with a >empty and true with a not empty directory. naturally - the behaviour shown is a bug -forwarded it to VOPS... Karl
From: Urs Eggmann on 8 Aug 2010 07:29 Karl, > naturally - the behaviour shown is a bug -forwarded it to VOPS... Thank you! Hope it will give a SP4 (with or without some $$$!! (g) ) Urs
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: How set multilineedit readonly at runtime Next: bBrowser3 and Scope |