topic
stringlengths
1
63
text
stringlengths
1
577k
to convert file.dll
Install Virtual PC with XP or send me the DLL and I send the RC
to distinguish get from combobox
Hi, oDlg:bKeyDown = { |nKey| press_dlg( oDlg, nKey, ....) FUNCTION PRESS_DLG( oDlg, nKey ) LOCAL oActive := OWNDFROMHWND( GETFOCUS() ) MsgInfo( oActive:classname ) RETURN NIL For combobox objects I have "TGET" as result. Is there a way to distinguish combobox from get objects?
to fill a rect
I must refill a rect : [code:1zvwy10i]METHOD Rectang( nTop, nLeft, nBottom, nRight, oPen ,nRecord) CLASS XXXXXXX local hPen := if( oPen = nil, 0, oPen:hPen ) Local nX := oPen:nWidth / 2 IIF( nRecord == nil , nRecord := 0 , ) ::GetDC() MoveTo( ::hDC, nLeft, nTop ) LineTo( ::hDC, nRight, nBottom, hPen ) FillRect( nTop, nLeft, nBottom, nRight, nColor ) ?? it make me error ::ReleaseDC() return nil[/code:1zvwy10i] Someone can help me please Regards
to fill a rect
This is a working sample: [code:1e1ehga4]#include "Fivewin.ch" FUNCTION MAIN() LOCAL oDlg, oBrush DEFINE BRUSH oBrush COLOR CLR_RED DEFINE DIALOG oDlg @ 3, 1 BUTTON "&Close" ACTION oDlg:End() ACTIVATE DIALOG oDlg; ON PAINT FILLRECT( hDC, { 10, 10, 100, 300 }, oBrush:hBrush ); CENTER RELEASE BRUSH oBrush RETURN NIL[/code:1e1ehga4] EMG
to fill a rect
thanks EMG but I must give to my func ncolor variable it create a rect with [code:3arqptgd]Rectang( nTop, nLeft, nBottom, nRight, oPen ,nRecord)[/code:3arqptgd] from this command I can create a brush with the ncolor of the open I give to it can I found the color of the open and insert to brush ?
to fill a rect
to understand well I explain you in a program I run this function [code:311kfm8m] oGraficos:Rectang( nLinea+nVertic+4, nColumnaInicio+nHoriz, nLinea+nVertic+10, nColumnaFinal+nHoriz ,oPen5,dati->(Recno()) ) [/code:311kfm8m] oGraficos is a object of a class and into class there is this method : [code:311kfm8m] METHOD Rectang( nTop, nLeft, nBottom, nRight, oPen ,nRecord) CLASS XXXXXX local hPen := if( oPen = nil, 0, oPen:hPen ) Local nX := oPen:nWidth / 2 IIF( nRecord == nil , nRecord := 0 , ) ::GetDC() *Rectangle( ::hDC, nTop, nLeft, nBottom, nRight, hPen ) MoveTo( ::hDC, nLeft, nTop ) LineTo( ::hDC, nRight, nBottom, hPen ) PPP ::ReleaseDC() if nRecord > 0 aadd(::aItems,{nTop-nX,nLeft-nX,nBottom+nX,nRight+nX,nRecord}) endif return nil[/code:311kfm8m] But it create a line as a pen and I want to show a rectangule filled of the color hpen where I insert the word "PPP" i must insert the _fillrect method but it want a brush [code:311kfm8m]METHOD _FillRect( nTop, nLeft, nBottom, nRight, nColor ) CLASS XXXX LOCAL oBrush, hBru, hOld hBru := CreateSolidBrush( nColor ) hPen := CreatePen( nColor ) hOld := SelectObject( ::hDC, hBru ) MoveTo( ::hDC, nLeft, nTop ) LineTo( ::hDC, nRight, nBottom, hPen ) FillRect( ::hDC, { nTop, nLeft, nBottom, nRight }, hBru ) SelectObject( ::hDC, hOld ) DeleteObject( hBru ) RETURN (Nil) [/code:311kfm8m] I hope you understand now well my work Regards
to fill a rect
OKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK I resolve IT NOw RUn OKKKKKKKK thanks to all Falconi Silvio
to find clients
Can I find ( in a program xharbour) how many computers there are in a classroom from a server computer : each pc are link to Lab2 Domain and put in a browse the name of each pc and his ip ? Can you write here a sample pls
to nages
Dear Mr Rao , I wish insert a name of field into a dialog : I made this [code=fw:2s1b0met]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> Insert_Fields<span style="color: #000000;">&#40;</span>oDlg<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oStru<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oDlgFields<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lOk:=.f.<br /><br />&nbsp; &nbsp;USE CUSTOMER <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> CUST SHARED VIA <span style="color: #ff0000;">"DBFCDX"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgFields <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Insert Fields"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">500</span>, <span style="color: #000000;">300</span><br /><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oStru <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlgFields ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE CUST-><span style="color: #000000;">&#40;</span> DbStruct<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">4</span> ;<br />&nbsp; &nbsp; &nbsp; HEADERS <span style="color: #ff0000;">"FldName"</span>,<span style="color: #ff0000;">"Typ"</span>,<span style="color: #ff0000;">"Len"</span>,<span style="color: #ff0000;">"Dec"</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES NOBORDER FASTEDIT<br /><br /><br />&nbsp; &nbsp;WITH OBJECT oStru<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bClrSel</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, CLR_HGRAY <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nStretchCol</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bLDClickData</span> &nbsp;:= <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#40;</span> lOk := .t., CreateSay<span style="color: #000000;">&#40;</span> oStru:<span style="color: #000000;">ColPos</span><span style="color: #000000;">&#40;</span>oStru:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span> oStru:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> , oDlg <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgFields <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> lOK<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CreateSay<span style="color: #000000;">&#40;</span> oStru:<span style="color: #000000;">nArrayAt</span><span style="color: #000000;">&#91;</span>nat<span style="color: #000000;">&#93;</span> , oDlg <span style="color: #000000;">&#41;</span><br />&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 /><br /><span style="color: #00C800;">function</span> CreateSay<span style="color: #000000;">&#40;</span>ctext, oDlg <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oSay<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"<"</span>+alltrim<span style="color: #000000;">&#40;</span>ctext<span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">">"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>, <span style="color: #000000;">20</span> DESIGN<br /><br />&nbsp; &nbsp;oSay:<span style="color: #000000;">bGet</span> = <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;oSay:<span style="color: #000000;">lWantClick</span> = .T.<br />&nbsp; &nbsp;BringWindowToTop<span style="color: #000000;">&#40;</span> oSay:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oSay:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br />&nbsp;</div>[/code:2s1b0met] But not run ok How I can to have the name of field?...thanks
to nages
Itried with :bLDClickData := {|| ( lOk := .t., CreateSay(oStru:aRow[ oStru:NAT()] , oDlg ) ) } it return the field of the stru but the n I have many say into dialog I not Know why
to nages
:bLDClickDatas := { || lOk := .t., CreateSay( oStru:aRow[ 1 ], oDlg ) }
to nages : add a xbrowse features
Dear Nages, Look this picture please [img:2af3rw6p]http&#58;//www&#46;eoeo&#46;it/wp-content/uploads/2015/05/proggetto_clienti&#46;jpg[/img:2af3rw6p] I wish insert on this menu at first menuitem a new option " Default Columns" and then the user can have the original columns How we can make ? METHOD SetColumns( nRow, nCol, nFlags ) CLASS TXBrowse ... Menuitem "Default Columns" action -> ?? separator for nFor := 1 to nLen ... thanls
to nages : add a xbrowse features
[code=fw:1hraszvw]<div class="fw" id="{CB}" style="font-family: monospace;"><br />... <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> ;<br />&nbsp; &nbsp;ASort<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aCols</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #000000;">&#123;</span> |x,y| x:<span style="color: #000000;">nCreationOrder</span> < y:<span style="color: #000000;">nCreationorder</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">lHide</span> := .f. <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp;::<span style="color: #000000;">GetDisplayCols</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp;::<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;</div>[/code:1hraszvw]
to nages : add a xbrowse features
[size=200:u7su7m8n]thanks[/size:u7su7m8n]
to nages : fix to Tbitmap paint
in tbitmap -> method paint ... in lines 677 +- and 696 +- [code=fw:22t25009]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />......<br /><span style="color: #00C800;">if</span> SetAlpha<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> .and. ::<span style="color: #000000;">lHasAlpha</span><br />            hBitmap := ResizeBmp<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap</span>, ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            ABPaint<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">nX</span>, ::<span style="color: #000000;">nY</span>, hBitmap, ::<span style="color: #000000;">nAlphaLevel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">if</span> hBitmap != <span style="color: #00C800;">nil</span>                <span style="color: #B900B9;">// new </span><br />               DeleteObject<span style="color: #000000;">&#40;</span> hBitmap <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// new</span><br />            <span style="color: #00C800;">endif</span>                                <span style="color: #B900B9;">// new </span><br />         <span style="color: #00C800;">else</span><br />            <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lTransparent</span><br />.............<br /><br /> </div>[/code:22t25009]
to nages : fix to Tbitmap paint
Thanks for pointing out. I propose to destroy hbitmap if not nil, towards the end of paint method, because this creation by resize is at two places in the paint method. Hope you too will agree. Also I am considering replacing resizebmp with resizeimg because I found the later function produces a better quality resizing. You may test it too on different bitmaps of different sizes.
to nages : fix to Tbitmap paint
Nages , resize images from gdi+ is better ... <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> ... look code in tgdiplus.prg.
to nages : fix to Tbitmap paint
[quote="mastintin":3ayl3ukp]Nages , resize images from gdi+ is better ... <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> ... look code in tgdiplus.prg.[/quote:3ayl3ukp] We need to do a lot more work on GDI. We both will make some time for it.
to nages : fix to Tbitmap paint
[quote="nageswaragunupudi":k7qrwmc0]We need to do a lot more work on GDI. We both will make some time for it.[/quote:k7qrwmc0] check your email. I sent a small code for tests.
to remote client
What use to connect with customer ?
to remote client
Try vnc viewer It's very good
to remote client
For service usage try "Listening VNC Viewer" and "VNC Server - user mode - option add new client" My customers use this option every time they need my help. Regards Robert
to remote client
I wanted and search something test made on fivewin and harbour please
to remote client
Silvio, To really help my client, I need a strong program. I subscribe to[b:1psapbr6] Log Me In Rescue[/b:1psapbr6]. I never have any problems connecting no matter what they have for firewalls, etc. In fact, I have a button in my program that takes them right to the website where they can enter their connection code. This product gives me full remote access, allows me to show my desktop ( for demonstrating something ), has a chat mode, and now allows me to do unattended access. There is also a full set of diagnostic tools to view their computer essentials. It is an excellent product / service and I have found their staff to be very helpful. An althernative might be Team Viewer. Its a product that is getting better all the time. Tim
to remote client
But we can create a client program ( made with fwh) where connect to our pc to SERVER program . we must have this server program in tray when weopen the pc and when the customer call us the server program must be opened and we can chat with the customer It is possible with fhw ? Or not ? strange....
to simplify the Tdatabase call
I wanted to know if in Tdatabase I can do this sample CLASS TUtenti from TDataBase METHOD New() METHOD ToArray() ENDCLASS METHOD New( lShared ) CLASS TUtenti Default lShared := .t. ::super:New(,oApp():cExePath + "Utenti" ,, lShared) if ::use() ::setOrder(1) ::gotop() endif RETURN Self [b:2r4weqh6]METHOD ToArray(aTmp) CLASS TUtenti if ::use() aTmp:=ARRAYTODBF() endif RETURN aTmp[/b:2r4weqh6] because I have some function I use often on all procedures and I ask I can insert on each class , but for a sample I not Know How save the field to array with arraytodbf until nos I used fw_arratodbf ( exclusive) ANY SOLUTION ?
to simplify the Tdatabase call
Silvio, I thought you already had this working? And the way you show it you care creating and array with every field, and I thought you only needed 3 fields?
to simplify the Tdatabase call
James, I resolved but I not use arraytodbf but to hand
to simplify the Tdatabase call
Silvio, [i:2gy0rmub]I resolved but I not use arraytodbf[/i:2gy0rmub] Hmm, doesn't arraytodbf() take an array and put it into a DBF? I think you want DBFtoArry() if there is such a method. James
to use xbrowse in dialog
hallo, I would like to use xbrowse in a dialog. I have the dialog in myfile.dll creted with pelles C. which "control" should I use? thanks
to use xbrowse in dialog
Look <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=193&p=2495&hilit=Txbrowse+Pellesc#p2495">viewtopic.php?f=6&t=193&p=2495&hilit=Txbrowse+Pellesc#p2495</a><!-- l -->
to use xbrowse in dialog
thanks for the reply, I created with Pelles C myfile.dll and in myfile.dll I created dialog "PROVA" i used custom control but when I choose custom control I had to type "txbrowse" (there were no classes to choose from). this is the samples: USE CUSTOMER NEW ALIAS (cAlias) DEFINE FONT oFont NAME "Tahoma" SIZE 0, -12 DEFINE DIALOG odlg RESOURCE "PROVA" FONT oFont TITLE "TITOLO" REDEFINE XBROWSE oBrw ID 200 SIZE -10,-30 PIXEL OF oDlg ; WITH OBJECT oBrw :nStretchCol := STRETCHCOL_WIDEST :CreateFromCode() END ACTIVATE DIALOG ODLG but when I run app.exe, fivewin return this error: FiveWin Version: FWHX 11.12 Windows version: 6.1, Build 7601 Service Pack 1 Time from start: 0 hours 0 mins 0 secs Error occurred at: 19-01-2014, 23:34:21 Error description: Error FiveWin/2 Duplicated Id: No: 101 any idea? thanks
to use xbrowse in dialog
You can put here your. Rc?
to use xbrowse in dialog
this is: // RESOURCE SCRIPT generated by "Pelles C for Windows, version 7.00". #include <windows.h> #include <commctrl.h> #include <richedit.h> LANGUAGE LANG_ITALIAN,SUBLANG_ITALIAN PROVA DIALOGEX FIXED IMPURE 6, 18, 310, 186 STYLE DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE CAPTION "Dialog" FONT 8, "Tahoma", 0, 0, 1 { CONTROL "OK", IDOK, "Button", WS_TABSTOP, 160, 5, 45, 15 CONTROL "Cancel", IDCANCEL, "Button", WS_TABSTOP, 160, 23, 45, 15 CONTROL "This is a label:", 4001, "Static", WS_GROUP, 4, 20, 40, 8 CONTROL "", 200, "txbrowse", 0x00000000, 20, 60, 240, 92 } LANGUAGE 0,0 DVCLAL RCDATA "res1.bin"
to use xbrowse in dialog
The problem is not in the. RC You are calling the method CreateFromCode, and you have to call the method :CreateFromResource( nId )
to use xbrowse in dialog
thanks mr. cnavarro, Can you explain me the meaning of WITH OBJECT... ? thank you
to use xbrowse in dialog
To define the properties of an object and avoid putting on each object name <oBj>: data or <obj>: method WITH OBJECT <oBj>            : <data1>: = ...            : <data2>: = ...            : <data3>: = ...            : <method> () END equivalent to:       <oBj>: <data1>: = ...       <oBj>: <data2>: = ...       <oBj>: <data3>: = ...       <oBj>: <method> () I hope I explained
to use xbrowse in dialog
ok, and now another question. this is my code: oDbf := oOdbc:Query( "SELECT articolo as codice, descrarticolo as descrizione, unitamisura as um, " +; "prezzo as listino "+; "FROM magazzino "+; "WHERE codice = 'AAAA' "+; "ORDER BY codice") oDbf:Open() oDbf:Gotop() DEFINE FONT oFont NAME 'TAHOMA' SIZE 0,-12 DEFINE DIALOG odlg RESOURCE "PROVA" FONT oFont TITLE "TITOLO" REDEFINE XBROWSE oBrw ID 200 OF oDlg add to obrw data odbf:codice HEADER "Employees" ACTIVATE DIALOG oDlg ; CENTERED .... odbc:query return 12 records but in xbrowse there is only the first record, why?
to use xbrowse in dialog
Find this line in the example .../... REDEFINE XBROWSE ..... This example can perhaps help <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=27965#p156123">viewtopic.php?f=3&t=27965#p156123</a><!-- l -->
to use xbrowse in dialog
thank you, it's very useful! excuse me, I'm use: oOdbc := TOdbc():New( cDSN, cName, cPass ) and the example use DEFINE QUERY etc..., can you explain me what is the difference?
to use xbrowse in dialog
I think in the example they are using the class TDolphin using Mysql In the forum there is a lot of information of that class and its Author: Daniel Garcia-Gil gives excellent help.
to use xbrowse in dialog
Very good, thank you Sent from my RM-885_eu_italy_299 using Tapatalk
toast win 10
I tried on windows 10 pro this Toast( "TicketBus", "Release 1.00", "(c) 2017",; ".\bitmaps\bus.png" ) not show anything only a notice at left with the text "New notice" any solution ? and how I can to simulate msgyesno function with toast ?
toast win 10
I tried also with msginfo(nKmIniziali) where nKmIniziali is a number and I recall msginfo with this function Function msginfo(ctext) Toast( ctext, "TicketBus", "Eoeo Software (c) 2017",; "file://C:\Work\Prg\TicketBus_tablet\bitmaps\info.png" ) return nil and it make error [code=fw:efiu5l9b]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Application<br />===========<br />&nbsp; &nbsp;Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\Work\Prg\TicketBus_tablet\TicketBus.Exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">Size</span>: <span style="color: #000000;">7</span>,<span style="color: #000000;">548</span>,<span style="color: #000000;">928</span> bytes<br />&nbsp; &nbsp;Compiler version: <span style="color: #000000;">Harbour</span> <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>r1406271520<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;FiveWin &nbsp;version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">17.02</span><br />&nbsp; &nbsp;C compiler version: <span style="color: #000000;">Borland</span> C++ <span style="color: #000000;">5.8</span><span style="color: #000000;">.2</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span>-bit<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Windows version: <span style="color: #000000;">6.2</span>, Build <span style="color: #000000;">9200</span> <br /><br />&nbsp; &nbsp;Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">46</span> secs <br />&nbsp; &nbsp;Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">13</span><span style="color: #000000;">-09</span><span style="color: #000000;">-2017</span>, <span style="color: #000000;">09</span>:<span style="color: #000000;">48</span>:<span style="color: #000000;">10</span><br />&nbsp; &nbsp;Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1111</span> &nbsp;Parametro errato: <span style="color: #000000;">LEN</span><br />&nbsp; &nbsp;Args:<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = N &nbsp; <span style="color: #000000;">744565</span><br /><br />Stack Calls<br />===========<br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> LEN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\internal\WINRT.PRG => WINRTSTRING<span style="color: #000000;">&#40;</span> <span style="color: #000000;">21</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\internal\WINRT.PRG => SETNODETEXT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">33</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\internal\WINRT.PRG => TOAST<span style="color: #000000;">&#40;</span> <span style="color: #000000;">97</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Source</span>\main.prg => <span style="color: #0000ff;">MSGINFO</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">3047</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Source</span>\PTablet.prg => SELEZIONA_BUS<span style="color: #000000;">&#40;</span> <span style="color: #000000;">446</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Source</span>\PTablet.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>DIALOGTABLET<span style="color: #000000;">&#40;</span> <span style="color: #000000;">189</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG => TBTNBMP:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">665</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG => TBTNBMP:<span style="color: #000000;">LBUTTONUP</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">901</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1721</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG => TBTNBMP:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1843</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3325</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> WINRUN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TWINDOW:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1036</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Source</span>\main.prg => TAPPLICATION:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">500</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Source</span>\main.prg => MAIN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">77</span> <span style="color: #000000;">&#41;</span><br /><br />System</div>[/code:efiu5l9b]
toast win 10
resolved with str(ctext) How simulate msgyesNO function with toast ?
today problem with savetodbf
[code=fw:22vz8sue]<div class="fw" id="{CB}" style="font-family: monospace;">Application<br />===========<br />&nbsp; &nbsp;Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\Work\errori\Ricerca_invoice_salvtaggio_ok\test.Exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">Size</span>: <span style="color: #000000;">4</span>,<span style="color: #000000;">657</span>,<span style="color: #000000;">664</span> bytes<br />&nbsp; &nbsp;Compiler version: <span style="color: #000000;">Harbour</span> <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>r1904111533<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;FiveWin &nbsp;version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">21.06</span><br />&nbsp; &nbsp;C compiler version: <span style="color: #000000;">Borland</span>/Embarcadero C++ <span style="color: #000000;">7.0</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span>-bit<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Windows version: <span style="color: #000000;">6.1</span>, Build <span style="color: #000000;">7601</span> Service Pack <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp;Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">8</span> secs <br />&nbsp; &nbsp;Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">18</span><span style="color: #000000;">-08</span><span style="color: #000000;">-2021</span>, <span style="color: #000000;">12</span>:<span style="color: #000000;">04</span>:<span style="color: #000000;">36</span><br />&nbsp; &nbsp;Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1132</span> &nbsp;Limiti superati: <span style="color: #000000;">accesso</span> all<span style="color: #ff0000;">'array<br />&nbsp; &nbsp;Args:<br />&nbsp; &nbsp; &nbsp;[ &nbsp; 1] = A &nbsp; {"","01","servizio",1,9,9,,,,0,0,"RR210818120430",.T.,.T.,"","",1,1} length: 18<br />&nbsp; &nbsp; &nbsp;[ &nbsp; 2] = N &nbsp; 19<br /><br />Stack Calls<br />===========<br />&nbsp; &nbsp;Called from: .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\f</span>unction<span style="color: #000000;">\D</span>BFFUNC2.PRG => FW_FIELDSPUT( 911 )<br />&nbsp; &nbsp;Called from: .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\f</span>unction<span style="color: #000000;">\D</span>BFFUNC2.PRG => (b)FW_SAVEARRAYTODBF( 859 )<br />&nbsp; &nbsp;Called from: &nbsp;=> AEVAL( 0 )<br />&nbsp; &nbsp;Called from: .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\f</span>unction<span style="color: #000000;">\D</span>BFFUNC2.PRG => FW_SAVEARRAYTODBF( 859 )<br />&nbsp; &nbsp;Called from: .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\D</span>ATABASE.PRG => TRIGHERESERVA:HB_EXECFROMARRAY( 0 )<br />&nbsp; &nbsp;Called from: .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\D</span>ATABASE.PRG => TRIGHERESERVA:SAVEARRAYTODBF( 1624 )<br />&nbsp; &nbsp;Called from: test.prg => EDITINVOICE( 327 )<br />&nbsp; &nbsp;Called from: test.prg => (b)ORDERS( 84 )<br />&nbsp; &nbsp;Called from: .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\B</span>UTTON.PRG => TBUTTONBMP:CLICK( 179 )<br />&nbsp; &nbsp;Called from: .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\C</span>ONTROL.PRG => TBUTTON:HANDLEEVENT( 1781 )<br />&nbsp; &nbsp;Called from: .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\B</span>UTTONB.PRG => TBUTTONBMP:HANDLEEVENT( 261 )<br />&nbsp; &nbsp;Called from: .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\W</span>INDOW.PRG => _FWH( 3560 )<br />&nbsp; &nbsp;Called from: &nbsp;=> SENDMESSAGE( 0 )<br />&nbsp; &nbsp;Called from: .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\D</span>IALOG.PRG => TDIALOG:COMMAND( 433 )<br />&nbsp; &nbsp;Called from: &nbsp;=> TWINDOW:HANDLEEVENT( 0 )<br />&nbsp; &nbsp;Called from: .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\D</span>IALOG.PRG => TDIALOG:HANDLEEVENT( 1140 )<br />&nbsp; &nbsp;Called from: &nbsp;=> DIALOGBOXINDIRECT( 0 )<br />&nbsp; &nbsp;Called from: .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\D</span>IALOG.PRG => TDIALOG:ACTIVATE( 304 )<br />&nbsp; &nbsp;Called from: test.prg => ORDERS( 110 )<br />&nbsp; &nbsp;Called from: test.prg => MAIN( 35 )</span></div>[/code:22vz8sue] I make the same I saw on yunus.prg only I use 18 FIELDS static cItemFlds := "ICO,TIPO,DESC,QTA,PREUNI,TOTQTA,DATAINI,DATAFIN,GIORNI,SCONTO,TOTALE,INVOICE,PRINTA4,PRINTPOS,STRUCTURE,BREVEDESC,PREZZOBASE,SERIAL,RECNO()" to save I make [code=fw:22vz8sue]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />&nbsp;<span style="color: #00C800;">IF</span> oDlg:<span style="color: #000000;">nresult</span> == IDOK<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oBrowse:<span style="color: #000000;">aDeleted</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> oBrowse:<span style="color: #000000;">aDeleted</span>, <span style="color: #000000;">&#123;</span> |a| a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">19</span> <span style="color: #000000;">&#93;</span> := -a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">19</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oRigheInvoice:<span style="color: #000000;">SaveArrayToDBF</span><span style="color: #000000;">&#40;</span> cItemFlds,oBrowse:<span style="color: #000000;">aDeleted</span> <span style="color: #000000;">&#41;</span> &nbsp;save the erased lines<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ADel<span style="color: #000000;">&#40;</span> oBrowse:<span style="color: #000000;">aArrayData</span>, <span style="color: #000000;">1</span>, .t. <span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">//erase first line</span><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |a| a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">12</span> <span style="color: #000000;">&#93;</span> := oRecPrenota:<span style="color: #000000;">Invoice</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// save the invoice number</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |a,i| a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">18</span> <span style="color: #000000;">&#93;</span> := i <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//serials</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xbrowser &nbsp;aData<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oRigheInvoice:<span style="color: #000000;">SaveArrayToDBF</span><span style="color: #000000;">&#40;</span> cItemFlds,aData <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//save the other filed od reservation</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oRecPrenota:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:22vz8sue] where is the error ?
today problem with savetodbf
Silvio, The array has only 18 elements: AEval( oBrowse:aDeleted, { |a| a[ 19 ] := -a[ 19 ] } )
today problem with savetodbf
oooppss you're right
today problem with savetodbf
[quote="Antonio Linares":28mt0trr]Silvio, The array has only 18 elements: AEval( oBrowse:aDeleted, { |a| a[ 19 ] := -a[ 19 ] } )[/quote:28mt0trr] Antonio I correct but there is the error on line 329 [b:28mt0trr] oRigheInvoice:SaveArrayToDBF( cItemFlds,aData )[/b:28mt0trr] [img:28mt0trr]https&#58;//i&#46;postimg&#46;cc/ZnRWFmLf/hhhh&#46;png[/img:28mt0trr]
today problem with savetodbf
Dear Silvio, what error is it ?
today problem with savetodbf
[quote="Antonio Linares":2y7wf215]Dear Silvio, what error is it ?[/quote:2y7wf215] the same on savearrattodbf see your mail
today problem with savetodbf
Silvio, Why don't you link in the source code SaveArrayToDBF or the class and insert some msginfos? Best regards, Otto
today problem with savetodbf
[quote="Otto":1nljo2d0]Silvio, Why don't you link in the source code SaveArrayToDBF or the class and insert some msginfos? Best regards, Otto[/quote:1nljo2d0] not know where is it
today problem with savetodbf
Silvio, oRigheInvoice is your class? It seems to me that you use the Fivewin function ArrayToDBF there. c:\fwh\source\function\dbffunc2.prg Best regards, Otto
today problem with savetodbf
[quote="Otto":2djcil41]Silvio, oRigheInvoice is your class? It seems to me that you use the Fivewin function ArrayToDBF there. c:\fwh\source\function\dbffunc2.prg Best regards, Otto[/quote:2djcil41] I re-created that I saw on yunus.prg only I have 18 Fields and use tdatabase no oRigheInvoice is the name of dbf [b:2djcil41]Rig_Res.dbf[/b:2djcil41] [code=fw:2djcil41]<div class="fw" id="{CB}" style="font-family: monospace;"> oRigheInvoice:=TRigheReserva<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 />&nbsp; &nbsp; &nbsp; &nbsp; oRigheInvoice:<span style="color: #000000;">setorder</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"res_rr"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oRigheInvoice:<span style="color: #000000;">gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:2djcil41] the error is on [b:2djcil41]oRigheInvoice:SaveArrayToDBF( cItemFlds,aData )[/b:2djcil41] I have cItemFlds 18 fields + 1 ( recno()) [code=fw:2djcil41]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">static</span> cItemFlds := <span style="color: #ff0000;">"ICO,TIPO,DESC,QTA,PREUNI,TOTQTA,DATAINI,DATAFIN,GIORNI,SCONTO,TOTALE,INVOICE,PRINTA4,PRINTPOS,STRUCTURE,BREVEDESC,PREZZOBASE,SERIAL,RECNO()"</span><br />&nbsp;</div>[/code:2djcil41] and aData 18 fields [b:2djcil41]the error let me say [/b:2djcil41] [code=fw:2djcil41]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">42</span> secs <br />&nbsp; &nbsp;Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">18</span><span style="color: #000000;">-08</span><span style="color: #000000;">-2021</span>, <span style="color: #000000;">22</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">03</span><br />&nbsp; &nbsp;Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1132</span> &nbsp;Limiti superati: <span style="color: #000000;">accesso</span> all<span style="color: #ff0000;">'array<br />&nbsp; &nbsp;Args:<br />&nbsp; &nbsp; &nbsp;[ &nbsp; 1] = A &nbsp; {".<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\s</span>ervizio.png","01","servizio",1,9,9,,,,0,0,"RR210818223522",.T.,.T.,"","",1,1} length: 18<br />&nbsp; &nbsp; &nbsp;[ &nbsp; 2] = N &nbsp; 19<br /><br />Stack Calls<br />===========</span></div>[/code:2djcil41] on error .log there is this Procedure Type Value ========================== FW_FIELDSPUT Param 1: O Class: ERROR (b)FW_SAVEARRAYTODBF [b:2djcil41] Param 1: A Len: 19 Param 2: A Len: 18[/b:2djcil41] so it tells me there are 19 fields in parameter 1 and 18 in parameter 2 in parameter 1 that is cItemFlds there are 18 fields but I also had to add [b:2djcil41]RECNO[/b:2djcil41] BECAUSE THE savearraytodbf tells me that a field must be [b:2djcil41]Recno[/b:2djcil41] so there is 19 instead adata has 18 and make error see the test sample I sent you
today problem with savetodbf
I think oRigheInvoice has inherited from TDatabase in your source code. This method does not yet exist in Fivewin. Can you post more source code? Show the source code where you create the object. Best regards, Otto
today problem with savetodbf
Called from: .\source\function\DBFFUNC2.PRG => FW_FIELDSPUT( 911 ) Called from: .\source\function\DBFFUNC2.PRG => (b)FW_SAVEARRAYTODBF( 859 ) Called from: => AEVAL( 0 ) Called from: .\source\function\DBFFUNC2.PRG => FW_SAVEARRAYTODBF( 859 ) Link c:\fwh\source\function\dbffunc2.prg There you have these functions: Then put in some fwlogs and you will get the error. Best regards, Otto [code=fw:1z5lzv9s]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> FW_SaveArrayToDBF<span style="color: #000000;">&#40;</span> acFieldList, aData <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nSaveRec &nbsp; &nbsp;:= RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> acFieldList <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span>, <span style="color: #ff0000;">"RECNO()"</span> $ Upper<span style="color: #000000;">&#40;</span> acFieldList <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> acFieldList <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'A'</span>, AScan<span style="color: #000000;">&#40;</span> acFieldList, <span style="color: #000000;">&#123;</span> |c| Upper<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"RECNO()"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span> , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .f. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |a| FW_FieldsPut<span style="color: #000000;">&#40;</span> acFieldList, a <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; DBGOTO<span style="color: #000000;">&#40;</span> nSaveRec <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; ? <span style="color: #ff0000;">"One of the field name should be RECNO()"</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: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> FW_FieldsPut<span style="color: #000000;">&#40;</span> aFields, aValues, nLockWaitSecs, lAppend, bTrigger <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRecNo &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n, nLen, fld, u, v<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nSecs &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lReady &nbsp; &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lLocked &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lDelete &nbsp; &nbsp; := .f.<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> DBINFO<span style="color: #000000;">&#40;</span> DBI_ISREADONLY <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> aFields <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'A'</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> aValues == <span style="color: #00C800;">nil</span> .and. ValType<span style="color: #000000;">&#40;</span> aFields<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'A'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aFields &nbsp; &nbsp; := ArrTranspose<span style="color: #000000;">&#40;</span> aFields <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aValues &nbsp; &nbsp; := aFields<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aFields &nbsp; &nbsp; := aFields<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> aFields == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aFields &nbsp; &nbsp; := Array<span style="color: #000000;">&#40;</span> FCOUNT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aFields <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aFields<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> &nbsp; := n<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span> n<br />&nbsp; &nbsp; &nbsp; elseif ValType<span style="color: #000000;">&#40;</span> aFields <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aFields &nbsp; &nbsp; := FW_ListAsArray<span style="color: #000000;">&#40;</span> aFields <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aFields &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> aFields <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> aValues <span style="color: #000000;">&#41;</span> != <span style="color: #ff0000;">'A'</span><br />&nbsp; &nbsp; &nbsp; aValues &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> aValues <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> lAppend <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'N'</span><br />&nbsp; &nbsp; &nbsp; DBGOTO<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Abs</span><span style="color: #000000;">&#40;</span> lAppend <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; lDelete &nbsp;:= <span style="color: #000000;">&#40;</span> lAppend < <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; lAppend &nbsp;:= <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;elseif lAppend == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; n &nbsp;:= AScan<span style="color: #000000;">&#40;</span> aFields, <span style="color: #000000;">&#123;</span> |c| ValType<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span> .and. Upper<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"RECNO()"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> n > <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DBGOTO<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span> aValues <span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lDelete &nbsp;:= <span style="color: #000000;">&#40;</span> aValues<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> < <span style="color: #000000;">0</span> <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 />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> lAppend &nbsp; := EOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> lAppend .and. lDelete<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ! DBINFO<span style="color: #000000;">&#40;</span> DBI_SHARED <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> .or. DBINFO<span style="color: #000000;">&#40;</span> DBI_ISFLOCK <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// exclusive or flocked</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> lAppend<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DBFAPPEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; lReady &nbsp; &nbsp; &nbsp;:= .t.<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! lReady .and. ! lAppend<br />&nbsp; &nbsp; &nbsp; lReady &nbsp; &nbsp; &nbsp;:= DBRECORDINFO<span style="color: #000000;">&#40;</span> DBRI_LOCKED <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! lReady<br />&nbsp; &nbsp; &nbsp; nSecs &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; nLockWaitSecs &nbsp;:= <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nLockWaitSecs == <span style="color: #00C800;">nil</span>, <span style="color: #000000;">-1</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nLockWaitSecs == <span style="color: #000000;">0</span>, <span style="color: #000000;">120</span>, nLockWaitSecs <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> <span style="color: #000000;">&#40;</span> ! <span style="color: #000000;">&#40;</span> lLocked := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lAppend, <span style="color: #000000;">&#40;</span> DBAPPEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, !NetErr<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, DBRLOCK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.and. nLockWaitSecs > <span style="color: #000000;">0</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.and. nSecs < nLockWaitSecs<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SysWait<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0.5</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nSecs &nbsp; &nbsp;+= <span style="color: #000000;">0.5</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp; &nbsp; lReady &nbsp; &nbsp; &nbsp;:= lLocked<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> lReady<br /><br />&nbsp; &nbsp; &nbsp; nRecNo &nbsp; &nbsp; &nbsp;:= RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> lDelete<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DBDELETE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> lAppend<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DBSKIP<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLen &nbsp;:= <span style="color: #0000ff;">Min</span><span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> aFields <span style="color: #000000;">&#41;</span>, Len<span style="color: #000000;">&#40;</span> aValues <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nLen<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fld := aFields<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> fld <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fld &nbsp; := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ISDIGIT<span style="color: #000000;">&#40;</span> fld <span style="color: #000000;">&#41;</span>, Val<span style="color: #000000;">&#40;</span> fld <span style="color: #000000;">&#41;</span>, FIELDPOS<span style="color: #000000;">&#40;</span> fld <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> fld <span style="color: #000000;">&#41;</span> .and. !<span style="color: #000000;">&#40;</span> FieldType<span style="color: #000000;">&#40;</span> fld <span style="color: #000000;">&#41;</span> $ <span style="color: #ff0000;">"+=@"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> u := FieldGet<span style="color: #000000;">&#40;</span> fld <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; u &nbsp;:= Trim<span style="color: #000000;">&#40;</span> u <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> v := XEval<span style="color: #000000;">&#40;</span> aValues<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, lAppend <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ! <span style="color: #000000;">&#40;</span> u == <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> v <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span>, Trim<span style="color: #000000;">&#40;</span> v <span style="color: #000000;">&#41;</span>, v <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FieldPut<span style="color: #000000;">&#40;</span> fld, v &nbsp;<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span> n<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> DELETED<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RECALL<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> bTrigger <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'B'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> bTrigger <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> lLocked<br />&nbsp; &nbsp; &nbsp; DBRUNLOCK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> nRecNo<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:1z5lzv9s]
today problem with savetodbf
[quote="Otto":37h0memb]I think oRigheInvoice has inherited from TDatabase in your source code. This method does not yet exist in Fivewin. Can you post more source code? Show the source code where you create the object. Best regards, Otto[/quote:37h0memb] ??? otto //OPEN THE DBF BODY oRigheInvoice:=TRigheReserva():New() oRigheInvoice:setorder("res_rr") oRigheInvoice:gotop() [code=fw:37h0memb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">CLASS</span> TXData <span style="color: #0000ff;">from</span> TDataBase<br /><br /><span style="color: #00C800;">DATA</span> cDbfPath <span style="color: #0000ff;">init</span> cFilePath<span style="color: #000000;">&#40;</span>GetModuleFileName<span style="color: #000000;">&#40;</span> GetInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #00C800;">CLASS</span> TReserva <span style="color: #0000ff;">from</span> TXData<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> lShared <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TReserva<br />&nbsp; &nbsp;<span style="color: #00C800;">Default</span> lShared := .t.<br />&nbsp; &nbsp;::<span style="color: #00C800;">super</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span>,::<span style="color: #000000;">cDbfPath</span> + <span style="color: #ff0000;">"Reserva"</span> ,<span style="color: #ff0000;">"DBFCDX"</span>, lShared<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">use</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<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 />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span><br />&nbsp;<span style="color: #00C800;">CLASS</span> TRigheReserva <span style="color: #0000ff;">from</span> TXData<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> lShared <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TRigheReserva<br />&nbsp; &nbsp;<span style="color: #00C800;">Default</span> lShared := .t.<br />&nbsp; &nbsp;::<span style="color: #00C800;">super</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span>,::<span style="color: #000000;">cDbfPath</span> + <span style="color: #ff0000;">"Rig_Res"</span> ,<span style="color: #ff0000;">"DBFCDX"</span>, lShared<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">use</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<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 />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span></div>[/code:37h0memb]
today problem with savetodbf
[quote="Otto":1uv608px]Called from: .\source\function\DBFFUNC2.PRG => FW_FIELDSPUT( 911 ) Called from: .\source\function\DBFFUNC2.PRG => (b)FW_SAVEARRAYTODBF( 859 ) Called from: => AEVAL( 0 ) Called from: .\source\function\DBFFUNC2.PRG => FW_SAVEARRAYTODBF( 859 ) Link c:\fwh\source\function\dbffunc2.prg There you have these functions: Then put in some fwlogs and you will get the error. Best regards, Otto [code=fw:1uv608px]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> FW_SaveArrayToDBF<span style="color: #000000;">&#40;</span> acFieldList, aData <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> nSaveRec    := RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">if</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> acFieldList <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span>, <span style="color: #ff0000;">"RECNO()"</span> $ Upper<span style="color: #000000;">&#40;</span> acFieldList <span style="color: #000000;">&#41;</span>, ;<br />      <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> acFieldList <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'A'</span>, AScan<span style="color: #000000;">&#40;</span> acFieldList, <span style="color: #000000;">&#123;</span> |c| Upper<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"RECNO()"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span> , ;<br />          .f. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />      AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |a| FW_FieldsPut<span style="color: #000000;">&#40;</span> acFieldList, a <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />      DBGOTO<span style="color: #000000;">&#40;</span> nSaveRec <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">else</span><br />      ? <span style="color: #ff0000;">"One of the field name should be RECNO()"</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> FW_FieldsPut<span style="color: #000000;">&#40;</span> aFields, aValues, nLockWaitSecs, lAppend, bTrigger <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> nRecNo      := <span style="color: #000000;">0</span><br />   <span style="color: #00C800;">local</span> n, nLen, fld, u, v<br />   <span style="color: #00C800;">local</span> nSecs       := <span style="color: #000000;">0</span><br />   <span style="color: #00C800;">local</span> lReady      := .f.<br />   <span style="color: #00C800;">local</span> lLocked     := .f.<br />   <span style="color: #00C800;">local</span> lDelete     := .f.<br /><br />   <span style="color: #00C800;">if</span> DBINFO<span style="color: #000000;">&#40;</span> DBI_ISREADONLY <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> aFields <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'A'</span><br />      <span style="color: #00C800;">if</span> aValues == <span style="color: #00C800;">nil</span> .and. ValType<span style="color: #000000;">&#40;</span> aFields<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'A'</span><br />         aFields     := ArrTranspose<span style="color: #000000;">&#40;</span> aFields <span style="color: #000000;">&#41;</span><br />         aValues     := aFields<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />         aFields     := aFields<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">else</span><br />      <span style="color: #00C800;">if</span> aFields == <span style="color: #00C800;">nil</span><br />         aFields     := Array<span style="color: #000000;">&#40;</span> FCOUNT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aFields <span style="color: #000000;">&#41;</span><br />            aFields<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>   := n<br />         <span style="color: #00C800;">next</span> n<br />      elseif ValType<span style="color: #000000;">&#40;</span> aFields <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span><br />         aFields     := FW_ListAsArray<span style="color: #000000;">&#40;</span> aFields <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">else</span><br />         aFields     := <span style="color: #000000;">&#123;</span> aFields <span style="color: #000000;">&#125;</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> aValues <span style="color: #000000;">&#41;</span> != <span style="color: #ff0000;">'A'</span><br />      aValues     := <span style="color: #000000;">&#123;</span> aValues <span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> lAppend <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'N'</span><br />      DBGOTO<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Abs</span><span style="color: #000000;">&#40;</span> lAppend <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      lDelete  := <span style="color: #000000;">&#40;</span> lAppend < <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />      lAppend  := <span style="color: #00C800;">nil</span><br />   elseif lAppend == <span style="color: #00C800;">nil</span><br />      n  := AScan<span style="color: #000000;">&#40;</span> aFields, <span style="color: #000000;">&#123;</span> |c| ValType<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span> .and. Upper<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"RECNO()"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> n > <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />         DBGOTO<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span> aValues <span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         lDelete  := <span style="color: #000000;">&#40;</span> aValues<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> < <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">DEFAULT</span> lAppend   := EOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">if</span> lAppend .and. lDelete<br />      <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ! DBINFO<span style="color: #000000;">&#40;</span> DBI_SHARED <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> .or. DBINFO<span style="color: #000000;">&#40;</span> DBI_ISFLOCK <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// exclusive or flocked</span><br />      <span style="color: #00C800;">if</span> lAppend<br />         DBFAPPEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br />      lReady      := .t.<br />   <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">if</span> ! lReady .and. ! lAppend<br />      lReady      := DBRECORDINFO<span style="color: #000000;">&#40;</span> DBRI_LOCKED <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ! lReady<br />      nSecs       := <span style="color: #000000;">0</span><br />      nLockWaitSecs  := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nLockWaitSecs == <span style="color: #00C800;">nil</span>, <span style="color: #000000;">-1</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nLockWaitSecs == <span style="color: #000000;">0</span>, <span style="color: #000000;">120</span>, nLockWaitSecs <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> <span style="color: #000000;">&#40;</span> ! <span style="color: #000000;">&#40;</span> lLocked := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lAppend, <span style="color: #000000;">&#40;</span> DBAPPEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, !NetErr<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, DBRLOCK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>  ;<br />               .and. nLockWaitSecs > <span style="color: #000000;">0</span> ;<br />               .and. nSecs < nLockWaitSecs<br />         SysWait<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0.5</span> <span style="color: #000000;">&#41;</span><br />         nSecs    += <span style="color: #000000;">0.5</span><br />      <span style="color: #00C800;">enddo</span><br />      lReady      := lLocked<br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> lReady<br /><br />      nRecNo      := RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> lDelete<br />         DBDELETE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">else</span><br />         <span style="color: #00C800;">if</span> lAppend<br />            DBSKIP<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span><br />         nLen  := <span style="color: #0000ff;">Min</span><span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> aFields <span style="color: #000000;">&#41;</span>, Len<span style="color: #000000;">&#40;</span> aValues <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nLen<br /><br />            fld := aFields<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><br />            <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> fld <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span><br />               fld   := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ISDIGIT<span style="color: #000000;">&#40;</span> fld <span style="color: #000000;">&#41;</span>, Val<span style="color: #000000;">&#40;</span> fld <span style="color: #000000;">&#41;</span>, FIELDPOS<span style="color: #000000;">&#40;</span> fld <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">endif</span><br />            <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> fld <span style="color: #000000;">&#41;</span> .and. !<span style="color: #000000;">&#40;</span> FieldType<span style="color: #000000;">&#40;</span> fld <span style="color: #000000;">&#41;</span> $ <span style="color: #ff0000;">"+=@"</span> <span style="color: #000000;">&#41;</span><br />               <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> u := FieldGet<span style="color: #000000;">&#40;</span> fld <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span><br />                  u  := Trim<span style="color: #000000;">&#40;</span> u <span style="color: #000000;">&#41;</span><br />               <span style="color: #00C800;">endif</span><br />               <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> v := XEval<span style="color: #000000;">&#40;</span> aValues<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, lAppend <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #00C800;">nil</span><br />                  <span style="color: #00C800;">if</span> ! <span style="color: #000000;">&#40;</span> u == <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> v <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span>, Trim<span style="color: #000000;">&#40;</span> v <span style="color: #000000;">&#41;</span>, v <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />                     FieldPut<span style="color: #000000;">&#40;</span> fld, v  <span style="color: #000000;">&#41;</span><br />                  <span style="color: #00C800;">endif</span><br />               <span style="color: #00C800;">endif</span><br />            <span style="color: #00C800;">endif</span><br />         <span style="color: #00C800;">next</span> n<br /><br />         <span style="color: #00C800;">if</span> DELETED<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            RECALL<br />         <span style="color: #00C800;">endif</span><br /><br />         <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> bTrigger <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'B'</span><br />            Eval<span style="color: #000000;">&#40;</span> bTrigger <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">If</span> lLocked<br />      DBRUNLOCK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> nRecNo<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:1uv608px][/quote:1uv608px] OTTO, I use another function Please see [b:1uv608px]YUNUS.prg [/b:1uv608px] search [b:1uv608px]static function EditInvoice( oRec )[/b:1uv608px] .... if ! Empty( oBrw:aDeleted ) AEval( oBrw:aDeleted, { |a| a[ 9 ] := -a[ 9 ] } ) IIT->( FW_SaveArrayToDBF( cItemFlds, oBrw:aDeleted ) ) endif AEval( aItems, { |a| a[ 1 ] := oRec:InvNum } ) AEval( aItems, { |a,i| a[ 2 ] := i } ) [b:1uv608px] IIT->( FW_SaveArrayToDBF( cItemFlds, aItems ) )[/b:1uv608px] oRec:Save() but [b:1uv608px] IIT->( FW_SaveArrayToDBF( cItemFlds, aItems ) )[/b:1uv608px] is not tdatabase the method is for tdatabase SaveArrayToDBF( cItemFlds, aItems ) [b:1uv608px]so odbf:SaveArrayToDBF( cItemFlds, aItems )[/b:1uv608px] If I use [b:1uv608px]oRigheInvoice:ArrayToDBF( aData, cItemFlds,, .t., .t. )[/b:1uv608px] run but I have on dbf another error If is a new record not save if is a edit record modifies the lines that are in the archive even if they are not of the same order number
today problem with savetodbf
'Silvio, but before you can save a record you have to navigate to the recNo METHOD GoTo( nRecNo ) or insert a new record. METHOD Append() Why don't you create a function, SAVE () and pass your data? There you open your database again and save everything. And then closes it. For such a complicated task, this is more transparent. And more secure. Commit, skip problems. More save in network enviroment. Best regards, Otto
today problem with savetodbf
I understood I have aItems of 18 field and citemflds of 19 How I can make to set aItems to 19 fields ?
today problem with savetodbf
[quote="Otto":26gu1y8e]'Silvio, but before you can save a record you have to navigate to the recNo METHOD GoTo( nRecNo ) or insert a new record. METHOD Append() Why don't you create a function, SAVE () and pass your data? There you open your database again and save everything. And then closes it. For such a complicated task, this is more transparent. And more secure. Commit, skip problems. More save in network enviroment. Best regards, Otto[/quote:26gu1y8e] after i can do everything, first i solve this problem in the yunus.prg program Nages adds a field to aBlankItem i have the array differently and i don't know how to add the field
today problem with savetodbf
Perhaps I found a solution I add on dbf Rig_Res a field [b:16s73mtg]recno numeric 3cr[/b:16s73mtg] when I add a new service I add a new field [code=fw:16s73mtg]<div class="fw" id="{CB}" style="font-family: monospace;">AaDd<span style="color: #000000;">&#40;</span>oBrowse:<span style="color: #000000;">aArrayData</span>,<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">".<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\s</span>ervizio.png"</span> &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"01"</span> &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"servizio"</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1</span> &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">9</span> &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">9</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span> &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span> &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nInvoice ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .t. ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .t.,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">""</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">""</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1</span> &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:16s73mtg] [b:16s73mtg]now the fields are 19 [/b:16s73mtg] the I save with [b:16s73mtg]oRigheInvoice:ArrayToDBF( aData, cItemFlds,, .t., .t. )[/b:16s73mtg] and seem to run Now I must make the edit procedure
today problem with savetodbf
Otto, making the modifies this afyernoon perhaps it can run the new record is ok the modify record is ok I have problems when I delete a row on xbrowse of yunus it delete with [code=fw:tc6u0a15]<div class="fw" id="{CB}" style="font-family: monospace;">  :<span style="color: #000000;">bKeyDown</span>   := <span style="color: #000000;">&#123;</span> |k| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> k == VK_DELETE, <span style="color: #000000;">&#40;</span> oBrowse:<span style="color: #000000;">aAppend</span> := <span style="color: #00C800;">nil</span>, oBrowse:<span style="color: #000000;">Delete</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:tc6u0a15] I insert a button at xbrowse with [code=fw:tc6u0a15]<div class="fw" id="{CB}" style="font-family: monospace;"> WITH OBJECT oBrowse:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">12</span><span style="color: #000000;">&#93;</span><br />                      :<span style="color: #000000;">AddBitmap</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"delete.bmp"</span>,<span style="color: #ff0000;">"broom.png"</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />                       :<span style="color: #000000;">nBtnBmp</span> := <span style="color: #000000;">1</span><br />                       :<span style="color: #000000;">lBmpStretch</span>     := .F.<br />                       :<span style="color: #000000;">lBmpTransparent</span> := .T.<br />                       :<span style="color: #000000;">nwidth</span> := <span style="color: #000000;">30</span><br />                       :<span style="color: #000000;">nEditType</span> := EDIT_BUTTON<br />                       :<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">&#123;</span> || oBrowse:<span style="color: #000000;">Delete</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span><br />                       :<span style="color: #000000;">nHeadBmpNo</span> := <span style="color: #000000;">2</span><br />                       :<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">""</span><br />                     END<br /> </div>[/code:tc6u0a15] this seem be not the same when I save the rows I use this [code=fw:tc6u0a15]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oBrowse:<span style="color: #000000;">aDeleted</span> <span style="color: #000000;">&#41;</span><br />            AEval<span style="color: #000000;">&#40;</span> oBrowse:<span style="color: #000000;">aDeleted</span>, <span style="color: #000000;">&#123;</span> |a| a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">18</span> <span style="color: #000000;">&#93;</span> := -a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">18</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />             oRigheInvoice:<span style="color: #000000;">SaveArrayToDBF</span><span style="color: #000000;">&#40;</span> cItemFlds,oBrowse:<span style="color: #000000;">aDeleted</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// save the delete records</span><br />          <span style="color: #00C800;">endif</span></div>[/code:tc6u0a15] If I use my method not run ok [b:tc6u0a15]in fact it does not delete (on dbf) the lines that I have deleted on xbrowse[/b:tc6u0a15]
today problem with savetodbf
OK NOW RUN OK [code=fw:u6cct93v]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oBrowse:<span style="color: #000000;">aDeleted</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> oBrowse:<span style="color: #000000;">aDeleted</span>, <span style="color: #000000;">&#123;</span> |a| a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">19</span> <span style="color: #000000;">&#93;</span> := -a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">19</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oRigheInvoice:<span style="color: #000000;">SaveArrayToDBF</span><span style="color: #000000;">&#40;</span> cItemFlds,oBrowse:<span style="color: #000000;">aDeleted</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// save the delete records</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:u6cct93v] [size=200:u6cct93v]I AM HAPPY [/size:u6cct93v]
todbcdirect
Some People Knows As firebird DB with this Class., But can´t open DBF TEMP to using LISTBOX Thanks..
todbcdirect
Mauricio, Could you please provide a small sample to reproduce it ? thanks,
toggle with BTNBMP
Hello, should toggle on BTNBMP work? Best regards Otto [code=fw:3ty0adan]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">10</span>, <span style="color: #000000;">65</span>;<br />&nbsp; &nbsp;<span style="color: #0000ff;">BTNBMP</span> oBtnVerrechnung ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg &nbsp; FLAT ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">30</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"CHECKON"</span>, <span style="color: #ff0000;">"CHECKOFF"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FONT</span> oFont ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> &nbsp;f_checkall<span style="color: #000000;">&#40;</span>oBtnVerrechnung<span style="color: #000000;">&#41;</span>, oBtnVerrechnung:<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 />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> &nbsp;CLR_WHITE, &nbsp;<span style="color: #000000;">12088150</span><br />&nbsp; &nbsp;<br />func f_checkall<br />...<br /><span style="color: #00C800;">if</span> lToggle = .t.<br />&nbsp; &nbsp; lToggle = .F.<br />&nbsp; &nbsp; oBtnVerrechnung:<span style="color: #000000;">bBmpNo</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">2</span> <span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">else</span><br />&nbsp; &nbsp; lToggle = .T.<br />&nbsp; &nbsp; oBtnVerrechnung:<span style="color: #000000;">bBmpNo</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">1</span> <span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:3ty0adan]
toggle with BTNBMP
[code=fw:13csxuek]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> ToggleBtn<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oBtn<br />   <span style="color: #00C800;">local</span> lToggle  := .t.<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br /><br />   @ <span style="color: #000000;">50</span>,<span style="color: #000000;">50</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\3</span>2X32<span style="color: #000000;">\y</span>es.bmp"</span>, <span style="color: #00C800;">nil</span>, ;<br />                                <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\3</span>2X32<span style="color: #000000;">\n</span>o.bmp"</span> ;<br />   <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> lToggle := !lToggle <span style="color: #000000;">&#41;</span><br /><br />   oBtn:<span style="color: #000000;">bBmpNo</span>    := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lToggle, <span style="color: #000000;">1</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:13csxuek]
toggle with BTNBMP
Dear Mr. Rao, thank you. This is working fine. Best regards, Otto
token index
HOLA TODOS.Busco alguna manera de indexar con algo asi como una CLAUSULA TOKEN. Mi necesidad es que el usuario captura una palabra y se muestren RAPIDAMENTE todos aquellos registros que contienen dicha palabra en un campo especifico.ALGUNA IDEA?
token index
Arturo,Si usas relativamente pocos registros entonces puedes usar SET FILTER TO ... que es algo lento ya que busca registro por registro.Si tu DBF es bien grande, entonces podemos indicarte otras técnicas para hacer las busquedas más rápidas, como crear un índice temporal condicional ó buscar directamente dentro de la DBF usando At().
token index
Gracias Antonio. Actualmente uso un indice temporal que resulta mas veloz que un SET FILTER en combinacion con AT() o "$", pero aun asi resulta lento, pues son muchos registros. Recuerdo habia una clausula token en algun RDD, la verdad creo que unicamente algo asi podria aumentar la velocidad de respuesta.GRACIAS. SALUDOS![quote="Antonio Linares":12agv50z]Arturo, Si usas relativamente pocos registros entonces puedes usar SET FILTER TO ... que es algo lento ya que busca registro por registro. Si tu DBF es bien grande, entonces podemos indicarte otras técnicas para hacer las busquedas más rápidas, como crear un índice temporal condicional ó buscar directamente dentro de la DBF usando At().[/quote:12agv50z]
tole on xp
this code : [code:1vews36w] Function stampa_affidamento&#40;&#41; Local cdoc&#58;= "c&#58;\maga\affida&#46;doc" oWord = TOleAuto&#40;&#41;&#58;New&#40; "Word&#46;Application" &#41; oDoc = oWord&#58;Documents&#58;Open&#40; cDoc &#41; oDoc&#58;Select&#40;&#41; oSel = oWord&#58;Selection WORDREPLACE&#40; oSel, "<protocollo>", &#40;oDCom&#41;->NumDoc &#41; WORDREPLACE&#40; oSel, "<data>", DToC&#40;&#40;oDCom&#41;->FecDoc&#41; &#41; WORDREPLACE&#40; oSel, "<fornitore>", &#40;oDCom&#41;->RazSoc &#41; WORDREPLACE&#40; oSel, "<servizio>", &#40;oDCom&#41;->Concep &#41; WORDREPLACE&#40; oSel, "<costo>", Desp_Imp&#40;&#41; &#41; // vederla in video e modificarla e salvarla oDoc&#58;save&#40;"c&#58;\maga\aff_"+&#40;oDCom&#41;->NumDoc+"&#46;doc"&#41; *oDoc&#58;save&#40;"c&#58;\maga\aff_"+alltrim&#40;&#40;oDCom&#41;->RazSoc&#41;+"_"+&#40;oDCom&#41;->NumDoc+"_"+dtos&#40;date&#40;&#41;&#41;+"&#46;doc"&#41; oWord&#58;Visible=&#46;t&#46; //stampa *oDoc&#58;PrintOut&#40; &#46;F&#46; &#41; *oDoc&#58;Close&#40; 0 &#41; *oWord&#58;Quit&#40;&#41; return nil[/code:1vews36w] it create a doc and replace variables but i make some error and the create the doc with xp wwinord 2003 Why ? On win 2000 ( office 2000) run ok
tole on xp
[quote="Silvio":1vp8e2b0]this code : [code:1vp8e2b0] Function stampa_affidamento&#40;&#41; Local cdoc&#58;= "c&#58;\maga\affida&#46;doc" oWord = TOleAuto&#40;&#41;&#58;New&#40; "Word&#46;Application" &#41; oDoc = oWord&#58;Documents&#58;Open&#40; cDoc &#41; oDoc&#58;Select&#40;&#41; oSel = oWord&#58;Selection WORDREPLACE&#40; oSel, "<protocollo>", &#40;oDCom&#41;->NumDoc &#41; WORDREPLACE&#40; oSel, "<data>", DToC&#40;&#40;oDCom&#41;->FecDoc&#41; &#41; WORDREPLACE&#40; oSel, "<fornitore>", &#40;oDCom&#41;->RazSoc &#41; WORDREPLACE&#40; oSel, "<servizio>", &#40;oDCom&#41;->Concep &#41; WORDREPLACE&#40; oSel, "<costo>", Desp_Imp&#40;&#41; &#41; // vederla in video e modificarla e salvarla oDoc&#58;save&#40;"c&#58;\maga\aff_"+&#40;oDCom&#41;->NumDoc+"&#46;doc"&#41; *oDoc&#58;save&#40;"c&#58;\maga\aff_"+alltrim&#40;&#40;oDCom&#41;->RazSoc&#41;+"_"+&#40;oDCom&#41;->NumDoc+"_"+dtos&#40;date&#40;&#41;&#41;+"&#46;doc"&#41; oWord&#58;Visible=&#46;t&#46; //stampa *oDoc&#58;PrintOut&#40; &#46;F&#46; &#41; *oDoc&#58;Close&#40; 0 &#41; *oWord&#58;Quit&#40;&#41; return nil[/code:1vp8e2b0] it create a doc and replace variables but i make some error and the create the doc with xp wwinord 2003 Why ? On win 2000 ( office 2000) run ok[/quote:1vp8e2b0] Silvio , Why not use TWord Class ? [code:1vp8e2b0] METHOD Cotizacion&#40;&#41; CLASS TCaptura LOCAL cCot &#58;= GetApp&#40;&#41;&#58;cRuta+"Template\C"+cTempFile&#40;&#41;+"&#46;doc" &#46; &#46; &#46; &#46; &#46; cFile &#58;= GetApp&#40;&#41;&#58;cRuta+"Template\Cotiza&#46;doc" __CopyFile&#40; cFile , cCot &#41; IF &#58;&#58;oWord&#58;IsVisible&#40;&#41; &#58;&#58;oWord&#58;Hide&#40;&#41; ENDIF &#58;&#58;oWord&#58;OpenDoc&#40; cCot &#41; &#58;&#58;oWord&#58;Replace&#40; "&#91;Nom&#93;" , cNombre &#41; &#58;&#58;oWord&#58;Replace&#40; "&#91;Raz&#93;" , cRazon &#41; &#58;&#58;oWord&#58;Replace&#40; "&#91;Dom&#93;" , cDom &#41; &#58;&#58;oWord&#58;Replace&#40; "&#91;Col&#93;" , cCol &#41; &#58;&#58;oWord&#58;Replace&#40; "&#91;CP&#93;" , cCp &#41; &#58;&#58;oWord&#58;Replace&#40; "&#91;Pob&#93;" , cPob &#41; &#58;&#58;oWord&#58;Replace&#40; "&#91;cCod&#93;" , Alltrim&#40; Str&#40; &#58;&#58;aVars&#91; 2 , 1 &#93; &#41; &#41; &#41; &#58;&#58;oWord&#58;Visualizar&#40;&#41; RETURN NIL [/code:1vp8e2b0]
tole on xp
because with tword clas not run ok the possibility to insert a logo into title
tole on xp
[quote="Silvio":39fp5px3]because with tword clas not run ok the possibility to insert a logo into title[/quote:39fp5px3] Silvio : see this code , it's works fine to me <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Method AddImagen() [code:39fp5px3] oWord &#58;= TWord&#40;&#41;&#58;New&#40;&#41; // Instancia la Clase Word cFileWord &#58;= cGetFile32&#40;"c&#58;\*&#46;doc"&#41; // Buscar el Docuemento oWord&#58;OpenDoc&#40; cFileWord &#41; // Abre el Documento oWord&#58;Visualizar&#40;&#41; // Visualizar Word oWord&#58;Write&#40; cTitulo , "Times New Roman", 20 , &#46;T&#46; , &#46;F&#46; , Rgb&#40; 255 , 0 , 0 &#41; &#41; oWord&#58;JustificaDoc&#40; 1 &#41; oWord&#58;HeaderFooter&#40; 9 &#41; ; oWord &#58;Write&#40; "Creswin + Word" , "Tahoma", 10 , &#46;F&#46; , &#46;F&#46; &#41; oWord&#58;AddImagen&#40; 1 , 1 , 50 , 50 , "c&#58;\creswin\skins\creswin&#46;bmp" &#41; oWord&#58;HeaderFooter&#40; 10 &#41; ; oWord &#58;Write&#40; "Creswin Support" , "Tahoma", 10 , &#46;T&#46; , &#46;T&#46; , Rgb&#40; 255,255,0&#41; &#41; oWord&#58;JustificaDoc&#40; 2 &#41; oWord&#58;HeaderFooter&#40; 0 &#41; oWord&#58;OpenDataSource&#40;"c&#58;\Browse&#46;xls"&#41; // Abre el origen de datos para la combinación de correspondencia oWord&#58;ReplaceField&#40; "#Nombre#", "Nombre" &#41; // Cambia el Template por el campo de correspondencia oWord&#58;ReplaceField&#40; "#Domicilio#", "Domicilio" &#41; // Cambia el Template por el campo de correspondencia oWord&#58;ReplaceField&#40; "#Colonia#", "Colonia" &#41; // Cambia el Template por el campo de correspondencia *oWord&#58;oMailMerge&#58;Set&#40; "Destination" , 0 &#41; // Nuevo documento //oWord&#58;oMailMerge&#58;Set&#40; "Destination" , 1 &#41; // A la impresora // Descomentar esta parte para probar el envio de Emails oWord&#58;oMailMerge&#58;Set&#40; "Destination" , 2 &#41; // Por E-Mail oWord&#58;oMailMerge&#58;Set&#40; "MailAddressFieldName" , "Email2" &#41; // Indica el campo que contiene el email oWord&#58;oMailMerge&#58;Set&#40; "MailAsAttachment" , &#46;T&#46; &#41; // Como Adjunto o parte del cuerpo TRUE = Adjunto oWord&#58;oMailMerge&#58;Set&#40; "MailSubject" , "Envio de correspondencia desde &#46;&#46;&#46;&#46;&#46;&#46;" &#41; oWord&#58;oMailMerge&#58;Invoke&#40; "Execute" &#41; return [/code:39fp5px3]
tole on xp
I tryed it last two year the I must use ole ....
tole on xp
perhaps I have a old wrong version of tword class where i can download it ?
too busy to response
hi, i try to use a GET MULTILINE to show "Output" under GUI [code=fw:2aumos2k]<div class="fw" id="{CB}" style="font-family: monospace;">PROCEDURE SetStatusText<span style="color: #000000;">&#40;</span> cData <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> ControlHandle<br />   cStatusBox += cData<br />   #IFDEF Use_Gui<br />      #IFDEF __HMG__<br />         ControlHandle := GetControlHandle<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"StatusBox"</span>, <span style="color: #ff0000;">"Main"</span> <span style="color: #000000;">&#41;</span><br />      #ELSE<br />         ControlHandle := oStatusBox:<span style="color: #000000;">hwnd</span><br />      #ENDIF<br />   #ENDIF<br /><br />   <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">&#40;</span> ControlHandle <span style="color: #000000;">&#41;</span><br />      #IFDEF Use_Gui<br />         #IFDEF __HMG__<br />            SendMessage<span style="color: #000000;">&#40;</span>ControlHandle  ,;<br />                  WM_SETTEXT     ,;<br />                  LEN<span style="color: #000000;">&#40;</span>cStatusBox<span style="color: #000000;">&#41;</span>,;<br />                  cStatusBox      <span style="color: #000000;">&#41;</span><br /><br />*           SetProperty<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Main"</span>,<span style="color: #ff0000;">"StatusBox"</span>,<span style="color: #ff0000;">"CaretPos"</span>, <span style="color: #000000;">-1</span> <span style="color: #000000;">&#41;</span><br />*           Main.StatusBox.CaretPos := - <span style="color: #000000;">1</span><br />         #ELSE<br />            oStatusBox:<span style="color: #000000;">cText</span> := cStatusBox<br />            oStatusBox:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         #ENDIF<br />         InvalidateRect<span style="color: #000000;">&#40;</span> ControlHandle, <span style="color: #00C800;">NIL</span>, .F. <span style="color: #000000;">&#41;</span><br />      #ENDIF<br />   <span style="color: #00C800;">ENDIF</span><br />   cStatusBox += CRLF<br /><span style="color: #00C800;">RETURN</span><br /> </div>[/code:2aumos2k] i do assign "growing" String direct to o:cText and show it with Scroll Effect. under HMG i have to use API else Memory goes up until crash while FiveWin is Stable <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> but in both Version "Output" will get slower with every line ... <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> ... hm now i have a BIG Problem with HMG and Fivewin when "Focus is lost". (click on other App) HMG and FiveWin App does run but no "Output" ("no response" Timeout Problem) any more until End <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> App does read file, analyze it, new align it, write new file both work with "Output" to GET Object ... and no "sleep" without "OutPut" (VERBOSE=NO) it just take < 5 Sec HMG and FiveWin need Minutes with (not optimized) GUI "Output" which is "normal" neverless i like to ask is there a Way to "Speed" up "OutPut" <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> what can i do against "no response" Timeout Problem <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> --- it is a old Cl*pper code and does not use RAM> 640 KB as we have now. it also use Function Code which are not Thread safe. but i don't want to revise hole Cl*pper Code ... only make it faster in GUI
too busy to response
got the Solution [code=fw:3ezm682f]<div class="fw" id="{CB}" style="font-family: monospace;">   hb_IdleSleep<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0.01</span> <span style="color: #000000;">&#41;</span><br />   SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>     <span style="color: #B900B9;">// Let Windows process</span></div>[/code:3ezm682f] as i say there was no time for Windows. hb_IdleSleep( 0.01 ) does not help but SysRefresh() ... which also need time but now i can play Solitar in Foreground while FW App work in Backgound and does "Output" hole time <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> have a nice Xmas Jimmy
toolbar
Hola Consulta como puedo enviar el mensaje que cuando se presiona el boton del toolbar se active el menu [code:1lzh7son] DEFINE TBMENU OF aToolBar&#91;1&#93; ; ACTION ListArtCli&#40;&#46;t&#46;&#41; ;//aqui al presionar que active el popup TOOLTIP ansitooem&#40;"Mantención·Clientes"&#41; ; PROMPT "Clientes" ; WHEN &#46;F&#46; ; MENU ShowPopup&#40; &#41; &#46;&#46;&#46; function showpopu&#40;&#41; local oPopup MENU oPopup POPUP MENUITEM "opcion1" ACTION fAccion1&#40;&#41; MENUITEM "opcion1" ACTION fAccion2&#40;&#41; ENDMENU return&#40; oPopup &#41; [/code:1lzh7son] Saludos Patricio
toolbar boton desactivar?
Hola. Como hago para desactivar el segundo boton? gracias. [code=fw:3q812dx8]<div class="fw" id="{CB}" style="font-family: monospace;"> WITH OBJECT oTb<br />      :<span style="color: #000000;">addButton</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#123;</span>|| <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"nada"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"Manejo de datos de los contactos"</span>, <span style="color: #ff0000;">"contactos"</span><span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">addButton</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#123;</span>|| <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Nada por ahora"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"Manejo de datos de los productos"</span>, <span style="color: #ff0000;">"registros"</span><span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">addSeparator</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      ...</div>[/code:3q812dx8] Gracias.
toolbar boton desactivar?
Prueba con oTb:aControls[2]:disable(), saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
toolbar boton desactivar?
[quote="joseluisysturiz":2nvrkx7f]Prueba con oTb:aControls[2]:disable(), saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->[/quote:2nvrkx7f] bien bien! habia probado con abuttons.... gracias! gracias!
toolbar boton desactivar?
[quote="goosfancito":36yu2rez][quote="joseluisysturiz":36yu2rez]Prueba con oTb:aControls[2]:disable(), saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->[/quote:36yu2rez] bien bien! habia probado con abuttons.... gracias! gracias![/quote:36yu2rez] Es lo primero que tambien se me habia ocurrido, pero asumiendo que ya lo habias intentado asi, revise la clase y vi que no era eso si no el aControls, que bueno hayas resuelto, siempre a la orden, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
toolbar boton desactivar?
me da error. me dice que esta fuera del rango [quote:j4150egg] Error description: Error BASE/1132 Error de rango: acceso al array Args: [ 1] = A { ... } [ 2] = N 1[/quote:j4150egg]
toolbar boton desactivar?
[quote="goosfancito":1r17ryie]me da error. me dice que esta fuera del rango [quote:1r17ryie] Error description: Error BASE/1132 Error de rango: acceso al array Args: [ 1] = A { ... } [ 2] = N 1[/quote:1r17ryie][/quote:1r17ryie] Nunca he desactivado un boton de la buton bar como lo quieres hacer ni la construyo asi...lo hago de la forma comun y le asigno a cada boton un valor en un array y luego descativo el que quiero...a menos que la barra de botones sea un array de 2 dimesiones, entonces tendrias que probar con oTb:aControls[1, 2]:disable(), o algo asi, o intenta usando oTb:aControls[1]:disable(),haber si te desactiva algun boton, hare pruebas, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
toolbar boton desactivar?
Gustavo, Hay un ejemplo en samples\toolbar1.prg: MENUITEM "&Disable button..." ACTION oToolBar:EnableButton( 3, .f. ) MENUITEM "&Enable button..." ACTION oToolBar:EnableButton( 3, .t. )
toolbar class as Menu 2015
Ho w Ican modify the color of the toolbar as colors of menu2015 ? the menu 2015 [img:2nn706wh]http&#58;//www&#46;eoeo&#46;it/wp-content/uploads/2016/01/menu2015&#46;jpg[/img:2nn706wh] I try to insert the menu on the toolbar and I change the background of the button but I cannot modify the color od the rebar [img:2nn706wh]http&#58;//www&#46;eoeo&#46;it/wp-content/uploads/2016/01/toolbar&#46;jpg[/img:2nn706wh] oImageList:AddMasked( TBitmap():Define( "TOOLBAR_ESERCIZI",, ::oWndMain ), RGB( 244, 245, 245 ) ) any solution ?
toolbar class as Menu 2015
[quote="Silvio.Falconi":36i1apgl]Ho w Ican modify the color of the toolbar as colors of menu2015 ? the menu 2015 [img:36i1apgl]http&#58;//www&#46;eoeo&#46;it/wp-content/uploads/2016/01/menu2015&#46;jpg[/img:36i1apgl] I try to insert the menu on the toolbar and I change the background of the button but I cannot modify the color od the rebar [img:36i1apgl]http&#58;//www&#46;eoeo&#46;it/wp-content/uploads/2016/01/toolbar&#46;jpg[/img:36i1apgl] oImageList:AddMasked( TBitmap():Define( "TOOLBAR_ESERCIZI",, ::oWndMain ), RGB( 244, 245, 245 ) ) any solution ?[/quote:36i1apgl] Silvio, style 2015 in oBar is implemented in next build We're doing tests
toolbar class as Menu 2015
I not mean buttonbar but on toolbar (REbar class)
toolbar class as Menu 2015
[quote="Silvio.Falconi":1bfocfxj]I not mean buttonbar but on toolbar (REbar class)[/quote:1bfocfxj] Ok, Any small example?
toolbar class as Menu 2015
Local oImageList, oReBar,oHand Local nColore_ToolBar:= RGB( 244, 245, 245 ) //2015... DEFINE CURSOR oHand HAND DEFINE IMAGELIST oImageList SIZE 32,30 oImageList:AddMasked( TBitmap():Define( "TOOLBAR_ESERCIZI",, ::oWndMain ), nColore_ToolBar ) oImageList:AddMasked( TBitmap():Define( "TOOLBAR_ATTIVITA",, ::oWndMain ), nColore_ToolBar ) oImageList:AddMasked( TBitmap():Define( "TOOLBAR_APUNTES",, ::oWndMain ), nColore_ToolBar ) oReBar = TReBar():New( ::oWndMain ) DEFINE TOOLBAR ::oBar OF oReBar SIZE 36,36 IMAGELIST oImageList ::oBar:lTTBalloon:=.t. ::oBar:oCursor:= oHand oReBar:InsertBand( ::oBar ) ::oBar:nHeight -= 2 DEFINE TBBUTTON OF ::oBar ; ACTION NIL ; TOOLTIP i18n( "Gestione Esercizi" ) ; MESSAGE i18n( "Gestione Esercizi." ) DEFINE TBBUTTON OF ::oBar ; ACTION NIL ; TOOLTIP i18n( "Gestione Attività" ) ; MESSAGE i18n( "Gestione Attività." ) DEFINE TBSEPARATOR OF ::oBar DEFINE TBBUTTON OF ::oBar ; ACTION NIL ; TOOLTIP i18n( "Gestione Movimenti" ) ; MESSAGE i18n( "Gestione Movimenti." )
toolbar class as Menu 2015
Sorry I wanted to say if you can attach a picture Thanks
toolbar class as Menu 2015
Silvio First implementation [url=http&#58;//postimage&#46;org/:2p1g2gkb][img:2p1g2gkb]http&#58;//s10&#46;postimg&#46;org/54ye45eih/Title256&#46;png[/img:2p1g2gkb][/url:2p1g2gkb]
toolbar class as Menu 2015
not depend from my bitmaps I use for create the button of toolbar I have c5bar and it run ok only I wish use toolbar fwh class
toolbar tbitmap urgente pro favor
saludos programando con la version fwh 2.6 y harbour, quize poner un toolbar, todo bien pero pongo una imagen no me aparece trasnparente, como puedo hacer para que me aparesca del color del boton, esta es la imagen [url:382mlvx6]http&#58;//img148&#46;imageshack&#46;us/my&#46;php?image=dibujoja8&#46;png[/url:382mlvx6]
toolbar tbitmap urgente pro favor
Revisa samples\toolbar1.prg y verás que para añadir una imagen has de hacer: DEFINE IMGBITMAP OF oImageList NAME "new" COLOR nRGB( 255, 0, 255 ) En donde nRGB( 255, 0, 255 ) -fucsia- indica el color que va a ser transparente y es el mismo que debes usar en el bitmap: [url=http&#58;//imageshack&#46;us:1337jiwf][img:1337jiwf]http&#58;//img100&#46;imageshack&#46;us/img100/479/internetur2&#46;png[/img:1337jiwf][/url:1337jiwf]
toolbar tbitmap urgente pro favor
Antonio hice lo que me indicaste me fije en el ejemplo de los samples en fwh y viene la instruccion asi oImageList:AddMasked( TBitmap():Define( "new",, oWnd ), nRGB( 255, 0, 255 ) ) oImageList:AddMasked( TBitmap():Define( "open",, oWnd ), nRGB( 255, 0, 255 ) ) parte de mi codigo es este pero no me pone las imagenes transparentes al boton se ven con el fondo blanco estoy haciendo algo mal oImgList:= TImageList():New( 32, 32 ) oImgList:AddMasked( oBmp[1] := TBitmap():Define( "TOOL_CLIENTE" ,, oWnd ), nRGB( 255, 0, 255 ) ) oImgList:AddMasked( oBmp[2] := TBitmap():Define( "TOOL_PROVEDOR" ,, oWnd ), nRGB( 255, 0, 255 ) ) oImgList:AddMasked( oBmp[3] := TBitmap():Define( "TOOL_PRODUCTO" ,, oWnd ), nRGB( 255, 0, 255 ) ) oImgList:AddMasked( oBmp[4] := TBitmap():Define( "TOOL_SERVICIOS",, oWnd ), nRGB( 255, 0, 255 ) )