topic
stringlengths
1
63
text
stringlengths
1
577k
store/restore parts of the screen
Thank you Rene. These are nice samples. I the meantime I had a closer look into Pezold and read about WM_PAINT and InvalidateRect. Please could you have a look at the topic: Can I change the report viewer ? Isn't that a heavy-duty to repaint the whole window every time you move the mouse? HairCross Cursor: Insert oMeta1:bMMoved:={|y,x,flags|hairCross(oMeta1,y,x) } in FUNCTION RPreview( oDevice ) in rpreview.prg. func hairCross(oMeta1,y,x) nCount:=nCount+1 IF nCount > 5 nCount:=0 oMeta1:refresh() sysrefresh() oMeta1:line (0,x,1800,x) oMeta1:line (y,0,y,1500) ENDIF return nil
storing mod_harbour views on memo fields
Wow... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> First you have to identify... [url:2hm5iwco]https&#58;//harbour&#46;fourtech&#46;es/modharbour_samples/genesis/index&#46;prg?views&#58;exec&#58;4[/url:2hm5iwco] [img:2hm5iwco]https&#58;//github&#46;com/FiveTechSoft/screenshots/blob/master/memo_views&#46;jpg?raw=true[/img:2hm5iwco]
storing mod_harbour views on memo fields
[img:1wux3lye]https&#58;//github&#46;com/FiveTechSoft/screenshots/blob/master/memo_views2&#46;jpg?raw=true[/img:1wux3lye]
storing mod_harbour views on memo fields
[img:2i072wqz]https&#58;//github&#46;com/FiveTechSoft/screenshots/blob/master/memo_views3&#46;jpg?raw=true[/img:2i072wqz]
storing mod_harbour views on memo fields
[img:16g92lp0]https&#58;//github&#46;com/FiveTechSoft/screenshots/blob/master/genesis_view4&#46;jpg?raw=true[/img:16g92lp0]
storing mod_harbour views on memo fields
Dear Antonio, I made a test on view: number 14 [url:1os3lv03]https&#58;//harbour&#46;fourtech&#46;es/modharbour_samples/genesis/index&#46;prg?views&#58;exec&#58;14[/url:1os3lv03] Code execution is working fine. Can you please explain how we get post data into harbour variables? I remember when I was using ASP that there were several way.s How do you suggest to do it. Would you be so kind to post a sample how to get and send mod_harbour variables to javascript. Thank you so much Otto [quote:1os3lv03] @Sergey, I have used submitting form here with POST method, i don't know why it doesn't work. Do you know why? And how to solve that? – Jiangong SUN Dec 17 '09 at 10:14 @sergey, so i need to use ajax? Actually, i'm familliar with that. – Jiangong SUN Dec 18 '09 at 10:08 Actually, I have used your method in the past one level select box. But now i have made a three-chained select box, so i can't use your method. – Jiangong SUN Dec 18 '09 at 10:17 At this point: Yes, you need to use AJAX technology. If you have troubles with realization, I think I can help. – Sergey Kuznetsov Dec 18 '09 at 17:50 2 @MadaraUchiha The OP already used mysql_ functions; it wouldn't be the goal of answering this question with a complete rewrite. – Ja?ck Oct 17 '12 at 4:14 [/quote:1os3lv03] [img:1os3lv03]https&#58;//mybergland&#46;com/fwforum/genesis1&#46;png[/img:1os3lv03]
storing mod_harbour views on memo fields
Dear Otto, Your example is working fine: {"title"=>"07%2F10%2F2019", "Abreise"=>"07%2F19%2F2019", "zimmer_quantity"=>"1", "zimmer%5Berwachsene%5D%5B%5D"=>"1", "zimmer%5Bkinder%5D%5B%5D"=>"1"} The only thing I noticed is that you are calling a non secure site: (SSL is invalid) <!-- m --><a class="postlink" href="https://my3zinnen.com/booking_tests/postpairs.prg">https://my3zinnen.com/booking_tests/postpairs.prg</a><!-- m --> Probably is because you are jumping from our server into your server. Run everything on your server.
storing mod_harbour views on memo fields
Dear Otto, To save the posted data you do this: [code=fw:2btt76k1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hPairs := AP_PostPairs<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;USE <span style="color: #000000;">&#40;</span>your DBF<span style="color: #000000;">&#41;</span> SHARED <span style="color: #00C800;">NEW</span><br /><br />&nbsp; &nbsp;APPEND BLANK<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> RLock<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; FieldPut<span style="color: #000000;">&#40;</span> FieldPos<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"title"</span> <span style="color: #000000;">&#41;</span>, hb_UrlDecode<span style="color: #000000;">&#40;</span> hPairs<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"title"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; FieldPut<span style="color: #000000;">&#40;</span> FieldPos<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Abreise"</span> <span style="color: #000000;">&#41;</span>, hb_UrlDecode<span style="color: #000000;">&#40;</span> hPairs<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"Abreise"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; FieldPut<span style="color: #000000;">&#40;</span> FieldPos<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"zimmer_quantity"</span> <span style="color: #000000;">&#41;</span>, hb_UrlDecode<span style="color: #000000;">&#40;</span> hPairs<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"zimmer_quantity"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; FieldPut<span style="color: #000000;">&#40;</span> FieldPos<span style="color: #000000;">&#40;</span> hb_UrlDecode<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"zimmer%5Berwachsene%5D%5B%5D"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, hb_UrlDecode<span style="color: #000000;">&#40;</span> hPairs<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"zimmer%5Berwachsene%5D%5B%5D"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; FieldPut<span style="color: #000000;">&#40;</span> FieldPos<span style="color: #000000;">&#40;</span> hb_UrlDecode<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"zimmer%5Bkinder%5D%5B%5D"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, hb_UrlDecode<span style="color: #000000;">&#40;</span> hPairs<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"zimmer%5Bkinder%5D%5B%5D"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; DbUnLock<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;USE<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2btt76k1]
storing mod_harbour views on memo fields
Dear Antonio, thank you. Would you be so kind to show me the code how to read the database and to show it on the form. OT: is there a way to know if I only have the files mod_harbour.so libharbour.dll if these are the 32 bit or 64 bit files. Thank you in advance Otto
storing mod_harbour views on memo fields
Otto, In mod_harbour/samples/genesis/index.prg please review function BuildEdit() source code [url:17phoq5d]https&#58;//github&#46;com/FiveTechSoft/mod_harbour/blob/master/samples/genesis/index&#46;prg[/url:17phoq5d] 1. Go to the folder where the DLL is 2. run "bash" from a cmd window from that folder 3. "file mod_harbour.so" will tell you if it is 32 or 64 4. same for libharbour.dll
storing mod_harbour views on memo fields
Hello Antonio. I've tested the genesis from the first link and works perfectly. Then I downloaded all the genesis folder from GitHub and placed inside the samples on my local machine. When starts and I put the login informations I have this error : [code=fw:kqygoc45]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />error: <span style="color: #000000;">Open</span> error <br /><br />called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">GETERRORINFO</span>, line: <span style="color: #000000;">106</span><br />called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">DOBREAK</span>, line: <span style="color: #000000;">117</span><br />called <span style="color: #0000ff;">from</span>: <span style="color: #000000;"><span style="color: #000000;">&#40;</span>b</span><span style="color: #000000;">&#41;</span>MAIN, line: <span style="color: #000000;">23</span><br />called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">DBUSEAREA</span>, line: <span style="color: #000000;">0</span><br />called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">IDENTIFY</span>, line: <span style="color: #000000;">299</span><br />called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">LOGIN</span>, line: <span style="color: #000000;">256</span><br />called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">CONTROLLER</span>, line: <span style="color: #000000;">124</span><br />called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">MAIN</span>, line: <span style="color: #000000;">10</span><br />called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">HB_HRBDO</span>, line: <span style="color: #000000;">0</span><br />called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">EXECUTE</span>, line: <span style="color: #000000;">84</span><br />called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">MAIN</span>, line: <span style="color: #000000;">34</span><br /><br /> </div>[/code:kqygoc45] The index.prg on your server and the one on GitHub are different ?
storing mod_harbour views on memo fields
Massimo, If you install Apache on the Windows 10 bash (linux) then you have to give the right permits to the data folder this way: cd /home/$USER/mod_harbour/samples/genesis sudo chown -R www-data:www-data data With this, the DBFs will open properly
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Hello: I use Harbour 3.1 and Windows 7 64 bits. When I run this code, very often I got: (DOS Error 32) DBFCDX/1006 Create error: C:\Users\John\Desktop\harbour \DATA\CUSTOMER.cdx Working sample at: <!-- m --><a class="postlink" href="http://www.mediafire.com/?47nd41ki6l87jgx">http://www.mediafire.com/?47nd41ki6l87jgx</a><!-- m --> Please, unzip and create a folder at your Desktop. This is the code: [code=fw:2nr4sjb8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#define</span> CRLF Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#41;</span>+Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span> <br /><br /><br /><span style="color: #00C800;">STATIC</span> pPath <br /><br /><br /><span style="color: #B900B9;">//-------------------------------------------------------------- </span><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><span style="color: #B900B9;">//-------------------------------------------------------------- </span><br /><br /><br />   <span style="color: #00C800;">LOCAL</span> i := <span style="color: #000000;">0</span> <br /><br /><br />   pPath := hb_dirbase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"DATA"</span> <br /><br /><br />   REQUEST DBFCDX, DBFFPT <br />   RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span><span style="color: #000000;">&#41;</span> <br /><br /><br />   SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1990</span> <br />   SET CENTURY <span style="color: #0000ff;">ON</span> <br />   SET DATE ITALIAN <br />   SET DELETED <span style="color: #0000ff;">ON</span> <br />   SetCancel<span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span> <br />   SetHandleCount<span style="color: #000000;">&#40;</span> <span style="color: #000000;">150</span> <span style="color: #000000;">&#41;</span> <br /><br /><br />   <span style="color: #0000ff;">SELECT</span> <span style="color: #000000;">1</span> <br />   USE <span style="color: #000000;">&#40;</span>pPath+<span style="color: #ff0000;">"<span style="color: #000000;">\C</span>USTOMER"</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">NEW</span> <br /><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;">100</span> <br />       reindex<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />   <span style="color: #00C800;">next</span> <br /><br /><br />   alert<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span>+CRLF+CRLF+PPATH<span style="color: #000000;">&#41;</span> <br />   dbcloseall<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />   quit <br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span> <br /><span style="color: #B900B9;">//-------------------------------------------------------------- </span><br /><br /><br /><span style="color: #B900B9;">//-------------------------------------------------------------- </span><br /><span style="color: #00C800;">FUNCTION</span> REINDEX<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><span style="color: #B900B9;">//-------------------------------------------------------------- </span><br /><br /><br />        <span style="color: #0000ff;">SELECT</span> <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"CUSTOMER"</span><span style="color: #000000;">&#41;</span> <br />        FERASE  <span style="color: #000000;">&#40;</span>pPath+<span style="color: #ff0000;">"<span style="color: #000000;">\C</span>USTOMER.CDX"</span><span style="color: #000000;">&#41;</span> <br />        PACK <br /><br /><br />        <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> FIELD->LAST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">&#40;</span>pPath+<span style="color: #ff0000;">"<span style="color: #000000;">\C</span>USTOMER"</span><span style="color: #000000;">&#41;</span> <br />        dbCommit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><span style="color: #B900B9;">//-------------------------------------------------------------- </span><br /><br /> </div>[/code:2nr4sjb8] What´s wrong?. Any clue?. Thank you very much.
strange (DOS Error 32) DBFCDX/1006 ¿bug?
DOS ERROR 32 means, according to DOS documentation, 'network request not supported'. But I think the problem is because the erasing and indexing happens in such a fast interval (For..Next loop) that writting to the disk in so fas iterations is the problem for the sistem. If you don't use Commit() it might not show the error because this function maybe cannot follow the iterations and while it is writting buffers on the disk, the next index command started with another commit()... Besides, I fon't get it why this code should exist at the first place??? Maybe I am missing something but indexing the same database 100 times in a loop is not something I understand?
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Hello, Thanks for reply. This error happens in my app from time to time. It has more dbfs and indexes, but I wrote this sample to easily reproduce the error. In my sample, I don´t open the index file never, just use customer.dbf new.
strange (DOS Error 32) DBFCDX/1006 ¿bug?
John, As Boris points, it may be a local network problem Anyhow, it is something specifically related to Harbour, not to FWH
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Antonio, Thanks for heloping me. Yes it is not a FWH bug. I did not say that. I am not running sample in a network. In fact, I created a second sample forcing EXCLUSIVE MODE and I still get the error. Sample updated: <!-- m --><a class="postlink" href="http://oron.com/8otfjgsek4zq">http://oron.com/8otfjgsek4zq</a><!-- m --> I think it is a serious issue and I other users could help to isolate the bug. Thanks again,
strange (DOS Error 32) DBFCDX/1006 ¿bug?
John, You should report it in the Harbour developers list: [url:3fmaqgjb]http&#58;//groups&#46;google&#46;es/group/harbour-devel[/url:3fmaqgjb]
strange (DOS Error 32) DBFCDX/1006 ¿bug?
UkService, Your code is doubly buggy: When you opens .dbf, that open .cdx file automatic. -SET AUTOOPEN ON- is default. Then: 1st) You must not FErase() .cdx open 2st) You must not INDEX ON .cdx open Regards [quote="ukservice":g19m0ipq]Hello: I use Harbour 3.1 and Windows 7 64 bits. [code=fw:g19m0ipq]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#define</span> CRLF Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#41;</span>+Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span> <br /><br /><br /><span style="color: #00C800;">STATIC</span> pPath <br /><br /><br /><span style="color: #B900B9;">//-------------------------------------------------------------- </span><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><span style="color: #B900B9;">//-------------------------------------------------------------- </span><br /><br /><br />   <span style="color: #00C800;">LOCAL</span> i := <span style="color: #000000;">0</span> <br /><br /><br />   pPath := hb_dirbase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"DATA"</span> <br /><br /><br />   REQUEST DBFCDX, DBFFPT <br />   RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span><span style="color: #000000;">&#41;</span> <br /><br /><br />   SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1990</span> <br />   SET CENTURY <span style="color: #0000ff;">ON</span> <br />   SET DATE ITALIAN <br />   SET DELETED <span style="color: #0000ff;">ON</span> <br />   SetCancel<span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span> <br />   SetHandleCount<span style="color: #000000;">&#40;</span> <span style="color: #000000;">150</span> <span style="color: #000000;">&#41;</span> <br /><br /><br />   <span style="color: #0000ff;">SELECT</span> <span style="color: #000000;">1</span> <br />   USE <span style="color: #000000;">&#40;</span>pPath+<span style="color: #ff0000;">"<span style="color: #000000;">\C</span>USTOMER"</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">NEW</span> <br /><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;">100</span> <br />       reindex<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />   <span style="color: #00C800;">next</span> <br /><br /><br />   alert<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span>+CRLF+CRLF+PPATH<span style="color: #000000;">&#41;</span> <br />   dbcloseall<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />   quit <br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span> <br /><span style="color: #B900B9;">//-------------------------------------------------------------- </span><br /><br /><br /><span style="color: #B900B9;">//-------------------------------------------------------------- </span><br /><span style="color: #00C800;">FUNCTION</span> REINDEX<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><span style="color: #B900B9;">//-------------------------------------------------------------- </span><br /><br /><br />        <span style="color: #0000ff;">SELECT</span> <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"CUSTOMER"</span><span style="color: #000000;">&#41;</span> <br />        FERASE  <span style="color: #000000;">&#40;</span>pPath+<span style="color: #ff0000;">"<span style="color: #000000;">\C</span>USTOMER.CDX"</span><span style="color: #000000;">&#41;</span> <br />        PACK <br /><br /><br />        <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> FIELD->LAST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">&#40;</span>pPath+<span style="color: #ff0000;">"<span style="color: #000000;">\C</span>USTOMER"</span><span style="color: #000000;">&#41;</span> <br />        dbCommit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><span style="color: #B900B9;">//-------------------------------------------------------------- </span><br /><br /> </div>[/code:g19m0ipq] What´s wrong?. Any clue?. Thank you very much.[/quote:g19m0ipq]
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Hello, Thanks for reply. I did another sample, forcing exclusive and using a different name for the index and I get she same error from time to time. I provide a new download url: <!-- m --><a class="postlink" href="http://demo.ovh.com/es/5a0f7902749392cdc7d498d584111b9f/">http://demo.ovh.com/es/5a0f7902749392cd ... 584111b9f/</a><!-- m --> So, that´s not the clue, sorry.
strange (DOS Error 32) DBFCDX/1006 ¿bug?
UkService, I do not understand or you don´t understand <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> Code sample ok: [code=fw:p0qzst0z]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />SET AUTOPEN OFF   <span style="color: #B900B9;">// Atencion / Warning / Atchung</span><br /><br /><span style="color: #0000ff;">SELECT</span> <span style="color: #000000;">0</span><br />USE FileDb EXCLUSIVE<br />Reindex<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>...<br /><br /> </div>[/code:p0qzst0z]
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Hello UK, you exe runs fine here. I tested on WINDOWS Server 2008 R2. I get the alert box saying 101 and the path. Best regards, Otto
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Hello UK, also of WINDOWS 7 Professional 64 bit the exe is running fine. I will go on on a WINDOWS 8 system. Best regards, Otto PS: What is you "userfriedly" name?
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Hello UK, it is running fine on WINDOWS 8 but I only have 32 bit Operating System installed. Best regards, Otto
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Otto, Thanks a lot. Did you run it several times (8-10)?. What Harbour and Linker do you use?, Thanks.
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Uk, I made now 25 tests (windows 7 prof 64 bit). All is working well. I use your exe file. What is your"userfriedly" name? Best regards, Otto
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Otto, My name is John. Thanks for helping me. Last question please, what Harbour and linker do you use?. Regards, John
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Hello John, I use xharbour and bcc582. But the tests I made with your exe. Best regards, Otto
strange (DOS Error 32) DBFCDX/1006 ¿bug?
John, try to remove Commit() inside the loop
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Hi John, regarding your first sample: - you cannot delete an open index - if the index is deleted you must use index, not reindex, reindex needs an open index - dbcommit() is not neccessary, it does not affekt the index, it will only write the database buffer to disk. your second sample should work, but I would remove dbcommit(). Here it´s working fine
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Hi, Thanks for all help. I modified the sample as follows: <!-- m --><a class="postlink" href="http://demo.ovh.com/en/5f778b0a078d64d9431f5b7153f675ff/">http://demo.ovh.com/en/5f778b0a078d64d9 ... 153f675ff/</a><!-- m --> And now I get sometimes: [b:1jsk90cw]Error description: (DOS Error 5) DBFCDX/1006 Create error: C:\Users\John\Desktop\harbour\DATA\CUSTOMER.cdx[/b:1jsk90cw] This is the code. I also compiled in pure DOS withour Fivewin and the error also arrises: [code=fw:1jsk90cw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#define</span> CRLF Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#41;</span>+Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">STATIC</span> pPath<br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//--------------------------------------------------------------</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> i := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;pPath := hb_dirbase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"DATA"</span><br /><br /><br /><br /><br />&nbsp; &nbsp;REQUEST DBFCDX, DBFFPT<br />&nbsp; &nbsp;RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1990</span><br />&nbsp; &nbsp;SET CENTURY <span style="color: #0000ff;">ON</span><br />&nbsp; &nbsp;SET DATE ITALIAN<br />&nbsp; &nbsp;SET DELETED <span style="color: #0000ff;">ON</span><br /><br /><br />&nbsp; &nbsp;SET EXCLUSIVE <span style="color: #0000ff;">ON</span><br />&nbsp; &nbsp;SET AUTOPEN OFF<br /><br /><br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> i:= <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">1000</span><br />&nbsp; &nbsp; &nbsp; reindex<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;alert<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span>+CRLF+CRLF+<span style="color: #ff0000;">"Path: "</span>+PPATH+CRLF+CRLF+<span style="color: #ff0000;">"Alias in use: "</span>+<span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;dbcloseall<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;quit<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">//--------------------------------------------------------------</span><br /><br /><br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> REINDEX<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//--------------------------------------------------------------</span><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; FERASE &nbsp;<span style="color: #000000;">&#40;</span>pPath+<span style="color: #ff0000;">"<span style="color: #000000;">\C</span>USTOMER.CDX"</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// It´s not opened and it has a different name than dbf</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SELECT</span> <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; USE <span style="color: #000000;">&#40;</span>pPath+<span style="color: #ff0000;">"<span style="color: #000000;">\C</span>UST"</span><span style="color: #000000;">&#41;</span> EXCLUSIVE <span style="color: #00C800;">NEW</span> &nbsp;<span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"CUSTOMER"</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; PACK<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> FIELD->LAST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">&#40;</span>pPath+<span style="color: #ff0000;">"<span style="color: #000000;">\C</span>USTOMER"</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #B900B9;">// This line causes error</span><br />&nbsp; &nbsp; &nbsp; &nbsp; dbcloseall<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//--------------------------------------------------------------</span><br />&nbsp;</div>[/code:1jsk90cw] It´s quite strange. Thank you very much for all help and support.
strange (DOS Error 32) DBFCDX/1006 ¿bug?
John I put together a Sample program to open and index a FoxPro Database and compound index. I saw a couple of things I felt were wrong with your code .. 1) The .dbf and .cdx have to be the same name "Customer.dbf", "Customer.Cdx" but you can use any Alias you wish. 2) Opening your tables I would use this syntax use ( "table.dbf" ) via "DBFCDX" .. you left out the via clause 3) I supplied a function called NetUse() and you can easily adapt it to open your databases in either Shared or Exclusive mode. In a multi-user network environment you will also need a good Record Locking function .. Let me know if you need one. 4) Avoid field->pointers in your index statements I also added a meter function so you can view the progress of the Indexing .. Consider this code: Rick Lipkin [code=fw:3aqb2l49]<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: #B900B9;">//-------------------</span><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">LOCAL</span> i := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> pPath,cDefa,cFile,nStart<br /><br />*pPath := hb_dirbase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"DATA"</span> <span style="color: #B900B9;">// does not compile</span><br /><br />cFILE := GetModuleFileName<span style="color: #000000;">&#40;</span> GetInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// where .exe started from is default directory //</span><br /><br />nSTART := RAT<span style="color: #000000;">&#40;</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 /><br />pPath := cDefa+"</span>\<span style="color: #00C800;">Data</span><span style="color: #ff0000;">"<br /><br />REQUEST DBFCDX<br />rddsetdefault ( "</span>DBFCDX<span style="color: #ff0000;">" )<br /><br />*   REQUEST DBFCDX, DBFFPT<br />*   RDDSETDEFAULT( "</span>DBFCDX<span style="color: #ff0000;">")<br /><br /><br />SET EPOCH TO 1990<br />SET CENTURY ON<br />SET DATE ITALIAN<br />SET DELETED ON<br /><br /><br />*   SET EXCLUSIVE ON<br />*   SET AUTOPEN OFF<br /><br />*   for i:= 1 to 1000<br />*      reindex()<br />*   next<br /><br />*   alert(str(i)+CRLF+CRLF+"</span>Path: <span style="color: #ff0000;">"+PPATH+CRLF+CRLF+"</span><span style="color: #0000ff;">Alias</span> in use: <span style="color: #ff0000;">"+Alias())<br />*   dbcloseall()<br />*   quit<br /><br />ReIndex( pPath )<br /><br /><br />RETURN( NIL )<br /><br /><br />//--------------------------------------------------------------<br />Static FUNCTION ReIndex( pPath )<br /><br />Local Saying<br /><br />FERASE( pPath+"</span>\CUSTOMER.CDX<span style="color: #ff0000;">" )<br />IF File( pPath+"</span>\CUSTOMER.CDX<span style="color: #ff0000;">" )<br />   Saying := "</span>Can not Delete <span style="color: #ff0000;">"+ pPath+"</span>\CUSTOMER.CDX<span style="color: #ff0000;">"+chr(10)<br />   Saying += "</span>Check <span style="color: #0000ff;">to</span> see <span style="color: #00C800;">if</span> the File is being Shared<span style="color: #ff0000;">"+chr(10)<br />   MsgInfo( Saying )<br />   Return(.f.)<br />Endif<br /><br />*SELECT 1<br />*USE (pPath+"</span>\CUST<span style="color: #ff0000;">") EXCLUSIVE NEW  ALIAS "</span>CUSTOMER<span style="color: #ff0000;">"   // missing via "</span>DBFCDX<span style="color: #ff0000;">" clause<br /><br />// .DBF AND .CDX Must be named the same !<br /><br />SELECT 1<br />Try<br />  Use (  pPath+"</span>\CUSTOMER.DBF<span style="color: #ff0000;">" ) via "</span>DBFCDX<span style="color: #ff0000;">" alias "</span>CUST<span style="color: #ff0000;">" EXCL<br />Catch<br />  Saying := "</span>Error opening file <span style="color: #ff0000;">"+pPath+"</span>\CUSTOMER.DBF<span style="color: #ff0000;">"<br />  MsgInfo( Saying )<br />  Return(.f.)<br />End Try<br /><br />Pack<br /><br />IndexMeter( { | oMeter, oText, oDlg, lEnd |            ;<br />        BuildCust( oMeter, oText, oDlg, @lEnd, 1 ) }     , ;<br />        ALIAS()+"</span>.dbf tag First <span style="color: #ff0000;">" )<br /><br />IndexMeter( { | oMeter, oText, oDlg, lEnd |            ;<br />        BuildCust( oMeter, oText, oDlg, @lEnd, 2 ) }     , ;<br />        ALIAS()+"</span>.dbf tag Last <span style="color: #ff0000;">" )<br /><br />IndexMeter( { | oMeter, oText, oDlg, lEnd |            ;<br />        BuildCust( oMeter, oText, oDlg, @lEnd, 3 ) }     , ;<br />        ALIAS()+"</span>.dbf tag Street <span style="color: #ff0000;">" )<br /><br />IndexMeter( { | oMeter, oText, oDlg, lEnd |            ;<br />        BuildCust( oMeter, oText, oDlg, @lEnd, 4 ) }     , ;<br />        ALIAS()+"</span>.dbf tag City <span style="color: #ff0000;">" )<br /><br />IndexMeter( { | oMeter, oText, oDlg, lEnd |            ;<br />        BuildCust( oMeter, oText, oDlg, @lEnd, 5 ) }     , ;<br />        ALIAS()+"</span>.dbf tag State <span style="color: #ff0000;">" )<br /><br />IndexMeter( { | oMeter, oText, oDlg, lEnd |            ;<br />        BuildCust( oMeter, oText, oDlg, @lEnd, 6 ) }     , ;<br />        ALIAS()+"</span>.dbf tag Zip <span style="color: #ff0000;">" )<br /><br />IndexMeter( { | oMeter, oText, oDlg, lEnd |            ;<br />        BuildCust( oMeter, oText, oDlg, @lEnd, 7 ) }     , ;<br />        ALIAS()+"</span>.dbf tag HireDate <span style="color: #ff0000;">" )<br /><br />IndexMeter( { | oMeter, oText, oDlg, lEnd |            ;<br />        BuildCust( oMeter, oText, oDlg, @lEnd, 8 ) }     , ;<br />        ALIAS()+"</span>.dbf tag Married <span style="color: #ff0000;">" )<br /><br />IndexMeter( { | oMeter, oText, oDlg, lEnd |            ;<br />        BuildCust( oMeter, oText, oDlg, @lEnd, 9) }     , ;<br />        ALIAS()+"</span>.dbf tag Age <span style="color: #ff0000;">" )<br /><br />IndexMeter( { | oMeter, oText, oDlg, lEnd |            ;<br />        BuildCust( oMeter, oText, oDlg, @lEnd, 10 ) }     , ;<br />        ALIAS()+"</span>.dbf tag Salary <span style="color: #ff0000;">" )<br /><br />IndexMeter( { | oMeter, oText, oDlg, lEnd |            ;<br />        BuildCust( oMeter, oText, oDlg, @lEnd, 11 ) }     , ;<br />        ALIAS()+"</span>.dbf tag Notes <span style="color: #ff0000;">" )<br /><br />CLOSE DATABASES<br /><br /><br />RETURN(NIL)<br /><br />//-------------------------------------------------------------//<br />FUNCTION BuildCust( oMeter, oText, oDlg, lEnd, nTAG )<br /><br />   oMeter:nTotal := lastrec()<br /><br />   // do not use field-> pointers in index statement<br /><br />   DO CASE<br />   CASE nTAG = 1<br />        INDEX on upper(First) TAG First                      ;<br />              EVAL ( oMeter:Set( recno() ), SysRefresh(), !lEnd )<br />   CASE nTAG = 2<br />        INDEX on upper(Last) TAG Last                        ;<br />              EVAL ( oMeter:Set( recno() ), SysRefresh(), !lEnd )<br />   CASE nTAG = 3<br />        INDEX on upper(Street) TAG street                    ;<br />              EVAL ( oMeter:Set( recno() ), SysRefresh(), !lEnd )<br />   CASE nTAG = 4<br />        INDEX on upper(City) TAG City                        ;<br />              EVAL ( oMeter:Set( recno() ), SysRefresh(), !lEnd )<br />   CASE nTAG = 5<br />        INDEX on upper(State) TAG State               ;<br />              EVAL ( oMeter:Set( recno() ), SysRefresh(), !lEnd )<br />   CASE nTAG = 6<br />        INDEX on upper(Zip) TAG Zip                          ;<br />              EVAL ( oMeter:Set( recno() ), SysRefresh(), !lEnd )<br />   CASE nTAG = 7<br />        INDEX on dtos(HireDate) TAG Hiredate                 ;<br />              EVAL ( oMeter:Set( recno() ), SysRefresh(), !lEnd )<br />   CASE nTAG = 8<br />        INDEX on Married TAG Married                         ;<br />              EVAL ( oMeter:Set( recno() ), SysRefresh(), !lEnd )<br />   CASE nTAG = 9<br />        INDEX on Age TAG Age                           ;<br />              EVAL ( oMeter:Set( recno() ), SysRefresh(), !lEnd )<br />   CASE nTAG = 10<br />        INDEX on Salary TAG Salary                           ;<br />              EVAL ( oMeter:Set( recno() ), SysRefresh(), !lEnd )<br />   CASE nTAG = 11<br />        INDEX on upper(Notes) TAG Notes                           ;<br />              EVAL ( oMeter:Set( recno() ), SysRefresh(), !lEnd )<br />   ENDCASE<br /><br />RETURN( NIL )<br /><br /><br /><br />*        FERASE  (pPath+"</span>\CUSTOMER.CDX<span style="color: #ff0000;">")  // It´s not opened and it has a different name than dbf<br /><br />*        SELECT 1<br />*        USE (pPath+"</span>\CUST<span style="color: #ff0000;">") EXCLUSIVE NEW  ALIAS "</span>CUSTOMER<span style="color: #ff0000;">"<br /><br />*        PACK<br /><br />*        INDEX ON FIELD->LAST TO (pPath+"</span>\CUSTOMER<span style="color: #ff0000;">")    // This line causes error<br />*        dbcloseall()<br /><br /><br />*        return nil<br /><br />//-------------------------------<br />Function IndexMeter( bAction, cMsg, cTag )<br /><br />local oDlg, oMeter, oText<br />local lEnd := .f.<br />local nVal := 0<br />local cTitle<br /><br />IF EMPTY( cTAG )<br />   cTAG := "</span>Indexing Please wait<span style="color: #ff0000;">"<br />ENDIF<br /><br />DEFAULT bAction := { || nil },;<br />        cMsg := "</span>Processing...<span style="color: #ff0000;">", cTitle := cTAG<br /><br />DEFINE DIALOG oDlg FROM 5, 5 TO 11, 45 TITLE cTitle ;<br />       STYLE nOr( WS_POPUP,WS_CAPTION,WS_THICKFRAME )<br /><br />   @ 0.2, 0.5  SAY oText VAR cMsg SIZE 130, 10 OF oDlg<br /><br />   @ 1,   0.5  METER oMeter VAR nVal TOTAL 10 SIZE 150, 10 OF oDlg<br /><br />*  @ 2.5, 9.5  BUTTON "</span>&Cancel<span style="color: #ff0000;">" OF oDlg SIZE 32, 13 ACTION lEnd := .t.<br /><br />   // This block gets evaluated only the first time the DialogBox is painted !!!<br />   oDlg:bStart := { || Eval( bAction, oMeter, oText, oDlg, @lEnd ),;<br />                      lEnd := .t., oDlg:End() }<br /><br />ACTIVATE DIALOG oDlg CENTERED ;<br />      VALID lEnd<br /><br />RETURN(NIL)<br /><br /><br /><br />/* LOGICAL NETUSE( CDATABASE, LOPENMODE, NSECONDS )<br /><br />  CHARACTER CDATABASE      - NAME OF DATABASE<br />  LOGICAL LOPENMODE        - OPEN MODE .T. exclusive  .F. shared<br />  NUMERIC NSECONDS         - NUMBER OF SECONDS TO WAIT  0 forever<br /><br />  RETURN  .T. if successful,  .F. if not<br /><br />  SAMPLE CALL  IF NETUSE( "</span>CALLS<span style="color: #ff0000;">", .F., 5 )<br />*/<br /><br />Func NETUSE( CDATABASE, LOPENMODE, NSECONDS, cAlias )<br /><br />LOCAL FOREVER, RESTART, WAIT_TIME, YESNO<br /><br />RESTART = .T.<br />FOREVER = ( NSECONDS := 0 )<br />YESNO := {"</span>Yes<span style="color: #ff0000;">" , "</span>No<span style="color: #ff0000;">"}<br /><br />DO WHILE RESTART<br />   WAIT_TIME := NSECONDS<br />   DO WHILE ( FOREVER .or. WAIT_TIME > 0 )<br /><br />      IF LOPENMODE<br />            USE ( CDATABASE ) via "</span>DBFCDX<span style="color: #ff0000;">" EXCLUSIVE<br /><br />      ELSE<br />            USE ( CDATABASE ) via "</span>DBFCDX<span style="color: #ff0000;">" SHARED<br /><br /><br />      ENDIF<br /><br />      IF .NOT. NETERR()<br />         RETURN(.T.)<br />      ENDIF<br />      INKEY(1)<br />      WAIT_TIME--<br /><br />   ENDDO<br /><br />   * lock failed, ask to continue<br /><br />   IF MsgYesNo( "</span>Cannot lock <span style="color: #ff0000;">" + CDATABASE + "</span>, <span style="color: #00C800;">retry</span> ?<span style="color: #ff0000;">" )<br />   ELSE<br />      EXIT<br />   ENDIF<br /><br />ENDDO<br /><br />RETURN(.F.)<br /></span></div>[/code:3aqb2l49]
strange (DOS Error 32) DBFCDX/1006 ¿bug?
John, I ran your sample several times, I get no error <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> . Very curious <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Dos error 5 means "Access denied", maybe it´s a problem with directorty rights or the file is still in use by another process. Check the return value of FErase(), if its not 0 than you can get the error with FError () [code=fw:1s4hufbm]<div class="fw" id="{CB}" style="font-family: monospace;">nOk := FERASE  <span style="color: #000000;">&#40;</span>pPath+<span style="color: #ff0000;">"<span style="color: #000000;">\C</span>USTOMER.CDX"</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// It´s not opened and it has a different name than dbf</span><br /><span style="color: #00C800;">IF</span> nOk <> <span style="color: #000000;">0</span><br />  nError := FError<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDIF</span><br /> </div>[/code:1s4hufbm]
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Rick, [quote="Rick Lipkin":1g9s2xcw] 1) The .dbf and .cdx have to be the same name "Customer.dbf", "Customer.Cdx" but you can use any Alias you wish.[/quote:1g9s2xcw] No, they can have different names, only this way you can create temporary indexes
strange behavior of a TGet
I have 3 numeric get controls when I insert a number in the first tget it would become the third update because it is a clause of the bchange and it performs a calculation but if I delete the number in the first get it does not execute the bchange for the second time, is normal or there is something wrong because in my opinion when I update a get automatically the third should be updated [img:2txlyur5]https&#58;//i&#46;postimg&#46;cc/4xmNZ4T4/get&#46;png[/img:2txlyur5] I had never noticed this problem, today trying the program I realized that there was something unusual if I activate the bchange I cannot enter any number in the get [b:2txlyur5]here the sample test [/b:2txlyur5] [code=fw:2txlyur5]<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: #00D7D7;">#include</span> <span style="color: #ff0000;">"report.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"constant.ch"</span><br /><br /> <span style="color: #00C800;">Function</span> test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">Local</span> oDlgMod,oFont,oBold<br /><br />   <span style="color: #00C800;">Local</span> nBottom   := <span style="color: #000000;">19.7</span><br />   <span style="color: #00C800;">Local</span> nRight    := <span style="color: #000000;">65.4</span><br />   <span style="color: #00C800;">Local</span> nWidth    := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> nRight * DLG_CHARPIX_W, <span style="color: #000000;">180</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">Local</span> nHeight   := nBottom * DLG_CHARPIX_H<br />   <span style="color: #00C800;">local</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#93;</span><br /><br />   <span style="color: #00C800;">local</span> nCosto,nSconto,nTotale<br /><br />    nCosto   := <span style="color: #000000;">5.00</span><br />    nSconto  := <span style="color: #000000;">0</span><br />    nTotale  := <span style="color: #000000;">5.00</span><br /><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;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oBold <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span> BOLD<br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgMod <span style="color: #0000ff;">SIZE</span> nWidth, nHeight <span style="color: #0000ff;">PIXEL</span> ;<br />          <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Modifica una tariffa base "</span> <span style="color: #0000ff;">FONT</span> oFont ;<br />          <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_WHITE TRANSPARENT<br />  oDlgMod:<span style="color: #000000;">lHelpIcon</span> := .F.<br />  oDlgMod:<span style="color: #000000;">nStyle</span>    := nOR<span style="color: #000000;">&#40;</span> DS_MODALFRAME, WS_POPUP, WS_CAPTION,  <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br /><br /><br />  @ <span style="color: #000000;">96</span>, <span style="color: #000000;">10</span>  <span style="color: #0000ff;">Say</span> <span style="color: #ff0000;">"Costo :"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">90</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlgMod<br />  @ <span style="color: #000000;">94</span>, <span style="color: #000000;">75</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> nCosto   <span style="color: #0000ff;">OF</span> oDlgMod <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">12</span> ;<br />            <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">PICTURE</span>  <span style="color: #ff0000;">'@ €99,999.99'</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">UPDATE</span> ;<br />            <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> Calcolo_tariffa<span style="color: #000000;">&#40;</span>nCosto,nSconto,@nTotale,aGet,oDlgMod<span style="color: #000000;">&#41;</span><br /><br />  @ <span style="color: #000000;">96</span>, <span style="color: #000000;">145</span>  <span style="color: #0000ff;">Say</span> <span style="color: #ff0000;">"Sconto :"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">90</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlgMod<br />  @ <span style="color: #000000;">94</span>, <span style="color: #000000;">175</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> nsconto   <span style="color: #0000ff;">OF</span> oDlgMod <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">12</span> ;<br />            <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">PICTURE</span>  <span style="color: #ff0000;">'@ €99,999.99'</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">UPDATE</span>  ;<br />           <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> Calcolo_tariffa<span style="color: #000000;">&#40;</span>nCosto,nSconto,@nTotale,aGet,oDlgMod<span style="color: #000000;">&#41;</span><br /><br /><br />           * <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,ntotale:=  ncosto-nsconto<span style="color: #000000;">&#41;</span>,aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">116</span>, <span style="color: #000000;">10</span>  <span style="color: #0000ff;">Say</span> <span style="color: #ff0000;">"Totale :"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">90</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlgMod<br />   @ <span style="color: #000000;">114</span>, <span style="color: #000000;">75</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> ntotale    <span style="color: #0000ff;">OF</span> oDlgMod <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">12</span> ;<br />            <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">PICTURE</span>  <span style="color: #ff0000;">'@ €99,999.99'</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">UPDATE</span><br /><br /><br /> @ <span style="color: #000000;">128</span>,<span style="color: #000000;">160</span>  BUTTONBMP oBtnSave;<br />             <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"    Salva"</span>  ;<br />             <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">45</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">PIXEL</span> ;<br />             <span style="color: #0000ff;">OF</span>  oDlgMod  ;<br />             <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">".<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\S</span>AVE.png"</span> ;<br />             TEXTRIGHT <span style="color: #0000ff;">FONT</span> oBold ;<br />             <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oDlgMod:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span> IDOK <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />    @ <span style="color: #000000;">128</span>,<span style="color: #000000;">210</span> BUTTONBMP oBtnSave;<br />             <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"     Annulla"</span>  ;<br />             <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">45</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">PIXEL</span> ;<br />             <span style="color: #0000ff;">OF</span>  oDlgMod  ;<br />             <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"bitmaps<span style="color: #000000;">\N</span>O.png"</span> ;<br />             TEXTRIGHT <span style="color: #0000ff;">FONT</span> oBold ;<br />             <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oDlgMod:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span> IDCANCEL <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgMod <span style="color: #0000ff;">center</span><br />     * <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>DlgCenter<span style="color: #000000;">&#40;</span> oDlgMod, oGrid <span style="color: #000000;">&#41;</span>, aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><br />      <span style="color: #00C800;">If</span> oDlgMod:<span style="color: #000000;">nresult</span> == IDOK<br />           <span style="color: #00C800;">if</span> msgYesNo<span style="color: #000000;">&#40;</span> i18n<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"¿ E' sicuro di voler modificare questa tariffa ?"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><br />           <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">Endif</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><br />   <span style="color: #00C800;">Function</span> Calcolo_tariffa<span style="color: #000000;">&#40;</span>nCosto,nSconto,nTotale,aGet, oDlgMod<span style="color: #000000;">&#41;</span><br />        ntotale:=  ncosto-nsconto<br />        aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cText</span><span style="color: #000000;">&#40;</span>ntotale<span style="color: #000000;">&#41;</span><br />        oDlgMod:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:2txlyur5]
strange behavior of a TGet
Now I correct with [code=fw:2vvxfz8t]<div class="fw" id="{CB}" style="font-family: monospace;"> <br />&nbsp; @ <span style="color: #000000;">96</span>, <span style="color: #000000;">10</span> &nbsp;<span style="color: #0000ff;">Say</span> <span style="color: #ff0000;">"Costo :"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">90</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlgMod<br />&nbsp; @ <span style="color: #000000;">94</span>, <span style="color: #000000;">75</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> nCosto &nbsp; <span style="color: #0000ff;">OF</span> oDlgMod <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">12</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">PICTURE</span> &nbsp;<span style="color: #ff0000;">'@ €99,999.99'</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">UPDATE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Calcolo_tariffa<span style="color: #000000;">&#40;</span>nCosto,nSconto,@nTotale,aGet<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; @ <span style="color: #000000;">96</span>, <span style="color: #000000;">145</span> &nbsp;<span style="color: #0000ff;">Say</span> <span style="color: #ff0000;">"Sconto :"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">90</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlgMod<br />&nbsp; @ <span style="color: #000000;">94</span>, <span style="color: #000000;">175</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> nsconto &nbsp; <span style="color: #0000ff;">OF</span> oDlgMod <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">12</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">PICTURE</span> &nbsp;<span style="color: #ff0000;">'@ €99,999.99'</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">UPDATE</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Calcolo_tariffa<span style="color: #000000;">&#40;</span>nCosto,nSconto,@nTotale,aGet<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:2vvxfz8t] now it seems to work but it is a little weird behavior this problem never happened
strange date get
Hi all, I have a very strange behaviour of a get object. The date doesn't fire it's bChange code if editing is made by hand. If the get is changed by action button the bChange block works okay. I don't find an explanation or solution for this. Here my code: rc file [code=rc:3hw9d7ga]<div id="{CB}" style="font-family: monospace;">#include <windows.h><br />#include <commctrl.h><br /><br />LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US<br />1 24 "WindowsXP.Manifest"<br /><br />DATE_DLG DIALOG DISCARDABLE 6, 18, 158, 70<br />STYLE WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_VISIBLE<br />CAPTION "Dialog"<br />FONT 10, "MS Sans Serif"<br />{<br />  CONTROL "Date", -1, "Static", WS_GROUP, 8, 12, 24, 9<br />  CONTROL "", 10, "Edit", ES_CENTER|WS_BORDER|WS_TABSTOP, 8, 24, 54, 11, WS_EX_RIGHT|0x00010000<br />  CONTROL "Statistic-Month-Year", -1, "Static", WS_GROUP, 76, 12, 64, 9<br />  CONTROL "", 20, "Edit", ES_AUTOHSCROLL|WS_VSCROLL|WS_BORDER|WS_TABSTOP, 76, 24, 24, 11<br />  CONTROL "", 30, "Edit", ES_CENTER|WS_VSCROLL|WS_BORDER|WS_TABSTOP, 108, 24, 40, 11<br />  CONTROL "Cancel", IDCANCEL, "Button", WS_TABSTOP, 100, 48, 48, 14<br />}<br /> </div>[/code:3hw9d7ga] prg file [code=fw:3hw9d7ga]<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;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//-------------</span><br /><span style="color: #00C800;">LOCAL</span> oDlG, oDate, oStatMonth, oStatYear, oBtn<br /><span style="color: #00C800;">LOCAL</span> hData := <span style="color: #000000;">&#123;</span> => <span style="color: #000000;">&#125;</span><br /><br /><br />   Set<span style="color: #000000;">&#40;</span> _SET_EPOCH,   <span style="color: #000000;">1990</span> <span style="color: #000000;">&#41;</span><br />   Set<span style="color: #000000;">&#40;</span> _SET_DATEFORMAT, <span style="color: #ff0000;">"dd.mm.yyyy"</span> <span style="color: #000000;">&#41;</span><br /><br />   hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"date"</span>       <span style="color: #000000;">&#93;</span> := date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"stat_month"</span> <span style="color: #000000;">&#93;</span> := month<span style="color: #000000;">&#40;</span> date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"stat_year"</span>  <span style="color: #000000;">&#93;</span> := <span style="color: #0000ff;">year</span><span style="color: #000000;">&#40;</span>  date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"DATE_DLG"</span><br /><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oDate <span style="color: #0000ff;">VAR</span> hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"date"</span> <span style="color: #000000;">&#93;</span>;<br />         <span style="color: #0000ff;">ID</span> <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@D"</span>;<br />         BITMAP <span style="color: #ff0000;">""</span> ;<br />         <span style="color: #0000ff;">UPDATE</span>         ;<br />         <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"date"</span> <span style="color: #000000;">&#93;</span> := dGetCal<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                     ,;<br />                  oDate:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                                  ,;<br />                  hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"stat_month"</span> <span style="color: #000000;">&#93;</span> := month<span style="color: #000000;">&#40;</span> hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"date"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>,;<br />                  hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"stat_year"</span>  <span style="color: #000000;">&#93;</span> :=  <span style="color: #0000ff;">year</span><span style="color: #000000;">&#40;</span> hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"date"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>,;<br />                  oStatMonth:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oStatYear:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>        ,;<br />                  oDate:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />                <span style="color: #000000;">&#41;</span>;<br />          <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span>;<br />                  hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"stat_month"</span> <span style="color: #000000;">&#93;</span> := month<span style="color: #000000;">&#40;</span> hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"date"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>,;<br />                  hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"stat_year"</span>  <span style="color: #000000;">&#93;</span> :=  <span style="color: #0000ff;">year</span><span style="color: #000000;">&#40;</span> hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"date"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>,;<br />                  oStatMonth:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oStatYear:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>        ,;<br />               <span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oStatMonth <span style="color: #0000ff;">VAR</span> hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"stat_month"</span> <span style="color: #000000;">&#93;</span>;<br />         <span style="color: #0000ff;">ID</span> <span style="color: #000000;">20</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"99"</span>;<br />         SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">1</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">12</span>      ;<br />         <span style="color: #0000ff;">UPDATE</span><br /><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oStatYear  <span style="color: #0000ff;">VAR</span> hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"stat_year"</span>  <span style="color: #000000;">&#93;</span>;<br />         <span style="color: #0000ff;">ID</span> <span style="color: #000000;">30</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"9999"</span>;<br />         SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">year</span><span style="color: #000000;">&#40;</span> date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span>;<br />                 <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">year</span><span style="color: #000000;">&#40;</span> date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span>;<br />         <span style="color: #0000ff;">UPDATE</span><br /><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">ID</span> IDCANCEL <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> dGetCal<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//-----------------------</span><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> ctod<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"24.12.2008"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:3hw9d7ga] Could please, anyone help me? Thanks, -Detlef
strange date get
Dear Detlef, On your example the ON CHANGE clause of the GET is not implemented You are just defining an ACTION for it
strange date get
Dear Antonio, sorry... I wanted to keep my example short. But I shortened too much. <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> Now the ON CHANGE clause is added. But the effect is still the same. Regards, Detlef
strange date get
It seems to behave fine. When you modify the GET then the other values are updated. What is wrong ?
strange date get
Antonio, when I type in a 5 for month of the date and press enter the following value for stat-month is not updated.
strange date get
Please try this: [code=fw:36m2ms7m]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDate:<span style="color: #000000;">Assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"stat_month"</span> <span style="color: #000000;">&#93;</span> := month<span style="color: #000000;">&#40;</span> hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"date"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"stat_year"</span> &nbsp;<span style="color: #000000;">&#93;</span> := &nbsp;<span style="color: #0000ff;">year</span><span style="color: #000000;">&#40;</span> hData<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"date"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oStatMonth:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oStatYear:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:36m2ms7m]
strange date get
Many thanks Antonio for your support, even on Sunday. [quote="Antonio Linares":3asy34ae]Please try this: .. oDate:Assign()[/quote:3asy34ae] With this it's working fine. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> -Detlef
strange effect on msgbar
In previous versions everything was homogeneous now if I assign the color to the message bar the end (ie the angle) comes in another color and is ugly to see even if I insert the vscroll this in windows seven and win 10 is ugly to see aesthetically I would prefer the old version [img:62qcmuql]https&#58;//i&#46;postimg&#46;cc/V6QpF70k/error-message&#46;jpg[/img:62qcmuql]
strange error
this evening when I compiled is go out this error Warning W8019 c:\Work\bcc7\include\windows\sdk\winnt.h 14984: Code has no effect in function TpDestroyCallbackEnviron
strange error
If I have this test Function test() Local dDatafine:=ctod("14/08/2019") SET DATE FORMAT "dd/mm/yyyy" SET DATE ITALIAN SET CENTURY ON SET EPOCH TO ( YEAR( DATE() ) - 50 ) ? dDatafine return nil it return me this [img:1js52c4k]https&#58;//i&#46;postimg&#46;cc/0rRC79S9/fffffffffffffffffffffffffffffffffffffffffffffff&#46;png[/img:1js52c4k] [b:1js52c4k]WHY ?[/b:1js52c4k]
strange error
What is strange in it? You look at your own code carefully. You have used CTOD() before setting DATE FORMAT. Till you set the date format is the default format "mm/dd/yy". 14 as month is invalid. To avoid such mistakes it is a good idea to use STOD( "20190814" ). This does not depend on date format.
strange error
ja ja ja sorry my mistake,,,,
strange error for calculating days !!Resolved!!
I have 4 date ranges (periods) I have two dates and I want to calculate the number of days for each period. local dcheck_in: = ctod ("17/05/2020") local dCheck_out: = ctod ("17/06/2020") if I do the operation dCheck_out-dcheck_in i get 31 days in the calculation function for the periods they inexplicably become 32 and I have not yet understood why ( see column number 5) [img:3c34c5ca]https&#58;//i&#46;postimg&#46;cc/hPS4S4V3/days&#46;png[/img:3c34c5ca] I have tried with other dates and sometimes the calculation is right and sometimes it is wrong to calculate the days I use this function [code=fw:3c34c5ca]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> GetDayofPeriod<span style="color: #000000;">&#40;</span>dDateFrom,dDateTo,aListini<span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">Local</span> d, n<br /><br /> <span style="color: #B900B9;">//reset days</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;">&#40;</span>aListini<span style="color: #000000;">&#41;</span><br />  aListIni<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:=<span style="color: #000000;">0</span><br /> <span style="color: #00C800;">next</span><br /><br /> <span style="color: #00C800;">For</span> d = dDateFrom <span style="color: #0000ff;">to</span> dDateTo<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;">&#40;</span>aListini<span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">IF</span> d >= aListini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> .and. d <= aListini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />          alistini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> += <span style="color: #000000;">1</span><br />       <span style="color: #00C800;">endif</span><br />    <span style="color: #00C800;">Next</span><br /> <span style="color: #00C800;">Next</span><br /><br /> <span style="color: #00C800;">return</span> alistini</div>[/code:3c34c5ca] if you want to try it, I have prepared a small test Thanks in advance for the help I hope I can get from U [code=fw:3c34c5ca]<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 />request dbfcdx<br />request dbffpt<br /><br /><br />request hb_lang_it<br />request hb_codepage_itwin<br /><br /><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   rddSetDefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br />   setHandleCount<span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span><br /><br />   set date format <span style="color: #ff0000;">"dd-mm-yyyy"</span><br />   set deleted <span style="color: #0000ff;">on</span><br />   set century <span style="color: #0000ff;">on</span><br />   set epoch <span style="color: #0000ff;">to</span> <span style="color: #0000ff;">Year</span><span style="color: #000000;">&#40;</span> Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">20</span><br />   set multiple off<br /><br />    SetBalloon<span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br /><br />   HB_LANGSELECT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"IT"</span> <span style="color: #000000;">&#41;</span><br />   HB_SETCODEPAGE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ITWIN"</span> <span style="color: #000000;">&#41;</span><br /><br /><br />   FWNumFormat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"E"</span>, .t. <span style="color: #000000;">&#41;</span><br /><br />   Create_Dbf<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>   <span style="color: #B900B9;">//periodi.dbf</span><br />   PopulatePeriodi<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />   test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//-------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// I want calculate how many days are on each  period</span><br /><br /><span style="color: #00C800;">Function</span> test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> <span style="color: #00C800;">local</span> dcheck_in   :=ctod<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"17/05/2020"</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//date()</span><br /> <span style="color: #00C800;">local</span> dCheck_out  :=ctod<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"17/06/2020"</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//date()</span><br /> <span style="color: #00C800;">Local</span> aPeriodi:= Crea_Periodi<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">//create array</span><br /> <span style="color: #00C800;">Local</span> aData:=GetDayofPeriod<span style="color: #000000;">&#40;</span>dcheck_in,dCheck_out,aPeriodi<span style="color: #000000;">&#41;</span><br /><br /> xbrowser aData <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Days for period"</span><br /><br />         ?   dCheck_out-dcheck_in<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><br /><span style="color: #00C800;">Function</span> PopulatePeriodi<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> aTemp  := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">Local</span> cYear :=<span style="color: #ff0000;">"2020"</span><br /> <span style="color: #00C800;">Local</span> aDataPeriodi := <span style="color: #000000;">&#123;</span> ;<br />    <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"01/01/"</span>+cYear,<span style="color: #ff0000;">"01"</span>,<span style="color: #ff0000;">"26/07/"</span>+cYear,<span style="color: #ff0000;">"29/08/"</span>+cYear,<span style="color: #ff0000;">"1"</span>,<span style="color: #ff0000;">"Alta Stagione"</span><span style="color: #000000;">&#125;</span>,;<br />    <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"01/01/"</span>+cYear,<span style="color: #ff0000;">"02"</span>,<span style="color: #ff0000;">"28/06/"</span>+cYear,<span style="color: #ff0000;">"25/07/"</span>+cYear,<span style="color: #ff0000;">"3"</span>,<span style="color: #ff0000;">"Media Stagione"</span><span style="color: #000000;">&#125;</span>,;<br />    <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"01/01/"</span>+cYear,<span style="color: #ff0000;">"03"</span>,<span style="color: #ff0000;">"17/05/"</span>+cYear,<span style="color: #ff0000;">"27/06/"</span>+cYear,<span style="color: #ff0000;">"2"</span>,<span style="color: #ff0000;">"Bassa Stagione"</span><span style="color: #000000;">&#125;</span>,;<br />    <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"01/01/"</span>+cYear,<span style="color: #ff0000;">"03"</span>,<span style="color: #ff0000;">"30/08/"</span>+cYear,<span style="color: #ff0000;">"20/09/"</span>+cYear,<span style="color: #ff0000;">"2"</span>,<span style="color: #ff0000;">"Bassa Stagione"</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br /><br />   USE PERIODI <span style="color: #0000ff;">ALIAS</span> PE<br />   <span style="color: #00C800;">If</span> PE-><span style="color: #000000;">&#40;</span>eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />      PE-><span style="color: #000000;">&#40;</span> FW_ArrayToDBF<span style="color: #000000;">&#40;</span>aDataPeriodi<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">Endif</span><br />   DbCloseAll<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><br /><br /><span style="color: #00C800;">Function</span> GetDayofPeriod<span style="color: #000000;">&#40;</span>dDateFrom,dDateTo,aListini<span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">Local</span> d, n<br /><br /> <span style="color: #B900B9;">//reset days</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;">&#40;</span>aListini<span style="color: #000000;">&#41;</span><br />  aListIni<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:=<span style="color: #000000;">0</span><br /> <span style="color: #00C800;">next</span><br /><br /> <span style="color: #00C800;">For</span> d = dDateFrom <span style="color: #0000ff;">to</span> dDateTo<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;">&#40;</span>aListini<span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">IF</span> d >= aListini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> .and. d <= aListini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />          alistini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> += <span style="color: #000000;">1</span><br />       <span style="color: #00C800;">endif</span><br />    <span style="color: #00C800;">Next</span><br /> <span style="color: #00C800;">Next</span><br /><br /> <span style="color: #00C800;">return</span> alistini<br /><br /><br /><br /><br /><br /><span style="color: #00C800;">Function</span> Create_Dbf<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">If</span> .not. file<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Periodi.dbf"</span><span style="color: #000000;">&#41;</span><br /><br />           DbCreate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'PE'</span>,<span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"date"</span>     , <span style="color: #ff0000;">"D"</span>,   <span style="color: #000000;">8</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>,;<br />                           <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"rooms_id"</span> , <span style="color: #ff0000;">"C"</span>,   <span style="color: #000000;">4</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>,;<br />                           <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"check_in"</span> , <span style="color: #ff0000;">"D"</span>,   <span style="color: #000000;">8</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>,;<br />                           <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"check_out"</span>, <span style="color: #ff0000;">"D"</span>,   <span style="color: #000000;">8</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>,;<br />                           <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"status"</span>   , <span style="color: #ff0000;">"C"</span>,   <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>,;<br />                           <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"guest"</span>    , <span style="color: #ff0000;">"C"</span>,  <span style="color: #000000;">30</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">'DBFCDX'</span><span style="color: #000000;">&#41;</span><br /><br /><br />      close all<br />      use &<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'PE'</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span><br />      <span style="color: #0000ff;">select</span> PE<br />      <span style="color: #00C800;">if</span> FILE<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Periodi.DBF'</span><span style="color: #000000;">&#41;</span><br />         delete file &<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Periodi.cdx'</span><span style="color: #000000;">&#41;</span><br />         append <span style="color: #0000ff;">from</span> &<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Periodi'</span><span style="color: #000000;">&#41;</span><br />         dbcommitall<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         close all<br />         delete file &<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Periodi.dbf'</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br />      close all<br />      rename &<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'PE.dbf'</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">to</span> &<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Periodi.dbf'</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">ENDIF</span><br /><br />   <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br />  <span style="color: #00C800;">function</span> Crea_Periodi<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">Local</span> oPeriodi<br />   <span style="color: #00C800;">Local</span> aTemp  := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #00C800;">Local</span> nArea := <span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    oPeriodi:=TDatabase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> ,<span style="color: #ff0000;">"Periodi"</span>, <span style="color: #ff0000;">"DBFCDX"</span>, .T. <span style="color: #000000;">&#41;</span><br />    oPeriodi:<span style="color: #000000;">setorder</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />    oPeriodi:<span style="color: #000000;">gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />         <span style="color: #00C800;">DO</span> <span style="color: #00C800;">While</span> !oPeriodi:<span style="color: #000000;">eof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            AaDd<span style="color: #000000;">&#40;</span>aTemp,<span style="color: #000000;">&#123;</span> oPeriodi:<span style="color: #000000;">check_in</span>,;<br />                            oPeriodi:<span style="color: #000000;">check_out</span>,;<br />                            oPeriodi:<span style="color: #000000;">Guest</span>,;<br />                            oPeriodi:<span style="color: #000000;">rooms_id</span>,;<br />                            <span style="color: #000000;">0</span>,; <span style="color: #B900B9;">//for the days</span><br />                            <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//for the rates</span><br /><br />            oPeriodi:<span style="color: #000000;">skip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">ENDDO</span><br />         oPeriodi:<span style="color: #000000;">close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />          <span style="color: #0000ff;">Select</span> <span style="color: #000000;">&#40;</span>nArea<span style="color: #000000;">&#41;</span><br /> <span style="color: #00C800;">return</span> aTemp<br /><br /><br /><br /> </div>[/code:3c34c5ca]
strange error for calculating days !!Resolved!!
[quote="ADutheil":1pmwg4za]What happens if you change the function to: [code=fw:1pmwg4za]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> GetDayofPeriod<span style="color: #000000;">&#40;</span>dDateFrom,dDateTo,aListini<span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">Local</span> n<br /><br /> <span style="color: #B900B9;">//reset days</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;">&#40;</span>aListini<span style="color: #000000;">&#41;</span><br />  aListIni<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:=<span style="color: #000000;">0</span><br /> <span style="color: #00C800;">next</span><br /><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;">&#40;</span>aListini<span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">IF</span> d >= aListini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> .and. d <= aListini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />       alistini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#40;</span> aListini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> - aListini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">Next</span><br /><br /><span style="color: #00C800;">return</span> alistini</div>[/code:1pmwg4za][/quote:1pmwg4za] happen... Application =========== Path and name: C:\Work\Prg\WinBeach\WinBeach.Exe (32 bits) Size: 7,526,912 bytes Compiler version: Harbour 3.2.0dev (r1904111533) FiveWin version: FWH 20.02 C compiler version: Borland/Embarcadero C++ 7.0 (32-bit) Windows version: 6.1, Build 7600 Time from start: 0 hours 1 mins 32 secs Error occurred at: 25-04-2020, 18:04:48 Error description: Error BASE/1076 Parametro errato: >= Args: [ 1] = U [ 2] = D 01-07-2020 Stack Calls =========== Called from: Source\spiaggia\PInvoice.prg => GETDAYOFPERIOD( 1359 ) Called from: Source\spiaggia\PInvoice.prg => AGGIUNGIPRIMORECORD( 943 ) Called from: Source\spiaggia\PInvoice.prg => (b)INVOICE( 474 ) Called from: .\source\classes\DIALOG.PRG => TDIALOG:PAINT
strange error for calculating days !!Resolved!!
What happens if you change the function to: [code=fw:3gxmgmdh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> GetDayofPeriod<span style="color: #000000;">&#40;</span>dDateFrom,dDateTo,aListini<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Local</span> n<br /><br />&nbsp;<span style="color: #B900B9;">//reset days</span><br />&nbsp;<span style="color: #00C800;">For</span> n=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>aListini<span style="color: #000000;">&#41;</span><br />&nbsp; aListIni<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:=<span style="color: #000000;">0</span><br />&nbsp;<span style="color: #00C800;">next</span><br /><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;">&#40;</span>aListini<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> d >= aListini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> .and. d <= aListini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;alistini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#40;</span> aListini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> - aListini<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">Next</span><br /><br /><span style="color: #00C800;">return</span> alistini</div>[/code:3gxmgmdh]
strange error for calculating days !!Resolved!!
Perhaps the error not is there ... This morning I saw the dateTo is wrong on a my function to update the dates after a modify I have these lines local dStart:= uCharToVal(dDataIniziale, "D" ) local dEnd:= uCharToVal(dDataFinale, "D" ) If I select the from 10 July to 14 July and the dEnd return me 14 March I not Know why and the the calculation days was wrong I use a release of Nages for uCharToVal seems not correct now I correct these lines with oldest my functios and now it seems correct as you can see on this picture [img:2y8zga7r]https&#58;//i&#46;postimg&#46;cc/027LnfR2/jk&#46;png[/img:2y8zga7r]
strange error on index with ftp
I have a strange error making index with dbf and ftp on main.prg I set [b:3imm77lc]REQUEST DBFCDX REQUEST DBFFPT EXTERNAL ORDKEYNO,ORDKEYCOUNT,ORDCREATE,ORDKEYGOTO[/b:3imm77lc] FUNCTION Main() PUBLIC oApp [b:3imm77lc] RddSetDefault( "DBFCDX" )[/b:3imm77lc] SetHandleCount( 100 ) SET DATE FORMAT "dd-mm-yyyy" SET DELETED ON SET CENTURY ON SET EPOCH TO year( date() ) - 20 SET MULTIPLE OFF SetBalloon( .T. ) WITH OBJECT oApp := TApplication():New() :Activate() END RETURN nil when I make the index it make error because it go to found DBT file and not FPT why ? [code=fw:3imm77lc]<div class="fw" id="{CB}" style="font-family: monospace;">Application<br />===========<br />&nbsp; &nbsp;Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\Work\Prg\Studio\Studio.Exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">Size</span>: <span style="color: #000000;">7</span>,<span style="color: #000000;">020</span>,<span style="color: #000000;">544</span> bytes<br />&nbsp; &nbsp;Compiler version: <span style="color: #000000;">Harbour</span> <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>r1703231115<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;FiveWin &nbsp;version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">17.12</span><br />&nbsp; &nbsp;C compiler version: <span style="color: #000000;">Borland</span>/Embarcadero C++ <span style="color: #000000;">7.0</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span>-bit<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Windows version: <span style="color: #000000;">6.1</span>, Build <span style="color: #000000;">7600</span> <br /><br />&nbsp; &nbsp;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;">14</span> secs <br />&nbsp; &nbsp;Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">22</span><span style="color: #000000;">-03</span><span style="color: #000000;">-2018</span>, <span style="color: #000000;">19</span>:<span style="color: #000000;">49</span>:<span style="color: #000000;">37</span><br />&nbsp; &nbsp;Error description: <span style="color: #000000;"><span style="color: #000000;">&#40;</span>DOS</span> Error <span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span> DBFCDX/<span style="color: #000000;">1002</span> &nbsp;Errore in apertura: .\<span style="color: #000000;">2013</span>\<span style="color: #00C800;">Data</span>\Agenda.dbt<br /><br />Stack Calls<br />===========<br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> DBUSEAREA<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\ut\ut_dbf.prg => DB_OPENNOINDEX<span style="color: #000000;">&#40;</span> <span style="color: #000000;">66</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\ut\ut_index.prg => UT_CREARCDX<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1295</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\ut\ut_index.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>UT_INDEXAR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">770</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TDIALOG<span style="color: #000000;">&#40;</span> <span style="color: #000000;">95</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #00C800;">DISPLAY</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">909</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> DIALOGBOXINDIRECT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;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;">&#40;</span> <span style="color: #000000;">296</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\ut\ut_index.prg => UT_INDEXAR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">774</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\Main.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TAPPLICATION_BUILDBTNBAR2<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1224</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\TRBTN.PRG => TRBTN:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">717</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\TRBTN.PRG => TRBTN:<span style="color: #000000;">LBUTTONUP</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">917</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1721</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\TRBTN.PRG => TRBTN:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1575</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3356</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> WINRUN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;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;">&#40;</span> <span style="color: #000000;">1037</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\Main.prg => TAPPLICATION:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">451</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\Main.prg => MAIN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">66</span> <span style="color: #000000;">&#41;</span></div>[/code:3imm77lc] on Index I open the file with no index and make the index
strange error on index with ftp
Hello Silvio, did you found a solution? Best regards, Otto
strange error on index with ftp
no. I 'm working to resolve it
strange error on index with ftp
It shouldn't be needed but try this: [code=fw:15jc66w7]<div class="fw" id="{CB}" style="font-family: monospace;">RDDINFO<span style="color: #000000;">&#40;</span> RDDI_MEMOEXT, <span style="color: #ff0000;">".FPT"</span> <span style="color: #000000;">&#41;</span></div>[/code:15jc66w7] You are going to need this too: [code=fw:15jc66w7]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Dbinfo.ch"</span></div>[/code:15jc66w7] EMG
strange error on index with ftp
enrico, i use other files with ftp and only one make error
strange error on index with ftp
Estimado Silvio . Mira haber si te sirve algpo de esto.. <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=35464">viewtopic.php?f=6&t=35464</a><!-- l --> Creo que si , pronto hare la proxima entrega. Oscar Chacon. <!-- w --><a class="postlink" href="http://www.SITUSR.com">www.SITUSR.com</a><!-- w -->
strange error on link (COMPILING )
this evening when I compiled my application happend this error [1]:iLink32.Exe -Gn -aa -Tpe -s -v @main.bcl Turbo Incremental Link 6.70 Copyright (c) 1997-2014 Embarcadero Technologies, Inc. Warning: C:/Work/Prg/Fsdi_tdatabase/main.ilc: 0x00010000 / 0x08000000 Warning: C:/Work/Prg/Fsdi_tdatabase/main.ild: 0x00010000 / 0x08000000 Warning: C:/Work/Prg/Fsdi_tdatabase/main.ilf: 0x00010000 / 0x0a000000 Warning: C:/Work/Prg/Fsdi_tdatabase/main.ils: 0x0003b000 / 0x08000000 Warning: unknown heap name : 0x08000000 / 0x08000000 Warning: Error detected (LME288) Error: Unable to perform link [size=200:34wngyip] [b:34wngyip]????????[/b:34wngyip][/size:34wngyip] what is happened ?
strange error on link (COMPILING )
Search in the forum for: Error detected (LME288) It has many answers. Look this for example, [url:di6og9ch]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=31426&p=197122&hilit=Error+detected+LME288+#p197122[/url:di6og9ch] Maybe upgrading your BCC to BCC7.4 Solve the problem. Regards.
strange error on link (COMPILING )
I reinstalled windows 10 pro on my tablet miix 320 lenovo now it is ok it come when windows 10 with last upgrade may 2019 I hope Antonio Linares resolve it soon
strange error on link (COMPILING )
It is a Embarcadero issue, not mine <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
strange error on link (COMPILING )
[url:34pnw8j7]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=16&t=33542[/url:34pnw8j7]
strange error on report
I call report with ACTION oApp:oGrid:Report() oGrid is a xbrowse and I have this [img:3urt2eud]https&#58;//i&#46;postimg&#46;cc/kXSHMnJn/AERROR-REPORT&#46;jpg[/img:3urt2eud] the problem is that the first 4 records have the ELATTIVO LOGIC field = .T. as you can see here : [img:3urt2eud]https&#58;//i&#46;postimg&#46;cc/tCLHDSTg/burep&#46;jpg[/img:3urt2eud] why it report FALSE instead of TRUE ?
strange error on report
The xbrowse you are displaying is different from the report you are displaying
strange error on report
this is the original [img:3s0o7ofu]https&#58;//i&#46;postimg&#46;cc/BbLXWgVN/bbgh&#46;png[/img:3s0o7ofu] [img:3s0o7ofu]https&#58;//i&#46;postimg&#46;cc/tTDc60pv/report&#46;png[/img:3s0o7ofu] I saw on the last column it not print any record ( bloccato field) [code=fw:3s0o7ofu]<div class="fw" id="{CB}" style="font-family: monospace;">aBrowse   := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ELATTIVO"</span>,  i18n<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Attivo"</span><span style="color: #000000;">&#41;</span>,,               <span style="color: #000000;">80</span>, <span style="color: #000000;">&#125;</span>,;<br />                  <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ELNOME"</span>,    i18n<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Descrizione elemento"</span><span style="color: #000000;">&#41;</span>,, <span style="color: #000000;">80</span>, <span style="color: #000000;">&#125;</span>,;<br />                  <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">""</span>,          i18n<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Colore "</span><span style="color: #000000;">&#41;</span>,,              <span style="color: #000000;">80</span>, <span style="color: #000000;">&#125;</span>,;<br />                  <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ELCOLORE"</span>,  i18n<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Descr. Colore"</span><span style="color: #000000;">&#41;</span>,,        <span style="color: #000000;">80</span>, <span style="color: #000000;">&#125;</span>,;<br />                  <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ELORDINE"</span>,  i18n<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Ordine"</span><span style="color: #000000;">&#41;</span>,,               <span style="color: #000000;">80</span>, <span style="color: #000000;">&#125;</span>,;<br />                  <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ELLOCK"</span>,    i18n<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Bloccato"</span><span style="color: #000000;">&#41;</span>,,             <span style="color: #000000;">200</span>,<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br /><br />     @<span style="color: #000000;">0</span>,nSplit<span style="color: #000000;">+2</span> <span style="color: #0000ff;">XBROWSE</span> oApp:<span style="color: #000000;">oGrid</span>  ;<br />           <span style="color: #0000ff;">SIZE</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oDlg</span>:<span style="color: #000000;">nGridBottom</span>,oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oDlg</span>:<span style="color: #000000;">nGridRight</span> <span style="color: #0000ff;">PIXEL</span>;<br />           <span style="color: #0000ff;">OF</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oDlg</span> ;<br />           DATASOURCE oElementi COLUMNS aBrowse<br /><br /><br />  WITH OBJECT  oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oGrid</span><br />             WITH OBJECT  oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oGrid</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><br />                     :<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"BTN_PNG_TICK"</span><span style="color: #000000;">&#41;</span><br />                     :<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"BTN_PNG_TICK_RED"</span><span style="color: #000000;">&#41;</span><br />                     :<span style="color: #000000;">bBmpData</span> := <span style="color: #000000;">&#123;</span> || IIF<span style="color: #000000;">&#40;</span> oElementi:<span style="color: #000000;">ELATTIVO</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />                     :<span style="color: #000000;">bEditValue</span> := <span style="color: #ff0000;">""</span><br />                     :<span style="color: #000000;">bStrData</span> := <span style="color: #ff0000;">""</span><br />                  END<br /><br />              WITH OBJECT  oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oGrid</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><br />                :<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> CLR_WHITE, GetBackColor<span style="color: #000000;">&#40;</span>oElementi:<span style="color: #000000;">ELCOLORE</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />                :<span style="color: #000000;">bClrSel</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> CLR_WHITE, GetBackColor<span style="color: #000000;">&#40;</span>oElementi:<span style="color: #000000;">ELCOLORE</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />                :<span style="color: #000000;">bClrSelFocus</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> CLR_WHITE, GetBackColor<span style="color: #000000;">&#40;</span>oElementi:<span style="color: #000000;">ELCOLORE</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />               END<br /><br />                  WITH OBJECT  oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oGrid</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span><br />                              :<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"BTN_PNG_LOCKSI"</span><span style="color: #000000;">&#41;</span><br />                             * :<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"BTN_PNG_LOCKNO"</span><span style="color: #000000;">&#41;</span><br />                              :<span style="color: #000000;">bBmpData</span> := <span style="color: #000000;">&#123;</span> || IIF<span style="color: #000000;">&#40;</span> oElementi:<span style="color: #000000;">ELLOCK</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />                              :<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">NIL</span>  <span style="color: #000000;">&#125;</span><br />                   END<br /><br /><br />                      :<span style="color: #000000;">nClrBorder</span> := CLR_GRAY<br />                      :<span style="color: #000000;">nMarqueeStyle</span>       := MARQSTYLE_HIGHLWIN7<br />                      :<span style="color: #000000;">lHscroll</span>            := .F.<br />                      :<span style="color: #000000;">l2007</span>               := .F.<br />                      :<span style="color: #000000;">l2015</span>               := .T.<br />                      :<span style="color: #000000;">nStretchCol</span>         := STRETCHCOL_WIDEST<br />                      :<span style="color: #000000;">lAllowRowSizing</span>     := .F.<br />                      :<span style="color: #000000;">lAllowColSwapping</span>   := .F.<br />                      :<span style="color: #000000;">lAllowColHiding</span>     := .F.<br />                      :<span style="color: #000000;">lRecordSelector</span>     := .F.<br />                      :<span style="color: #000000;">nColDividerStyle</span>    := LINESTYLE_LIGHTGRAY<br />                      :<span style="color: #000000;">nRowDividerStyle</span>    := LINESTYLE_LIGHTGRAY<br />                      :<span style="color: #000000;">nRowDividerStyle</span>    := LINESTYLE_NOLINES<br />                      :<span style="color: #000000;">nColDividerStyle</span>    := LINESTYLE_LIGHTGRAY<br />                      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /><br /><br /><br /><br /><br /><br /><br /><br /> </div>[/code:3s0o7ofu]
strange error on xbrowse
I must show bitmaps on a column for different type of record I made at init // prendo i bitmaps dei gradi oDTipGrad:=Apri_Dbf("Tabelle" ) // open database (oDTipGrad)->(DbSeek("G")) DO WHILE (oDTipGrad)->CveTab="G" .AND. !(oDTipGrad)->(EoF()) AAdd(aGradiBmp,(oDTipGrad)->Bitmap) (oDTipGrad)->(DbSkip()) ENDDO Chiudi_Dbf("Tabelle",oDTipGrad) // close database and I save on aGradiBmp all bitmaps sample ".\bitmaps\gradi\0028.bmp" then on xbrowse I made oCol:= oApp():oGrid:AddCol() oCol:AddBmpFile(".\BITMAPS\GRID\SORT1.BMP") oCol:AddBmpFile(".\BITMAPS\GRID\SORT2.BMP") oCol:cHeader := "Grado" oCol:nHeadBmpNo := if( (oDVds)->( ORDNUMBER() ) == 7, 1, 2) oCol:nHeadBmpAlign := AL_RIGHT [b:1419fawm]AEval( aGradiBmp, { |cBmpFile| oCol:AddBmpFile(cBmpFile)} )[/b:1419fawm] oCol:bBmpData := { || (oDVds)->GRADO+2} oCol:nWidth :=40 this runned ok but now I cannot show the bitmaps
strange error on xbrowse
Please make sure that all elements of aGradiBmp represent correct filepaths, If necessary first check all elements of the array with File(aGradiBmp[n]) before creating xbrowse. Incidentally with recent versions of xbrowse instead of [code=fw:2p88hqwi]<div class="fw" id="{CB}" style="font-family: monospace;">AEval<span style="color: #000000;">&#40;</span> aGradiBmp, <span style="color: #000000;">&#123;</span> |cBmpFile| oCol:<span style="color: #000000;">AddBmpFile</span><span style="color: #000000;">&#40;</span>cBmpFile<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2p88hqwi] you can write [code=fw:2p88hqwi]<div class="fw" id="{CB}" style="font-family: monospace;">oCol:<span style="color: #000000;">AddBitmap</span><span style="color: #000000;">&#40;</span> aGradiBmp <span style="color: #000000;">&#41;</span></div>[/code:2p88hqwi]
strange error on xbrowse
NOT RUN I made // prendo i bitmaps dei gradi oDTipGrad:=Apri_Dbf("Tabelle" ) (oDTipGrad)->(DbSeek("G")) DO WHILE (oDTipGrad)->CveTab="G" .AND. !(oDTipGrad)->(EoF()) AAdd(aGradiBmp,(oDTipGrad)->Bitmap) (oDTipGrad)->(DbSkip()) ENDDO Chiudi_Dbf("Tabelle",oDTipGrad) // to control file FOR n=1 TO len(aGradiBmp) IF ! file( aGradiBmp[n]) MsgInfo("NoT exit file bmp") endif next oCol:= oApp():oGrid:AddCol() oCol:AddBmpFile(".\BITMAPS\GRID\SORT1.BMP") oCol:AddBmpFile(".\BITMAPS\GRID\SORT2.BMP") oCol:cHeader := "Grado" oCol:nHeadBmpNo := if( (oDVds)->( ORDNUMBER() ) == 7, 1, 2) oCol:nHeadBmpAlign := AL_RIGHT [b:1lsampqo] oCol:AddBitmap( aGradiBmp )[/b:1lsampqo] oCol:bBmpData := { || (oDVds)->GRADO+2} // I add 2 because the first and second are for the sort oCol:nWidth :=40 WITH OBJECT oApp():oGrid :nMarqueeStyle = 7 // MARQSTYLE_HIGHLWIN7 // for Windows 7 style :nFreeze :=3 :SetRDD() :nRecSelColor = 15512898 // :bClrStd := { || Colores(oDVds) } // :bClrSelFocus = { || { 0, DARKCYAN } } // :bClrSel ={ || { 0, DARKCYAN } } :bChange :={ || (RefreshCont(oCont,oDVds)) } END oApp():oGrid:CreateFromCode()
strange error on xbrowse
Dear Nages , Can you see this test please [code=fw:3fvg3m45]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> MARQSTYLE_HIGHLWIN7 &nbsp;<span style="color: #000000;">7</span><br /><br />REQUEST DBFCDX, DBFFPT<br />external ordkeyno, ordkeycount,ordcreate<br /><br /><span style="color: #00C800;">FUNCTION</span> TEST<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> aGradiBmp:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>,oDTipGrad,n<br /><span style="color: #00C800;">Local</span> oGrid,oDVds<br /><span style="color: #00C800;">Local</span> oDlg<br /><br />&nbsp;RddSetDefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp;USE TABELLE <span style="color: #0000ff;">ALIAS</span> oDTipGrad <span style="color: #0000ff;">INDEX</span> TABELLE<br /><br />&nbsp; oDTipGrad-><span style="color: #000000;">&#40;</span>DbSeek<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"G"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> oDTipGrad->CveTab=<span style="color: #ff0000;">"G"</span> .AND. !oDTipGrad-><span style="color: #000000;">&#40;</span>EoF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span>aGradiBmp,oDTipGrad->Bitmap<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oDTipGrad-><span style="color: #000000;">&#40;</span>DbSkip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDDO</span><br /><br />&nbsp;<span style="color: #00C800;">FOR</span> n=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> len<span style="color: #000000;">&#40;</span>aGradiBmp<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> ! file<span style="color: #000000;">&#40;</span> aGradiBmp<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"non esiste"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br /><br /><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;">800</span>,<span style="color: #000000;">600</span><br /><br />&nbsp; &nbsp;oGrid := TXBrWin7<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oGrid:<span style="color: #000000;">nTop</span> &nbsp; &nbsp;:= <span style="color: #000000;">00</span><br />&nbsp; &nbsp;oGrid:<span style="color: #000000;">nLeft</span> &nbsp; := <span style="color: #000000;">00</span><br />&nbsp; &nbsp;oGrid:<span style="color: #000000;">nBottom</span> := &nbsp;<span style="color: #000000;">200</span><br />&nbsp; &nbsp;oGrid:<span style="color: #000000;">nRight</span> &nbsp;:= &nbsp;<span style="color: #000000;">400</span><br /><br /><br />USE SOCI <span style="color: #0000ff;">ALIAS</span> oDVds<br />oDVds-><span style="color: #000000;">&#40;</span>OrdSetFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />oDVds-><span style="color: #000000;">&#40;</span>DbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp;oCol:= oGrid:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;oCol:<span style="color: #000000;">AddBmpFile</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">".<span style="color: #000000;">\B</span>ITMAPS<span style="color: #000000;">\G</span>RID<span style="color: #000000;">\S</span>ORT1.BMP"</span><span style="color: #000000;">&#41;</span><br />&nbsp;oCol:<span style="color: #000000;">AddBmpFile</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">".<span style="color: #000000;">\B</span>ITMAPS<span style="color: #000000;">\G</span>RID<span style="color: #000000;">\S</span>ORT2.BMP"</span><span style="color: #000000;">&#41;</span><br />&nbsp;oCol:<span style="color: #000000;">AddBitmap</span><span style="color: #000000;">&#40;</span> aGradiBmp <span style="color: #000000;">&#41;</span><br />&nbsp;oCol:<span style="color: #000000;">cHeader</span> &nbsp;:= <span style="color: #ff0000;">"Grado"</span><br />&nbsp;oCol:<span style="color: #000000;">nHeadBmpNo</span> &nbsp; &nbsp;:= <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> oDVds-><span style="color: #000000;">&#40;</span> ORDNUMBER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">7</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />&nbsp;oCol:<span style="color: #000000;">bBmpData</span> := <span style="color: #000000;">&#123;</span> || oDVds->GRADO<span style="color: #000000;">+2</span><span style="color: #000000;">&#125;</span><br />&nbsp;oCol:<span style="color: #000000;">nWidth</span> &nbsp; :=<span style="color: #000000;">40</span><br /><br /><br /><br />&nbsp;WITH OBJECT oGrid<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nMarqueeStyle</span> &nbsp; &nbsp;= <span style="color: #000000;">7</span> <span style="color: #B900B9;">// MARQSTYLE_HIGHLWIN7 &nbsp;// for Windows 7 style</span><br /><br />&nbsp; &nbsp;END<br /><br />&nbsp;oGrid:<span style="color: #000000;">SetRDD</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;oGrid:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:3fvg3m45] [b:3fvg3m45]where is the error ?[/b:3fvg3m45]
strange error on xbrowse
Nages have try the test ?
strange error with Pelles
[1]:PORC.EXE Resource\default.rc /I c:\work\pellesc\include /I c:\work\pellesc\include\win PORC: Resource\default.rc(54): error: File not found: 'beach\simboliote.png'. PORC: Resource\default.rc(55): error: File not found: 'beach\simboliew.png'. I have on default.rc BTN_PNG_NOTE 10 "beach\simboli\note.png" BTN_PNG_ALL 10 "beach\simboli\new.png" why not accept the string \simboli\new.png ?
strange error with Pelles
Intenta: [code=fw:2emdt9v8]<div class="fw" id="{CB}" style="font-family: monospace;"><br />BTN_PNG_NOTE <span style="color: #000000;">10</span> <span style="color: #ff0000;">".<span style="color: #000000;">\b</span>each<span style="color: #000000;">\s</span>imboli<span style="color: #000000;">\n</span>ote.png"</span><br />BTN_PNG_ALL <span style="color: #000000;">10</span> <span style="color: #ff0000;">".<span style="color: #000000;">\b</span>each<span style="color: #000000;">\s</span>imboli<span style="color: #000000;">\n</span>ew.png"</span><br />&nbsp;</div>[/code:2emdt9v8]
strange error with Pelles
resolved with BTN_PNG_NOTE 10 "beach/simboli/note.png" BTN_PNG_ALL 10 "beach/simboli/new.png"
strange error with png files
friends, I tried a small prg to show a background file png and two button ( btnbmp) with png file into a Wnd I have some problems as you can see the btnbmp are not transparent [img:1uxyuuza]http&#58;//www&#46;eoeo&#46;it/wp-content/uploads/2016/01/nn&#46;jpg[/img:1uxyuuza] [code=fw:1uxyuuza]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br />&nbsp;<span style="color: #00C800;">Static</span> c_path,c_path1,oBackground<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br /><br /><br />&nbsp; &nbsp; c_path := cFilePath<span style="color: #000000;">&#40;</span>GetModuleFileName<span style="color: #000000;">&#40;</span> GetInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; c_path1 := c_Path + <span style="color: #ff0000;">"IMAGES<span style="color: #000000;">\"</span><br /><br />&nbsp; &nbsp; DEFINE IMAGE oBackground FILENAME c_path1 + "</span>Back.png<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp; &nbsp;DEFINE WINDOW oWnd FROM 10, 10 TO 48,110<br /><br /><br /><br />@ 200, 450 BTNBMP oBtn[1] OF oWnd &nbsp;;<br />SIZE 80, 80 ;<br />PROMPT "</span><span style="color: #ff0000;">";<br />NOBORDER ;<br />FILE c_Path1 + "</span>Pay.png<span style="color: #ff0000;">" ;<br />ACTION MsgInfo("</span>Pay<span style="color: #ff0000;">")<br />oBtn[1]:lEllipse := .T.<br />oBtn[1]:lTransparent := .T.<br /><br />@ 350, 520 BTNBMP oBtn[2] OF oWnd &nbsp;;<br />SIZE 120, 80 ;<br />PROMPT "</span><span style="color: #ff0000;">";<br />NOBORDER ;<br />FILE c_Path1 + "</span>Spin.png<span style="color: #ff0000;">" ;<br />ACTION MsgInfo("</span>spin<span style="color: #ff0000;">")<br />oBtn[2]:lTransparent := .T.<br /><br /><br />&nbsp;ACTIVATE WINDOW oWnd ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ON PAINT ( ABPaint( hDC, 50, 10, oBackground:hBitmap, 255 ) )<br /><br />// &nbsp; &nbsp;another test ON PAINT &nbsp; PaintTransparent( hDC, oBackground:hBitmap, 0, 0 )<br /><br />//-----------------------------------------------------------------------------//<br /><br />&nbsp;function PaintTransparent( hDC, hBitmap, nRow, nCol )<br /><br />&nbsp; &nbsp;local hBmpOld := SelectObject( hDC, hBitmap )<br />&nbsp; &nbsp;local nZeroZeroClr := GetPixel( hDC, 0, 0 )<br />&nbsp; &nbsp;local nOldClr<br /><br />&nbsp; &nbsp;SelectObject( hDC, hBmpOld )<br />&nbsp; &nbsp;nOldClr = SetBkColor( hDC, nRGB( 255, 255, 255 ) )<br />&nbsp; &nbsp;TransBmp( hBitmap, nBmpWidth( hBitmap ), nBmpHeight( hBitmap ),;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nZeroZeroClr, hDC, nRow, nCol, nBmpWidth( hBitmap ), nBmpHeight( hBitmap ) )<br />&nbsp; &nbsp;SetBkColor( hDC, nOldClr )<br /><br />&nbsp; &nbsp;return nil</span></div>[/code:1uxyuuza]
strange error with png files
Silvio, Painting a Button on top of a image doesn't work ( the transparent area shows the window-brush ) The following solution works, merging 2 images for brush usage Using PIXELFORMER 1. load and copy the needed image 2. create a new image with the window-size and wanted backgound-color 3. past the copied image 4. save the new merged image as new image 5. use it as a wnd-brush [color=#0000FF:1dd6x0t2][b:1dd6x0t2]DEFINE BRUSH oBrush1 FILENAME c_path1 + "Backgrd.png" DEFINE WINDOW oWnd FROM 50, 50 TO 600, 800 TITLE "GDIPLUS-test" ; STYLE WS_POPUP BRUSH oBrush1 PIXEL[/b:1dd6x0t2][/color:1dd6x0t2] [img:1dd6x0t2]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Btnonimg1&#46;jpg[/img:1dd6x0t2] best regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
strange error with png files
I cannot use a brush because I must insert the background on window on exactly position I explain you I have a png where you can see a room as the picture I sent you and the reels must be on center ( see the e-mail) I use oWnd:bPainted := {|hDC| PalBmpDraw( hDC, 0, 0, oBackground:hBitmap,, oWnd:nWidth, oWnd:nHeight,, .T.) } then I must make a configuration for the touch monitor I found local nMINWidth := 1200 local nMINHeight := 900 local nMAXWidth := 1200//GETSYSMETRICS( 0 ) //risoluzione orizzontale local nMAXHeight := 900//GETSYSMETRICS( 1 ) //risoluzione verticale oWnd:aMinMaxInfo = { GETSYSMETRICS( 0 ), GETSYSMETRICS( 1 ),; // xMaxSize, yMaxSize 0, 0,; // xMaxPosition, yMaxPosition nMINWidth, nMINHeight,; // xMinTrackSize, yMinTrackSize nMAXWidth, nMAXHeight } I cannot insert buttons ( png) on bottom
strange errors
Today I compiles this test and I have strange errors on compilation and I not Know why I have Harbour and last fwh with bcc7 where are the errors ? [b:oj648w9w]the test[/b:oj648w9w] [code=fw:oj648w9w]<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> SalvaImage<span style="color: #000000;">&#40;</span>oImg<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">Local</span> nType<br />   <span style="color: #00C800;">local</span> oBmp  := GdiBmp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">local</span> cFile := cGetFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Bitmap (*.bmp)| *.bmp|"</span> +         ;<br />                                <span style="color: #ff0000;">"JPEG  (*.jpg)| *.jpg|"</span> +          ;<br />                                <span style="color: #ff0000;">"GIF   (*.gif)| *.gif|"</span>  +         ;<br />                                <span style="color: #ff0000;">"TIFF (*.tif)| *.tif|"</span> +           ;<br />                                <span style="color: #ff0000;">"PNG   (*.png)| *.png"</span>            ;<br />                                ,<span style="color: #ff0000;">"Salva con il nome"</span>,  hb_CurDrive<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> , .t. <span style="color: #000000;">&#41;</span><br /><br /><br />  <span style="color: #B900B9;">// oBmp:hBmp   := GDIP_FROMHBITMAP( oImg:GetHBitmap(), oImg:aPalBmp[ 1 ], .T. )</span><br />   oBmp:<span style="color: #000000;">hBmp</span>   := oImg:<span style="color: #000000;">aPalBmp</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br /><br />   <span style="color: #00C800;">IF</span> .NOT. EMPTY<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br />             nType := NGETFILEFILTER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />            <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br />                  <span style="color: #00C800;">CASE</span> nType == <span style="color: #000000;">1</span><br />                   cExt := <span style="color: #ff0000;">"bmp"</span><br />                  <span style="color: #00C800;">CASE</span> nType == <span style="color: #000000;">2</span><br />                   cExt := <span style="color: #ff0000;">"jpg"</span><br />                  <span style="color: #00C800;">CASE</span> nType == <span style="color: #000000;">3</span><br />                   cExt := <span style="color: #ff0000;">"gif"</span><br />                  <span style="color: #00C800;">CASE</span> nType == <span style="color: #000000;">4</span><br />                   cExt := <span style="color: #ff0000;">"tif"</span><br />                  <span style="color: #00C800;">CASE</span> nType == <span style="color: #000000;">5</span><br />                   cExt := <span style="color: #ff0000;">"png"</span><br />                <span style="color: #00C800;">ENDCASE</span><br /><br /><br />             cFile := cFilePath<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> + cFileNoExt<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"."</span> + cExt<br /><br />               <span style="color: #00C800;">IF</span> oImagePreview:<span style="color: #000000;">nZoom</span> == <span style="color: #000000;">1</span> .and. oImagePreview:<span style="color: #000000;">nRotate</span> == <span style="color: #000000;">0</span><br />                 oImagePreview:<span style="color: #000000;">SaveImage</span><span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br />               <span style="color: #00C800;">ELSE</span><br />                  SaveImgMod<span style="color: #000000;">&#40;</span> oImagePreview,  cFile,,oBmp <span style="color: #000000;">&#41;</span><br />              <span style="color: #00C800;">ENDIF</span><br /><br />             <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"saved as: "</span>+ cFile<span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">ENDIF</span><br /><br />     <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//------------------------------------------------------------------//</span><br /><br /> <span style="color: #00C800;">Function</span> SaveImgMod<span style="color: #000000;">&#40;</span> oImg, cFile, lDimImg,oBmp <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> lRet       := .F.<br />  <span style="color: #B900B9;">// local oBmp</span><br />   <span style="color: #00C800;">local</span> oRect<br />   <span style="color: #00C800;">DEFAULT</span> lDimImg  := .F.<br />   <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br />      oRect      := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> lDimImg, oImg:<span style="color: #000000;">oRect</span>, oImg:<span style="color: #000000;">GetCliRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />     <span style="color: #B900B9;">// oBmp       := GdiBmp():New()</span><br />      oBmp:<span style="color: #000000;">hBmp</span>  := GDIPLUSCAPTURERECTWND<span style="color: #000000;">&#40;</span> oImg:<span style="color: #000000;">hWnd</span>, ;<br />                       oRect:<span style="color: #000000;">nTop</span>  + <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> oImg:<span style="color: #000000;">lBorder</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, ;<br />                       oRect:<span style="color: #000000;">nLeft</span> + <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> oImg:<span style="color: #000000;">lBorder</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, ;<br />                       oRect:<span style="color: #000000;">nRight</span> - oRect:<span style="color: #000000;">nLeft</span> - <span style="color: #000000;">1</span> - <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> oImg:<span style="color: #000000;">lBorder</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, ;<br />                       oRect:<span style="color: #000000;">nBottom</span> - oRect:<span style="color: #000000;">nTop</span> - <span style="color: #000000;">1</span> - <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> oImg:<span style="color: #000000;">lBorder</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      lRet  := oBmp:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br />      oBmp:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">else</span><br />      <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Name File Empty"</span>, <span style="color: #ff0000;">"Attention"</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">Return</span> lRet<br /><br /><span style="color: #B900B9;">//------------------------------------------------------------------/</span><br />&nbsp;</div>[/code:oj648w9w] [b:oj648w9w]the errors[/b:oj648w9w] [code=fw:oj648w9w]<div class="fw" id="{CB}" style="font-family: monospace;">Progetto: <span style="color: #000000;">test</span>, Ambiente: <span style="color: #000000;">bcc7Harbor</span>:<br /><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Harbour</span>.Exe test2.prg  /m /n0 /gc1 /es2 /a /iC:\Work\fwh\include /iC:\work\HARBOUR\Include /jI18n\Main.hil /iinclude;c:\work\fwh\include;C:\work\HARBOUR\include /oObj\test2.c<br />Harbour <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>r1703231115<span style="color: #000000;">&#41;</span><br />Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1999</span><span style="color: #000000;">-2016</span>, http:<span style="color: #B900B9;">//harbour-project.org/</span><br />Compiling <span style="color: #ff0000;">'test2.prg'</span>...<br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">11</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">14</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">15</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">17</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">18</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">21</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">22</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">23</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">24</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">25</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">26</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">27</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">28</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">29</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">31</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">43</span><span style="color: #000000;">&#41;</span> Error E0010  <span style="color: #00C800;">ENDIF</span> does not <span style="color: #0000ff;">match</span> <span style="color: #00C800;">IF</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">51</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">52</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">53</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">54</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">55</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">56</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">57</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">62</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">63</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">64</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">65</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">66</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br />test2.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">67</span><span style="color: #000000;">&#41;</span> Error E0030  Syntax error <span style="color: #ff0000;">"syntax error at ' '"</span><br /><span style="color: #000000;">32</span> errors<br /><br />No code generated.<br /> </div>[/code:oj648w9w]
strange errors
Silvio, I can't test your code since I don't use Harbour and I don't have the latest FW version installed. However all those syntax errors look like they might be invisible characters. This used to happen whenever you copied code online using the MS Edge browser--it stuck in a lot of characters that you couldn't see but generated lots of syntax errors. James
strange errors
ok I found the error I used Edge on win10 this morning I use moxilla and it is compiled thanks
strange errors
Silvio, you are using an old version of Edge. Please update Windows 10. MS has fixed this problem months ago. EMG
strange errors
strange I have edge updated
strange errors
Silvio, My Edge is also fixed. Check your file date: c:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe Mine is dated 12/7/2017. Alternately, you can use Explorer. James
strange errors
mine date is 06.01.2018 Microsoft Edge 40.15063.0.0 Microsoft EdgeHTML 15.15063
strange errors
They look old. These are mine: Microsoft Edge 41.16299.15.0 Microsoft EdgeHTML 16.16299 EMG
strange errors
I have the same versions as Enrico. Slivio, something seems very wrong with yours. You have a newer date on the file and an older version number.
strange errors
I not Know How upgrade edge not found on Internet a link and my Pc windowsupdaye let me say the system is updated on 12.01.2018 last windows 10 Pro update
strange errors
Silvio, It may just be that the Win 10 Home and Win 10 Pro versions are different, and that they have not fixed the Pro version of Edge yet. If so, then you will just have to wait and avoid using Edge to copy code from. I know it will be hard to remember, because I kept forgetting and doing it myself. James
strange errors
[quote="James Bott":3h3ldes3]It may just be that the Win 10 Home and Win 10 Pro versions are different, and that they have not fixed the Pro version of Edge yet.[/quote:3h3ldes3] No, I have Windows 10 Pro 1709 16299.192 and Edge [b:3h3ldes3]is[/b:3h3ldes3] updated. EMG
strange errors
I have w19 home. Perhaps win10pro is updated.
strange execution of Index
I have a dbf and made 3 index USE SERVIZI ALIAS SERVIZI INDEX ON SERVIZI->ID TAG ID TO SERVIZI FOR !deleted() INDEX ON UPPER(SERVIZI->NAME) TAG NAME TO SERVIZI FOR !deleted() INDEX ON SERVIZI->ORDINE TAG ORDINE TO SERVIZI FOR !deleted() Now I wish see the dbf index on Ordine field If I made [b:1bi1sg6i]SERVIZI->( DbSetOrder(3 ) ) //ORDINE[/b:1bi1sg6i] SERVIZI->( DBGOTOP() ) XBROWSE() [b:1bi1sg6i]then I see this[/b:1bi1sg6i] [img:1bi1sg6i]https&#58;//i&#46;postimg&#46;cc/qqYrTd3g/bu1&#46;png[/img:1bi1sg6i] [b:1bi1sg6i]check the last column [/b:1bi1sg6i] [b:1bi1sg6i]if I made [/b:1bi1sg6i] [b:1bi1sg6i] SERVIZI->( DbSetOrder("ordine" ) ) //ORDINE[/b:1bi1sg6i] SERVIZI->( DBGOTOP() ) XBROWSE() [b:1bi1sg6i]then I see this [/b:1bi1sg6i] [img:1bi1sg6i]https&#58;//i&#46;postimg&#46;cc/63bJrNzz/22&#46;png[/img:1bi1sg6i] [b:1bi1sg6i]why ?[/b:1bi1sg6i]
strange execution of Index
What did you expect to see? We can't see the Ordine column so we can't tell if it is correct.
strange execution of Index
I think the problem for Silvio is that the index "order" is not the number 3. may be you can use [b:3ltuew6s]IndexOrd[/b:3ltuew6s] to see what number it is. or get informations by this piece of code (untested): [code=fw:3ltuew6s]<div class="fw" id="{CB}" style="font-family: monospace;">cMsg := <span style="color: #ff0000;">""</span><br /><span style="color: #00C800;">for</span> j = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> OrdCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> IndexKey<span style="color: #000000;">&#40;</span> j <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      OrdSetFocus<span style="color: #000000;">&#40;</span> j <span style="color: #000000;">&#41;</span><br />      cMsg += Str<span style="color: #000000;">&#40;</span>j<span style="color: #000000;">&#41;</span> <span style="color: #ff0000;">" OrdName:"</span> + OrdName<span style="color: #000000;">&#40;</span> j <span style="color: #000000;">&#41;</span><br />      cMsg += <span style="color: #ff0000;">" Key: "</span> + IndexKey<span style="color: #000000;">&#40;</span>j<span style="color: #000000;">&#41;</span> + CRLF<br />   <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">next</span><br /><span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>cMsg<span style="color: #000000;">&#41;</span><br />SetClipboardData<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #B900B9;">/* CF_TEXT */</span>, cMsg <span style="color: #000000;">&#41;</span><br /> </div>[/code:3ltuew6s]
strange execution of Index
Silvio, Mr. Rao told that there can be a issue when building indexes like this : INDEX ON SERVIZI->ID TAG ID TO SERVIZI FOR !deleted() See : <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=33776&hilit=field">viewtopic.php?f=3&t=33776&hilit=field</a><!-- l --> Maybe this wil help your problem.
strange execution of Index
I have ID as Character sample "0001", name as Character , Ordine as Number the problem is on ordine field if I use dbsetorder(3) instead of dbsetorder("ordine") is the tag
strange execution of Index
Silvio, You can't use aliases in an index.
strange execution of Index
Silvio, This code is working fine here. [code=fw:rtphhr8z]<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;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   REQUEST DBFCDX<br />   rddsetdefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br />   SET EXCLUSIVE OFF<br />   SET<span style="color: #000000;">&#40;</span>_SET_AUTOPEN, .T. <span style="color: #000000;">&#41;</span>   <br /><br /><br />   USE SERVIZI <span style="color: #0000ff;">ALIAS</span> SERVIZI<br />   <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">ID</span> TAG <span style="color: #0000ff;">ID</span> <span style="color: #0000ff;">TO</span> SERVIZI <span style="color: #00C800;">FOR</span> !deleted<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> UPPER<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">NAME</span><span style="color: #000000;">&#41;</span> TAG <span style="color: #0000ff;">NAME</span> <span style="color: #0000ff;">TO</span> SERVIZI <span style="color: #00C800;">FOR</span> !deleted<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> ORDINE TAG ORDINE <span style="color: #0000ff;">TO</span> SERVIZI <span style="color: #00C800;">FOR</span> !deleted<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   Set order <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">"name"</span><br />   go top<br />   browse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <br />   set order <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">"ordine"</span><br />   go top<br />   browse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <br />   set order <span style="color: #0000ff;">to</span> <span style="color: #000000;">3</span><br />   go top<br />   browse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span></div>[/code:rtphhr8z]
strange execution of Index
Silvio, DbSetOrder( <nIndexPos> ) --> NIL Arguments <nIndexPos> This is the numeric ordinal position of the index to activate as the controlling index. Indexes are numbered in the sequence they are opened with OrdListAdd(), try this way: [code=fw:1f9382d4]<div class="fw" id="{CB}" style="font-family: monospace;">SERVIZI-><span style="color: #000000;">&#40;</span> OrdSetFocus<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ORDINE"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:1f9382d4]
strange execution of Index
I made allways servizi->(dbsetorder(number_of_index)) why now I must make servizi->(dbsetorder(tagname)) Incredible!!!!
strange execution of Index
Silvio, I noticed that the file was already in ORDINE order, so I changed a couple of them. Then when I ran it they were not indexed properly. Then I realized I had forgotten to delete the existing index before building the indexes. I did that and now it is working. [code=fw:lhyx1bso]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   REQUEST DBFCDX<br />   rddsetdefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br />   SET EXCLUSIVE OFF<br />   SET<span style="color: #000000;">&#40;</span>_SET_AUTOPEN, .T. <span style="color: #000000;">&#41;</span>   <br /><br />   ferase<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"servizi.cdx"</span><span style="color: #000000;">&#41;</span><br />   USE SERVIZI <span style="color: #0000ff;">ALIAS</span> SERVIZI<br />   <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">ID</span> TAG <span style="color: #0000ff;">ID</span> <span style="color: #0000ff;">TO</span> SERVIZI <span style="color: #00C800;">FOR</span> !deleted<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> UPPER<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">NAME</span><span style="color: #000000;">&#41;</span> TAG <span style="color: #0000ff;">NAME</span> <span style="color: #0000ff;">TO</span> SERVIZI <span style="color: #00C800;">FOR</span> !deleted<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> ORDINE TAG ORDINE <span style="color: #0000ff;">TO</span> SERVIZI <span style="color: #00C800;">FOR</span> !deleted<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   Set order <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">"name"</span><br />   go top<br />   browse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <br />   set order <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">"ordine"</span><br />   go top<br />   browse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <br />   <span style="color: #B900B9;">//set order to 3</span><br />   SERVIZI-><span style="color: #000000;">&#40;</span> DbSetOrder<span style="color: #000000;">&#40;</span><span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   go top<br />   browse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:lhyx1bso]