topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
Bug in FolderEx ...
|
[quote="Antonio Linares":2kpnm2ip]Rimantas,
Does it look wrong in TFolderEx ? Or you simply get nothing ?[/quote:2kpnm2ip]
Antonio ,
It looks wrong in TFolderEx and only when FolDerEx is placed on Dialog . When placing FolderEx on windows then is working fine .
[code=fw:2kpnm2ip]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oWnd, oFld<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TFolderex - DIALOG -"</span><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span> FOLDEREX oFld <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ADJUST</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&OS"</span>, <span style="color: #ff0000;">"&Žaidimai"</span>, <span style="color: #ff0000;">"&Movies"</span>, <span style="color: #ff0000;">"&?sai"</span><br /><br /> @ <span style="color: #000000;">1</span>,<span style="color: #000000;">3</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"UNDER CONSTRUCTION"</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> TRANSPARENT<br /> @ <span style="color: #000000;">40</span>,<span style="color: #000000;">50</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Linksm? Kal?d?! Lithuanian chars - ?????š??ž - "</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">PIXEL</span> TRANSPARENT<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oWnd<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:2kpnm2ip]
Compile this sample in fwh\samples directory with buildg.bat . I'm not seeing lithuanian chars ... Daniel did sample - he is seeing ... Can't understand where is problem ... After discusion with Daniel I was thinking that maybe source code - did all variants with notepad ( Save As , Encoding types ) . No good results ... <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
|
Bug in FolderEx ...
|
Rimantas,
Here it looks fine:
[img:2qjg0ojz]http://img716.imageshack.us/img716/5290/capturestb.png[/img:2qjg0ojz]
We need to find a way to reproduce what you get there...
|
Bug in FolderEx ...
|
[quote="Antonio Linares":1cge6hpg]Rimantas,
Here it looks fine:
We need to find a way to reproduce what you get there...[/quote:1cge6hpg]
It make me crazy ...
Antonio , can you say how to did sample with DrawTextW() on folder tab ? Can't to make this ... Maybe here is the problem ?
|
Bug in FolderEx ...
|
[quote="Antonio Linares":26s9ezct]Rimantas,
Here it looks fine:
We need to find a way to reproduce what you get there...[/quote:26s9ezct]
Antonio - request ... Can you change line with SAY and then try ?
[code=fw:26s9ezct]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> @ <span style="color: #000000;">40</span>,<span style="color: #000000;">50</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Linksm? Kal?d?! Lithuanian chars - ?????š??ž - "</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">PIXEL</span> TRANSPARENT<br /> </div>[/code:26s9ezct]
Regards !
|
Bug in FolderEx ...
|
Hi to all ! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
It seems that I solved this problem with FolderEx ... If you remember , some times ago I wrote a message , that can't see nationals chars in VistaMenu . Then I directed font "Times New Roman Baltic" and then national chars appears . So I did the same with folderEx on dialogs :
[code=fw:1nog0u0l]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><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 /> <span style="color: #00C800;">local</span> oWnd<br /> <span style="color: #00C800;">local</span> oFld<br /> <span style="color: #00C800;">local</span> oFont<br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Times New Roman Baltic"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TFolderex - DIALOG -"</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span> FOLDEREX oFld <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ADJUST</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Žaidimai"</span>, <span style="color: #ff0000;">"Lietuviškai"</span>, <span style="color: #ff0000;">"?????š??ž"</span><br /><br /> @ <span style="color: #000000;">1</span>,<span style="color: #000000;">3</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"UNDER CONSTRUCTION"</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> TRANSPARENT<br /> @ <span style="color: #000000;">40</span>,<span style="color: #000000;">50</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Linksm? Kal?d? !"</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">PIXEL</span> TRANSPARENT<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oWnd<br /><br /> oFont:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:1nog0u0l]
Now I can see national chars in prompts and folder tab ... But ... The choice of fonts with "Baltic" is minimal ... And second question - why it's not working with font of system ? And in some places - vistaMenu , FolderEx on dialogs ? If you remember - nationals chars works fine on standard folders in both cases , windows and dialogs ...
With best regards !
|
Bug in FolderEx ...
|
Rimantas,
Great news! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
I don't know the reason but I am happy that at least you have a way to use it.
|
Bug in FolderEx ...
|
[quote="Antonio Linares":3o7l56fc]Rimantas,
Great news! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
I don't know the reason but I am happy that at least you have a way to use it.[/quote:3o7l56fc]
Thanks Antonio . But it will more pleasure if you can answer to my questions ... <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> . In my opinion , something is wrong here ...
Regards !
|
Bug in FolderEx ...
|
Rimantas,
I think that it has to be related with the unicode, maybe only some fonts use it.
Anyhow we have not finished the support for unicode, once we finish it I am sure we will have more answers <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in GDIP_IMAGEFROMFILE()?
|
The following sample freezes for some seconds and then terminates. It should return zero instead.
[code=fw:ik11doqx]<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 />EXTERNAL GDIBMP<br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> ? GDIP_IMAGEFROMFILE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"NOTEXIST.JPG"</span>, .T. <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:ik11doqx]
EMG
|
Bug in GDIP_IMAGEFROMFILE()?
|
Creo que no se inicializa el sistema gdi+ con esa function ( GDIP_IMAGEFROMFILE() es a nages function <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> y no podria decirlo con seguridad )
Mira asi :
#include "Fivewin.ch"
EXTERNAL GDIBMP
FUNCTION MAIN()
GDIPLUSSTARTUP() // inicialice gdi+
? GDIP_IMAGEFROMFILE( "NOTEXIST.JPG", .T. )
RETURN NIL
|
Bug in GDIP_IMAGEFROMFILE()?
|
Sorry, same result. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
EMG
|
Bug in GDIP_IMAGEFROMFILE()?
|
Enrico :
This sample is ok for me , msginfo() return 36514824 ( hbitmap )
#include "FiveWin.ch"
function Main()
local ogdi:= Gdibmp():new("..\gifs\halo.gif")
msginfo( GDIP_IMAGEFROMFILE( "..\gifs\halo.gif", .T. ) )
return nil
GDIP_IMAGEFROMFILE() no mira si existe o no la imagen , por lo que falla .
seria mejor ...
if file("..\gifs\halo.gif" )
msginfo( GDIP_IMAGEFROMFILE( "..\gifs\halo.gif", .T. ) )
endif
|
Bug in GDIP_IMAGEFROMFILE()?
|
[quote="mastintin":2tq6lqi5]GDIP_IMAGEFROMFILE() no mira si existe o no la imagen , por lo que falla .[/quote:2tq6lqi5]
Exactly what I'm saying: it's a bug. It should check if the open operation has succeded
[code=fw:2tq6lqi5]<div class="fw" id="{CB}" style="font-family: monospace;">FILE * hFile = fopen <span style="color: #000000;">(</span> hb_parc<span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span> , <span style="color: #ff0000;">"rb"</span> <span style="color: #000000;">)</span> ;</div>[/code:2tq6lqi5]
and return 0 if not.
EMG
|
Bug in GET
|
Hello all!
I found a bug in get. When a picture template "@R" and the clausula ON CHANGE is used then came when i leave the get with TAB a error-message from get:untransform()! When i leave the get with ENTER then it is ok.
|
Bug in GET
|
Please provide a small and self contained PRG to reproduce the bug, thanks
|
Bug in GET
|
Mr. Linares
I send you to your Email an EXE for this error to show.
|
Bug in GET
|
Please send me the source code of the sample as a ZIP file, thanks.
|
Bug in GRADIENT clause
|
In the following sample you can see that labels on gradient background are not transparent anymore:
[code=fw:2jk71p04]<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 /> GRADIENT ACLRGRAD<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"This is a test"</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 /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> ACLRGRAD<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">216</span>, <span style="color: #000000;">230</span>, <span style="color: #000000;">238</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">103</span>, <span style="color: #000000;">154</span>, <span style="color: #000000;">194</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span></div>[/code:2jk71p04]
EMG
|
Bug in GRADIENT clause
|
Any news?
EMG
|
Bug in GRADIENT clause
|
Enrico,
Please try it this way:
DEFINE DIALOG oDlg TRANSPARENT ;
GRADIENT ACLRGRAD()
|
Bug in GRADIENT clause
|
Tried. No change, sorry. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
EMG
|
Bug in GRADIENT clause
|
Any ideas on how to fix this problem?
EMG
|
Bug in GRADIENT clause
|
Enrico
i did some changes in SVN please try again... and test with other samples.
thanks for feedback
|
Bug in GRADIENT clause
|
Daniel,
Thanks, I am busy these days following a project, almost done <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in GRADIENT clause
|
Any ideas on how to fix this problem?
|
Bug in GRADIENT clause
|
Dear Fgondi,
If you using Borland Resource , you must select simple text and it will transparent
Don't forget to redefine say for it simple text
regards,
kok
|
Bug in GRADIENT clause
|
Antonio ,
is possible update to FW 11.12 ?
Regards Maurizio
|
Bug in GRADIENT clause
|
Maurizio,
In a few days we will publish FWH 12.01, in the meantime if someone needs this fix please email me specifying Harbour or xHarbour and C compiler and we will send the modified libraries, thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
En pocos dias publicaremos FWH 12.01, mientras tanto si alguien necesita este arreglo por favor envíenme un email indicando Harbour ó xHarbour y el compilador de C usado y le enviaremos las librerias modificadas, gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in GRADIENT clause
|
Antonio ,
is possible in FW 12.01 have the setup of HArbour and xHArbour in the same page of FW ( as before of FWH 11.12 ) ?
Regards MAurizio
|
Bug in GRADIENT clause
|
Maurizio,
Yes, no problem to do it that way <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in GradientFill()?
|
In the following sample you will see that there is something strange in how GradientFill() paint the gradient when nPos is greater than 0.5:
[code=fw:uzqd09jf]<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, oSay<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;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">""</span>;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</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;">"Test"</span>;<br /> <span style="color: #0000ff;">ACTION</span> TEST<span style="color: #000000;">(</span> oSay <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 /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> TEST<span style="color: #000000;">(</span> oSay <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> i, j<br /><br /> <span style="color: #00C800;">FOR</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span><br /> <span style="color: #00C800;">FOR</span> j = <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span><br /> GRADIENTFILL<span style="color: #000000;">(</span> oSay:<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oSay:<span style="color: #000000;">nHeight</span>, oSay:<span style="color: #000000;">nWidth</span>, ACLRGRAD<span style="color: #000000;">(</span> j <span style="color: #000000;">)</span>, .F. <span style="color: #000000;">)</span><br /><br /> oSay:<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> INKEY<span style="color: #000000;">(</span> <span style="color: #000000;">0.01</span> <span style="color: #000000;">)</span><br /><br /> SYSREFRESH<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">NEXT</span><br /> <span style="color: #00C800;">NEXT</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00D7D7;">#define</span> CLRSTA RGB<span style="color: #000000;">(</span> <span style="color: #000000;">4</span>, <span style="color: #000000;">210</span>, <span style="color: #000000;">10</span> <span style="color: #000000;">)</span><br /><span style="color: #00D7D7;">#define</span> CLREND RGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> ACLRGRAD<span style="color: #000000;">(</span> nPos <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> aClr<br /><br /> <span style="color: #00C800;">IF</span> nPos = <span style="color: #000000;">0</span><br /> aClr = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, CLREND, CLRSTA <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> ELSEIF nPos = <span style="color: #000000;">100</span><br /> aClr = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, CLRSTA, CLREND <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">ELSE</span><br /> aClr = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> nPos / <span style="color: #000000;">100</span>, CLRSTA, CLREND <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">(</span> <span style="color: #000000;">100</span> - nPos <span style="color: #000000;">)</span> / <span style="color: #000000;">100</span>, CLREND, CLRSTA <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">RETURN</span> aClr</div>[/code:uzqd09jf]
EMG
|
Bug in GradientFill()?
|
Hello Enrico...
i made some change in TProgress class, maybe is very usefull for you in this case
this a sample:
[url:1ve4b2ee]http://www.sitasoft.com/fivewin/test/progres2.zip[/url:1ve4b2ee]
[code=fw:1ve4b2ee]<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, oProg1, oProg2<br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Progress Bars"</span><br /> <br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">PROGRESS</span> oProg1 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">12</span> MARQUEE<br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PROGRESS</span> oProg2 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">12</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">VERTICAL</span> <br /> <br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">9</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Ok"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oProg1:<span style="color: #000000;">SetMarquee</span><span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span>, Increase<span style="color: #000000;">(</span> oProg1, oProg2 <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /> oDlg:<span style="color: #000000;">bStart</span> = <span style="color: #000000;">{</span> || Increase<span style="color: #000000;">(</span> oProg1, oProg2 <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 <span style="color: #0000ff;">CENTER</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> oProg1:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span>, oProg1:<span style="color: #000000;">SetStep</span><span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>,;<br /> oProg2:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span>, oProg2:<span style="color: #000000;">SetStep</span><span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <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: #00C800;">function</span> Increase<span style="color: #000000;">(</span> oProg1, oProg2 <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> n<br /><br /> <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">111</span><br /> <span style="color: #B900B9;">// oProg1:StepIt()</span><br /> <span style="color: #B900B9;">// oProg2:StepIt()</span><br /> oProg1:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> n <span style="color: #000000;">)</span><br /> oProg2:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> n <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> n = <span style="color: #000000;">55</span> <br /> oProg1:<span style="color: #000000;">SetMarquee</span><span style="color: #000000;">(</span> .F. <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #0000ff;">Sleep</span><span style="color: #000000;">(</span> <span style="color: #000000;">50</span> <span style="color: #000000;">)</span><br /> SysRefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> </div>[/code:1ve4b2ee]
i will explain for other user too
[b:1ve4b2ee]open file:[/b:1ve4b2ee] TProgress.prg
[b:1ve4b2ee]after [/b:1ve4b2ee]
[code=fw:1ve4b2ee]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> PBM_GETPOS <span style="color: #000000;">1032</span></div>[/code:1ve4b2ee]
[b:1ve4b2ee]add[/b:1ve4b2ee]
[code=fw:1ve4b2ee]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> PBM_SETMARQUEE <span style="color: #000000;">1034</span></div>[/code:1ve4b2ee]
[b:1ve4b2ee]add new method[/b:1ve4b2ee]
[code=fw:1ve4b2ee]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> SetMarquee<span style="color: #000000;">(</span> lOnOff <span style="color: #000000;">)</span> <span style="color: #00C800;">INLINE</span> __ChangeStyleWindow<span style="color: #000000;">(</span> ::<span style="color: #000000;">hWnd</span>, PBM_SETMARQUEE, , lOnOff <span style="color: #000000;">)</span></div>[/code:1ve4b2ee]
[color=#FF0040:1ve4b2ee]the function __ChangeStyleWindow is same provided by: Hernan Diego Ceccarelli ( <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=93212#p93212">viewtopic.php?p=93212#p93212</a><!-- l --> ) thank Hernan[/color:1ve4b2ee]
[b:1ve4b2ee]Add new parameter METHOD New[/b:1ve4b2ee]
[b:1ve4b2ee]lMarquee[/b:1ve4b2ee]
[code=fw:1ve4b2ee]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">(</span> nTop, nLeft, oWnd, nPos, nClrFore, nClrBack, lPixel,;<br /> lDesign, nWidth, nHeight, cMsg, lVertical, lMarquee <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TProgress</div>[/code:1ve4b2ee]
[b:1ve4b2ee]locate in METHOD New[/b:1ve4b2ee]
[code=fw:1ve4b2ee]<div class="fw" id="{CB}" style="font-family: monospace;"> nPos := <span style="color: #000000;">0</span>, lVertical := .f.</div>[/code:1ve4b2ee]
[b:1ve4b2ee]replace with [/b:1ve4b2ee]
[code=fw:1ve4b2ee]<div class="fw" id="{CB}" style="font-family: monospace;"> nPos := <span style="color: #000000;">0</span>, lVertical := .f.,;<br /> lMarquee := .F.</div>[/code:1ve4b2ee]
[b:1ve4b2ee]locate in METHOD New[/b:1ve4b2ee]
[code=fw:1ve4b2ee]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">nStyle</span> = nOR<span style="color: #000000;">(</span> WS_CHILD, WS_VISIBLE,;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lDesign, WS_CLIPSIBLINGS, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>,;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lVertical, PBS_VERTICAL, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>, WS_TABSTOP <span style="color: #000000;">)</span></div>[/code:1ve4b2ee]
[b:1ve4b2ee]replace with [/b:1ve4b2ee]
[code=fw:1ve4b2ee]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">nStyle</span> = nOR<span style="color: #000000;">(</span> WS_CHILD, WS_VISIBLE,;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lDesign, WS_CLIPSIBLINGS, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>,;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lVertical, PBS_VERTICAL, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>, WS_TABSTOP,;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lMarquee, PBM_SETMARQUEE, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:1ve4b2ee]
[b:1ve4b2ee]Open file fivewin.ch[/b:1ve4b2ee]
[b:1ve4b2ee]locate and replace @ nRow, nCol PROGRESS command with[/b:1ve4b2ee]
[code=fw:1ve4b2ee]<div class="fw" id="{CB}" style="font-family: monospace;">#xcommand @ <nRow>, <nCol> <span style="color: #0000ff;">PROGRESS</span> <oPrg> ;<br /> <span style="color: #000000;">[</span> <of: <span style="color: #0000ff;">OF</span>, <span style="color: #0000ff;">WINDOW</span>, DIALOG> <oWnd> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <pos: <span style="color: #000000;">POS</span>, POSITION> <nPos> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">COLOR</span> <nClrFore> <span style="color: #000000;">[</span>,<nClrBack><span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <pixel: <span style="color: #000000;">PIXEL</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <design: <span style="color: #000000;">DESIGN</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">SIZE</span> <nWidth>, <nHeight> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">MESSAGE</span> <cMsg> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <vert: <span style="color: #000000;">VERTICAL</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lMar: <span style="color: #000000;">MARQUEE</span>> <span style="color: #000000;">]</span>;<br /> => ;<br /> <oPrg> := TProgress<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <nRow>, <nCol>, <oWnd>, <span style="color: #000000;">[</span><nPos><span style="color: #000000;">]</span>,;<br /> <nClrFore>, <nClrBack>, <.<span style="color: #0000ff;">pixel</span>.>, <.design.>,;<br /> <nWidth>, <nHeight>, <cMsg>, <.vert.>, <.lMar.> <span style="color: #000000;">)</span></div>[/code:1ve4b2ee]
|
Bug in GradientFill()?
|
Hello Enrico
yes, is a Gradient function bug, now is solved
the problem come when the difference between top, bottom or left, right is over 100 and first gradient is over 50%
please test now the sample with the bug fixed
[url:37lcckfg]http://www.sitasoft.com/fivewin/test/grafill1.zip[/url:37lcckfg]
|
Bug in GradientFill()?
|
Thank you. Can you show the fix to GradientFill(), please?
EMG
|
Bug in GradientFill()?
|
Ok, no problem. I can wait for the next FWH build.
EMG
|
Bug in GradientFill()?
|
Enrico, did you tested tprogress change posted here??
|
Bug in GradientFill()?
|
Hello enrico...
so sorry, i cant show the fix, because gradient is a fivewin internal function
|
Bug in GradientFill()?
|
I tested your EXE and it's fine and very nice, thank you.
EMG
|
Bug in GradientFill()?
|
Dear Mr.Daniel & Mr.EMG,
Do this TProgress fix solves the problem in Vista & Windows 7 when used along with the .Manifest file ?.
Regards
Anser
|
Bug in GradientFill()?
|
Hello Anserkk
sorry, no, it only a new feature to tprogress class
|
Bug in GradientFill()?
|
[quote:10caosrl]sorry, no, it only a new feature to tprogress class[/quote:10caosrl]
Ok. Thank you for the information.
Regards
Anser
|
Bug in GradientFill()?
|
Hello Daniel,
does Your change in GradientFill solve this Problem as well ?
It is the same Result like in Enrico's example.
[img:1u86quer]http://www.pflegeplus.com/pictures/grad1.jpg[/img:1u86quer]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Bug in GradientFill()?
|
Hello Uwe...
i think yes... <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
|
Bug in GradientFill()?
|
Hello Uwe.
it is a sample
[code=fw:30trdcv1]<div class="fw" id="{CB}" style="font-family: monospace;"><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> oDlg, oSay<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">size</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">CENTER</span>;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> GradientFill<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oDlg:<span style="color: #000000;">nHeight</span>, oDlg:<span style="color: #000000;">nWidth</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">8388608</span>,<span style="color: #000000;">16117445</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16117445</span>, <span style="color: #000000;">8388608</span> <span style="color: #000000;">}</span> <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 /> </div>[/code:30trdcv1]
[img:30trdcv1]http://www.sitasoft.com/fivewin/screen/gard1.png[/img:30trdcv1]
|
Bug in GradientFill()?
|
One more bug. This sample GPFs because nSegments is zero (in Gradient()). That's because nSlice is a fractional number smaller than 1 (in GradientFill()):
[code=fw:3k36dtmx]<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, oSay<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;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">""</span>;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">20</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;">"Test"</span>;<br /> <span style="color: #0000ff;">ACTION</span> TEST<span style="color: #000000;">(</span> oSay <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 /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> TEST<span style="color: #000000;">(</span> oSay <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> i, j<br /><br /> <span style="color: #00C800;">FOR</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span><br /> <span style="color: #00C800;">FOR</span> j = <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span><br /> GRADIENTFILL<span style="color: #000000;">(</span> oSay:<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oSay:<span style="color: #000000;">nHeight</span>, oSay:<span style="color: #000000;">nWidth</span>, ACLRGRAD<span style="color: #000000;">(</span> j <span style="color: #000000;">)</span>, .F. <span style="color: #000000;">)</span><br /><br /> oSay:<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> INKEY<span style="color: #000000;">(</span> <span style="color: #000000;">0.01</span> <span style="color: #000000;">)</span><br /><br /> SYSREFRESH<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">NEXT</span><br /> <span style="color: #00C800;">NEXT</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00D7D7;">#define</span> CLRSTA RGB<span style="color: #000000;">(</span> <span style="color: #000000;">4</span>, <span style="color: #000000;">210</span>, <span style="color: #000000;">10</span> <span style="color: #000000;">)</span><br /><span style="color: #00D7D7;">#define</span> CLREND RGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> ACLRGRAD<span style="color: #000000;">(</span> nPos <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> aClr<br /><br /> <span style="color: #00C800;">IF</span> nPos = <span style="color: #000000;">0</span><br /> aClr = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, CLREND, CLRSTA <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> ELSEIF nPos = <span style="color: #000000;">100</span><br /> aClr = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, CLRSTA, CLREND <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">ELSE</span><br /> aClr = <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> nPos / <span style="color: #000000;">100</span>, CLRSTA, CLREND <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">(</span> <span style="color: #000000;">100</span> - nPos <span style="color: #000000;">)</span> / <span style="color: #000000;">100</span>, CLREND, CLRSTA <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">RETURN</span> aClr</div>[/code:3k36dtmx]
EMG
|
Bug in GradientFill()?
|
Enrico..
is fixed
|
Bug in GradientFill()?
|
Hello Daniel,
is it possible, to include / add in VTitles a Selection for the Gradient-Direction .T. / .F. in GradientFill ?
Class TTitle Lines :
616 else
617 GradientFill( ::hDC, aRect[ 1 ], aRect[ 2 ], aRect[ 3 ], aRect[ 4 ], ::aGrdBack ) // [color=#FF0000:2ayxwwdv].T. or .F.[/color:2ayxwwdv]
618 endif
Do You still remember to add the ToolTips for the BMP's, I asked for ?
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Bug in GradientFill()?
|
[quote="Daniel Garcia-Gil":3w1ehxqg]Enrico..
is fixed[/quote:3w1ehxqg]
Thank you!
EMG
|
Bug in Harbour ATAIL() [False report]
|
This is a sample of the problem:
[code=fw:1z3205cd]<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> aArray<span style="color: #000000;">[</span> <span style="color: #000000;">10</span> <span style="color: #000000;">]</span><br /><br /> ATAIL<span style="color: #000000;">(</span> aArray <span style="color: #000000;">)</span> = <span style="color: #000000;">123</span><br /><br /> ? aArray<span style="color: #000000;">[</span> <span style="color: #000000;">10</span> <span style="color: #000000;">]</span><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></div>[/code:1z3205cd]
I get
[code=fw:1z3205cd]<div class="fw" id="{CB}" style="font-family: monospace;">Harbour <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">(</span>r2104281802<span style="color: #000000;">)</span><br />Copyright <span style="color: #000000;">(</span>c<span style="color: #000000;">)</span> <span style="color: #000000;">1999</span><span style="color: #000000;">-2021</span>, https:<span style="color: #B900B9;">//harbour.github.io/</span><br />BUG.prg<span style="color: #000000;">(</span><span style="color: #000000;">5</span><span style="color: #000000;">)</span> Error E0022 Invalid lvalue <span style="color: #ff0000;">'()'</span><br /><span style="color: #000000;">1</span> error</div>[/code:1z3205cd]
EMG
|
Bug in Harbour ATAIL() [False report]
|
Dear Enrico,
You can not assign a value to a value, so it seems as the error is correct. It is like doing:
nil = nil
Anyhow, if the returned value is an object with a redefined "=" or ":=" operator, then it should accept it
|
Bug in Harbour ATAIL() [False report]
|
From Clipper docs:
[quote:6zjxdd0b] ATAIL()
Return the highest numbered element of an array
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Syntax
ATAIL(<aArray>) --> Element
Arguments
<aArray> is the array.
Returns
ATAIL() returns either a value or a reference to an array or object.
The array is not changed.
Description
ATAIL() is an array function that returns the highest numbered element
of an array. It can be used in applications as shorthand for
<aArray>[LEN(<aArray>)] when you need to obtain the last element of an
array.
Examples
þ The following example creates a literal array and returns that
last element of the array:
aArray := {"a", "b", "c", "d"}
? ATAIL(aArray) // Result: d
Files: Library is CLIPPER.LIB.[/quote:6zjxdd0b]
So it should be perfectly legal to use
[code=fw:6zjxdd0b]<div class="fw" id="{CB}" style="font-family: monospace;">ATAIL<span style="color: #000000;">(</span> aArray <span style="color: #000000;">)</span> = xValue</div>[/code:6zjxdd0b]
just like you can use
[code=fw:6zjxdd0b]<div class="fw" id="{CB}" style="font-family: monospace;">aArray<span style="color: #000000;">[</span>LEN<span style="color: #000000;">(</span>aArray<span style="color: #000000;">)</span><span style="color: #000000;">]</span> = xValue</div>[/code:6zjxdd0b]
EMG
|
Bug in Harbour ATAIL() [False report]
|
I forgot to mention that this works fine using xHarbour:
[code=fw:rxduwckx]<div class="fw" id="{CB}" style="font-family: monospace;">ATAIL<span style="color: #000000;">(</span> aArray <span style="color: #000000;">)</span> = xValue</div>[/code:rxduwckx]
EMG
|
Bug in Harbour ATAIL() [False report]
|
Dear Enrico,
Harbour and xHarbour source code for ATail() are the same, so we need to keep searching where the difference comes from.
I would say that the compiler parser does not allows it, so we need to modify Harbour syntax rules.
You should report this Harbour bug on Google groups Harbour developers and the group will decide
thank you
|
Bug in Harbour ATAIL() [False report]
|
Sorry, I'm not following Harbour development. I don't even know if this bug has been corrected in the latest version.
EMG
|
Bug in Harbour ATAIL() [False report]
|
It has not been corrected as lastest commit was on Apr 28, 2021:
[url:3i96k0m6]https://github.com/harbour/core/commits/master[/url:3i96k0m6]
|
Bug in Harbour ATAIL() [False report]
|
Dear Enrico,
I just reported it into the Harbour's developers group:
[url:9sfbe851]https://groups.google.com/g/harbour-devel/c/ZPvgH-Lt1sY/m/w5z0BUQSAgAJ[/url:9sfbe851]
many thanks for your great feedback
|
Bug in Harbour ATAIL() [False report]
|
Thank you.
EMG
|
Bug in Harbour ATAIL() [False report]
|
Dear Enrico,
There are already four answers in the conversation, please review them
|
Bug in Harbour ATAIL() [False report]
|
Unfortunately, I can't test it with Clipper. Can you?
EMG
|
Bug in Harbour ATAIL() [False report]
|
Tried with Clipper: same error. Ok, I'm going to change my source code...
EMG
|
Bug in Harbour Descend()
|
This is a sample of the problem:
[code=fw:2b45cw42]<div class="fw" id="{CB}" style="font-family: monospace;">REQUEST HB_CODEPAGE_ITWIN<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> aData<span style="color: #000000;">[</span> <span style="color: #000000;">7</span> <span style="color: #000000;">]</span><br /><br /> <span style="color: #00C800;">LOCAL</span> i<br /><br /> HB_SETCODEPAGE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ITWIN"</span> <span style="color: #000000;">)</span><br /><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST1"</span>, <span style="color: #000000;">3107.77</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST2"</span>, <span style="color: #000000;">852.07</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST3"</span>, <span style="color: #000000;">191.00</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">4</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST4"</span>, <span style="color: #000000;">148.68</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">5</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST5"</span>, <span style="color: #000000;">44.73</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">6</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST6"</span>, <span style="color: #000000;">15.24</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">7</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST7"</span>, <span style="color: #000000;">255.65</span> <span style="color: #000000;">}</span><br /><br /> ASORT<span style="color: #000000;">(</span> aData, , , <span style="color: #000000;">{</span> | aItem1, aItem2 | Descend<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> aItem1<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + aItem1<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> < Descend<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> aItem2<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + aItem2<span style="color: #000000;">[</span> <span style="color: #000000;">1</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> aData <span style="color: #000000;">)</span><br /> ? aData<span style="color: #000000;">[</span> i, <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>, aData<span style="color: #000000;">[</span> i, <span style="color: #000000;">2</span> <span style="color: #000000;">]</span><br /> <span style="color: #00C800;">NEXT</span><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></div>[/code:2b45cw42]
Result:
[code=fw:2b45cw42]<div class="fw" id="{CB}" style="font-family: monospace;">TEST1 <span style="color: #000000;">3107.77</span><br />TEST2 <span style="color: #000000;">852.07</span><br />TEST5 <span style="color: #000000;">44.73</span><br />TEST6 <span style="color: #000000;">15.24</span><br />TEST7 <span style="color: #000000;">255.65</span><br />TEST4 <span style="color: #000000;">148.68</span><br />TEST3 <span style="color: #000000;">191.00</span></div>[/code:2b45cw42]
Any workaround?
EMG
|
Bug in Harbour Descend()
|
IMHO Test is erronous
Sorting so:
[code=fw:13m2t0gm]<div class="fw" id="{CB}" style="font-family: monospace;">ASORT<span style="color: #000000;">(</span> aData, , , <span style="color: #000000;">{</span> | aItem1, aItem2 | Descend<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> aItem1<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> + aItem1<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> < Descend<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> aItem2<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> + aItem2<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><span style="color: #000000;">}</span> <span style="color: #000000;">)</span></div>[/code:13m2t0gm]
Regards
|
Bug in Harbour Descend()
|
No, as I want to sort for the second item descending and the first item ascending. Anyway, it doesn't work either.
EMG
|
Bug in Harbour Descend()
|
The problem seems to be the codepage. Without setting it, the sort order is correct. But the codepage should not affect the behaviour of Descend() function, should it?
EMG
|
Bug in Harbour Descend()
|
I am not commenting on the behaviour of the Descend() function, but I would have approached it in a different way:
[code=fw:3fcwz30e]<div class="fw" id="{CB}" style="font-family: monospace;"><br />ASort<span style="color: #000000;">(</span> aData,<span style="color: #00C800;">nil</span>,<span style="color: #00C800;">nil</span>, <span style="color: #000000;">{</span> |x,y| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> x<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> == y<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>, x<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> > y<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>, x<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> > y<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> </div>[/code:3fcwz30e]
|
Bug in Harbour Descend()
|
Thank you. It is not feasible as it would require to change all the ASort() calls. I prefer to remove the codepage.
EMG
|
Bug in Harbour Descend()
|
Similar discussions are:
<!-- m --><a class="postlink" href="https://groups.google.com/g/harbour-users/c/K1zokpP0K6I/m/6wS8IIuDBQAJ+">https://groups.google.com/g/harbour-use ... 8IIuDBQAJ+</a><!-- m -->
<!-- m --><a class="postlink" href="https://groups.google.com/g/harbour-users/c/Ge4dnbgGTGc/m/lVgkZEOLy3sJ">https://groups.google.com/g/harbour-use ... gkZEOLy3sJ</a><!-- m -->
<!-- m --><a class="postlink" href="https://groups.google.com/g/harbour-users/c/piZSdzt2drI/m/x-S1EeUNAgAJ">https://groups.google.com/g/harbour-use ... S1EeUNAgAJ</a><!-- m -->
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=29052&p=163632&hilit=descend&sid=17d6d2aeb2ab1b539390e4fd93f78e55#p163632">viewtopic.php?f=6&t=29052&p=163632&hilit=descend&sid=17d6d2aeb2ab1b539390e4fd93f78e55#p163632</a><!-- l -->
<!-- m --><a class="postlink" href="http://www.pctoledo.com.br/forum/viewtopic.php?f=4&t=17321&start=0">http://www.pctoledo.com.br/forum/viewto ... 21&start=0</a><!-- m -->
Solution and explication:
<!-- m --><a class="postlink" href="https://groups.google.com/g/harbour-users/c/shebtWLdGuI/m/WJOfx4M4ECsJ">https://groups.google.com/g/harbour-use ... Ofx4M4ECsJ</a><!-- m -->
|
Bug in Harbour Descend()
|
It looks like the bug has never been fixed. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
EMG
|
Bug in Harbour Descend()
|
have you tryied using StrZero instead of Str?
|
Bug in Harbour Descend()
|
Yes, the order changes but it's not correct either.
EMG
|
Bug in Harbour Descend()
|
The purpose of Descend () is to be Clipper compatible. Therefore it is not an error, but an unexpected behavior for those who use codepages
The existence of hb_Descend (), compatible with the codepage system, would be highly desirable.
|
Bug in Harbour Descend()
|
I see that if you remove HB_SETCODEPAGE from your example the array looks correctly sorted...
I investigated a little and I found that there is a flag in the code pages "BinarySort" that indicate if the comparison can be simply binary or more complex, it is true for "en" and false for "itwin"
Try this:
[code=fw:ja908brn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> ? chr<span style="color: #000000;">(</span><span style="color: #000000;">199</span><span style="color: #000000;">)</span><chr<span style="color: #000000;">(</span><span style="color: #000000;">205</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//--> T</span><br /> HB_SETCODEPAGE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ITWIN"</span> <span style="color: #000000;">)</span><br /> ? chr<span style="color: #000000;">(</span><span style="color: #000000;">199</span><span style="color: #000000;">)</span><chr<span style="color: #000000;">(</span><span style="color: #000000;">205</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//--> F</span><br /> </div>[/code:ja908brn]
the problem is not the descend... very sad
|
Bug in Harbour Descend()
|
Thank you, but I can't found anything about Descend() function in that web page. I need to use Descend() in Harbour just like I use it in xHarbour and used in Clipper. Please look at my first message on this thread for a sample of the problem.
|
Bug in Harbour Descend()
|
Master Enrico, look this:
[url:3el8jd5f]http://www.pctoledo.com.br/forum/viewtopic.php?f=4&t=19895[/url:3el8jd5f]
Regards, saludos.
|
Bug in Harbour Descend()
|
Ok, thank you. I already use that workaround. I was hope that there is a better way.
|
Bug in Harbour Descend()
|
Master Enrico, see if it helps:
[url:2y4zgx2i]https://linguagemclipper.com.br/dicas/arrays[/url:2y4zgx2i]
Regards, saludos.
|
Bug in Harbour Descend()
|
How do you deal with this bug? I need to use codepage with Harbour, otherwise the accented chars are not correctly read from the file system (ie. filenames, Directory(), File(), Memoread(), etc.). But doing so, Descend() function is not working anymore. I can't even build index with Descend() in the key. Any help, please.
|
Bug in Harbour Descend()
|
Please note that this is not working too:
[code=fw:35tmy5aq]<div class="fw" id="{CB}" style="font-family: monospace;">DESCEND<span style="color: #000000;">(</span> DTOS<span style="color: #000000;">(</span> dDate <span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:35tmy5aq]
I can't believe that this bug has not been corrected yet... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
|
Bug in Harbour Descend()
|
Master Enrico, I'm not sure, but I think you have to save the DATES, in a Database first. Just an idea.
Maestro Enrico, no estoy seguro, pero creo que primero debe guardar las FECHAS en una base de datos. Solo una idea.
Example / ejemplo:
[code=fw:1fat6bgp]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> USE Sales <span style="color: #00C800;">NEW</span><br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> Str<span style="color: #000000;">(</span>Descend<span style="color: #000000;">(</span>SaleDate<span style="color: #000000;">)</span><span style="color: #000000;">)</span> + Salesman <span style="color: #0000ff;">TO</span> LastSale<br />OR<br /><br /> USE Sales <span style="color: #00C800;">NEW</span><br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> Descend<span style="color: #000000;">(</span>OrdDate<span style="color: #000000;">)</span> <span style="color: #0000ff;">TO</span> SalesDate<br /> </div>[/code:1fat6bgp]
Regards, saludos.
|
Bug in Harbour Descend()
|
It doesn't work either. This works:
[code=fw:1pfnnjpf]<div class="fw" id="{CB}" style="font-family: monospace;">DESCEND<span style="color: #000000;">(</span> dDate <span style="color: #000000;">)</span></div>[/code:1pfnnjpf]
But this not:
[code=fw:1pfnnjpf]<div class="fw" id="{CB}" style="font-family: monospace;">DESCEND<span style="color: #000000;">(</span> DTOS<span style="color: #000000;">(</span> dDate <span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:1pfnnjpf]
Please note that there is no problem at all with xHarbour.
|
Bug in Harbour Descend()
|
? DESCEND( dDate ) // Esto me retorna un numero, está correcto?
Regards, saludos.
|
Bug in Harbour Descend()
|
Yes, that's right. The problem is there when you want to combine dates and other data types. In this case you have to convert the dates to strings and here the codepage breaks the sort order of the descending string.
|
Bug in Harbour Descend()
|
OK. Look this, please:
[url:2pi0kr95]http://www.pctoledo.com.br/forum/viewtopic.php?f=4&t=17321&p=107630&hilit=descend[/url:2pi0kr95]
Regards, saludos.
|
Bug in Harbour Descend()
|
Thank you. It is not a real solution but better than nothing:
[code=fw:farvzcf2]<div class="fw" id="{CB}" style="font-family: monospace;">DESCEND<span style="color: #000000;">(</span> STR<span style="color: #000000;">(</span> nVal <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> => STR<span style="color: #000000;">(</span> <span style="color: #000000;">999999999999999</span> - nVal <span style="color: #000000;">)</span><br />DESCEND<span style="color: #000000;">(</span> DTOS<span style="color: #000000;">(</span> dVal <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> => STR<span style="color: #000000;">(</span> DESCEND<span style="color: #000000;">(</span> dVal <span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:farvzcf2]
Let's hope that Harbour developers will fix the bug, one day or another...
My concern is that Descend() could be called millions of times during a sort. So it should be as faster as possible.
|
Bug in Harbour Descend()
|
From Harbour-users group
[quote:jlx28jte]
DESCEND() function is designed to operate on binary (BYTE) sorting
and gives reverted collation order only for codepages which use
such collation.
Because DESCEND() converts numbers to characters which have
special order in CP you are using. Look at this list archive
for some easy to create custom DESCEND() replacements which
can be used with non accented Latin based languages like
Lithuanian or Polish ones.
[/quote:jlx28jte]
Dear Enrico
Please try with this. I hope you find this codepage useful
[code=fw:jlx28jte]<div class="fw" id="{CB}" style="font-family: monospace;"><br />REQUEST HB_LANG_IT<br />REQUEST HB_CODEPAGE_ITWIN, HB_CODEPAGE_IT850<br /><br />HB_CDPSELECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"IT850"</span> <span style="color: #000000;">)</span><br />hb_langSelect<span style="color: #000000;">(</span> <span style="color: #ff0000;">'IT'</span> <span style="color: #000000;">)</span><br /><span style="color: #B900B9;">// hb_SetTermCP( 'ITWIN', 'ITWIN', .T. ) // Also with it run ok</span><br /> </div>[/code:jlx28jte]
|
Bug in Harbour Descend()
|
It doesn't work, it creates a file with the wrong name. Please try this:
[code=fw:386inxd1]<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 />REQUEST HB_LANG_IT<br />REQUEST HB_CODEPAGE_ITWIN, HB_CODEPAGE_IT850<br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> HB_CDPSELECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"IT850"</span> <span style="color: #000000;">)</span><br /> HB_LANGSELECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"IT"</span> <span style="color: #000000;">)</span><br /><br /> HB_SETTERMCP<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ITWIN"</span>, <span style="color: #ff0000;">"ITWIN"</span>, .T. <span style="color: #000000;">)</span><br /><br /> MEMOWRIT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"àèéìòù.txt"</span>, <span style="color: #ff0000;">"àèéìòù"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:386inxd1]
|
Bug in Harbour Descend()
|
[quote="Enrico Maria Giordano":1ts84rnj]It doesn't work, it creates a file with the wrong name. Please try this:
[code=fw:1ts84rnj]<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 />REQUEST HB_LANG_IT<br />REQUEST HB_CODEPAGE_ITWIN, HB_CODEPAGE_IT850<br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> HB_CDPSELECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"IT850"</span> <span style="color: #000000;">)</span><br /> HB_LANGSELECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"IT"</span> <span style="color: #000000;">)</span><br /><br /> HB_SETTERMCP<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ITWIN"</span>, <span style="color: #ff0000;">"ITWIN"</span>, .T. <span style="color: #000000;">)</span><br /><br /> MEMOWRIT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"àèéìòù.txt"</span>, <span style="color: #ff0000;">"àèéìòù"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:1ts84rnj][/quote:1ts84rnj]
Sorry Enrico, but the example you put now has nothing to do with the Descend() function
Has the example I posted worked?
I will look at the new example you propose and I will answer you
|
Bug in Harbour Descend()
|
The problem is: without any codepage settings (ie. EN codepage) Descend() is fine but accented chars from filesystem are wrong. With ITWIN (or other codepages I tried) the accented chars from filesystem are right but Descend() is not working.
Any solutions will make me happy. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in Harbour Descend()
|
[quote="Enrico Maria Giordano":b7ls04b0]The problem is: without any codepage settings (ie. EN codepage) Descend() is fine but accented chars from filesystem are wrong. With ITWIN (or other codepages I tried) the accented chars from filesystem are right but Descend() is not working.
Any solutions will make me happy. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:b7ls04b0]
This is more simple
[code=fw:b7ls04b0]<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 /><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> aData<span style="color: #000000;">[</span> <span style="color: #000000;">7</span> <span style="color: #000000;">]</span><br /><br /> <span style="color: #00C800;">LOCAL</span> i<br /><br /><br /> HB_SETCODEPAGE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"UTF8"</span> <span style="color: #000000;">)</span><br /><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST1"</span>, <span style="color: #000000;">3107.77</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST2"</span>, <span style="color: #000000;">852.07</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST3"</span>, <span style="color: #000000;">191.00</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">4</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST4"</span>, <span style="color: #000000;">148.68</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">5</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST5"</span>, <span style="color: #000000;">44.73</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">6</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST6"</span>, <span style="color: #000000;">15.24</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">7</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST7"</span>, <span style="color: #000000;">255.65</span> <span style="color: #000000;">}</span><br /><br /> ASORT<span style="color: #000000;">(</span> aData, , , <span style="color: #000000;">{</span> | aItem1, aItem2 | Descend<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> aItem1<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + aItem1<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> < Descend<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> aItem2<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + aItem2<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">xBrowse</span><span style="color: #000000;">(</span> aData <span style="color: #000000;">)</span><br /><br /> hb_MemoWrit<span style="color: #000000;">(</span> <span style="color: #ff0000;">"àèéìòù.txt"</span>, <span style="color: #ff0000;">"àèéìòù"</span> <span style="color: #000000;">)</span><br /><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /> </div>[/code:b7ls04b0]
|
Bug in Harbour Descend()
|
Sorry, it doesn't work:
[code=fw:2kr5gjzt]<div class="fw" id="{CB}" style="font-family: monospace;">? hb_MemoWrit<span style="color: #000000;">(</span> <span style="color: #ff0000;">"àèéìòù.txt"</span>, <span style="color: #ff0000;">"àèéìòù"</span> <span style="color: #000000;">)</span></div>[/code:2kr5gjzt]
Result:
[code=fw:2kr5gjzt]<div class="fw" id="{CB}" style="font-family: monospace;">.F.</div>[/code:2kr5gjzt]
<!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
|
Bug in Harbour Descend()
|
For me run OK
[img:1wxzcv4d]https://i.postimg.cc/htMP4dYQ/enrico13.png[/img:1wxzcv4d]
|
Bug in Harbour Descend()
|
[code=fw:g08fxkte]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br />REQUEST HB_LANG_IT<br />REQUEST HB_CODEPAGE_ITWIN, HB_CODEPAGE_IT850<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> cFile<br /><br /> HB_CDPSELECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"IT850"</span> <span style="color: #000000;">)</span><br /> HB_LANGSELECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"IT"</span> <span style="color: #000000;">)</span><br /><br /> HB_SETTERMCP<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ITWIN"</span>, <span style="color: #ff0000;">"ITWIN"</span>, .T. <span style="color: #000000;">)</span><br /><br /> HB_CDPSELECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"UTF8"</span> <span style="color: #000000;">)</span><br /> HB_SETCODEPAGE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"UTF8"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> FILE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ENRICO.txt"</span> <span style="color: #000000;">)</span><br /><br /> ERASE <span style="color: #ff0000;">"ENRICO.txt"</span><br /><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #B900B9;">// MEMOWRIT( "ENRICO.txt", HB_OemToAnsi( "àèéìòù" ) )</span><br /><br /> MEMOWRIT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ENRICO.txt"</span>, <span style="color: #ff0000;">"àèéìòù"</span> <span style="color: #000000;">)</span><br /><br /> cFile := <span style="color: #ff0000;">"ENRICO.txt"</span><br /><br /> WinExec<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Notepad.exe "</span> + cFile <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;">// fin / end</span><br /> </div>[/code:g08fxkte]
Regards, saludos.
|
Bug in Harbour Descend()
|
[quote="cnavarro":unbbznrh]For me run OK[/quote:unbbznrh]
[code=fw:unbbznrh]<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 /> HB_SETCODEPAGE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"UTF8"</span> <span style="color: #000000;">)</span><br /><br /> ? HB_MEMOWRIT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"àèéìòù.txt"</span>, <span style="color: #ff0000;">"àèéìòù"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:unbbznrh]
Result: .F., and no file written. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
|
Bug in Harbour Descend()
|
[quote="karinha":1ap43xra][code=fw:1ap43xra]<div class="fw" id="{CB}" style="font-family: monospace;">MEMOWRIT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ENRICO.txt"</span>, <span style="color: #ff0000;">"àèéìòù"</span> <span style="color: #000000;">)</span></div>[/code:1ap43xra][/quote:1ap43xra]
It doesn't work with this:
[code=fw:1ap43xra]<div class="fw" id="{CB}" style="font-family: monospace;">MEMOWRIT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"àèéìòù.txt"</span>, <span style="color: #ff0000;">"àèéìòù"</span> <span style="color: #000000;">)</span></div>[/code:1ap43xra]
|
Bug in Harbour Descend()
|
A workaroud that seems to work fine:
[code=fw:ipiobt2s]<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 />REQUEST HB_CODEPAGE_ITWIN<br /><br />#xtranslate DESCEND<span style="color: #000000;">(</span> STR<span style="color: #000000;">(</span> <nVal><span style="color: #000000;">[</span>, <nLen><span style="color: #000000;">]</span><span style="color: #000000;">[</span>, <nDec><span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> => Str<span style="color: #000000;">(</span> <span style="color: #000000;">999999999999999</span> - <nVal> <span style="color: #000000;">)</span><br />#xtranslate DESCEND<span style="color: #000000;">(</span> DTOS<span style="color: #000000;">(</span> <dVal> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> => Str<span style="color: #000000;">(</span> Descend<span style="color: #000000;">(</span> <dVal> <span style="color: #000000;">)</span> <span style="color: #000000;">)</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> aData<span style="color: #000000;">[</span> <span style="color: #000000;">8</span> <span style="color: #000000;">]</span><br /><br /> <span style="color: #00C800;">LOCAL</span> i<br /><br /> HB_SETCODEPAGE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ITWIN"</span> <span style="color: #000000;">)</span><br /><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST1"</span>, <span style="color: #000000;">3107.77</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST2"</span>, <span style="color: #000000;">852.07</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST3"</span>, <span style="color: #000000;">191.00</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">4</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST4"</span>, <span style="color: #000000;">148.68</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">5</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST5"</span>, <span style="color: #000000;">44.73</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">6</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST6"</span>, <span style="color: #000000;">15.24</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">7</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST7"</span>, <span style="color: #000000;">255.65</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> <span style="color: #000000;">8</span> <span style="color: #000000;">]</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TEST8"</span>, <span style="color: #000000;">44.88</span> <span style="color: #000000;">}</span><br /><br /> ASORT<span style="color: #000000;">(</span> aData, , , <span style="color: #000000;">{</span> | aItem1, aItem2 | Descend<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> aItem1<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + aItem1<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> < Descend<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> aItem2<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + aItem2<span style="color: #000000;">[</span> <span style="color: #000000;">1</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> aData <span style="color: #000000;">)</span><br /> ? aData<span style="color: #000000;">[</span> i, <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>, aData<span style="color: #000000;">[</span> i, <span style="color: #000000;">2</span> <span style="color: #000000;">]</span><br /> <span style="color: #00C800;">NEXT</span><br /><br /> ? MEMOWRIT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"àèéìòù.txt"</span>, <span style="color: #ff0000;">"àèéìòù"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:ipiobt2s]
|
Bug in Harbour version of toolbar
|
In the following sample try to move the mouse over the button and the program will terminate without errors. The problem is only with Harbour and not with xHarbour:
[code:291sbjqs]#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oWnd
DEFINE WINDOW oWnd
DEFINE BUTTONBAR OF oWnd
DEFINE BUTTON;
OF oWnd:oBar
ACTIVATE WINDOW oWnd
RETURN NIL[/code:291sbjqs]
EMG
|
Bug in Harbour version of toolbar
|
Enrico,
Here it is working fine.
What errors do you get ? Thanks,
|
Bug in Harbour version of toolbar
|
[quote="Antonio Linares":2tce1klb]Enrico,
Here it is working fine.
What errors do you get ? Thanks,[/quote:2tce1klb]
No errors. The app just vanishes with a sound when i put the mouse on the button in the toolbar. Please try with latest Harbour (not xHarbour) from SVN.
EMG
|
Bug in Harbour version of toolbar
|
Do you want my EXE to test it there?
EMG
|
Bug in Harbour version of toolbar
|
Enrico,
We have tested FWH 7.11 with Harbour svn 05 Nov, and it works fine. Its the one distributed with FWH 7.11.
So it has to be a change in Harbour since 05 Nov.
Do you get an error.log file ?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.