topic
stringlengths
1
63
text
stringlengths
1
577k
show only some records on Xbrowse ( nRecords year)
I will display n records in an array, default 10 records I use Tdatabase and made a Set filter as you can see on this method [code=fw:xcv7cp6g]<div class="fw" id="{CB}" style="font-family: monospace;">  <span style="color: #00C800;">METHOD</span> Load_Data<span style="color: #000000;">&#40;</span>nCount<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TLOTTO<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> nLastRecords,nInit,nEnd<br /><br />  <span style="color: #00C800;">DEFAULT</span> nCount := <span style="color: #000000;">10</span><br /><br />    ::<span style="color: #000000;">olotto</span> := TArchivioLotto<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: #000000;">olotto</span>:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />    ::<span style="color: #000000;">olotto</span>:<span style="color: #000000;">goBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">IF</span> nCount > <span style="color: #000000;">0</span><br />       nInit:=::<span style="color: #000000;">olotto</span>:<span style="color: #000000;">lastrec</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>-nCount<br />       nEnd:= ::<span style="color: #000000;">olotto</span>:<span style="color: #000000;">lastrec</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDIF</span><br /><br />      ::<span style="color: #000000;">olotto</span>:<span style="color: #000000;">Exec</span><span style="color: #000000;">&#40;</span> <||<br />                SET FILTER <span style="color: #0000ff;">TO</span>   <span style="color: #000000;">&#40;</span>  nInit <= ::<span style="color: #000000;">olotto</span>:<span style="color: #000000;">RECNO</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> .AND.             ;<br />                                    nEnd >=  ::<span style="color: #000000;">olotto</span>:<span style="color: #000000;">RECNO</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>    <span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />            > <span style="color: #000000;">&#41;</span><br /><br />       ::<span style="color: #000000;">olotto</span>:<span style="color: #000000;">gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       xbrowser ::<span style="color: #000000;">olotto</span><br />     ::<span style="color: #000000;">olotto</span>:<span style="color: #000000;">ArrayToDBF</span><span style="color: #000000;">&#40;</span> atemp, , <span style="color: #00C800;">nil</span>, .t., .t. <span style="color: #000000;">&#41;</span><br /><br />     xbrowser aTemp<br />    <span style="color: #00C800;">return</span> aTemp<br /><br /> </div>[/code:xcv7cp6g] [img:xcv7cp6g]https&#58;//i&#46;postimg&#46;cc/mDZYtJH2/hhh&#46;png[/img:xcv7cp6g] on this picture I use the dbf not the array I don't understand why I don't care about a record on array aTemp, obviously I'm using the database and have an nInit/nEnd filter for the last records, by default the number of records to display is 10 until the final user should check the possibility of caricature at least fine at 500 through a combobox to select ( 10,20,30,50,100,200,300,500) any help please
show only some records on Xbrowse ( nRecords year)
Maybe with Refilter ? [url:3o34nut1]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=40438&hilit=refilter&sid=6f66d10cde594a73729efcf9cdbb09cd[/url:3o34nut1]
show only some records on Xbrowse ( nRecords year)
Dear Silvio, SET FILTER is very slow Using an index with scopes should be better
show only some records on Xbrowse ( nRecords year)
[quote="Antonio Linares":23sdrb9f]Dear Silvio, SET FILTER is very slow Using an index with scopes should be better[/quote:23sdrb9f] with tdatabase I not Know How make it IF nCount > 0 nInit:=oDbf:lastrec()-nCount nEnd:= oDbf:lastrec() ENDIF oDbf:setscope(0,nInit) oDbf:setscope(1,nEnd) then for the year ?
show only some records on Xbrowse ( nRecords year)
this run ok [code=fw:14yi6yvh]<div class="fw" id="{CB}" style="font-family: monospace;"> <br />       cFilter:= <span style="color: #ff0000;">"LTRIM(STR(YEAR(FIELD->DATA)))= '"</span> + nyear + <span style="color: #ff0000;">"'"</span><br />        oDbf:<span style="color: #000000;">SetFilter</span><span style="color: #000000;">&#40;</span>cFilter<span style="color: #000000;">&#41;</span><br />        oDbf:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:14yi6yvh] How I can add the number of records to show ? sample only 5 records give me error Here nInit:=Ltrim(str(oDbf:lastrec()-nCount)) nEnd:=Ltrim(str(oDbf:lastrec())) cFilter:= "LTRIM(STR(YEAR(FIELD->DATA)))= '" + nyear + "' .and. '"+; nInit + "' <= Ltrim(str(FIELD-RECNO())) .and. '"+; nEnd + "' => Ltrim(str(FIELD-RECNO())) + "'"
show only some records on Xbrowse ( nRecords year)
Glad to see that you have recovered your strength <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
show only some records on Xbrowse ( nRecords year)
[quote="Antonio Linares":3c3d7d7q]Glad to see that you have recovered your strength <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:3c3d7d7q] I'm still recovering, my knee hurts
show only some records on Xbrowse ( nRecords year)
also some errors [img:2u7q2ckm]https&#58;//i&#46;postimg&#46;cc/X7yy1kqp/gg&#46;png[/img:2u7q2ckm]
show only some records on Xbrowse ( nRecords year)
I found a solution!!
show only some records on Xbrowse ( nRecords year)
+1
show the dots of a class
I made a main class called Txxxxand another class called Tyyy from Txxxxon new method of the tyyy class I insert the commandSuper:New( ntop,nleft,nbottom,nwidth, ldesign )but I cannot see the dots when I call tyyy How I can make it ?
show the help button
I made this on a dialog STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION, 4 ) because I try with SetDialogEsc() and not run ok and it erase the button X e ? but I want only show the help button How I can make ?
show tooltip on btnbmp
I made a plan of the beach with btnbmp I show the beach in a window created with the btnbmp controls. Depending on the day / date range, different types of btnbmp are displayed when the operator wants to search for a customer, he inserts the name and surname to be searched for in a high place on the explorer class the procedure must show the name and surname of the customer with a tooltip when the operator performs a search of the client (for that day or for that period already displayed) how can I display this tooltip without the operator moving the mouse on every btnbmp?
show tooltip on btnbmp
Silvio, oBtn:ShowTooltip()
show tooltip on btnbmp
yes of Course but perhaps I not explain good the final user searche for the client's first and last name I have 200 btnbmp the beach umbrellas I want to display the tooltip at the same time in all the btnbmp It is possible that in the archive there are many customers who are called with the same name and are in different umbrellas so if the user is looking for the opening procedure he must display the tooltip in all the buttons at the same time so on the video the operator can see where the customer x is located
show tooltip on btnbmp
BUT not run I cannot see the tooltip For n= 1 to 4 @ nRow, nCol BTNBMP aBtn[ n ] RESOURCE GiveBmp(nStatus) ; SIZE OMB_W,OMB_H PIXEL OF oDlg ; FLAT TOP COLOR CLR_WHITE NOBORDER ; TOOLTIP cPosNome next ACTIVATE DIALOG oDlg CENTERED ; on init Mostra(aBtn) RETURN NIL Function Mostra(aBtn) for n= 1 to 4 aBtn[n]:showtooltip() next return nil
show tooltip on btnbmp
any solution please ?
show tooltip on btnbmp
To the best of my understanding, only one tooltip can be shown at a time.
show tooltip on btnbmp
[quote="nageswaragunupudi":29za9v9q]To the best of my understanding, only one tooltip can be shown at a time.[/quote:29za9v9q] Hi Mr. Rao, Is it possible to set duration of tooltip showtime?
show tooltip on btnbmp
[quote:2ifg0vfj]Is it possible to set duration of tooltip showtime?[/quote:2ifg0vfj] Yes. Assign an array to cToolTip cToolTip := { cToolTipText, [cHeader], [Icon], [nClrFore], [nClrBack], [nWidth], [nDelayInSeconds] } Note: Color settings do not seem to work in Windows 10
show tooltip on btnbmp
Mr Rao, I cannot show the tooltip on the btnbmp I wish ( without mouse over) I explain you I have a dialog with many btnbmp I use to show Umbrellas of a beach When I search on customer I must show the tooltip on umbrellas where is the customer  I use reserva.dbf Of Tplan sample : the roomID is the number of Umbrellas ( btnbmp) I show into this dialog 1 . search on reserva.dbf   -> check_in and check_out  date past and  name of customer  2. if found it I have the number of umbrellas ( roomID) 3 the procedure must show a tooltip on btnbmp here there is a test ( I sent to Antonio last week) [code=fw:yquvjqeb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// search a customer into Beach</span><br /><br />REQUEST DBFCDX<br />REQUEST DBFFPT<br />EXTERNAL ORDKEYNO,ORDKEYCOUNT,ORDCREATE,ORDKEYGOTO<br /><br /><br /><span style="color: #00D7D7;">#define</span> OMB_W &nbsp;<span style="color: #000000;">30</span><br /><span style="color: #00D7D7;">#define</span> OMB_H &nbsp;<span style="color: #000000;">30</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> oDlg,oFont<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> nBottom &nbsp; := <span style="color: #000000;">28.4</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> nRight &nbsp; &nbsp;:= <span style="color: #000000;">77.7</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nWidth := &nbsp;<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 />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nHeight := nBottom * DLG_CHARPIX_H<br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nOmbrelloni := <span style="color: #000000;">10</span> <span style="color: #B900B9;">// Total number of Umbrellas</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> aBtn<span style="color: #000000;">&#91;</span> nOmbrelloni <span style="color: #000000;">&#93;</span> <span style="color: #B900B9;">// number of Umbrellas</span><br /><br />&nbsp;RDDSetDefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'DBFCDX'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; <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 /><br />&nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> nWidth, nHeight <span style="color: #0000ff;">PIXEL</span>;<br />&nbsp;<span style="color: #0000ff;">FONT</span> oFont &nbsp; &nbsp;<span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">"Searching a customer"</span><br /><br />&nbsp;nRow &nbsp;:= <span style="color: #000000;">60</span><br />&nbsp;nCol &nbsp;:= <span style="color: #000000;">10</span><br /><br />&nbsp;<span style="color: #00C800;">FOR</span> n= <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nOmbrelloni<br />&nbsp;@ nRow, nCol <span style="color: #0000ff;">BTNBMP</span> aBtn<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\w</span>ork<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\w</span>orld.bmp"</span> ; <span style="color: #B900B9;">//PROMPT LTrim( Str( n ) ) + " " ;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> OMB_W,OMB_H <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; FLAT TOP <span style="color: #0000ff;">COLOR</span> CLR_WHITE,CLR_GREEN NOBORDER ;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"Umbrella:"</span>+Ltrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>n<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; nCol &nbsp;+= OMB_W<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">Activate</span> <span style="color: #0000ff;">Dialog</span> oDlg <span style="color: #0000ff;">Centered</span> ;<br />&nbsp; &nbsp;<span style="color: #0000ff;">on</span> <span style="color: #0000ff;">init</span> Searching<span style="color: #000000;">&#40;</span>aBtn<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 /><br /><span style="color: #00C800;">Function</span> Searching<span style="color: #000000;">&#40;</span>oControl<span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #B900B9;">// After the search I found the customer</span><br />&nbsp; <span style="color: #B900B9;">// the customer is on umbrella &nbsp;number 4</span><br />&nbsp;<span style="color: #B900B9;">// now I must show the tooltip on this button</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> searched:= <span style="color: #000000;">4</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> cCustomer:=<span style="color: #ff0000;">"Antonio Linares"</span><br />&nbsp; &nbsp;oControl<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">showtooltip</span><span style="color: #000000;">&#40;</span>,,cCustomer<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oControl<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</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><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">//------------------------------------------------//</span><br />&nbsp;</div>[/code:yquvjqeb]
show tooltip on btnbmp
[quote="nageswaragunupudi":2d3ogxa4][quote:2d3ogxa4]Is it possible to set duration of tooltip showtime?[/quote:2d3ogxa4] Yes. Assign an array to cToolTip cToolTip := { cToolTipText, [cHeader], [Icon], [nClrFore], [nClrBack], [nWidth], [nDelayInSeconds] } Note: Color settings do not seem to work in Windows 10[/quote:2d3ogxa4] [code=fw:2d3ogxa4]<div class="fw" id="{CB}" style="font-family: monospace;">  oBrw:<span style="color: #000000;">bToolTips</span>   := ;<br />         <span style="color: #000000;">&#123;</span> | oBrw,r,c,f,oMouseCol,nMouseRow| MyColToolTip<span style="color: #000000;">&#40;</span> oBrw,r,c,f,oMouseCol,nMouseRow <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><br /><br /><span style="color: #00C800;">Function</span> MyColToolTip<span style="color: #000000;">&#40;</span> oBrw, r, c, f, oMouseCol, nMouseRow <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> uBm, uVal<br /><br />   <span style="color: #00C800;">if</span> nMouseRow != oBrw:<span style="color: #000000;">nRowSel</span><br />      uBm   := oBrw:<span style="color: #000000;">BookMark</span><br />      Eval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">bSkip</span>, nMouseRow - oBrw:<span style="color: #000000;">nRowSel</span> <span style="color: #000000;">&#41;</span>   <br />      uVal  := oMouseCol:<span style="color: #000000;">Value</span><br />      oBrw:<span style="color: #000000;">BookMark</span> := uBm<br />   <span style="color: #00C800;">else</span><br />      uVal  := oMouseCol:<span style="color: #000000;">Value</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> cValToChar<span style="color: #000000;">&#40;</span> uVal <span style="color: #000000;">&#41;</span><br /> </div>[/code:2d3ogxa4] Hi Mr. Rao, How can I adapt it to xbrowse bToolTip?
show tooltip on btnbmp
Please stop using bToolTip. This requires very complex code and now it is obsolete. Instead use, bCellTooltip [code=fw:2lxt5a13]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">bCellToolTips</span> := <span style="color: #000000;">&#123;</span> |oMouseCol| oMouseCol:<span style="color: #000000;">StrData</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:2lxt5a13]
show tooltip on btnbmp
[quote="nageswaragunupudi":2rxa0t5p]To the best of my understanding, only one tooltip can be shown at a time.[/quote:2rxa0t5p] Can I show the tooltip of one btnbmp without move the mouse over ?
show tooltip on btnbmp
[quote="nageswaragunupudi":3dsm92pn]Please stop using bToolTip. This requires very complex code and now it is obsolete. Instead use, bCellTooltip [code=fw:3dsm92pn]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">bCellToolTips</span> := <span style="color: #000000;">&#123;</span> |oMouseCol| oMouseCol:<span style="color: #000000;">StrData</span> <span style="color: #000000;">&#125;</span><br /> </div>[/code:3dsm92pn][/quote:3dsm92pn] Is it possible to set showtime in bCellToolTips?
show tooltip on btnbmp
[b:2db4kz7j]Sorry Horizon [/b:2db4kz7j] [b:2db4kz7j]but the topic is another [/b:2db4kz7j] I asked[b:2db4kz7j] tooltip on btnbmp [/b:2db4kz7j] and the possibility to show it on btnbmp without mouse over on btnbmp Please, if you wish ask another your problem add a new topic thanks
si es una de las ultimas
Si es una de las ultimas versiones. Para solucionar el problema agrege una antigua que tenia. Sera que me puedes indicar la forma de solucionar el problema UN ABRAZO LEANDRO ALFONSO
siemens sx45 pocket pc win ce 3..0
hi, i am trying the tutors of fivetech in pocket pc siemens sx45 windows ce 3.0.9348 processor mips vr4122, but dont work... theres any way to work? thanks
siemens sx45 pocket pc win ce 3..0
If I am not wrong, processor mips is not ARM compatible Do you get any error message ?
siemens sx45 pocket pc win ce 3..0
antonio, "fwce5 is not a valid windows ce aplication", error message.
siemens sx45 pocket pc win ce 3..0
FWPPC is ARM architecture compatible which it is the mainstream for Pocket PCs
sign a Pdf
Hello. Is possible to sign a pdf with a digital signature in fivewin?. Thanks <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
sign a Pdf
Lucas, See <!-- m --><a class="postlink" href="http://www.example-code.com/vbscript/signFile_VbScript.asp">http://www.example-code.com/vbscript/si ... Script.asp</a><!-- m -->
sign on the tablet
Hi to everybody, I'm looking for an android App to install in a tablet that permit to me to have the customer sign directly on the tablet. File name must be a parameters and ther mnust be only to button Clear and Save Another important thing: this app must be launched from a web page. After pressing the button SAVE it returns to web page wich will display the signature and then another button will perform upload on the web server. basically how the camera works King regards Marco
sign on the tablet
Hello Marco, Why don't you use mod harbour? Please test: Fill in the data on this page and then submit the form. At the bottom of the form, there is a signature field. As background, your data is set in the signature field. This way, you know what you are signing. Best regards Otto [url:1hbvajlg]https&#58;//winhotel&#46;space/mm/test&#46;prg[/url:1hbvajlg]
sign on the tablet
Otto, It's very interesting! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
sign on the tablet
From my android smartphone instead I have this [img:3myd8ze0]http&#58;//www&#46;marcoboschi&#46;it/public/otto&#46;png[/img:3myd8ze0]
sign on the tablet
Hello Marco, I tested on my Android with Chrome and Firefox. Both working fine. What browser do you use? Best regards Otto
sign on the tablet
[quote="MarcoBoschi":2d5tgicr]Hi to everybody, I'm looking for an android App to install in a tablet that permit to me to have the customer sign directly on the tablet. File name must be a parameters and ther mnust be only to button Clear and Save Another important thing: this app must be launched from a web page. After pressing the button SAVE it returns to web page wich will display the signature and then another button will perform upload on the web server. basically how the camera works King regards Marco[/quote:2d5tgicr] Mario. Escribeme puedo ayudarte.
sign on the tablet
Hello Marco, What browser do you use? Best regards Otto [img:2tdgh2hd]https&#58;//mybergland&#46;com/fwforum/mmsmartphone&#46;gif[/img:2tdgh2hd]
sign on the tablet
Chrome Have a nice day
sign on the tablet
Is it working?
sign on the tablet
No Otto In my smartphone (Chrome) no bye
sign on the tablet
Hello Marco, Thank you for helping to test. I write the variables into a session object and pass the values with AJAX. Maybe this is a right problem. I test on other phones too. Hope I find one here which is not working so I can find out the problem. Best regards Otto
sign on the tablet
Hallo, another test with my old CAT30 phone. Internet from public WLAN. Best regards Otto [img:2ujxo1f2]https&#58;//mybergland&#46;com/fwforum/mmcat&#46;jpg[/img:2ujxo1f2]
sign on the tablet
Otto, using other two smartphone I have the same problem. One of this is Moto G4 Android 8.1.0 brower is Ecosia based on crohme/Crhromium My smartphone is Huawei ALE-L21 Android 6.0 chrome
sign on the tablet
Dear Antonio, Can you help to find out why this does not work on some phones? Are there security rules we have to respect with web pages for phones. Thank you in advance Otto
sign on the tablet
Otto, when I click on [b:5pdw894f]Abschicken[/b:5pdw894f] button the signature image is saved server side? Many thanks Marco
sign on the tablet
Hello Marco, I use this js: <!-- m --><a class="postlink" href="https://github.com/szimek/signature_pad">https://github.com/szimek/signature_pad</a><!-- m --> I use ajax to copy the jpg and the data inside the form. Best regards, Otto
sign on the tablet
Many Thanks Otto!
signatur.prg How can I know if the user has signed or not?
How can I know if the user has signed or not? Referring to this example, I need to force the user to sign. How can I test this? #include "FiveWin.ch" function CaptureSignature() local oDlg, oSig, lPaint := .F., cFile := Lower( "signature.bmp" ), hDC DEFINE DIALOG oDlg TITLE "Signature" FROM 0, 0 TO 150, 350 PIXEL @ 15, 5 SAY oSig PROMPT "" SIZE 150, 40 PIXEL BORDER OF oDlg @ 01, 5 BUTTON "Clear" SIZE 25, 10 PIXEL ACTION oSig:refresh(.t.) OF oDlg @ 01, 60 BUTTON "Save" SIZE 25, 10 PIXEL OF odlg ; ACTION ( oSig:SaveToBmp( cFile ), oDlg:End() ) oSig:lWantClick := .T. oSig:bLButtonUp := { | x, y, z | DoDraw( hDC, y+1, x+1, lPaint := .F. ) } oSig:bMMoved := { | x, y, z | DoDraw( hDC, y, x , lPaint ) } oSig:bLClicked := { | x, y, z | DoDraw( hDC, y, x, lPaint := .T. ) } ACTIVATE DIALOG oDlg CENTER ; ON INIT ( hDC := GetDC( oSig:hWnd ) ) ; VALID ( ReleaseDC( oSig:hWnd, hDC ), .T. ) return nil static function DoDraw( hDc, x, y, lPaint ) if ! lPaint MoveTo( hDC, x, y ) else LineTo( hDc, x, y ) endIf return nil
signatur.prg How can I know if the user has signed or not?
hi, [quote="MGA":cq1aonq9]How can I know if the user has signed or not?[/quote:cq1aonq9] Sample \fwh\samples\signatur.prg "just" save a BMP but did not "recognize" it have a look at \fwh\samples\msink.prg when use MENUITEM "Text" you got a MsgInfo() but a GET would be better to present Result
signatur.prg How can I know if the user has signed or not?
Jimmy: I need to validate if the user signed the document. referring to this example: @ 15, 5 SAY oSig PROMPT "" SIZE 150, 40 PIXEL BORDER OF oDlg Objeto: oSig i need something like this, example: function Button_ValidSegnatur(oSig) if Empty(oSig:cCaption) MsgStop("It is mandatory to sign the document.") return .f. endif return .t.
signatur.prg How can I know if the user has signed or not?
Estimado MGA, Solo tienes que consultar la variable lSigned para saber si ha firmado o no: [code=fw:3nxhghs3]<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> CaptureSignature<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oSig, lPaint := .F., cFile := Lower<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"signature.bmp"</span> <span style="color: #000000;">&#41;</span>, hDC <br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lSigned := .F.<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Signature"</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">350</span> <span style="color: #0000ff;">PIXEL</span> <br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">15</span>, <span style="color: #000000;">5</span> <span style="color: #0000ff;">SAY</span> oSig <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">""</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> BORDER <span style="color: #0000ff;">OF</span> oDlg <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">01</span>, <span style="color: #000000;">5</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Clear"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> oSig:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span>.t.<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oDlg <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">01</span>, <span style="color: #000000;">60</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Save"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> odlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oSig:<span style="color: #000000;">SaveToBmp</span><span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp;oSig:<span style="color: #000000;">lWantClick</span> := .T.<br />&nbsp; &nbsp;oSig:<span style="color: #000000;">bLButtonUp</span> := <span style="color: #000000;">&#123;</span> | x, y, z | DoDraw<span style="color: #000000;">&#40;</span> hDC, y<span style="color: #000000;">+1</span>, x<span style="color: #000000;">+1</span>, lPaint := .F. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br />&nbsp; &nbsp;oSig:<span style="color: #000000;">bMMoved</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> | x, y, z | DoDraw<span style="color: #000000;">&#40;</span> hDC, y, x , lPaint <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br />&nbsp; &nbsp;oSig:<span style="color: #000000;">bLClicked</span> &nbsp;:= <span style="color: #000000;">&#123;</span> | x, y, z | lSigned := .T., DoDraw<span style="color: #000000;">&#40;</span> hDC, y, x, lPaint := .T. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> hDC := GetDC<span style="color: #000000;">&#40;</span> oSig:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span> ReleaseDC<span style="color: #000000;">&#40;</span> oSig:<span style="color: #000000;">hWnd</span>, hDC <span style="color: #000000;">&#41;</span>, .T. <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: #00C800;">static</span> <span style="color: #00C800;">function</span> DoDraw<span style="color: #000000;">&#40;</span> hDc, x, y, lPaint <span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! lPaint<br />&nbsp; &nbsp; &nbsp; MoveTo<span style="color: #000000;">&#40;</span> hDC, x, y <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">else</span> <br />&nbsp; &nbsp; &nbsp; LineTo<span style="color: #000000;">&#40;</span> hDc, x, y <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endIf</span> <br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:3nxhghs3]
signatur.prg How can I know if the user has signed or not?
Thanks <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
signatur.prg How can I know if the user has signed or not?
hi, [quote="MGA":2wqz9se2]I need to validate if the user signed the document.[/quote:2wqz9se2] using your Sample i can "just" Paint 1 x Pixel as Signature and press "Save" ... <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: --> msink.prg use Microsoft INK when made a Signature it can "recognize" if and what User have "write" when got Result of "recognition" you can "test" if Signature was made or not when have Name of Receiver you can compare if Signature is right Name p.s. if you need to "Save" Signature as Image i do have some "more" CODE (but HMG or Xbase++ Syntax)
sigo con el wbrowse
amigo paco creo que no me explique bien , bueno ahi voy con un ejemplo; yo para definir el estilo de 2 colores en wbrowse hago lo siguiente:oC9:oLbx:bBkColor:= {|nRow,nCol,nStyle| If( nRow%2==0 .and. nStyle=0,RGB(217,230,253), ) }Lo que no deseo es colocar toda esa linea de codigo en cada browse de mi sistema, poque calculando tendre como mas de 50, lo que deseo es que al redefinir el browse, talvez o creo que ahi es lo que se tendria que hacer es modificar algo de la clase, pero no logro ubicar donde.Haber si alguien me puede dar la mano, se lo agradeceria.
sigo con el wbrowse
Angel Miguel,Que browse usas ? El de Manuel, el de Harnán ? Los propios de FWH ?
sigo con el wbrowse
estoy usando el wbrowse de hernan diego cecarelli, haber si alguien puede darme la mano en lo que deseo hacer
silvio_falconi Contact me please
Dear Silvio, I've sent you a private mail, if not please contact at dutchez4 @ gmail.com Thanks&regards, Dutch
simple image viewer - sample
Dear João, Thank you, João Santos, for this beautiful example. I am reposting it as a standalone post to ensure it doesn't get overlooked. I have made an effort to create a description of it using ChatGPT. Best regards, Otto [img:a03miii7]https&#58;//mybergland&#46;com/fwforum/prnka&#46;jpg[/img:a03miii7] Description: This program appears to be written in Harbour, a language that is a modern, open-source variant of the older Clipper language. The program uses the FiveWin library, which is a popular library for creating GUI applications in Harbour. Let's break down what the program does: 1. **Includes**: It starts by including two header files, "FiveWin.ch" and "Image.ch". These likely provide additional functionality or definitions used in the program. 2. **Main Function**: The `Main()` function is the entry point of the program. Here, it initializes several local variables, sets some properties, and defines the GUI of the program. 3. **Dialog Definition**: It defines a dialog box (`oDlg`) with various properties, including title, color, and font. The dialog does not have a help icon. 4. **Image Display**: An image (`oImage`) is displayed in the dialog box. The image can be scrolled, and its progress bar is turned off by default. 5. **Buttons**: The program defines several buttons with different actions: - "Select Image": This button calls the `GetImage()` function to allow the user to select an image file to display. - "Print": This button calls the `PrintImage()` function to print the currently displayed image. - "Copy": This button copies the currently displayed image to the clipboard. - "Paste": This button loads an image from the clipboard and refreshes the image display. - "Save": This button saves the currently displayed image as "SAVED.JPG" and displays a message "saved as saved.jpg". - "Exit": This button ends the dialog. 6. **Checkboxes**: There are two checkboxes that allow the user to adjust the image display: - "Stretch": This checkbox allows the user to toggle whether the image should be stretched to fit the display area. - "Set Alpha Channel": This checkbox allows the user to toggle the alpha channel of the image. However, the `SetAlpha()` function is not defined in the provided code. 7. **GetImage Function**: This function allows the user to select an image file of various formats (bmp, dib, pcx, jpg, gif, tga, rle) to display. The chosen image is then loaded into the image display. 8. **PrintImage Function**: This function prints the currently displayed image. It sets up a print job with the name "Image Printing", sets the page format and orientation, and prints the image. In summary, the program is a simple image viewer that allows the user to select, display, print, copy, paste, and save images. It also provides options to stretch the image and adjust the alpha channel. However, note that some functionality such as `SetAlpha()` is not defined within the provided code. ChatGPT [code=fw:a03miii7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// C:\FWH..\SAMPLES\PRNIMAG1.PRG</span><br /><br />&nbsp; &nbsp; <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br />&nbsp; &nbsp; <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Image.ch"</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oImage, lSetAlpha := .T., cTitle, oFont<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// SetAlpha( .f. )</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;SkinButtons<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;cTitle := FWDESCRIPTION + <span style="color: #ff0000;">": .JPG, .JIF, .GIF, .BMP, .DIB, .RLE, .TGA, .PNG."</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-12</span> BOLD<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">22</span>, <span style="color: #000000;">60</span> <span style="color: #0000ff;">TITLE</span> cTitle ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLORS CLR_BLACK, CLR_WHITE TRANSPARENT <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">IMAGE</span> oImage <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SCROLL</span> <span style="color: #B900B9;">// ADJUST</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;oImage:<span style="color: #0000ff;">Progress</span><span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">1</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Select Image"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> GetImage<span style="color: #000000;">&#40;</span> oImage <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">2</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> PrintImage<span style="color: #000000;">&#40;</span> oImage <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">3</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Copy"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> oImage:<span style="color: #000000;">CopyToClipboard</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">4</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Paste"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">LoadFromClipboard</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oImage:<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 />&nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">5</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Save"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">SaveImage</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SAVED.JPG"</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">25</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"saved as saved.jpg"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">6</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Exit"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CANCEL<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">10</span>, <span style="color: #000000;">23</span> <span style="color: #0000ff;">CHECKBOX</span> oImage:<span style="color: #000000;">lStretch</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Stretch"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">ScrollAdjust</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oImage:<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 />&nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">11</span>, <span style="color: #000000;">23</span> <span style="color: #0000ff;">CHECKBOX</span> lSetAlpha <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Set Alpha Channel"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">90</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> SetAlpha<span style="color: #000000;">&#40;</span> lSetAlpha <span style="color: #000000;">&#41;</span>, oImage:<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 />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">FUNCTION</span> GetImage<span style="color: #000000;">&#40;</span> oImage <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> gcFile := cGetFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Bitmap (*.bmp)| *.bmp|"</span> + &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"DIB &nbsp; (*.dib)| *.dib|"</span> + &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"PCX &nbsp; (*.pcx)| *.pcx|"</span> + &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"JPEG &nbsp;(*.jpg)| *.jpg|"</span> + &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"GIF &nbsp; (*.gif)| *.gif|"</span> + &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"TARGA (*.tga)| *.tga|"</span> + &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"RLE &nbsp; (*.rle)| *.rle|"</span> + &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"All Files (*.*)| *.*"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #ff0000;">"Please select a image file"</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> .NOT. EMPTY<span style="color: #000000;">&#40;</span> gcFile <span style="color: #000000;">&#41;</span> .AND. File<span style="color: #000000;">&#40;</span> gcFile <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oImage:<span style="color: #000000;">LoadBmp</span><span style="color: #000000;">&#40;</span> gcFile <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">FUNCTION</span> PrintImage<span style="color: #000000;">&#40;</span> oImage <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oPrn, nRow := <span style="color: #000000;">1.00</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nLinLogo := <span style="color: #000000;">1.00</span>, nColLogo := <span style="color: #000000;">600</span>, nLargLogo := <span style="color: #000000;">650</span>, nAltLogo := <span style="color: #000000;">650</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Image Printing"</span> PREVIEW <span style="color: #0000ff;">MODAL</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;oPrn:<span style="color: #000000;">SetPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oPrn:<span style="color: #000000;">SetPortrait</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PAGE</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">/*<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPrn:PrintImage( 50, 50, oImage )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">/*<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // oPrn:SayImage( nLinLogo, nColLogo, "LOGO.JPG", nLargLogo, nAltLogo )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @ &nbsp;nLinLogo, nColLogo <span style="color: #00C800;">PRINT</span> <span style="color: #0000ff;">TO</span> oPrn <span style="color: #0000ff;">IMAGE</span> oImage <span style="color: #0000ff;">SIZE</span> nLargLogo, nAltLogo LASTROW nRow<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ENDPAGE</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ENDPRINT</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// FIN / END</span><br />&nbsp; &nbsp; &nbsp;<br /><br />&nbsp;</div>[/code:a03miii7]
simple image viewer - sample
Dear Otto, very, very good indeed. Excellent definition. Congratulations. Estimado Otto, muy, muy bien de hecho. Excelente definición. Parabiéns. Origin / Origen: [url:2rrt24y0]https&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=43295&sid=fe6c663cbbfc32d427290cbb413d24b9[/url:2rrt24y0] Regards, saludos.
simple image viewer - sample
Another example / Otro ejemplo: [code=fw:148k6419]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\FWH..\SAMPLES\PRNIMAG2.PRG by Mister Nages.</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oPrn<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">PRINT</span> oPrn PREVIEW<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">PAGE</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> <span style="color: #00C800;">PRINT</span> <span style="color: #0000ff;">TO</span> oPrn <span style="color: #0000ff;">IMAGE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\o</span>lga1.jpg"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">3</span>,<span style="color: #000000;">4</span> INCHES<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">5.3</span>,<span style="color: #000000;">1</span> <span style="color: #00C800;">PRINT</span> <span style="color: #0000ff;">TO</span> oPrn <span style="color: #0000ff;">IMAGE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"https://www.jesmondfruitbarn.com.au/wp-content/uploads/2016/10/Jesmond-Fruit-Barn-Oranges.jpg"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">4</span>,<span style="color: #000000;">4</span> INCHES<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDPAGE</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDPRINT</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// FIN / END</span><br />&nbsp;</div>[/code:148k6419] Regards, saludos.
simple image viewer - sample
Another sample....My procedure for attaching documents to a product, a customer, a supplier to an invoice, etc [img:19nv5ixz]https&#58;//i&#46;postimg&#46;cc/gj1t5MHS/hjg&#46;gif[/img:19nv5ixz] Notice.. each type of document can be opened with specific application , my procedure search these application on computer I can acquire a document with scanner and save directly on this produre
simular un listbox desde un query de mysql
Compañeros del foro Como se podría llevar un query a una estructura listbox? Gracias
simular un listbox desde un query de mysql
Ernesto, si entendí bien, lo hago asi con TMySql, usando TxBrowse: [code=fw:3cld9k7i]<div class="fw" id="{CB}" style="font-family: monospace;">oCatalogo:= oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT * FROM catalogo ORDER BY codicont"</span> <span style="color: #000000;">&#41;</span><br />oCatalogo:<span style="color: #000000;">Gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; oLbx := TXBrowse<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; oLbx:<span style="color: #000000;">SetMySql</span><span style="color: #000000;">&#40;</span>oCatalogo,.f.<span style="color: #000000;">&#41;</span><br /><br />&nbsp; oCol = oLbx:<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;">bEditValue</span> = <span style="color: #000000;">&#123;</span> || oCatalogo:<span style="color: #000000;">Codicont</span> <span style="color: #000000;">&#125;</span><br />&nbsp; oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"Codigo Contable"</span> <br />&nbsp; oCol:<span style="color: #000000;">nWidth</span> = <span style="color: #000000;">164</span><br />&nbsp; ...<br />&nbsp; ...<br />&nbsp;</div>[/code:3cld9k7i] Saludos.
simular un listbox desde un query de mysql
<!-- l --><a class="postlink-local" href="http://fivetechsupport.com/forums/viewtopic.php?f=6&t=23673&hilit=Setmysql&start=15#p127394">viewtopic.php?f=6&t=23673&hilit=Setmysql&start=15#p127394</a><!-- l -->
simulate a read
How can I simulate a READ (as we made with CLIPPER) to force the final user to enter the data before proceeding with the procedure?
simulate a read
Silvio, Using VALIDs <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
simulate a read
Antonio allready tried before !!!... can I set the valid clausole on second moment on another function when show() the get ? I tried with aGet[11]:bvalid :={|o| ! Empty(o:varGet()) } but make error the user can use the xbrowse ( the obrw is on up) or the other buttons allready tried with bPostKey
simulate a read
Silvio, try it this way: aGet[ 11 ]:bValid := { | o | ! Empty( o:GetText() ) }
simulate a read
I tried with aGet[11]:Show() aGet[11]:SetFocus() aGet[11]:bvalid :={|| ValEmpty( CodBarreArt, aGet[11] ) } If the final user press the other get the func ValEmpty run ok if the final user resize the dialog or use ( press) the oBrw the func valid not run [img:30ajvasg]http&#58;//www&#46;eoeo&#46;it/wp-content/uploads/2014/11/unnamed&#46;jpg[/img:30ajvasg] FUNCTION ValEmpty( cDato, oGet ) IF empty( cDato ) MsgStop( i18n( "E' obbligatorio riempire questo campo." ) ) oGet:setFocus() RETURN .F. END IF RETURN .T.
simulate a read
Silvio, Please try it as I have told you <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
simulate a read
I made also : aGet[11]:Show() aGet[11]:SetFocus() aGet[ 11 ]:bValid := { | o | ! Empty( o:GetText() ) } the final use cannot use combobox and other gets controls but if press on xbrowse ( edit_get) columns the aget[11] lose the setfocus and the final user can edit the xbrowse columns ( also the combo) and then can use the other get controls and combobox there are on dialog
simulate a read
Silvio, You can always disable a control to avoid the control from gaining the focus: oBrowse:Disable() and later on oBrowse:Enable()
simulate a read
THIS IS A GOOD IDEA !!!!
simulate a read
yes <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
simulate a read
we allready block together the final User <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
simulate dbzap
I need to erase all record from a database open with share mode and replace all record from an array with [b:1egcejwa]FW_ArrayToDBF[/b:1egcejwa] function I cannot use[b:1egcejwa] dbzap because it want exclusive mode[/b:1egcejwa] is there another solution ? I'm thinking to use this function [b:1egcejwa]but it not run and crash the procedure[/b:1egcejwa] [code=fw:1egcejwa]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> allRecordErase<span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">local</span> nRecord := <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>Recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">local</span> nNext<br /><br />   <span style="color: #00C800;">Do</span> <span style="color: #00C800;">While</span> .not. <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><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 />         <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><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 />                 nNext := <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>Recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />                      <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>DbGoto<span style="color: #000000;">&#40;</span>nRecord<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />                          <span style="color: #00C800;">IF</span>!Occupato<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />                              <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>DbDelete<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />                              <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>DbCommit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />                              <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>DbUnlock<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />                           <span style="color: #00C800;">ENDIF</span><br /><br />                  <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>DbGoto<span style="color: #000000;">&#40;</span>nNext<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />                   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><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> .or. nNext == nRecord<br />                      <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>DbGoBottom<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />                   <span style="color: #00C800;">endif</span><br />       <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><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 />    <span style="color: #00C800;">Enddo</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:1egcejwa] Occupato function [code=fw:1egcejwa]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> Occupato<span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> lRet:=.F., nTimes:=<span style="color: #000000;">5</span><br />   <span style="color: #00C800;">DEFAULT</span> cAlias:=<span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> nTimes><span style="color: #000000;">0</span><br />      <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>RLock<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />         nTimes:=<span style="color: #000000;">0</span><br />      <span style="color: #00C800;">ELSE</span><br />         INKEY<span style="color: #000000;">&#40;</span><span style="color: #000000;">0.5</span><span style="color: #000000;">&#41;</span><br />         nTimes:=nTimes<span style="color: #000000;">-0.5</span><br />         <span style="color: #00C800;">IF</span> nTimes<=<span style="color: #000000;">0</span> .AND.;<br />            MsgYesNo<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"!Record  occupato da un altro utente!, ¿Continuare?"</span>,<span style="color: #ff0000;">"Conferma..."</span><span style="color: #000000;">&#41;</span><br />            nTimes:=<span style="color: #000000;">3</span><br />         <span style="color: #00C800;">ELSE</span><br />            lRet:=.T.<br />         <span style="color: #00C800;">ENDIF</span><br />      <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">ENDDO</span><br />   <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span>lRet<span style="color: #000000;">&#41;</span><br /> </div>[/code:1egcejwa] any solution please ?
simulate dbzap
You must open the file in exclusive use mode. Even in a multi-user app.
simulate dbzap
there is a method Local nRecords:= (cAlias)->(reccount()) For n= 1 to nRecords (cAlias)->(DbGoto(n)) IF!Occupato((cAlias)) (cAlias)->(DbDelete()) (cAlias)->(DbCommit()) (cAlias)->(DbUnlock()) ENDIF next the problem is then how recreate the index file cdx or refresh it
simulate dbzap
The deleted records are still there. You will still have to zap the file to remove them. Or, you could just over-write all the existing records with data from the array. No deleting or zapping required. But if this procedure is only done by an Admin, then you just have to make sure no other users are in the app, then use your original routine one the file opened in exclusive use.
simulate dbzap
[quote:1jox0xm9]>I need to erase all record from a database open with share mode and replace all record from an array with FW_ArrayToDBF function [/quote:1jox0xm9] 1) What is in this database? 2) Why does it need to be in shared use? Is it because more than one person needs to access it at the same time, or is it because you think that ALL databases in a multi-user app [b:1jox0xm9]must[/b:1jox0xm9] be opened in shared mode?
simulate dbzap
I explained it to you in private have you sold an application that has an archive of items to make an invoice to a person ok? does this person like when he makes the bill to select items from a list ok? but does this person like to display some articles before instead of others ok? so in order to display the personalized list of these articles you have to make sure to index them in a certain way add a numeric field to the database "display" 1 N and that person enters a number corresponding to the display number after you index for that field and you will have the custom list did you understand up to this point? instead of inserting a number in the numeric field, I made a dialog where your person (to whom you sell the program) could move the elements of this list with the mouse, ie move them to position to do this I create a temporary array from the archive and show this array into a xbrowse ok ? then with two buttons I give the end user the ability to move the elements in the array at the end the user must save the positions to save the positions I have to reinsert the array in the archive because I have the same records of archive but with the value changed in that numeric field "Display" so I have to delete the database records and insert the records from the array dbzap
simulate dbzap
Silvio, Did you get the private email I sent explaining how to do this and why?
simulate dbzap
forget it I understood that I have to give up too hard for you to understand, yet it is so simple and crystalline I am the owner of the plant and I have a computer open on the planning of the beach my lifeguard who works at the beach opens the program (lan) and inserts a new multiple service for example boat trip with a view to the sharks and fishing my lifeguard orders the display of services but he can not do it because my friend James did not understand what I have to do for the archives if they are open in share mode then you can not use dbzap and insert a database array with the function fw_arraytodb It's unbelievable .... I'm just wasting time
simulate dbzap
Or, you could do, as I said at the start of this message thread: [quote:1z4z6f7y]Or, you could just over-write all the existing records with data from the array. No deleting or zapping required.[/quote:1z4z6f7y] [url:1z4z6f7y]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=36558&p=218106#p218100[/url:1z4z6f7y]
simulate dbzap
I resolved without dbzap
simulate unknown Function of UDF in IndexKey()
hi, when Index have a UDF in Indexkey() it will crash when open Index and don´t have that missing Function Question : how can i get "Name" of missing Function when use [code=fw:254fuszk]<div class="fw" id="{CB}" style="font-family: monospace;">   RECOVER oError</div>[/code:254fuszk] i will get [quote:254fuszk]oError:description, oError:operation, oError:osCode[/quote:254fuszk] --- let say i got Function Name XYZ() Question : is it possible to "simulate" Function XYZ() "on-fly" <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> --- if i have a [code=fw:254fuszk]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> Dummy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> .T.</div>[/code:254fuszk] i can use #xtranslate XYZ -> Dummy so i can call XYZ() without "real" existing Function XYZ() --- so when i can get Function Name from oError the Idea is to "redirect" to existing Function Dummy() is there a Way to use this Idea <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: -->
simulate unknown Function of UDF in IndexKey()
Dear Jimmy, To build it: hbmk2.exe create.prg -cflag=-D_HB_API_INTERNAL_ create.prg [code=fw:2rllxh36]<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 />   CreateFunction<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"xyz"</span> <span style="color: #000000;">&#41;</span><br /><br />   ? HB_IsFunction<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"xyz"</span> <span style="color: #000000;">&#41;</span><br /><br />   &<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"xyz()"</span> <span style="color: #000000;">&#41;</span><br /><br />   ? <span style="color: #ff0000;">"ok"</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #00C800;">function</span> Dummy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    ? <span style="color: #ff0000;">"inside dummy"</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span>    <br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <hbvmpub.h><br /><br />const char * hb_parvc<span style="color: #000000;">&#40;</span> int iParam, ... <span style="color: #000000;">&#41;</span>;<br />PHB_DYNS hb_dynsymGet<span style="color: #000000;">&#40;</span> const char * szName <span style="color: #000000;">&#41;</span>;<br />PHB_DYNS hb_dynsymFindName<span style="color: #000000;">&#40;</span> const char * szName <span style="color: #000000;">&#41;</span>;<br />PHB_SYMB hb_dynsymSymbol<span style="color: #000000;">&#40;</span> PHB_DYNS pDynSym <span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> CREATEFUNCTION <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   PHB_DYNS pDynSym   = hb_dynsymGet<span style="color: #000000;">&#40;</span> hb_parvc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />   PHB_SYMB pSymDummy = hb_dynsymSymbol<span style="color: #000000;">&#40;</span> hb_dynsymFindName<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DUMMY"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />   pDynSym->pSymbol->value.pFunPtr = pSymDummy->value.pFunPtr;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP</div>[/code:2rllxh36]
simulate unknown Function of UDF in IndexKey()
I guess the next challenge would be to assign a codeblock to such created function... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Then we would have a way to assign functions to codebloks
simulate unknown Function of UDF in IndexKey()
First prototype to create a function at runtime at assign a codeblock to it: 1. As we are using a static PHB_ITEM pCodeBlock, next call to CreateFunction() will overwrite it, so we need to find a solution for this. 2. We could enhance CreateFunction() to allow parameters: CreateFunction( cFunctionName, { | x, y, ... | ... } ) [code=fw:2e3k89qz]<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;CreateFunction<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"xyz"</span>, <span style="color: #000000;">&#123;</span> || QOut<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"inside codeblock "</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;? HB_IsFunction<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"xyz"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;&<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"xyz()"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"ok"</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <hbapiitm.h><br /><br /><span style="color: #00C800;">static</span> PHB_ITEM pCodeBlock;<br /><br /><span style="color: #00C800;">static</span> void evalBlock<span style="color: #000000;">&#40;</span> void <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;hb_evalBlock0<span style="color: #000000;">&#40;</span> pCodeBlock <span style="color: #000000;">&#41;</span>; &nbsp; &nbsp;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> CREATEFUNCTION <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;PHB_DYNS pDynSym = hb_dynsymGet<span style="color: #000000;">&#40;</span> hb_parvc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;pCodeBlock = hb_itemNew<span style="color: #000000;">&#40;</span> hb_param<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, HB_IT_BLOCK <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;pDynSym->pSymbol->value.pFunPtr = evalBlock;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP</div>[/code:2e3k89qz]
simulate unknown Function of UDF in IndexKey()
Enhanced version supporting n parameters: We have to solve where to store the codeblocks, or next call to hb_CreateFunction() will overwrite the previous one. [code=fw:3vho8kww]<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 />   hb_CreateFunction<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"xyz"</span>, <span style="color: #000000;">&#123;</span> | a, b, c | QOut<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />   ? hb_IsFunction<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"xyz"</span> <span style="color: #000000;">&#41;</span><br /><br />   &<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"xyz( ,, 'Hello world' )"</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: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <hbapiitm.h><br /><span style="color: #00D7D7;">#include</span> <hbvm.h><br /><br /><span style="color: #00C800;">static</span> PHB_ITEM pCodeBlock;<br /><br /><span style="color: #00C800;">static</span> void evalBlock<span style="color: #000000;">&#40;</span> void <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   HB_USHORT ui, uiParams = hb_pcount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><br />   hb_vmPushEvalSym<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />   hb_vmPush<span style="color: #000000;">&#40;</span> pCodeBlock <span style="color: #000000;">&#41;</span>;<br /><br />   <span style="color: #00C800;">for</span><span style="color: #000000;">&#40;</span> ui = <span style="color: #000000;">0</span>; ui < uiParams; ui++ <span style="color: #000000;">&#41;</span><br />      hb_vmPush<span style="color: #000000;">&#40;</span> hb_param<span style="color: #000000;">&#40;</span> ui + <span style="color: #000000;">1</span>, HB_IT_ANY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />    <br />   hb_vmSend<span style="color: #000000;">&#40;</span> uiParams <span style="color: #000000;">&#41;</span>;        <br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> HB_CREATEFUNCTION <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   PHB_DYNS pDynSym = hb_dynsymGet<span style="color: #000000;">&#40;</span> hb_parvc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />   pCodeBlock = hb_itemNew<span style="color: #000000;">&#40;</span> hb_param<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, HB_IT_BLOCK <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />   pDynSym->pSymbol->value.pFunPtr = evalBlock;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP</div>[/code:3vho8kww]
simulate unknown Function of UDF in IndexKey()
Using hashes from low level to support multiple codeblocks <!-- s:-D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":-D" title="Very Happy" /><!-- s:-D --> Remember to build it this way: hbmk2.exe create.prg -cflag=-D_HB_API_INTERNAL_ [code=fw:3clbhtet]<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 />   hb_CreateFunction<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"xyz"</span>, <span style="color: #000000;">&#123;</span> || QOut<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"from XYZ()"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   hb_CreateFunction<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"abcd"</span>, <span style="color: #000000;">&#123;</span> || QOut<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"from ABDC()"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   hb_CreateFunction<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"another"</span>, <span style="color: #000000;">&#123;</span> | c | QOut<span style="color: #000000;">&#40;</span> ProcName<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, QOut<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />   &<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"XYZ()"</span> <span style="color: #000000;">&#41;</span><br />   &<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ABCD()"</span> <span style="color: #000000;">&#41;</span><br />   &<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"another( 'Hello world' )"</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: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <hbapiitm.h><br /><span style="color: #00D7D7;">#include</span> <hbvm.h><br /><span style="color: #00D7D7;">#include</span> <hbapicdp.h><br /><br /><span style="color: #00C800;">static</span> PHB_ITEM pHash = <span style="color: #00C800;">NULL</span>;<br /><br /><span style="color: #00C800;">static</span> void evalBlock<span style="color: #000000;">&#40;</span> void <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   HB_USHORT ui, uiParams = hb_pcount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />   char szProcName<span style="color: #000000;">&#91;</span> HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span>;<br />   PHB_ITEM pKey, pValue;<br /><br />   hb_procname<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, szProcName, HB_FALSE <span style="color: #000000;">&#41;</span>;<br />   pKey = hb_itemPutC<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span>, szProcName <span style="color: #000000;">&#41;</span>;<br />   pValue = hb_hashGetItemPtr<span style="color: #000000;">&#40;</span> pHash, pKey, HB_HASH_AUTOADD_ACCESS <span style="color: #000000;">&#41;</span>;<br /><br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> pValue <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      hb_vmPushEvalSym<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />      hb_vmPush<span style="color: #000000;">&#40;</span> pValue <span style="color: #000000;">&#41;</span>;<br /><br />      <span style="color: #00C800;">for</span><span style="color: #000000;">&#40;</span> ui = <span style="color: #000000;">0</span>; ui < uiParams; ui++ <span style="color: #000000;">&#41;</span><br />         hb_vmPush<span style="color: #000000;">&#40;</span> hb_param<span style="color: #000000;">&#40;</span> ui + <span style="color: #000000;">1</span>, HB_IT_ANY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />      <br />      hb_vmSend<span style="color: #000000;">&#40;</span> uiParams <span style="color: #000000;">&#41;</span>;        <br />   <span style="color: #000000;">&#125;</span>   <br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> HB_CREATEFUNCTION <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   const char * szSymbolName = hb_parvc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />   PHB_ITEM pText = hb_param<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, HB_IT_STRING <span style="color: #000000;">&#41;</span>;<br />   HB_SIZE nLen;<br />   char * pszBuffer;<br />   PHB_DYNS pDynSym = hb_dynsymGet<span style="color: #000000;">&#40;</span> szSymbolName <span style="color: #000000;">&#41;</span>;<br /><br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ! pHash <span style="color: #000000;">&#41;</span><br />      pHash = hb_hashNew<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br />      <br />   nLen  = hb_itemGetCLen<span style="color: #000000;">&#40;</span> pText <span style="color: #000000;">&#41;</span>;<br />   pszBuffer = hb_cdpnDupUpper<span style="color: #000000;">&#40;</span> hb_vmCDP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<br />                                hb_itemGetCPtr<span style="color: #000000;">&#40;</span> pText <span style="color: #000000;">&#41;</span>, &nLen <span style="color: #000000;">&#41;</span>;   <br />   hb_hashAdd<span style="color: #000000;">&#40;</span> pHash, hb_itemPutC<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span>, pszBuffer <span style="color: #000000;">&#41;</span>, hb_itemNew<span style="color: #000000;">&#40;</span> hb_param<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, HB_IT_BLOCK <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />   pDynSym->pSymbol->value.pFunPtr = evalBlock;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP</div>[/code:3clbhtet]
simulate unknown Function of UDF in IndexKey()
hi Antonio, [quote="Antonio Linares":2hemhcoy] To build it: hbmk2.exe create.prg -cflag=-D_HB_API_INTERNAL_ [/quote:2hemhcoy] i try to use 1st Sample using [code=fw:2hemhcoy]<div class="fw" id="{CB}" style="font-family: monospace;">set FWDIR=c:\fwh<br />set fwh=c:\fwh<br />set HBDIR=c:\harbour<br /><br />set hdirl=%hdir%\lib\win\bcc<br />set bcdir=c:\bcc7<br /><br />c:\Harbour\bin\hbmk2.exe %<span style="color: #000000;">1</span> -cflag=-D_HB_API_INTERNAL_<br />del %<span style="color: #000000;">1</span>.map<br />del %<span style="color: #000000;">1</span>.tds<br />del %<span style="color: #000000;">1</span>.obj<br />del %<span style="color: #000000;">1</span>.c<br />del %<span style="color: #000000;">1</span>.ppo<br />del b32.bc</div>[/code:2hemhcoy] but i got [quote:2hemhcoy]hbmk2: Error: Referenced, missing, but unknown function(s): HB_ISFUNCTION()[/quote:2hemhcoy] can you please provide a *.BAT which will work with these Sample, thx
simulate unknown Function of UDF in IndexKey()
Dear Jimmy, I use this go.bat [code=fw:3drq97di]<div class="fw" id="{CB}" style="font-family: monospace;">set path=c:\bcc7\bin<br />c:\harbour\bin\win\bcc\hbmk2.exe create.prg -cflag=-D_HB_API_INTERNAL_<br />create</div>[/code:3drq97di]
simulate unknown Function of UDF in IndexKey()
hi Antonio, thx for go.bat now it work <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
simulate unknown Function of UDF in IndexKey()
Przemek solution using the Harbour error handler: [code=fw:2dxg66hn]<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 />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cFuncName<br /><br />&nbsp; &nbsp;cFuncName := <span style="color: #ff0000;">"SOME_FUNC"</span><br />&nbsp; &nbsp;UDF_DEFFUN<span style="color: #000000;">&#40;</span> cFuncName, @MY_FUNC<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// add redirection</span><br />&nbsp; &nbsp;? &cFuncName<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'abc'</span>, <span style="color: #000000;">123</span>, Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// show my_func() result</span><br />&nbsp; &nbsp;UDF_DEFFUN<span style="color: #000000;">&#40;</span> cFuncName, <span style="color: #000000;">&#123;</span>| p | Upper<span style="color: #000000;">&#40;</span> p <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// change redirection</span><br />&nbsp; &nbsp;? &cFuncName<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'abc'</span>, <span style="color: #000000;">123</span>, Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// show "ABC"</span><br />&nbsp; &nbsp;UDF_DEFFUN<span style="color: #000000;">&#40;</span> cFuncName <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// remove redirection</span><br />&nbsp; &nbsp;? &cFuncName<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'abc'</span>, <span style="color: #000000;">123</span>, Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// gen RTE</span><br /><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> MY_FUNC<span style="color: #000000;">&#40;</span> ... <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> hb_ValToExp<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> ... <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #B900B9;">/* missing function redirector based on standard error handler */</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"error.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> UDF_DEFFUN<span style="color: #000000;">&#40;</span> cFuncName, bCode <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">STATIC</span> s_hUdfSubst<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> bError<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> HB_ISHASHKEY<span style="color: #000000;">&#40;</span> cFuncName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> s_hUdfSubst == <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;s_hUdfSubst := <span style="color: #000000;">&#123;</span> => <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bError := ErrorBlock<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span>| oError | UDF_ErrorCode<span style="color: #000000;">&#40;</span> oError, bError, s_hUdfSubst <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> HB_ISEVALITEM<span style="color: #000000;">&#40;</span> bCode <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;s_hUdfSubst<span style="color: #000000;">&#91;</span> cFuncName <span style="color: #000000;">&#93;</span> := bCode<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hb_HDel<span style="color: #000000;">&#40;</span> s_hUdfSubst, cFuncName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<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: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> UDF_ErrorCode<span style="color: #000000;">&#40;</span> oError, bError, hUdfSubst <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> bFunc<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> oError:<span style="color: #000000;">genCode</span> == EG_NOFUNC .AND. oError:<span style="color: #000000;">subCode</span> == <span style="color: #000000;">1001</span> .AND. ;<br />&nbsp; &nbsp; &nbsp; oError:<span style="color: #000000;">canSubstitute</span> .AND. ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> bFunc := hb_HGetDef<span style="color: #000000;">&#40;</span> hUdfSubst, oError:<span style="color: #000000;">operation</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> Eval<span style="color: #000000;">&#40;</span> bFunc, hb_ArrayToParams<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">args</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> Eval<span style="color: #000000;">&#40;</span> bError, oError <span style="color: #000000;">&#41;</span></div>[/code:2dxg66hn]
sincronizacion de tablas con FWHMariadb SOLUCIONADO
Buenos días, Estoy experimentado y haciendo mis primeras armas con mysql con las clases nativas de fivewin. No he podido sacar este listado que debería tener un dato procedente de una tabla vinculada a la principal, y no me doy cuenta que es lo que estaría mal. La tabla principal es mantenimientos, y la vinculada es maquinas estan vinculadas por el campo mantmaq_id de la tabla mantenimientos y maq_id (primary key) de maquinas. Este es el codigo: [code=fw:2dhg48q0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> ListMantAg<span style="color: #000000;">&#40;</span>oCn<span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">LOCAL</span> oFont1, oFont2, oFont3, oReport, oMant<br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-10</span><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont2 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-10</span> BOLD<br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont3 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-20</span> BOLD<br />         <br />         oMant :=oCn:<span style="color: #000000;">RowSet</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"mantenimientos"</span> <span style="color: #000000;">&#41;</span><br />         oMant:<span style="color: #000000;">SetFilter</span><span style="color: #000000;">&#40;</span>  <span style="color: #ff0000;">"mant_Tipo <> ?"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />         oMant:<span style="color: #000000;">AddChild</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT * FROM maquinas WHERE maqid = mantenimientos.mantmaq_id"</span> <span style="color: #000000;">&#41;</span><br />         oMant:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         oMant:<span style="color: #000000;">SyncChild</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #0000ff;">PRINTER</span> <span style="color: #0000ff;">FROM</span> USER<br />         <br />    REPORT oReport;<br />        <span style="color: #0000ff;">TITLE</span>  <span style="color: #ff0000;">"**Listado de Mantenimientos Agendados**"</span>, <span style="color: #ff0000;">""</span> ;<br />        HEADER <span style="color: #ff0000;">"SIRSIL S.A."</span> + <span style="color: #ff0000;">" - Fecha: "</span> + transform<span style="color: #000000;">&#40;</span>date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"@d"</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" Hora: "</span> + time<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">RIGHT</span>  ;<br />        FOOTER <span style="color: #ff0000;">"Pagina: "</span> + str<span style="color: #000000;">&#40;</span>oReport:<span style="color: #000000;">nPage</span>,<span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">CENTERED</span> ;<br />        <span style="color: #0000ff;">FONT</span> oFont1, oFont2, oFont3 ;<br />        CAPTION <span style="color: #ff0000;">"Listado de Mantenimientos"</span> ;<br />        PREVIEW<br />                  <span style="color: #B900B9;">//no sacar</span><br />                  COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"#Mantenim.:"</span> ;<br />            <span style="color: #00C800;">DATA</span>  oMant:<span style="color: #000000;">Mant_id</span> ;<br />            <span style="color: #0000ff;">PICTURE</span>  <span style="color: #ff0000;">"99"</span> ;<br />            <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">3</span><br />                  COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Detalle:"</span> ;<br />            <span style="color: #00C800;">DATA</span>  omant:<span style="color: #000000;">mant_nombre</span> ;<br />            <span style="color: #0000ff;">PICTURE</span>  <span style="color: #ff0000;">"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"</span> ;<br />            <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">38</span><br />        COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Tipo:"</span>;<br />            <span style="color: #00C800;">DATA</span>  TipoMant<span style="color: #000000;">&#40;</span>oMant:<span style="color: #000000;">Mant_Tipo</span><span style="color: #000000;">&#41;</span> ;<br />            <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"XXXXXXXXXXX"</span> ;<br />            <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">10</span><br />        COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Plazo:"</span> ;<br />            <span style="color: #00C800;">DATA</span> PlazoMant<span style="color: #000000;">&#40;</span>oMant:<span style="color: #000000;">Mant_Plazo</span><span style="color: #000000;">&#41;</span> ;<br />            <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"XXXXXXXXXXX"</span> ;<br />            <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">10</span><br />                  COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Días:"</span> ;<br />            <span style="color: #00C800;">DATA</span>  oMant:<span style="color: #000000;">Mant_Dias</span> ;<br />            <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"99999"</span> ;<br />            <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">6</span>                                    <br />                  COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Máquina:"</span> ;<br />                           <span style="color: #00C800;">DATA</span>  oMant:<span style="color: #000000;">MantMaq_id</span> ;<br />            <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"9999"</span> ;<br />            <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">7</span><br />                   COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Máquina:"</span> ;<br />                           <span style="color: #00C800;">DATA</span>  maquinas:<span style="color: #000000;">maq_Desc</span>  ;<br />            <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"!!!!!!!!!!!!!!!!!!!!!!!!!"</span> ;<br />            <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">23</span><br />                   <span style="color: #B900B9;">//no sacar</span><br />    END REPORT<br /> </div>[/code:2dhg48q0] Y este es el error: [code=fw:2dhg48q0]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Application<br />===========<br />   Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">10</span> mins <span style="color: #000000;">41</span> secs <br />   Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">19</span>/<span style="color: #000000;">10</span>/<span style="color: #000000;">2021</span>, <span style="color: #000000;">10</span>:<span style="color: #000000;">09</span>:<span style="color: #000000;">43</span><br />   Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1004</span>  No existe el m‚todo: <span style="color: #000000;">REQUERY</span><br />   Args:<br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = U   <br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> = A   <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"mantmaq_id"</span>,<span style="color: #000000;">82</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span> length: <span style="color: #000000;">1</span><br /><br />Stack Calls<br />===========<br />   Called <span style="color: #0000ff;">from</span>:  => REQUERY<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\internal\FWMARIA.PRG => FWMARIAROWSET:<span style="color: #000000;">SYNCCHILD</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">5561</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\maquinas\source\Listados.prg => LISTMANTAG<span style="color: #000000;">&#40;</span> <span style="color: #000000;">83</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\maquinas\source\Maquinas.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>HAGOMENU<span style="color: #000000;">&#40;</span> <span style="color: #000000;">134</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">MENU</span>.PRG => TMENU:<span style="color: #000000;">COMMAND</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1563</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TWINDOW:<span style="color: #000000;">COMMAND</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1141</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   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;">3560</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => WINRUN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TWINDOW:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1097</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\maquinas\source\Maquinas.prg => MAIN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">76</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:2dhg48q0] No me doy cuenta cual es el error que cometo. Agradezco toda ayuda.
sincronizacion de tablas con FWHMariadb SOLUCIONADO
El problema pasaba el uso de la tabla hija, utilizando oMant:oChild:campo, funcionó perfecto.