dbTalk Databases Forums  

WriteText et GPV

comp.databases.paradox comp.databases.paradox


Discuss WriteText et GPV in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Régis
 
Posts: n/a

Default WriteText et GPV - 10-15-2006 , 05:15 AM






A problem from Michel, in a french NG.

The writeText method produces a GPV with a french Paradox version.

Try this (the sample method included in P10)

method pushButton(var eventInfo Event)
var
f form
endvar

if not f.open("BIOLIFE") then ; attempts to open Biolife.fsl. If not
successful, alerts t
; the user and returns
to the form
msginfo("stop","could not open Biolife form")
return
endif
f.attach("BIOLIFE") ; attaches form variable to
biolife.fsl
f.writetext(":WORK:test.txt") ; writes the displayed contents of
biolife.fsl to the file test.txt

f.close() ; closes biolife.fsl
endMethod


test.txt is an empty file and the method produces a GPV.
Can you confirm this with an English version and do you have an explanation
for this.
The question is more about why the GPV yhan how to use writeText.
(Obviously, make the test with an axisting form of your working directory)

Régis



Reply With Quote
  #2  
Old   
Tom Nelson
 
Posts: n/a

Default Re: WriteText et GPV - 10-15-2006 , 07:54 AM






Quote:
The writeText method produces a GPV with a french Paradox version.
Try this (the sample method included in P10)...

