topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
Bug in TGet
|
Mr EMG
May I ask, if this works correctly in native (x)Harbour without FWH ? Is this problem only with FWH ?
|
Bug in TGet
|
Any news?
EMG
|
Bug in TGet
|
Enrico,
Testing Your example, I noticed, a RETURN or moving to the next Get,
refreshes the Format.
[img:2ef19mxn]http://www.pflegeplus.com/pictures/focus1.jpg[/img:2ef19mxn]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Bug in TGet
|
Yes, but as you can see one digit out of four is missing.
EMG
|
Bug in TGet
|
Enrico,
I use FWH 9.11 and the latest version (11/2009) of xHarbour Builder.
I did some tests and I found no problem at all : not with 1 get and not with 2 gets.
I don't know what's happening.
|
Bug in TGet
|
Are you sure? Please, can you send me your EXE to test it here?
EMG
|
Bug in TGet
|
Enrico,
You can download an EXE-file at [url:vn39ztfk]http://www.ma-consult.be/test.exe[/url:vn39ztfk].
Please let me know when you have used the test so I can deleted it from my webspace.
Good luck.
|
Bug in TGet
|
I just downloaded it and tested, thank you. It shows the problem. If you paste this string:
123456789012345678901234567890
you will get
123-567-901-345-789-123-567-90 - - - -
As you can see, 4 is missing, 8 is missing, and so on. If you try to insert that string manually the result is correct:
123-456-789-012-345-678-901-234-567-890
EMG
|
Bug in TGet
|
Enrico,
Indeed, the problems occurs when pasting.
|
Bug in TGet
|
Yes, as I wrote in the first message of this thread. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TGet
|
Enrico,
I think it is not a FWH bug, I explain you why <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
In Clipper or in Harbour we can not "paste" a value into a GET, we just can type it and FWH does it fine this way too. When we paste a value into a FWH GET we are simply replacing the contained oGet buffer and not typing each one of the characters. Please run this test to see what I mean:
[code=fw:2sqej153]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg, oGet<br /><br /> <span style="color: #00C800;">LOCAL</span> cVar := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">39</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cVar;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999-999-999-999-999-999-999-999-999-999"</span><br /> <br /> <span style="color: #B900B9;">// standard Harbour code</span><br /> oGet:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> oGet:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">buffer</span> = <span style="color: #ff0000;">"1234567890"</span><br /> oGet:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Assign</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> oGet:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">UpdateBuffer</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// end of standard Harbour code </span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> oGet:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">buffer</span> <span style="color: #000000;">)</span> <br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Close"</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:2sqej153]
|
Bug in TGet
|
Enrico,
This small example shows more clearly what I mean:
[code=fw:3vbh7zsn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> Transform<span style="color: #000000;">(</span> <span style="color: #ff0000;">"1234567890"</span>, <span style="color: #ff0000;">"999-999-999-999-999-999-999-999-999-999"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> </div>[/code:3vbh7zsn]
Its a (wrong?) Transform() behavior:
[img:3vbh7zsn]http://img687.imageshack.us/img687/8397/captureft.jpg[/img:3vbh7zsn]
|
Bug in TGet
|
Enrico,
I am reviewing Transform() docs and it does not manage "-" in any way. It has no special meaning for Transform():
[url:1yy3k403]http://www.ousob.com/ng/53guide/nga46c2.php[/url:1yy3k403]
GET's PICTURE docs:
[url:1yy3k403]http://www.ousob.com/ng/53guide/ngaee8c.php[/url:1yy3k403]
I think we are missing something...
|
Bug in TGet
|
This is my understanding of the behavior of non-template characters in the picture clause, consistent from the days of Clipper till now in (x)Harbour.
When a picture clause containing non-template characters is used to transform a numeric value, the non-template characters are inserted. But when a character value is transformed, the non-template characters are substituted unless '@R ' mask is used.
Transform( "12345678901", "999-999-999" ) --> "123-567-901"
Transform( "123456789", "@R 999-999-999" ) --> "123-456-789"
Transform( 123456789, "999-999-999" ) --> "123-456-789"
Transform( 123456789, "@R 999-999-999" ) --> "123-456-789"
The behavior reported by Mr. EMG is correct and that is what should be expected. I do not think there is any bug either in FWH or in (x)Harbour.
If I am still missing anything I am interested to know.
|
Bug in TGet
|
Rao,
Many thanks for the very valuables examples.
I think this may be the way to go:
Transform( 123456789, "999-999-999" ) --> "123-456-789"
We could check the type() of the pasted value and if numeric, then use Val()
thinking about it...
|
Bug in TGet
|
You are right. But the following pure Clipper samples works fine if we paste in the console:
[code=fw:2p7uwod6]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> GetList := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">LOCAL</span> cVar := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">39</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> cVar;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999-999-999-999-999-999-999-999-999-999"</span><br /><br /> READ<br /><br /> INKEY<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #B900B9;">// 123456789012345678901234567890</span></div>[/code:2p7uwod6]
EMG
|
Bug in TGet
|
ops, cVar is character type, so we can't use Val()...
|
Bug in TGet
|
Enrico,
I think thats because console's paste types each character, one by one.
Maybe thats the way to go: We could use a for next to type each pasted character
|
Bug in TGet
|
Enrico,
This change in FWH Class TGet seems to work fine <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
[code=fw:oi1qmlm9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">(</span> nMsg, nWParam, nLParam <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TGet<br /><br /> <span style="color: #00C800;">local</span> oClp, cText, n<br /> ...<br /> <span style="color: #00C800;">case</span> nMsg == WM_PASTE<br /> <span style="color: #00C800;">if</span> GetFocus<span style="color: #000000;">(</span><span style="color: #000000;">)</span> == ::<span style="color: #000000;">hWnd</span><br /> CallWindowProc<span style="color: #000000;">(</span> ::<span style="color: #000000;">nOldProc</span>, ::<span style="color: #000000;">hWnd</span>, WM_PASTE, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">DEFINE</span> CLIPBOARD oClp <span style="color: #0000ff;">OF</span> <span style="color: #00C800;">Self</span> FORMAT <span style="color: #0000ff;">TEXT</span><br /> cText = oClp:<span style="color: #000000;">GetText</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oClp:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span> cText <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> Set<span style="color: #000000;">(</span> _SET_INSERT <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Insert</span><span style="color: #000000;">(</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> cText, n, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Overstrike</span><span style="color: #000000;">(</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> cText, n, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">next</span> <br /> SetWindowText<span style="color: #000000;">(</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">buffer</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Assign</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span> <br /> <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br /> ...<br /> </div>[/code:oi1qmlm9]
|
Bug in TGet
|
Cursor position was not properly set. Now it is fine:
[code=fw:283xotcz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">case</span> nMsg == WM_PASTE<br /> <span style="color: #00C800;">if</span> GetFocus<span style="color: #000000;">(</span><span style="color: #000000;">)</span> == ::<span style="color: #000000;">hWnd</span><br /> CallWindowProc<span style="color: #000000;">(</span> ::<span style="color: #000000;">nOldProc</span>, ::<span style="color: #000000;">hWnd</span>, WM_PASTE, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">DEFINE</span> CLIPBOARD oClp <span style="color: #0000ff;">OF</span> <span style="color: #00C800;">Self</span> FORMAT <span style="color: #0000ff;">TEXT</span><br /> cText = oClp:<span style="color: #000000;">GetText</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oClp:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span> cText <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> Set<span style="color: #000000;">(</span> _SET_INSERT <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Insert</span><span style="color: #000000;">(</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> cText, n, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Overstrike</span><span style="color: #000000;">(</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> cText, n, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">next</span> <br /> SetWindowText<span style="color: #000000;">(</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">buffer</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Pos</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Assign</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span> <br /> <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br /> </div>[/code:283xotcz]
|
Bug in TGet
|
Thank you.
EMG
|
Bug in TGet
|
Works like a charm!
EMG
|
Bug in TGet
|
Great Antonio !!!
|
Bug in TGet
|
In the following sample, please click on the second get and you will see the caret placed on the next digit and not on the clicked digit.
[code=fw:f59i4b9e]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg<br /><br /> <span style="color: #00C800;">LOCAL</span> cVar := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">30</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> nVar := <span style="color: #000000;">0</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> cVar<br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> nVar;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@EZ 999,999.99"</span>;<br /> <span style="color: #0000ff;">RIGHT</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:f59i4b9e]
EMG
|
Bug in TGet
|
EMG,
that obviously only happens if the 2nd get doesn't have the focus. As soon as it has the focus everything is OK. So maybe it has something to do what happens if the get gets the focus?
|
Bug in TGet
|
Yes, it happens when you click on the second GET.
EMG
|
Bug in TGet
|
In this sample, the size of the GET is very small:
[code=fw:78bga99m]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg<br /><br /> <span style="color: #00C800;">LOCAL</span> cVar := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">30</span> <span style="color: #000000;">)</span><br /><br /> FW_SETUNICODE<span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> cVar<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:78bga99m]
EMG
|
Bug in TGet
|
Enrico,
If you use:
LOCAL cVar := Replicate( "X", 30 )
would the shown width be correct ?
|
Bug in TGet
|
Yes, it is.
EMG
|
Bug in TGet [Fixed]
|
In the following sample, please change the number and press TAB. The new number doesn't properly align to right.
[code=fw:kqbpcd2a]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg<br /><br /> <span style="color: #00C800;">LOCAL</span> cCli := <span style="color: #000000;">23</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> cCli <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">13</span> <span style="color: #0000ff;">RIGHT</span><br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Chiudi"</span>;<br /> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:kqbpcd2a]
EMG
|
Bug in TGet [Fixed]
|
Enrico,
This seems as a valid temporary solution:
[code=fw:5s6qwca6]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg, oGet<br /><br /> <span style="color: #00C800;">LOCAL</span> cCli := <span style="color: #000000;">23</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cCli <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">13</span> <span style="color: #0000ff;">RIGHT</span> ;<br /> <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">(</span> oGet:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">)</span> <br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Chiudi"</span>;<br /> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:5s6qwca6]
|
Bug in TGet [Fixed]
|
Thank you. It's not something that I need to use. I only noticed this problem and reported here. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TGet [Fixed]
|
This bug is still not fixed.
EMG
|
Bug in TGet [Fixed]
|
Enrico,
Please add these lines at the end of Class TGet Method KeyChar()
[code=fw:22kgic3a]<div class="fw" id="{CB}" style="font-family: monospace;"> #ifndef __CLIPPER__<br /> <span style="color: #00C800;">if</span> nKey == VK_RETURN <span style="color: #B900B9;">// Execute DEFPUSHBUTTON Action</span><br /> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">KeyChar</span><span style="color: #000000;">(</span> nKey, nFlags <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> #endif<br /><br /> <span style="color: #00C800;">if</span> lAnd<span style="color: #000000;">(</span> ::<span style="color: #000000;">nStyle</span>, ES_RIGHT <span style="color: #000000;">)</span> <span style="color: #B900B9;">// new</span><br /> ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// new</span><br /> <span style="color: #00C800;">endif</span> <span style="color: #B900B9;">// new </span><br /><br /> <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span></div>[/code:22kgic3a]
|
Bug in TGet [Fixed]
|
Changes included in FWH 17.05
many thanks
|
Bug in TGet [Fixed]
|
Thank you.
EMG
|
Bug in TGet with latest xHarbour from CVS
|
This is the sample. Try pressing a digit and you will get the separator dots on the GET.
[code:2wotm1pd]#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL nVar := 0
DEFINE DIALOG oDlg
@ 0, 0 GET nVar;
PICTURE "@EZ 999,999.99";
RIGHT
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL[/code:2wotm1pd]
EMG
|
Bug in TGet with latest xHarbour from CVS
|
It is a bug in xHarbour's GET class:
[code:19qmuk52]FUNCTION MAIN()
LOCAL GetList := {}
LOCAL nVar1 := 0
LOCAL nVar2 := 0
CLS
@ 10, 10 GET nVar1;
PICTURE "@EZ 999,999.99";
WHEN ( GetList[ 1 ]:Picture := "@EZ 999999.99", .T. );
VALID ( GetList[ 1 ]:Picture := "@EZ 999,999.99", .T. )
@ 12, 10 GET nVar2;
PICTURE "@EZ 999,999.99"
READ
RETURN NIL[/code:19qmuk52]
Already reported to xHarbour developers list.
EMG
|
Bug in TGet with latest xHarbour from CVS
|
Enrico, this is after or before this entry:
2007-01-07 16:45 UTC-0300 Eduardo Fernandes <modalsist@yahoo.com.br>
258 * source/rtl/tget.prg
259 ! fixed parsepict() method to avoid replacing commas by spaces, in
260 pictures like @Z 99,999.99.
261 Adjusted get len for negative numbers, when not exist picture on get.
|
Bug in TGet with latest xHarbour from CVS
|
Enrico,
> Already reported to xHarbour developers list.
Thanks!
|
Bug in TGet with latest xHarbour from CVS
|
[quote="Nop":37yob631]Enrico, this is after or before this entry:
2007-01-07 16:45 UTC-0300 Eduardo Fernandes <modalsist@yahoo.com.br>
258 * source/rtl/tget.prg
259 ! fixed parsepict() method to avoid replacing commas by spaces, in
260 pictures like @Z 99,999.99.
261 Adjusted get len for negative numbers, when not exist picture on get.[/quote:37yob631]
Thank you.
EMG
|
Bug in TGet with latest xHarbour from CVS
|
Enrico,
I have a problem when pressing . to enter numbers to the right of the decimal and the original number to the left of the decimal is not cleared.
For example, I have a number 123.45. If I press .67 the 123 remains and the .67 is entered over the .45. The old behaviour was to clear the all the digits to the left of the decimal so that the result was only 0.67.
Do you get the same behaviour? I'm using PICTURE "9999.99". It seems to be a problem with latest xHarbour Jan 07 and FWH.
Thanks,
Randal Ferguson
|
Bug in TGet with latest xHarbour from CVS
|
Please show a self-contained sample of the problem.
EMG
|
Bug in TGet with latest xHarbour from CVS
|
Enrico,
Thanks for the reply. I was simply compiling a small FWH sample to test. This sample works when compiled with FWH and xBuilder Mar06 but with xBuilder Oct 06 and Jan 07 I get the behaviour I described.
Thanks,
Randal Ferguson
// Testing GETs
#include "FiveWin.ch"
function Main()
LOCAL oDlg, oGet
LOCAL cCad := "Testing " // pad("Testing Gets",40)
LOCAL nNum := 0
LOCAL dDat := "Test 2"
Set century On
Set Date Ansi
Set Date format "mm/dd/yyyy"
SET _3DLOOK ON
msginfo("testget")
DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION
@ 1, 2 SAY "Text..:" OF oDlg
@ 1, 6 GET oGet VAR cCad OF oDlg SIZE 60, 10 // COLOR "W/G"
@ 1.8, 2 SAY "Number:" OF oDlg
@ 2, 6 GET oGet VAR nNum OF oDlg SIZE 60, 10 PICTURE "9999999.99"
@ 2.6, 2 SAY "Date:" OF oDlg
@ 3, 6 GET oGet VAR dDat OF oDlg SIZE 60, 10 // WHEN .f. // "@D"
oGet:lDisColors = .f. // don't use standard disabled colors
@ 3, 7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ACTION oDlg:End()
@ 3, 16 BUTTON "&Cancel" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL
ACTIVATE DIALOG oDlg CENTERED ;
VALID MsgYesNo( "Want to end ?" )
return nil
//------------------------------------------------------------------------//
procedure appsys
return
|
Bug in TGet with latest xHarbour from CVS
|
Confirmed. Just reported to the xHarbour developers list with the following sample:
[code:srt9vhty]#include "Inkey.ch"
FUNCTION MAIN()
LOCAL GetList := {}
LOCAL nVar := 123.45
SETKEY( K_F2, { || GetList[ 1 ]:ToDecPos() } )
CLS
@ 10, 10 GET nVar;
PICTURE "@E 999.99"
READ
RETURN NIL[/code:srt9vhty]
EMG
|
Bug in TGet with latest xHarbour from CVS
|
Enrico,
Thanks!
|
Bug in TGet with latest xHarbour from CVS
|
Enrico,
Thanks alot! I really appreciate you taking the time to look at this.
Best Regards,
Randal Ferguson
|
Bug in TGet with latest xHarbour from CVS
|
The bug has been fixed but the result is not what you expected. Now the xHarbour GET class behavior is Clipper compatible but you have to change FWH TGet class to get the same behavior:
[code:2vqlrub2]if ::oGet:Type == "N" .and. ;
( Chr( nKey ) == "." .or. Chr( nKey ) == "," )
if ::oGet:Clear // EMG
::oGet:DelEnd() // EMG
endif // EMG
::oGet:ToDecPos()
else[/code:2vqlrub2]
EMG
|
Bug in TGet with latest xHarbour from CVS
|
Enrico,
Does your change work fine with Harbour too ? thanks
|
Bug in TGet with latest xHarbour from CVS
|
[quote="Antonio Linares":1h0f7en0]Enrico,
Does your change work fine with Harbour too ? thanks[/quote:1h0f7en0]
Yes, it seems so.
EMG
|
Bug in TGet with latest xHarbour from CVS
|
Thanks!
|
Bug in TGet with latest xHarbour from CVS
|
hi, the error now is when i press "." , only dec is saved in get. im using last cvs, fwh 2.8 , and EMG solution.
|
Bug in TGet with latest xHarbour from CVS
|
Can you show me a sample of the problem?
EMG
|
Bug in TGet with latest xHarbour from CVS
|
EMG, using the samples above, try press ".", only the decimal part is saved in get. thanks
|
Bug in TGet with latest xHarbour from CVS
|
[quote="Nop":kv7a94cn]EMG, using the samples above, try press ".", only the decimal part is saved in get. thanks[/quote:kv7a94cn]
Pressing "," or "." makes no difference for me. The number is zeroed. What do you get instead?
EMG
|
Bug in TGet with latest xHarbour from CVS
|
EMG, try the samples below, but without picture,
@ 10, 10 GET nVar
when press, ".", is showed "1.00", but after enter, only "1", stay in get, decimal part is cut.
thanks
|
Bug in TGet with latest xHarbour from CVS
|
[quote="Nop":1ri66ub4]EMG, try the samples below, but without picture,
@ 10, 10 GET nVar
when press, ".", is showed "1.00", but after enter, only "1", stay in get, decimal part is cut.
thanks[/quote:1ri66ub4]
Ok. Sorry, I can't find the cause of the problem.
EMG
|
Bug in TGet with latest xHarbour from CVS
|
EMG, but you confirm this? thanks
|
Bug in TGet with latest xHarbour from CVS
|
Yes.
EMG
|
Bug in TGet with latest xHarbour from CVS
|
Nop,
Use PICTURE "9999999.99"
|
Bug in TGet with latest xHarbour from CVS
|
[quote="Antonio Linares":2v26uimq]Nop,
Use PICTURE "9999999.99"[/quote:2v26uimq]
Yes, of course. But pure Clipper and [x]Harbour behavior is different.
EMG
|
Bug in TGet with latest xHarbour from CVS
|
Enrico,
yes, right, its just a workaround to solve the problem
|
Bug in TGet? (+fix)
|
Antonio,
In TGet, line 885, there is:
[code:eqm3k0kg]::oWnd:GoNextControl( ::hWnd )[/code:eqm3k0kg]
Should it not be:
[code:eqm3k0kg]::oWnd:GoNextCtrl( ::hWnd )[/code:eqm3k0kg]
--
Sincerely,
Patrick Mast,
<!-- m --><a class="postlink" href="http://www.WinFakt.com">http://www.WinFakt.com</a><!-- m -->
|
Bug in TGet? (+fix)
|
Patrick,
It was already fixed here,
Thanks anyhow <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in TGraph
|
This is a sample:
[code=fw:3gq64vjn]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oWnd<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> TEST<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> TEST<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oPrn, oGraph<br /><br /> PRNLANDSCAPE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Test"</span> PREVIEW<br /> <span style="color: #0000ff;">PAGE</span><br /> oGraph = TGraph<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oGraph:<span style="color: #000000;">lXGrid</span> = .T.<br /> oGraph:<span style="color: #000000;">lYGrid</span> = .T.<br /><br /> oGraph:<span style="color: #000000;">lDotted</span> = .F.<br /> oGraph:<span style="color: #000000;">lTitle</span> = .T.<br /> oGraph:<span style="color: #000000;">lLegends</span> = .F.<br /><br /> oGraph:<span style="color: #000000;">cTitle</span> = <span style="color: #ff0000;">"TEST"</span><br /><br /> oGraph:<span style="color: #000000;">nBarSep</span> = <span style="color: #000000;">100</span><br /><br /> oGraph:<span style="color: #000000;">lxVal</span> = .T.<br /> oGraph:<span style="color: #000000;">lViewVal</span> = .T.<br /><br /> oGraph:<span style="color: #000000;">cTitX</span> = <span style="color: #ff0000;">"TESTX"</span><br /> oGraph:<span style="color: #000000;">cTitY</span> = <span style="color: #ff0000;">"TESTY"</span><br /><br /> oGraph:<span style="color: #000000;">aSeries</span> = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">""</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">109</span>, <span style="color: #000000;">177</span>, <span style="color: #000000;">124</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">1</span>, .F. <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> oGraph:<span style="color: #000000;">aYVals</span> = <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> oGraph:<span style="color: #000000;">aData</span> = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> AADD<span style="color: #000000;">(</span> oGraph:<span style="color: #000000;">aYVals</span>, <span style="color: #ff0000;">"2016"</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> oGraph:<span style="color: #000000;">aData</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span><br /><br /> oGraph:<span style="color: #00C800;">Print</span><span style="color: #000000;">(</span> oPrn, <span style="color: #000000;">5</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">66</span>, <span style="color: #000000;">5</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">80</span>, <span style="color: #000000;">70</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">80</span>, <span style="color: #000000;">56</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">66</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ENDPAGE</span><br /> <span style="color: #0000ff;">ENDPRINT</span><br /><br /> PRNPORTRAIT<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:3gq64vjn]
I get the following error:
[code=fw:3gq64vjn]<div class="fw" id="{CB}" style="font-family: monospace;">Application<br />===========<br /> Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">E</span>:\FWXHARB\PEPPE.EXE <span style="color: #000000;">(</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">3</span>,<span style="color: #000000;">106</span>,<span style="color: #000000;">816</span> bytes<br /> Compiler version: <span style="color: #000000;">xHarbour</span> <span style="color: #000000;">1.2</span><span style="color: #000000;">.3</span> Intl. <span style="color: #000000;">(</span>SimpLex<span style="color: #000000;">)</span> <span style="color: #000000;">(</span>Build <span style="color: #000000;">20160815</span><span style="color: #000000;">)</span><br /> FiveWin Version: <span style="color: #000000;">FWHX</span> <span style="color: #000000;">16.06</span><br /> Windows version: <span style="color: #000000;">6.2</span>, Build <span style="color: #000000;">9200</span> <br /><br /> Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">0</span> secs <br /> Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">09</span>/<span style="color: #000000;">26</span>/<span style="color: #000000;">16</span>, <span style="color: #000000;">15</span>:<span style="color: #000000;">05</span>:<span style="color: #000000;">55</span><br /> Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1132</span> Bound error: <span style="color: #000000;">array</span> access<br /> Args:<br /> <span style="color: #000000;">[</span> <span style="color: #000000;">1</span><span style="color: #000000;">]</span> = A <span style="color: #000000;">{</span> ... <span style="color: #000000;">}</span> length: <span style="color: #000000;">1</span><br /> <span style="color: #000000;">[</span> <span style="color: #000000;">2</span><span style="color: #000000;">]</span> = N <span style="color: #000000;">2</span><br /><br />Stack Calls<br />===========<br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\TGRAPH.PRG => TGRAPH:<span style="color: #0000ff;">PAINT</span><span style="color: #000000;">(</span> <span style="color: #000000;">1054</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\TGRAPH.PRG => <span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>TGRAPH:<span style="color: #000000;">TGRAPH</span><span style="color: #000000;">(</span> <span style="color: #000000;">116</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: => TGRAPH:<span style="color: #00C800;">DISPLAY</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TGRAPH:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span> <span style="color: #000000;">1697</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">(</span> <span style="color: #000000;">3305</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: => DIALOGBOXINDIRECT<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">(</span> <span style="color: #000000;">296</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\<span style="color: #00C800;">function</span>\ERRSYSW.PRG => ERRORDIALOG<span style="color: #000000;">(</span> <span style="color: #000000;">421</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\<span style="color: #00C800;">function</span>\ERRSYSW.PRG => <span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>ERRORSYS<span style="color: #000000;">(</span> <span style="color: #000000;">23</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\TGRAPH.PRG => TGRAPH:<span style="color: #0000ff;">PAINT</span><span style="color: #000000;">(</span> <span style="color: #000000;">1054</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\TGRAPH.PRG => TGRAPH:<span style="color: #00C800;">PRINT</span><span style="color: #000000;">(</span> <span style="color: #000000;">1782</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">PEPPE</span>.prg => TEST<span style="color: #000000;">(</span> <span style="color: #000000;">51</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">PEPPE</span>.prg => <span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>MAIN<span style="color: #000000;">(</span> <span style="color: #000000;">11</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TWINDOW:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">(</span> <span style="color: #000000;">1028</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">PEPPE</span>.prg => MAIN<span style="color: #000000;">(</span> <span style="color: #000000;">11</span> <span style="color: #000000;">)</span></div>[/code:3gq64vjn]
Changing
oGraph:lViewVal = .T.
to
oGraph:lViewVal = .F.
the error goes away.
Any suggestion?
EMG
|
Bug in TGraph
|
Enrico, change line 1059
[code=fw:1vbesyh8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> ::<span style="color: #000000;">aSeries</span><span style="color: #000000;">[</span> nJ, <span style="color: #000000;">5</span> <span style="color: #000000;">]</span> = <span style="color: #00C800;">NIL</span> .OR. ::<span style="color: #000000;">aSeries</span><span style="color: #000000;">[</span> nJ, <span style="color: #000000;">5</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> .AND. ::<span style="color: #000000;">aData</span><span style="color: #000000;">[</span> nJ, nI <span style="color: #000000;">]</span> <> <span style="color: #00C800;">NIL</span><br /> </div>[/code:1vbesyh8]
with
[code=fw:1vbesyh8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> ::<span style="color: #000000;">aSeries</span><span style="color: #000000;">[</span> nJ, <span style="color: #000000;">5</span> <span style="color: #000000;">]</span> = <span style="color: #00C800;">NIL</span> .OR. ::<span style="color: #000000;">aSeries</span><span style="color: #000000;">[</span> nJ, <span style="color: #000000;">5</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span> .AND. ::<span style="color: #000000;">aData</span><span style="color: #000000;">[</span> nJ, <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <> <span style="color: #00C800;">NIL</span><br /> </div>[/code:1vbesyh8]
|
Bug in TGraph
|
Thank you. Now I get
[code=fw:2balzb56]<div class="fw" id="{CB}" style="font-family: monospace;">Argument error conditional</div>[/code:2balzb56]
Sorry, I can't provide a sample.
EMG
|
Bug in TGraph
|
You previous sample run now OK for me
Try, but, thik this not is the problem
[code=fw:3kvnq1rs]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> oGraph:<span style="color: #000000;">aSeries</span> = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Value"</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">109</span>, <span style="color: #000000;">177</span>, <span style="color: #000000;">124</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">1</span>, .F.,,,, <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> </div>[/code:3kvnq1rs]
|
Bug in TGraph
|
[quote="cnavarro":zjbuzkoz]You previous sample run now OK for me[/quote:zjbuzkoz]
Yes, but the real code in my app doesn't. Here it is, but it's not compilable, sorry:
[code=fw:zjbuzkoz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> GRAFICO<span style="color: #000000;">(</span> cTit, aDat <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oPrn, oGraph<br /><br /> <span style="color: #00C800;">LOCAL</span> i<br /><br /> PRNLANDSCAPE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Fatturato "</span> + LOWER<span style="color: #000000;">(</span> cTit <span style="color: #000000;">)</span> PREVIEW<br /> <span style="color: #0000ff;">PAGE</span><br /> oGraph = TGraph<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oGraph:<span style="color: #000000;">lXGrid</span> = .T.<br /> oGraph:<span style="color: #000000;">lYGrid</span> = .T.<br /><br /> oGraph:<span style="color: #000000;">lDotted</span> = .F.<br /> oGraph:<span style="color: #000000;">lTitle</span> = .T.<br /> oGraph:<span style="color: #000000;">lLegends</span> = .F.<br /><br /> oGraph:<span style="color: #000000;">cTitle</span> = <span style="color: #ff0000;">"FATTURATO "</span> + cTit<br /><br /> oGraph:<span style="color: #000000;">nBarSep</span> = <span style="color: #000000;">100</span><br /><br /> oGraph:<span style="color: #000000;">lxVal</span> = M -> ACS_LEVEL < <span style="color: #000000;">3</span><br /> oGraph:<span style="color: #000000;">lViewVal</span> = M -> ACS_LEVEL < <span style="color: #000000;">3</span><br /><br /> oGraph:<span style="color: #000000;">cTitX</span> = <span style="color: #ff0000;">"FATTURATO"</span><br /> oGraph:<span style="color: #000000;">cTitY</span> = <span style="color: #ff0000;">"ANNI"</span><br /><br /> oGraph:<span style="color: #000000;">aSeries</span> = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">""</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">109</span>, <span style="color: #000000;">177</span>, <span style="color: #000000;">124</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">1</span>, .F. <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> oGraph:<span style="color: #000000;">aYVals</span> = <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> oGraph:<span style="color: #000000;">aData</span> = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">FOR</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">(</span> aDat <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> oGraph:<span style="color: #000000;">aYVals</span>, NTRIM<span style="color: #000000;">(</span> aDat<span style="color: #000000;">[</span> i, <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> + <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span> i > <span style="color: #000000;">1</span>, <span style="color: #ff0000;">" ("</span> + NTRIM<span style="color: #000000;">(</span> aDat<span style="color: #000000;">[</span> i, <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">"%)"</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> oGraph:<span style="color: #000000;">aData</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>, aDat<span style="color: #000000;">[</span> i, <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">NEXT</span><br /><br /> oGraph:<span style="color: #00C800;">Print</span><span style="color: #000000;">(</span> oPrn, <span style="color: #000000;">5</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">66</span>, <span style="color: #000000;">5</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">80</span>, <span style="color: #000000;">70</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">80</span>, <span style="color: #000000;">56</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">66</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ENDPAGE</span><br /> <span style="color: #0000ff;">ENDPRINT</span><br /><br /> PRNPORTRAIT<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:zjbuzkoz]
EMG
|
Bug in TGraph
|
The error pops up executing this line:
[code=fw:3clph68n]<div class="fw" id="{CB}" style="font-family: monospace;">oGraph:<span style="color: #00C800;">Print</span><span style="color: #000000;">(</span> oPrn, <span style="color: #000000;">5</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">66</span>, <span style="color: #000000;">5</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">80</span>, <span style="color: #000000;">70</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">80</span>, <span style="color: #000000;">56</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">66</span> <span style="color: #000000;">)</span></div>[/code:3clph68n]
EMG
|
Bug in TGraph
|
Try:
- Create Graph into Dialog
- After, execute oGraph:Print
|
Bug in TGraph
|
This doesn't work, even with your fix:
[code=fw:zc1jmu0c]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> TEST<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:zc1jmu0c]
EMG
|
Bug in TGraph
|
Look your sample
[img:2nj148ry]http://s15.postimg.org/ifvo4wp0b/graph01.png[/img:2nj148ry]
[img:2nj148ry]http://s11.postimg.org/c5t6ueakj/graph02.png[/img:2nj148ry]
|
Bug in TGraph
|
Did you try ma new sample using DIALOG?
EMG
|
Bug in TGraph
|
It is the same example
[code=fw:3ebh41be]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oWnd<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">PIXEL</span> <br /> oWnd:<span style="color: #000000;">nTop</span> := <span style="color: #000000;">10</span><br /> oWnd:<span style="color: #000000;">nLeft</span> := <span style="color: #000000;">10</span><br /> oWnd:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">600</span><br /> oWnd:<span style="color: #000000;">nHeight</span> := <span style="color: #000000;">600</span><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> Test1<span style="color: #000000;">(</span> TEST<span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> TEST<span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oGraph<br /><br /> oGraph = TGraph<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oGraph:<span style="color: #000000;">lXGrid</span> = .T.<br /> oGraph:<span style="color: #000000;">lYGrid</span> = .T.<br /><br /> oGraph:<span style="color: #000000;">lDotted</span> = .F.<br /> oGraph:<span style="color: #000000;">lTitle</span> = .T.<br /> oGraph:<span style="color: #000000;">lLegends</span> = .F.<br /><br /> oGraph:<span style="color: #000000;">cTitle</span> = <span style="color: #ff0000;">"TEST"</span><br /><br /> oGraph:<span style="color: #000000;">nBarSep</span> = <span style="color: #000000;">100</span><br /><br /> oGraph:<span style="color: #000000;">lxVal</span> = .T.<br /> oGraph:<span style="color: #000000;">lViewVal</span> = .T.<br /><br /> oGraph:<span style="color: #000000;">cTitX</span> = <span style="color: #ff0000;">"TESTX"</span><br /> oGraph:<span style="color: #000000;">cTitY</span> = <span style="color: #ff0000;">"TESTY"</span><br /><br /> oGraph:<span style="color: #000000;">aSeries</span> = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Value"</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">109</span>, <span style="color: #000000;">177</span>, <span style="color: #000000;">124</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">1</span>, .F.,,,, <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> oGraph:<span style="color: #000000;">aYVals</span> = <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> oGraph:<span style="color: #000000;">aData</span> = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> AADD<span style="color: #000000;">(</span> oGraph:<span style="color: #000000;">aYVals</span>, <span style="color: #ff0000;">"2016"</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> oGraph:<span style="color: #000000;">aData</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span><br /><br /> oWnd:<span style="color: #000000;">oClient</span> := oGraph<br /> <br /> <span style="color: #B900B9;">//if MsgYesNo( "Print Graph", "Attention:" )</span><br /> <span style="color: #B900B9;">// Test1( oGraph )</span><br /> <span style="color: #B900B9;">//endif</span><br /><span style="color: #00C800;">RETURN</span> oGraph<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> TEST1<span style="color: #000000;">(</span> oGraph <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oPrn<br /><br /> PRNLANDSCAPE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Test"</span> PREVIEW<br /> <span style="color: #0000ff;">PAGE</span><br /> oGraph:<span style="color: #00C800;">Print</span><span style="color: #000000;">(</span> oPrn, <span style="color: #000000;">5</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">66</span>, <span style="color: #000000;">5</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">80</span>, <span style="color: #000000;">70</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">80</span>, <span style="color: #000000;">56</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">66</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ENDPAGE</span><br /> <span style="color: #0000ff;">ENDPRINT</span><br /><br /> PRNPORTRAIT<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /> </div>[/code:3ebh41be]
|
Bug in TGraph
|
This is the sample that doesn't work:
[code=fw:1hrkdgls]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> TEST<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> TEST<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oPrn, oGraph<br /><br /> PRNLANDSCAPE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Test"</span> PREVIEW<br /> <span style="color: #0000ff;">PAGE</span><br /> oGraph = TGraph<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oGraph:<span style="color: #000000;">lXGrid</span> = .T.<br /> oGraph:<span style="color: #000000;">lYGrid</span> = .T.<br /><br /> oGraph:<span style="color: #000000;">lDotted</span> = .F.<br /> oGraph:<span style="color: #000000;">lTitle</span> = .T.<br /> oGraph:<span style="color: #000000;">lLegends</span> = .F.<br /><br /> oGraph:<span style="color: #000000;">cTitle</span> = <span style="color: #ff0000;">"TEST"</span><br /><br /> oGraph:<span style="color: #000000;">nBarSep</span> = <span style="color: #000000;">100</span><br /><br /> oGraph:<span style="color: #000000;">lxVal</span> = .T.<br /> oGraph:<span style="color: #000000;">lViewVal</span> = .T.<br /><br /> oGraph:<span style="color: #000000;">cTitX</span> = <span style="color: #ff0000;">"TESTX"</span><br /> oGraph:<span style="color: #000000;">cTitY</span> = <span style="color: #ff0000;">"TESTY"</span><br /><br /> oGraph:<span style="color: #000000;">aSeries</span> = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">""</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">109</span>, <span style="color: #000000;">177</span>, <span style="color: #000000;">124</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">1</span>, .F. <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> oGraph:<span style="color: #000000;">aYVals</span> = <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> oGraph:<span style="color: #000000;">aData</span> = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> AADD<span style="color: #000000;">(</span> oGraph:<span style="color: #000000;">aYVals</span>, <span style="color: #ff0000;">"2016"</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> oGraph:<span style="color: #000000;">aData</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span><br /><br /> oGraph:<span style="color: #00C800;">Print</span><span style="color: #000000;">(</span> oPrn, <span style="color: #000000;">5</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">66</span>, <span style="color: #000000;">5</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">80</span>, <span style="color: #000000;">70</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">80</span>, <span style="color: #000000;">56</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">66</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ENDPAGE</span><br /> <span style="color: #0000ff;">ENDPRINT</span><br /><br /> PRNPORTRAIT<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:1hrkdgls]
EMG
|
Bug in TGraph
|
The error is in the line
[code=fw:3dmmdrkq]<div class="fw" id="{CB}" style="font-family: monospace;">::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span></div>[/code:3dmmdrkq]
inside the Print() method.
EMG
|
Bug in TGraph
|
Another problem in Paint() method:
::aSeries[nJ,5]
contains NIL.
EMG
|
Bug in TGraph
|
Works fine if
[code=fw:12faj0h4]<div class="fw" id="{CB}" style="font-family: monospace;">oGraph:<span style="color: #000000;">aSeries</span> = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">""</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">109</span>, <span style="color: #000000;">177</span>, <span style="color: #000000;">124</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">1</span>, .F. <span style="color: #000000;">}</span> <span style="color: #000000;">}</span></div>[/code:12faj0h4]
is replaced with
[code=fw:12faj0h4]<div class="fw" id="{CB}" style="font-family: monospace;">oGraph:<span style="color: #000000;">aSeries</span> = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">""</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">109</span>, <span style="color: #000000;">177</span>, <span style="color: #000000;">124</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">1</span>, .F., .T. <span style="color: #000000;">}</span> <span style="color: #000000;">}</span></div>[/code:12faj0h4]
It seems that the fifth item of aSeries lost its default value (previously it had one, don't know since which FWH release).
Anyway, problem solved for me. But a proper fix would be welcome. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TGraph
|
Enrico,
This aSeries error in fixed in FWH 16.08
thanks
|
Bug in TGraph
|
Thank you, master! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TGraph
|
Unfortunately is not fixed in 16.08. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
EMG
|
Bug in TGraph
|
Enrico,
Should I test the same example that you posted on this thread ?
It worked fine here
|
Bug in TGraph
|
This is the sample:
[code=fw:1258x0cq]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> TEST<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> TEST<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oPrn, oGraph<br /><br /> <span style="color: #00C800;">LOCAL</span> cTit := <span style="color: #ff0000;">"CLIENTI"</span><br /><br /> <span style="color: #00C800;">LOCAL</span> aDat := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">2016</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">LOCAL</span> i<br /><br /> PRNLANDSCAPE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Fatturato "</span> + LOWER<span style="color: #000000;">(</span> cTit <span style="color: #000000;">)</span> PREVIEW<br /> <span style="color: #0000ff;">PAGE</span><br /> oGraph = TGraph<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oGraph:<span style="color: #000000;">lXGrid</span> = .T.<br /> oGraph:<span style="color: #000000;">lYGrid</span> = .T.<br /><br /> oGraph:<span style="color: #000000;">lDotted</span> = .F.<br /> oGraph:<span style="color: #000000;">lTitle</span> = .T.<br /> oGraph:<span style="color: #000000;">lLegends</span> = .F.<br /><br /> oGraph:<span style="color: #000000;">cTitle</span> = <span style="color: #ff0000;">"FATTURATO "</span> + cTit<br /><br /> oGraph:<span style="color: #000000;">nBarSep</span> = <span style="color: #000000;">100</span><br /><br /> oGraph:<span style="color: #000000;">lxVal</span> = .T.<br /> oGraph:<span style="color: #000000;">lViewVal</span> = .T.<br /><br /> oGraph:<span style="color: #000000;">cTitX</span> = <span style="color: #ff0000;">"FATTURATO"</span><br /> oGraph:<span style="color: #000000;">cTitY</span> = <span style="color: #ff0000;">"ANNI"</span><br /><br /> oGraph:<span style="color: #000000;">aSeries</span> = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">""</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">109</span>, <span style="color: #000000;">177</span>, <span style="color: #000000;">124</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">1</span>, .F. <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> oGraph:<span style="color: #000000;">aYVals</span> = <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> oGraph:<span style="color: #000000;">aData</span> = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">FOR</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">(</span> aDat <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> oGraph:<span style="color: #000000;">aYVals</span>, LTRIM<span style="color: #000000;">(</span> STR<span style="color: #000000;">(</span> aDat<span style="color: #000000;">[</span> i, <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span> i > <span style="color: #000000;">1</span>, <span style="color: #ff0000;">" ("</span> + LTRIM<span style="color: #000000;">(</span> STR<span style="color: #000000;">(</span> aDat<span style="color: #000000;">[</span> i, <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">"%)"</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> oGraph:<span style="color: #000000;">aData</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>, aDat<span style="color: #000000;">[</span> i, <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">NEXT</span><br /><br /> oGraph:<span style="color: #00C800;">Print</span><span style="color: #000000;">(</span> oPrn, <span style="color: #000000;">5</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">66</span>, <span style="color: #000000;">5</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">80</span>, <span style="color: #000000;">70</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">80</span>, <span style="color: #000000;">56</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">66</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ENDPAGE</span><br /> <span style="color: #0000ff;">ENDPRINT</span><br /><br /> PRNPORTRAIT<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:1258x0cq]
This is the error:
[code=fw:1258x0cq]<div class="fw" id="{CB}" style="font-family: monospace;">Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1087</span> Argument error: --</div>[/code:1258x0cq]
EMG
|
Bug in TGraph
|
Enrico, for use also with Dialogs, please try with
[code=fw:34cy72zg]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">Print</span><span style="color: #000000;">(</span> oPrn, nTop, nLeft, nWidth, nHeight <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TGraph<br /><br /> <span style="color: #00C800;">LOCAL</span> nRight, nBottom, nI, nResV<br /> <span style="color: #00C800;">LOCAL</span> cOldBitmap:= ::<span style="color: #000000;">cBitmap</span><br /> <span style="color: #00C800;">LOCAL</span> aOldF := <span style="color: #000000;">{</span> oClone<span style="color: #000000;">(</span> ::<span style="color: #000000;">aFont</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, oClone<span style="color: #000000;">(</span> ::<span style="color: #000000;">aFont</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, ;<br /> oClone<span style="color: #000000;">(</span> ::<span style="color: #000000;">aFont</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, oClone<span style="color: #000000;">(</span> ::<span style="color: #000000;">aFont</span><span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, ;<br /> oClone<span style="color: #000000;">(</span> ::<span style="color: #000000;">aFont</span><span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, oClone<span style="color: #000000;">(</span> ::<span style="color: #000000;">aFont</span><span style="color: #000000;">[</span><span style="color: #000000;">6</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, ;<br /> oClone<span style="color: #000000;">(</span> ::<span style="color: #000000;">aFont</span><span style="color: #000000;">[</span><span style="color: #000000;">7</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, oClone<span style="color: #000000;">(</span> ::<span style="color: #000000;">aFont</span><span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, ;<br /> oClone<span style="color: #000000;">(</span> ::<span style="color: #000000;">aFont</span><span style="color: #000000;">[</span><span style="color: #000000;">9</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> ::<span style="color: #000000;">oPrn</span> := oPrn<br /> ::<span style="color: #000000;">nTRight</span> := <span style="color: #000000;">1</span><br /> ::<span style="color: #000000;">nTLeft</span> := <span style="color: #000000;">0</span><br /> ::<span style="color: #000000;">nTCent</span> := <span style="color: #000000;">2</span><br /> ::<span style="color: #000000;">cBitmap</span> := <span style="color: #ff0000;">" "</span><br /><br /> nRight := nLeft + nWidth<br /> nBottom := nTop + nHeight<br /><br /> <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">hDC</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Add this</span><br /> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span> <span style="color: #B900B9;">// Add this</span><br /><br /><br /><br /> </div>[/code:34cy72zg]
|
Bug in TGraph
|
Thank you. Can you send me the new lib please?
EMG
|
Bug in TIcon
|
This is the sample:
[code:2uo6nd3f]#include "Fivewin.ch"
#define IDI_QUESTION MAKEINTRESOURCE( 32514 )
FUNCTION MAIN()
LOCAL oDlg, oIcon
DEFINE DIALOG oDlg;
COLOR CLR_BLACK, CLR_CYAN
@ 1, 1 ICON oIcon OF oDlg
ACTIVATE DIALOG oDlg;
ON INIT oIcon:hIcon := LOADICON( 0, IDI_QUESTION );
CENTER
RETURN NIL[/code:2uo6nd3f]
The offending code seems to be
METHOD EraseBkGnd() VIRTUAL // for transparency on dialogs
from icon.prg.
EMG
|
Bug in TIcon
|
I forgot to describe the problem: the sample shows a square of different color around the icon.
EMG
|
Bug in TIcon
|
Enrico,
have you tried to assign it a "NULL" brush ?
|
Bug in TIcon
|
How?
EMG
|
Bug in TIcon
|
[quote="EnricoMaria":119sl56g]How?[/quote:119sl56g]
[code:119sl56g]
ACTIVATE DIALOG oDlg;
ON INIT ( oIcon:hIcon := LOADICON( 0, IDI_QUESTION ),;
oIcon:SetBrush( TBrush():New( "NULL" ) ) ) ;
CENTER[/code:119sl56g]
|
Bug in TIcon
|
Sorry, no change:
[code:2u1x1qux]#include "Fivewin.ch"
#define IDI_QUESTION MAKEINTRESOURCE( 32514 )
FUNCTION MAIN()
LOCAL oDlg, oIcon
DEFINE DIALOG oDlg;
COLOR CLR_BLACK, CLR_CYAN
@ 1, 1 ICON oIcon OF oDlg
ACTIVATE DIALOG oDlg;
ON INIT ( oIcon:hIcon := LOADICON( 0, IDI_QUESTION ),;
oIcon:SetBrush( TBrush():New( "NULL" ) ) );
CENTER
RETURN NIL[/code:2u1x1qux]
EMG
|
Bug in TIcon
|
Enrico,
I assume you are using XP and themes enabled, right ?
|
Bug in TIcon
|
Yes.
EMG
|
Bug in TImageList
|
Hi,
I don't think that oIcon should be in inverted comma's <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Alex
METHOD AddIcon( oIcon ) CLASS TImageList
local oIco
if ValType( oIcon ) == "C"
[b:50phbd14] if File( "oIcon" )[/b:50phbd14]
DEFINE ICON oIco FILENAME oIcon
else
DEFINE ICON oIco RESOURCE oIcon
endif
else
oIco = oIcon
endif
return ILAddIcon( ::hImageList, oIco:hIcon )
|
Bug in TImageList
|
Alex,
Fixed, thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in TMail [Fixed]
|
In TMail, method Activate, there is
[code=fw:16cdii9u]<div class="fw" id="{CB}" style="font-family: monospace;">cCurPath = CurDrive<span style="color: #000000;">(</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">":<span style="color: #000000;">\"</span> + CurDir()</span></div>[/code:16cdii9u]
But this doesn't work when the current path is a network one (ie. \\myserver\myfolder).
EMG
|
Bug in TMail [Fixed]
|
How to retrieve the current path when it is a network one ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in TMail [Fixed]
|
Enrico
This code is not especially elegant .. and it assumes the .exe is located in the drive or unc you wish to resolve.
Rick Lipkin
[code=fw:xnqwhn56]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// where .exe started from is default directory //</span><br /><br />cFILE := GetModuleFileName<span style="color: #000000;">(</span> GetInstance<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br />nSTART := RAT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"<span style="color: #000000;">\"</span>, cFILE )<br />cDEFA := SUBSTR(cFILE,1,nSTART-1)<br /><br />SET DEFA to ( cDEFA )<br /></span></div>[/code:xnqwhn56]
|
Bug in TMail [Fixed]
|
[quote="Antonio Linares":14unokhb]How to retrieve the current path when it is a network one ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:14unokhb]
Something like:
[code=fw:14unokhb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">IF</span> CurDrive<span style="color: #000000;">(</span><span style="color: #000000;">)</span> = <span style="color: #ff0000;">"<span style="color: #000000;">\"</span><br /> cCurPath = CurDir()<br />ELSE<br /> cCurPath = CurDrive() + "</span>:\<span style="color: #ff0000;">" + CurDir()<br />ENDIF</span></div>[/code:14unokhb]
EMG
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.