test.txt is an empty file and the method produces a GPV.
Can you confirm this with an English version and do you have an explanation
for this.
Régis,
I tested this (example method from Paradox 10 [10.0.0.719 English version]
help and also experienced an unexpected GPV. Don't know why, though.

Tom Nelson




Reply With Quote
  #3  
Old   
Régis
 
Posts: n/a

Default Re: WriteText et GPV - 10-15-2006 , 08:39 AM




Tom,
Thanks testing.
Do you have an empty *.txt file too ?

And the real question is Why ?
Régis

Quote:



Reply With Quote
  #4  
Old   
Tom Nelson
 
Posts: n/a

Default Re: WriteText et GPV - 10-15-2006 , 09:01 AM



Quote:
Do you have an empty *.txt file too ?
Yes.

I have never used WriteText() before. No idea why it gives the GPV

Tom Nelson



Reply With Quote
  #5  
Old   
Anders Jonsson
 
Posts: n/a

Default Re: WriteText et GPV - 10-15-2006 , 12:31 PM



Quote:
test.txt is an empty file and the method produces a GPV.
Can you confirm this with an English version and do you have an
explanation for this.
Confirmed.

Quote:
The question is more about why the GPV yhan how to use writeText.
(Obviously, make the test with an axisting form of your working directory)

The help files in P10 says:

"This method will be removed in a future version of Paradox. It is
recommended that you use the publishTo method instead."

I have never used this (didn't even know it was there).

Why do they need this function? Wouldn't it be easier/better to export to
text in another way?

Anders









Reply With Quote
  #6  
Old   
Rodney Wise
 
Posts: n/a

Default Re: WriteText et GPV - 10-15-2006 , 01:59 PM



Régis,

In Pdox 9, I had no trouble. However, what happens if you open the Form
using the

WinStyleDefault+WinStyleHidden

Parameters? (see below)

Below is the code I tested:

;//=== Begin
;------------------------>
Var

f Form
strCurrentDir String

endVar
;<------------------------

strCurrentDir = cpCurrentDir() ;//- returns my current directory
if f.open(strCurrentDir + "\\Sample.fsl", WinStyleDefault+WinStyleHidden)
then
; if f.open(strCurrentDir + "\\Sample.fsl") then ;//- <--- this worked
also
f.writetext(":PRIV:test.txt")
sleep() ;//- I added this sleep()
f.close()
endif

;//=== End



--
....
`·.¸¸.·´¯`·.¸¸.·´¯`·-> rodney



Reply With Quote
  #7  
Old   
Bertil Isberg
 
Posts: n/a

Default Re: WriteText et GPV - 10-15-2006 , 02:37 PM



Régis

This is documented in my Docissues document.
ObjectPAL - Form type - writeText()


--
Bertil Isberg - CTECH
Paradox buglist:
online: http://hem.bredband.net/bertilisberg/

"Régis" <regis.dd (AT) club-internet (DOT) fr> skrev i meddelandet
news:45320a2e (AT) pnews (DOT) thedbcommunity.com...
Quote:
A problem from Michel, in a french NG.

The writeText method produces a GPV with a french Paradox version.

Try this (the sample method included in P10)

method pushButton(var eventInfo Event)
var
f form
endvar

if not f.open("BIOLIFE") then ; attempts to open Biolife.fsl. If not
successful, alerts t
; the user and returns
to the form
msginfo("stop","could not open Biolife form")
return
endif
f.attach("BIOLIFE") ; attaches form variable to
biolife.fsl
f.writetext(":WORK:test.txt") ; writes the displayed contents of
biolife.fsl to the file test.txt

f.close() ; closes biolife.fsl
endMethod


test.txt is an empty file and the method produces a GPV.
Can you confirm this with an English version and do you have an
explanation for this.
The question is more about why the GPV yhan how to use writeText.
(Obviously, make the test with an axisting form of your working directory)

Régis





Reply With Quote
  #8  
Old   
Régis
 
Posts: n/a

Default Re: WriteText et GPV - 10-15-2006 , 02:38 PM



With P10, I always have GPV.
Régis


"Rodney Wise" <NSpamPlease_rodney1 (AT) bellsouth (DOT) net> a écrit dans le message de
news: 45328535$1 (AT) pnews (DOT) thedbcommunity.com...
Quote:
Régis,

In Pdox 9, I had no trouble. However, what happens if you open the Form
using the

WinStyleDefault+WinStyleHidden

Parameters? (see below)

Below is the code I tested:

;//=== Begin
;------------------------
Var

f Form
strCurrentDir String

endVar
;<------------------------

strCurrentDir = cpCurrentDir() ;//- returns my current directory
if f.open(strCurrentDir + "\\Sample.fsl", WinStyleDefault+WinStyleHidden)
then
; if f.open(strCurrentDir + "\\Sample.fsl") then ;//- <--- this worked
also
f.writetext(":PRIV:test.txt")
sleep() ;//- I added this sleep()
f.close()
endif

;//=== End



--
...
`·.¸¸.·´¯`·.¸¸.·´¯`·-> rodney





Reply With Quote
  #9  
Old   
Régis
 
Posts: n/a

Default Re: WriteText et GPV - 10-15-2006 , 02:46 PM



Thanks Bertil,
As usual, before asking, it is better to read your documentation and bug
list.
Just a little point, you refer to version 11, build 300, and that exists in
P10, too

Régis



"Bertil Isberg" <ctech (AT) corel (DOT) ca> a écrit dans le message de news:
45328e00 (AT) pnews (DOT) thedbcommunity.com...
Quote:
Régis

This is documented in my Docissues document.
ObjectPAL - Form type - writeText()


--
Bertil Isberg - CTECH
Paradox buglist:
online: http://hem.bredband.net/bertilisberg/

"Régis" <regis.dd (AT) club-internet (DOT) fr> skrev i meddelandet
news:45320a2e (AT) pnews (DOT) thedbcommunity.com...
A problem from Michel, in a french NG.

The writeText method produces a GPV with a french Paradox version.

Try this (the sample method included in P10)

method pushButton(var eventInfo Event)
var
f form
endvar

if not f.open("BIOLIFE") then ; attempts to open Biolife.fsl. If not
successful, alerts t
; the user and returns
to the form
msginfo("stop","could not open Biolife form")
return
endif
f.attach("BIOLIFE") ; attaches form variable to
biolife.fsl
f.writetext(":WORK:test.txt") ; writes the displayed contents of
biolife.fsl to the file test.txt

f.close() ; closes biolife.fsl
endMethod


test.txt is an empty file and the method produces a GPV.
Can you confirm this with an English version and do you have an
explanation for this.
The question is more about why the GPV yhan how to use writeText.
(Obviously, make the test with an axisting form of your working
directory)

Régis







Reply With Quote
  #10  
Old   
Régis
 
Posts: n/a

Default Re: WriteText et GPV - 10-15-2006 , 02:49 PM



Errare humanum est,
You mention this in the text Part, so forgot my last point
Régis


"Régis" <regis.dd (AT) club-internet (DOT) fr> a écrit dans le message de news:
45329034$1 (AT) pnews (DOT) thedbcommunity.com...
Quote:
Thanks Bertil,
As usual, before asking, it is better to read your documentation and bug
list.
Just a little point, you refer to version 11, build 300, and that exists
in P10, too

Régis




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.