topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
Are there any Treeview samples with associated edit boxes?
|
D.
You simply upload the image file to your repo in GitHub, then you click on it, right click on the image again and copy the "raw" url.
That url is the one to post here clicking on the Img button here when editing.
Please post here the entire content of C:\fwh\samples\test.xml once your overwrite it
|
Are there any Treeview samples with associated edit boxes?
|
Sorry, I thought we were sharing files on the FW repository. But of course we're using our own space.
Too many things going on. Alright, thanks Antonio.
Let me know if you need any more info, regarding the error.
|
Are there any Treeview samples with associated edit boxes?
|
Here's the test.xml
<!-- m --><a class="postlink" href="https://github.com/HBEnthusiast/FW/raw/main/test.xml">https://github.com/HBEnthusiast/FW/raw/main/test.xml</a><!-- m -->
|
Are there any Treeview samples with associated edit boxes?
|
Did you get the same error, Antonio?
|
Are there any Treeview samples with associated edit boxes?
|
D.
Yes, it fails here too
We still have some bugs to solve
|
Are there any Treeview samples with associated edit boxes?
|
Ok, thanks. I'll continue playing with it.
|
Are there checked uncheck box bitmap functions ?
|
Hi, Like hBmpRecSel := FwRArrow() hBmpBtnList := FwDArrow() hBmpSortAsc := FwBmpAsc() hBmpSortDes := FwBmpDes() Are there checked, uncheck box bitmap functions ?Regards!Shuming Wang
|
Are there checked uncheck box bitmap functions ?
|
None as of now ( to my knowledge). I wish fivewin provides them too
|
Are there checked uncheck box bitmap functions ?
|
I'm keen for same facility.For many years I have used the following for a Tick / Empty pair:--------------// Use OEM system resources <- Black tickLOCAL _hOn := LoadBitMap(0, OBM_CHECK) // Next equates to an empty cell and is treated as if it were bitmapLOCAL _hOff := Chr(160) -------------//When finished with these, do thisDeleteObject(_hOn)---------------The above approach works fine - it's just not as visually pretty as I would like.Colin Wisbey
|
Are there checked uncheck box bitmap functions ?
|
Checked and UnChecked images are based on the used Windows theme and on the used Windows version, so we can not provide generic functions, unless we decide what images we want for them (XP, Vista, themed or classic? what theme ?)
|
Are there checked uncheck box bitmap functions ?
|
Apologies for resurrecting such an old post but hoping it's been solved by now. I've been out of the FWH community loop for long time but need to revisit some legacy apps of mine and, in my browses based on TCBrowse, it seems that the next bit still works to display a check (tick) in a cell but no longer works (under Win 10 32 bit) to display a "blank" to represent unchecked. Now using CHR(160) results in an oversized red cross instead of a blank as it had done under Win XP, Vista and Win 7 32bit.
_hOn := LoadBitMap(0, OBM_CHECK) // Use OEM system resources <- Black tick <- this still works fine
// Next equates to an empty cell and is treated as if it were bitmap
LOCAL _hOff := Chr(160) // <- this no longer works.
Anyone have a suggestion? Many thanks in advance.
Colin Wisbey
(BTW, regards to all my old FW/FWH friends, many of whom I'm pleased to notice are still active on here).
|
Are there checked uncheck box bitmap functions ?
|
FWBmpOn() and FWBmpOff()
|
Are there checked uncheck box bitmap functions ?
|
Thank you as always, my friend, and especially for such a prompt response but I've been out of the Fivewin loop and my FWH version is about 2008 so does not have those functions.
Regards,
Colin
|
Are there checked uncheck box bitmap functions ?
|
Hi Colin, it's a pleasure to see you hanging around here again. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Are there checked uncheck box bitmap functions ?
|
Thanks, Enrico. Cheers, mate.
Col
|
Are there time functions :09:01+5-->:09:06
|
Hi, Are there functions like: 09:01 +5 --> 09:06 09:01 -08:01--> 01:01Thanks !Shuming Wang
|
Are there time functions :09:01+5-->:09:06
|
Estas Funciones las encontr en el Foro hace muchos años atrasEspero te sirvan...[code:3nwq21lt]
*+--------------------------------------------------------------------
*+
*+ Function TimeAsSeconds()
*+
*+--------------------------------------------------------------------
*+
FUNCTION TimeAsSeconds( cTime )
RETURN VAL( cTime ) * 3600 + VAL( SUBSTR( cTime, 4 ) ) * 60 + VAL( SUBSTR( cTime, 7 ) )
*+--------------------------------------------------------------------
*+
*+ Function TimeAsSeconds()
*+
*+--------------------------------------------------------------------
*+
FUNCTION TimeAsMinute( cTime )
LOCAL nSEC := VAL( cTime ) * 3600 + VAL( SUBSTR( cTime, 4 ) ) * 60 //+ VAL( SUBSTR( cTime, 7 ) )
RETURN( nSEC / 60 )
*+--------------------------------------------------------------------
*+
*+ Function TimeAsString()
*+
*+--------------------------------------------------------------------
*+
FUNCTION TimeAsChar( nSeconds )
RETURN STRZERO( INT( MOD( nSeconds / 3600, 24 ) ), 2, 0 ) + ;
STRZERO( INT( MOD( nSeconds / 60, 60 ) ), 2, 0 ) + ;
STRZERO( INT( MOD( nSeconds, 60 ) ), 2, 0 )
*+--------------------------------------------------------------------
*+
*+ Function TimeAsString()
*+
*+--------------------------------------------------------------------
*+
FUNCTION TimeAsString( nSeconds )
RETURN STRZERO( INT( MOD( nSeconds / 3600, 24 ) ), 2, 0 ) + ":" + ;
STRZERO( INT( MOD( nSeconds / 60, 60 ) ), 2, 0 ) + ":" + ;
STRZERO( INT( MOD( nSeconds, 60 ) ), 2, 0 )
*+--------------------------------------------------------------------
*+
*+ Function TimeDiff()
*+
*+--------------------------------------------------------------------
*+
FUNCTION TimeDiff( cStartTime, cEndTime )
Default cEndTime := Time()
RETURN TimeAsString( IF( cEndTime < cStartTime, 86400, 0 ) + ;
TimeAsSeconds( cEndTime ) - TimeAsSeconds( cStartTime ) )
*+--------------------------------------------------------------------
*+
*+ Function TimeIsValid() 20:20:00
*+
*+--------------------------------------------------------------------
*+
FUNCTION TimeIsValid( cTime )
RETURN VAL( cTime ) < 24 .AND. VAL( SUBSTR( cTime, 4 ) ) < 60 .AND. VAL( SUBSTR( cTime, 7 ) ) < 60
[/code:3nwq21lt]
|
Are there time functions :09:01+5-->:09:06
|
[quote="ShumingWang":19wft9dw]Hi,
Are there functions like:
09:01 +5 --> 09:06
09:01 -08:01--> 01:01
Thanks !
Shuming Wang[/quote:19wft9dw]This ar native functions of xharbour:Secs()Calculates the number of seconds from a time string. SyntaxSecs( <cTime>|<dDateTime> ) --> nSecondsTString()Converts numeric seconds into a time formatted character string. SyntaxTString( <nSeconds> ) --> cTimeStringI hope It may help.
|
Are there time functions :09:01+5-->:09:06
|
pablovidal,jose_murugosa, Thank you!Shuming Wang
|
Area cliente en FWPPC
|
Hola,
¿Como puedo averiguar el area cliente de una WINDOW y por extensión de un Control?
Parece ser que el método GetCliRect no está implementado.
Saludos,
José Luis Capel
|
Area cliente en FWPPC
|
Hola
Prueba GetCoors( o:hWnd )
Siau.
C.
|
Area cliente en FWPPC
|
Jose Luis,
oWnd:nWidth y oWnd:nHeight
|
Area cliente en FWPPC
|
Carles, Antonio,
Gracias por las respuesta.
Getcoors me devuelve siempre 0.
oWnd:nHeight y oWnd:nWidth es lo que buscaba.
No obstante... tengo una duda (básicamente por desconocimiento del funcionamiento del mundo Windows CE): ¿ El area cliente incluye o no la zona de los menús ?
nHeight vale lo mismo con menú como sin menú. ¿Cuanto mide el menú?
Saludos y gracias,
José Luis Capel
|
Area de trabajo no usada: ORDKEYNO
|
Hola otra vez. Pase un wbrowse a txbrowse por los problemas ya comentados
[code=fw:837bf8qb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*************************************************************************************/</span><br /><span style="color: #B900B9;">// FUNCION AGREGAR CHOFERES Ó MODIFICAR</span><br /><span style="color: #B900B9;">// utiliza la clase database</span><br /><span style="color: #B900B9;">// Setiembre de 2001</span><br /><span style="color: #B900B9;">/*************************************************************************************/</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"splitter.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"inkey.ch"</span><br /><br /><br /><span style="color: #B900B9;">// * * *</span><br /><span style="color: #B900B9;">// FUNCION : Brwven() -> NIL</span><br /><span style="color: #B900B9;">// DESCRIPCION: Realiza un Browse de la base de datos CHOFER.Dbf,</span><br /><span style="color: #B900B9;">// Permitiendo: Borrar o Modificar el registro actual,</span><br /><span style="color: #B900B9;">// Dar de alta Nuevo o Buscar registro.</span><br /><span style="color: #B900B9;">// * * *</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> Brwcho<br /><br /> <span style="color: #00C800;">LOCAL</span> oLbx<br /> <span style="color: #00C800;">LOCAL</span> oDlg, oSplit := Array<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> oRadioButtons<br /> <span style="color: #00C800;">LOCAL</span> nOrden := <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">LOCAL</span> onbut := Array<span style="color: #000000;">(</span> <span style="color: #000000;">6</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> oCho<br /> <span style="color: #00C800;">LOCAL</span> paso := <span style="color: #ff0000;">"no paso"</span><br /> <span style="color: #00C800;">LOCAL</span> surge, oRadiobutton, titu<br /><br /> <span style="color: #00C800;">IF</span> !PASAJE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"chofer"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> DATABASE oCho<br /> oCho:<span style="color: #000000;">setorder</span><span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span><br /> oCho:<span style="color: #000000;">gotop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oCho:<span style="color: #000000;">beof</span> := <span style="color: #000000;">{</span>|| <span style="color: #00C800;">nil</span> <span style="color: #000000;">}</span><br /><br /><br /><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">icon</span> surge <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"icomega"</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"DIALOG_2"</span><br /> oDlg:<span style="color: #000000;">cCaption</span> := <span style="color: #ff0000;">"Vendedores"</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> SPLITTER oSplit<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">id</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">COLOR</span> rgb<span style="color: #000000;">(</span> <span style="color: #000000;">234</span>, <span style="color: #000000;">234</span>, <span style="color: #000000;">234</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">of</span> odlg _3DLOOK<br /> <span style="color: #0000ff;">REDEFINE</span> SPLITTER oSplit<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">id</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">COLOR</span> rgb<span style="color: #000000;">(</span> <span style="color: #000000;">234</span>, <span style="color: #000000;">234</span>, <span style="color: #000000;">234</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">of</span> odlg _3DLOOK<br /><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oLbx <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> DATASOURCE oCho ;<br /> columns <span style="color: #ff0000;">"codigo"</span>, <span style="color: #ff0000;">"nombre"</span>,<span style="color: #ff0000;">"dni"</span>,<span style="color: #ff0000;">"camion"</span>,<span style="color: #ff0000;">"patente"</span>,<span style="color: #ff0000;">"modelo"</span>, <span style="color: #ff0000;">"tipo"</span>, <span style="color: #ff0000;">"te"</span>,<span style="color: #ff0000;">"domicilio"</span>,<span style="color: #ff0000;">"localidad"</span>,<span style="color: #ff0000;">"provincia"</span> ;<br /> HEADERS <span style="color: #ff0000;">"CODIGO"</span>, <span style="color: #ff0000;">"APELLIDO"</span>, <span style="color: #ff0000;">"DOCUMENTO"</span>, <span style="color: #ff0000;">"CAMION"</span>, <span style="color: #ff0000;">"PATENTE"</span>, ;<br /> <span style="color: #ff0000;">"MODELO"</span>, <span style="color: #ff0000;">"TIPO"</span>, <span style="color: #ff0000;">"TELEFONO"</span>, <span style="color: #ff0000;">"DOMICILIO"</span>, <span style="color: #ff0000;">"LOCALIDAD"</span>, <span style="color: #ff0000;">"PROVINCIA"</span>;<br /> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ON</span> DBLCLICK <span style="color: #000000;">(</span> FCHOFER<span style="color: #000000;">(</span> oLbx, .f.,oCho<span style="color: #000000;">)</span>,oLbx:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> olbx:<span style="color: #000000;">setfocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> WITH OBJECT oLbx<br /> :<span style="color: #000000;">nMarqueeStyle</span> := <span style="color: #000000;">4</span><br /> :<span style="color: #000000;">nColDividerStyle</span> := LINESTYLE_BLACK<br /> :<span style="color: #000000;">nStretchCol</span> := STRETCHCOL_LAST<br /> :<span style="color: #000000;">lColDividerComplete</span> := .F.<br /> :<span style="color: #000000;">l2010</span> := .T.<br /> :<span style="color: #000000;">lAllowColHiding</span> := .F.<br /> :<span style="color: #000000;">lIncrFilter</span> := .T.<br /> :<span style="color: #000000;">lSeekWild</span> := .F.<br /> :<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">{</span>| nKey | <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> nKey == K_ENTER, <span style="color: #000000;">(</span> FCHOFER<span style="color: #000000;">(</span> oLbx, .f.,oCho<span style="color: #000000;">)</span>,oDlg:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nRowDividerStyle</span> :=<span style="color: #000000;">2</span> <span style="color: #B900B9;">// Row divider style: 0 No lines 1 Black line 2 Dark gray line 3 Raised 4 Inset 5 Fore Color 6 Light gray</span><br /> :<span style="color: #000000;">nColDividerStyle</span> :=<span style="color: #000000;">2</span><br /><br /> END WITH<br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">RADIO</span> oRadioButton <span style="color: #0000ff;">VAR</span> nOrden <span style="color: #0000ff;">id</span> <span style="color: #000000;">108</span>, <span style="color: #000000;">107</span>;<br /> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> Orden<span style="color: #000000;">(</span> nOrden, oLbx, oCho <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Al detectar un cambio se ejecutar la funci¢n</span><br /><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oNbut<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">id</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"btnagregar"</span>, <span style="color: #ff0000;">"btnagrega1"</span> <span style="color: #0000ff;">ACTION</span> FCHOFER<span style="color: #000000;">(</span> oLbx, .T., oCho <span style="color: #000000;">)</span> NOBORDER<br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oNbut<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">id</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"btncambio"</span>, <span style="color: #ff0000;">"btncambi1"</span> <span style="color: #0000ff;">ACTION</span> FCHOFER<span style="color: #000000;">(</span> oLbx, .F., oCho <span style="color: #000000;">)</span> NOBORDER<br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oNbut<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">id</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"btnbusca"</span>, <span style="color: #ff0000;">"btnbusc1"</span> <span style="color: #0000ff;">ACTION</span> Buscar<span style="color: #000000;">(</span> oLbx, nOrden, oCho, paso <span style="color: #000000;">)</span> NOBORDER<br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oNbut<span style="color: #000000;">[</span> <span style="color: #000000;">4</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">id</span> <span style="color: #000000;">105</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"btnborra"</span>, <span style="color: #ff0000;">"btnborr1"</span> <span style="color: #0000ff;">ACTION</span> DelClient<span style="color: #000000;">(</span> oLbx, oCho, <span style="color: #000000;">(</span> oCho:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">)</span>->nombre <span style="color: #000000;">)</span> NOBORDER<br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oNbut<span style="color: #000000;">[</span> <span style="color: #000000;">5</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">id</span> <span style="color: #000000;">106</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"btnimpri"</span>, <span style="color: #ff0000;">"btnimpr1"</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> NOBORDER<br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oNbut<span style="color: #000000;">[</span> <span style="color: #000000;">6</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">id</span> <span style="color: #000000;">109</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"btnsalir"</span>, <span style="color: #ff0000;">"btnsali1"</span> ;<br /> <span style="color: #0000ff;">ACTION</span> cierroalias<span style="color: #000000;">(</span> oCho:<span style="color: #000000;">calias</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> NOBORDER<br /><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">NOWAIT</span> <span style="color: #0000ff;">valid</span><span style="color: #000000;">(</span> olbx:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, sysrefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, cierroalias<span style="color: #000000;">(</span> oCho:<span style="color: #000000;">calias</span> <span style="color: #000000;">)</span>, .T. <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span></div>[/code:837bf8qb]
Al hacer doble click se abre un diálogo para cargar o modificar datos
Lo haces una vez abre el diálogo, lo cerras y
lo abris nuevamente y ok pero a la tercera indefectiblemente da este error
[code=fw:837bf8qb]<div class="fw" id="{CB}" style="font-family: monospace;">Application<br />===========<br /> Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">K</span>:\fivexhar2\fivehar.exe <span style="color: #000000;">(</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">6</span>,<span style="color: #000000;">572</span>,<span style="color: #000000;">544</span> bytes<br /> Compiler version: <span style="color: #000000;">Harbour</span> <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">(</span>r1806032230<span style="color: #000000;">)</span><br /> FiveWin version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">17.09</span><br /> C compiler version: <span style="color: #000000;">Borland</span>/Embarcadero C++ <span style="color: #000000;">7.3</span> <span style="color: #000000;">(</span><span style="color: #000000;">32</span>-bit<span style="color: #000000;">)</span><br /> Windows version: <span style="color: #000000;">6.2</span>, Build <span style="color: #000000;">9200</span> <br /><br /> Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">12</span> secs <br /> Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">23</span>/<span style="color: #000000;">10</span>/<span style="color: #000000;">2019</span>, <span style="color: #000000;">22</span>:<span style="color: #000000;">49</span>:<span style="color: #000000;">57</span><br /> Error description: <span style="color: #000000;">Error</span> DBCMD/<span style="color: #000000;">2001</span> Area de trabajo no usada: <span style="color: #000000;">DBGOTO</span><br /><br />Stack Calls<br />===========<br /> Called <span style="color: #0000ff;">from</span>: => DBGOTO<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\DATABASE.PRG => TDATABASE:<span style="color: #000000;">TD_SAVEREC</span><span style="color: #000000;">(</span> <span style="color: #000000;">1973</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\DATABASE.PRG => TDATABASE:<span style="color: #000000;">SKIPPER</span><span style="color: #000000;">(</span> <span style="color: #000000;">1558</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\DATABASE.PRG => <span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>TDATABASE_SETXBROWSE<span style="color: #000000;">(</span> <span style="color: #000000;">1602</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => <span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>TXBROWSE<span style="color: #000000;">(</span> <span style="color: #000000;">503</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">SKIP</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #0000ff;">PAINT</span><span style="color: #000000;">(</span> <span style="color: #000000;">1946</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #00C800;">DISPLAY</span><span style="color: #000000;">(</span> <span style="color: #000000;">1746</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span> <span style="color: #000000;">1697</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span> <span style="color: #000000;">10242</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">(</span> <span style="color: #000000;">3348</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: => DIALOGBOXINDIRECT<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">(</span> <span style="color: #000000;">296</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\<span style="color: #00C800;">function</span>\ERRSYSW.PRG => ERRORDIALOG<span style="color: #000000;">(</span> <span style="color: #000000;">436</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\<span style="color: #00C800;">function</span>\ERRSYSW.PRG => <span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>ERRORSYS<span style="color: #000000;">(</span> <span style="color: #000000;">23</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: => ORDKEYCOUNT<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\DATABASE.PRG => <span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>TDATABASE<span style="color: #000000;">(</span> <span style="color: #000000;">212</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\DATABASE.PRG => TDATABASE:<span style="color: #000000;">KEYCOUNT</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\DATABASE.PRG => <span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>TDATABASE_SETXBROWSE<span style="color: #000000;">(</span> <span style="color: #000000;">1607</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => <span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>TXBROWSE<span style="color: #000000;">(</span> <span style="color: #000000;">497</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">KEYCOUNT</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">(</span> <span style="color: #000000;">1650</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">megacho</span>.prg => <span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>BRWCHO<span style="color: #000000;">(</span> <span style="color: #000000;">74</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TWINDOW:<span style="color: #000000;">LDBLCLICK</span><span style="color: #000000;">(</span> <span style="color: #000000;">1997</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">LDBLCLICK</span><span style="color: #000000;">(</span> <span style="color: #000000;">1744</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">LDBLCLICK</span><span style="color: #000000;">(</span> <span style="color: #000000;">4709</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: => TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span> <span style="color: #000000;">1731</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span> <span style="color: #000000;">10242</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">(</span> <span style="color: #000000;">3348</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: => WINRUN<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TMDIFRAME:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">(</span> <span style="color: #000000;">1037</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">origen</span>.prg => ORIGEN<span style="color: #000000;">(</span> <span style="color: #000000;">260</span> <span style="color: #000000;">)</span><br /><br />System; etc:<span style="color: #000000;">etc</span><br /><br /> </div>[/code:837bf8qb]
Encontre un posteo similar del año 2010 bajo el título Errores esporádicos con XBROWSE
Pero no me lo soluciona.
Que es lo que falta o sobra, ya que la base se cierra cuando cierro el diálogo o uso la opción salir del diálogo
Fwh17.09 y harbour3.2
Luis
|
Area de trabajo no usada: ORDKEYNO
|
SurGom, buenos días:
No tengo ni idea del motivo de este error.
Pero... ¿ podrías por favor poner una imagen de esta ventana ( "DIALOG_2" ) para ver el aspecto y su resultado final ?
Mil gracias.
LORENZO.
|
Area de trabajo no usada: ORDKEYNO
|
Analise ó post estas funciones:
[code=fw:i8lgrspz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">origen</span>.prg => ORIGEN<span style="color: #000000;">(</span> <span style="color: #000000;">260</span> <span style="color: #000000;">)</span> Vien de aqui?<br /><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">megacho</span>.prg => <span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>BRWCHO<span style="color: #000000;">(</span> <span style="color: #000000;">74</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">//???</span><br /> <span style="color: #B900B9;">// ???</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">FCHOFER</span>.PRG <span style="color: #B900B9;">// algo errado aqui?</span><br /> </div>[/code:i8lgrspz]
Saludos.
|
Area de trabajo no usada: ORDKEYNO
|
Hola Karinha, me parece que como estoy utilizando la clase twbrowse de Hernán por ahí puede ser el conficto. Ahora lo voy a tener que dejar porque surgieron otras cosas mas apremiantes. Si compilo el sistema con la clase database fw15 y quito las ordenes para que el xbrowse no haga la busqueda, no hay problema hace tiempo que funciona así.
Gracias por tu atención
|
Area de trabajo no usada: ORDKEYNO
|
Hola buen día, en un programa que trabaja con SQL, tengo en los abm un listbox donde muestro los datos y si hacen click sobre cualquier registro y arrastran da este error.
Como se puede evitar que provoque el error.
Saludos
Jorge
|
Area de trabajo no usada: ORDKEYNO
|
Post el ERROR asi, porfa:
[url:2cdy337o]http://forums.fivetechsupport.com/viewtopic.php?f=6&t=37936&start=0[/url:2cdy337o]
Use:
[code=fw:2cdy337o]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//external ordkeyno, ordkeycount, ordcreate, ordkeygoto</span><br /><br />REQUEST OrdKeyNo, OrdKeyCount, OrdCreate, OrdKeyGoto<br /> </div>[/code:2cdy337o]
Regards, saludos.
|
Area de trabajo no usada: ORDKEYNO
|
[quote="jpcavagnaro":3bjnr4fm]Hola buen día, en un programa que trabaja con SQL, tengo en los abm un listbox donde muestro los datos y si hacen click sobre cualquier registro y arrastran da este error.
Como se puede evitar que provoque el error.
Saludos
Jorge[/quote:3bjnr4fm]
Let us see how you are building xbrowse.
and
your fwh version
what sql library you are using
Try to prepare a small sample.
|
Area de trabajo no usada: ORDKEYNO
|
Gracias por responder, este es el código:
xOrdenadoPor =""
xcampobusca = "Nombre"
cSQL := "SELECT top(25) * FROM clientes "
oRS1cli := CargaRecordSet( cSQL, CadenaCon )
DEFINE FONT oFont NAME "Arial narrow" SIZE 0, - 12
DEFINE FONT oFont1 NAME "Arial narrow " SIZE 6, 18
DEFINE WINDOW oWndChild MDICHILD OF oWnd FROM 0,0 TO 24,79TITLE "Actualización de Clientes "
DEFINE DIALOG odlg RESOURCE "pan_actu" ;
OF oWndChild
REDEFINE GET obusco var xbusco ID 171 PICTURE "@!" OF oDlg ;
ON CHANGE ( ::assign(), oRS1Cli:=buscosql( oBrow, xbusco, oRS1Cli ) )
REDEFINE LISTBOX oBrow FIELDS ;
iif (oRS1Cli:Fields( "activo" ):Value="S",aHbitMaps[1],aHbitMaps[2]),; // str( oRS1Cli:Fields( "Id" ):Value, 0 ), ; str( oRS1Cli:Fields( "Id" ):Value, 0 ), ;
str( oRS1Cli:Fields( "numero" ):Value, 0 ), ;
str( oRS1Cli:Fields( "documento" ):Value, 0 ), ;
str( oRS1Cli:Fields( "vendedor" ):Value, 0 ), ;
oRS1Cli:Fields( "Nombre" ):Value, ;
oRS1Cli:Fields( "Apodo" ):Value, ;
oRS1Cli:Fields( "Domic" ):Value, ;
oRS1Cli:Fields( "copo" ):Value, ;
oRS1Cli:Fields( "loca" ):Value, ;
oRS1Cli:Fields( "tele" ):Value ;
HEADERS "Act.", "Nro.","Documento", ; // ,"Reg."
"Vend", "Nombre","Apodo", ;
"Direccion" , ;
"C.Postal", ;
"Localidad", ;
( "Telofono" ), ;
( "Zona" ) ; // "zona",;
ID 181 of odlg ;
font ofont1
oBrow:bLogicLen = { || oRS1Cli:RecordCount }
oBrow:bGoTop = { || oRS1Cli:MoveFirst() }
oBrow:bGoBottom = { || oRS1Cli:MoveLast() }
oBrow:bSkip = { | nSkip | Skipper( oRs1Cli, nSkip ) }
oBrow:lcellstyle := .f.
oBrow:nlinestyle := 2
oBrow:nclrpane := { || iif( ( oRS1Cli:AbsolutePosition / 2 ) - INT( oRS1Cli:AbsolutePosition / 2 ) > 0, RGB( 193, 221, 255 ), RGB( 221, 245, 255 ) ) }
oBrow:GoTop()
oBrow:aActions = { "ID","numero", "", "", "Nombre", "Domicilio" }
oBrow:aActions[ 1 ] = { || iif (xcampobusca = "activo",(xcampobusca := "activo",xOrdenadoPor:= "activo desc"),(xcampobusca := "activo",xOrdenadoPor:= " activo ")), oRS1Cli:=buscosql( oBrow, "", obusco, oRS1Cli ) }
oBrow:aActions[ 2 ] = { || iif (xcampobusca = "numero",(xcampobusca := "numero",xOrdenadoPor:= "numero desc"),(xcampobusca := "numero",xOrdenadoPor:= "numero ")), oRS1Cli:=buscosql( oBrow, "", obusco, oRS1Cli ) }
oBrow:aActions[ 3 ] = { || xcampobusca := "documento",xOrdenadoPor:="documento", oRS1Cli:=buscosql( oBrow, "", obusco, oRS1Cli ) }
oBrow:aActions[ 4 ] = { || xcampobusca := "vendedor",xOrdenadoPor:="vendedor", oRS1Cli:=buscosql( oBrow, "", obusco, oRS1Cli ) }
oBrow:aActions[ 5 ] = { || xcampobusca := "Nombre",xOrdenadoPor:="Nombre", oRS1Cli:=buscosql( oBrow, "", obusco, oRS1Cli ) }
oBrow:aActions[ 6 ] = { || xcampobusca := "apodo" ,xOrdenadoPor:="apodo" , oRS1Cli:=buscosql( oBrow, "", obusco, oRS1Cli ) }
REDEFINE BTNBMP 2007 prompt HB_UTF8CHR( 57609 ) + " Agregar " font oSegoe ID 170 OF oDlg ACTION EditClient( oBrow, oCon, oRs1cli, oRS1Cli:AbsolutePosition, .t. ) //editclient( oLbx, .t. )
REDEFINE BTNBMP 2007 prompt HB_UTF8CHR( 57604 ) + " Editar " font oSegoe ID 180 OF oDlg ACTION EditClient( oBrow, oCon, oRs1cli, oRS1Cli:AbsolutePosition, .f. ) // editclient( oLbx, .f. )
REDEFINE BTNBMP 2007 prompt HB_UTF8CHR( 57607 ) + " Borrar " font oSegoe ID 260 OF oDlg ACTION borrasql( odlg, oRS1cli )
REDEFINE BTNBMP 2007 prompt HB_UTF8CHR( 58102 ) + " Imprimir " font oSegoe ID 210 OF oDlg ACTION lisclie( xcampo ) //generoxls() //
REDEFINE BTNBMP 2007 prompt HB_UTF8CHR( 57615 ) + " Volver " font oSegoe ID 240 OF oDlg ACTION (oWndChild:End(),oRS1cli:Close()) //on init buscosql(oBrow, "")
ACTIVATE DIALOG oDlg nowait ON INIT odlg:Move( 0, 0 )
oWndChild:nWidth := odlg:nWidth + 7
oWndChild:nHeight := odlg:nHeight + 32
ACTIVATE WINDOW oWndChild ON INIT (oRS1Cli:=buscosql( obrow, xbusco, oRS1Cli ) ,oWnd:paint() )
|
Arguement Error Conditional
|
In my program, there is a listbox. when information in this list is doubleclicked the fields in the dialog box are updated. this works fine for all of them, exept for two places where a dbf field is shared between the two. I have used a PADL function, so that if the information in the field ends with .EXE then it will go to a preprocessor field, otherwise it will go to an invoice condition field. however, when i doubleclick the listbox i get an "arguement error conditional" message. Here is the code i use
CODE;
IF PADL(REPDETS->REP_FOR,3,"exe")
mPreProcessor := REPDETS->REP_FOR
ELSE
mInvCon := REPDETS->REP_FOR
ENDIF
Any ideas?
Thanks in advance
|
Arguement Error Conditional
|
Deano,
Try this:
IF Right(REPDETS->REP_FOR,3 ) == "exe"
...
|
Arguement Error Conditional
|
Thanks Antonio, all seems ok now <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Argument error: <=
|
is wrong this expresiion ?
[code:v0fy4s8r] i:=0
do while i <= wdiapro
wfecFin++
if wDiaLab[Dow(wFecIni+i)]
wFecFin++
endif
i++
enddo[/code:v0fy4s8r]
it me make error on <=... why ?
Regards
|
Argument error: <=
|
Check the data type of wdiapro. It must be numeric.
EMG
|
Argument error: <=
|
yes it is numeric
if i insert wdiapro=1 it run ok
|
Argument error: MOVEFIRST
|
Hi all ,
Testing Mysql1.prg with ADORDD , adding a new record (Button NEW) i get the following :
Argument error: MOVEFIRST
Stack Calls
===========
Called from: => WIN_OLEAUTO:MOVEFIRST(0)
Called from: adordd.prg => ADO_GOTOP(555)
Called from: => DBGOTOP(0)
Called from: .\source\classes\WBROWSE.PRG => (b)TWBROWSE_SETFILTER(1991)
Called from: .\source\classes\WBROWSE.PRG => TWBROWSE:GOTOP(1035)
Called from: .\source\classes\WBROWSE.PRG => TWBROWSE:UPSTABLE(1935)
Called from: .\source\classes\WBROWSE.PRG => (b)TWBROWSE_NEW(304)
Somebody can help me ?
Tank you
Walter Zafferami
|
Argument error: MOVEFIRST
|
I've found that if I call BROWSE() with argument bNew := { || add1record() }
where add1recors is :
append blank
fieldput(1, "" )
all work fine.
In other words: if the first field od the new record is not null , there is no error.
<!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
best regards
Wzaf
|
Argument error: SWITCH
|
How to solve the following:
Application
===========
Path and name: C:\test\test1.exe (32 bits)
Size: ********* bytes
Time from start: 0 hours 0 mins 11 secs
Error occurred at: 10/12/07, 02:10:20
Error description: Error BASE/3104 Argument error: SWITCH
Args:
[ 1] = U
Stack Calls
===========
Called from: => XLSFONT(0)
Called from: .\c13.prg => EXCELFAB(6110)
Called from: .\c13.prg => (b)EXCELFAA(6067)
Called from: .\source\function\MSGRUN.PRG => (b)MSGRUN(0)
Called from: .\source\classes\DIALOG.PRG => (b)TDIALOG(0)
Called from: => TDIALOG:DISPLAY(0)
Called from: => TDIALOG:HANDLEEVENT(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: .\source\function\MSGRUN.PRG => MSGRUN(0)
Called from: .\c13.prg => EXCELFAA(6067)
Called from: .\c13.prg => (b)EXCELFA(6047)
Called from: => TBUTTON:CLICK(0)
Called from: => TBUTTON:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => SENDMESSAGE(0)
Called from: => TDIALOG:COMMAND(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => TDIALOG:HANDLEEVENT(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: .\c13.prg => EXCELFA(6056)
Called from: .\c11.prg => (b)EXCELTRAN(7105)
Called from: => TWINDOW:LBUTTONDOWN(0)
Called from: => TBITMAP:LBUTTONDOWN(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => TCONTROL:HANDLEEVENT(0)
Called from: => TBITMAP:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: .\c11.prg => EXCELTRAN(7237)
Called from: .\ec.prg => (b)BUILDMENU2(4012)
Called from: => TMENU:COMMAND(0)
Called from: => TWINDOW:COMMAND(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: => TWINDOW:ACTIVATE(0)
Called from: .\test1.prg => MAIN(146)
The Code:
FUNCTION excelfab()
#include "fivewin.ch"
#include "FileXLS.ch"
#define BORDER_UP nOr( BORDER_TOP )
#define BORDER_DOWN nOr( BORDER_BOTTOM )
#DEFINE TRUE .T.
#DEFINE FALSE .F.
static oFileXLS
Local nFont1, nFont2
Local nFormat1, nFormat2,nXlsLine:=0
Public Drive:="D:\",Directory:="TempXLS",Start:="\"
lChDir("D:\")
lMkDir("TempXLS")
lChDir("TempXLS")
DEFINE XLS FONT nFont1 NAME "Arial" HEIGHT 12 BOLD <- Why Argument error: SWITCH
Please help
|
Argument error: SWITCH
|
Acwoo,
The error is inside XLSFONT()
Please search for SWITCH statement inside XLSFONT() source code
|
Argument error: SWITCH
|
Thanks for the reply
I still can't figure out
Why Argument error: SWITCH
Please help
|
Argument error: SWITCH
|
Acwoo,
Please post the source code of XLSFONT()
|
Argument error: SWITCH
|
Got it fixed. Thanks
|
Argumento de función de Harbour dentro Fast Report
|
Hola :
Estoy nuevamente evaluando el programas para generar reporte Fast Report, Lo hice funcionar 10 puntos el único problema que tengo es enviar parametros a una función escrita en Harbour.
El ejemplo que baje de internet funciono ok,
* OK
oFr:SetEventHandler( "Report" , "OnUserFunction" , { | FName, FParams | CallUserFunction( FName , FParams ) } )
oFr:AddFunction( "function XBaseStr( nValue: Double, nLength: Variant = EmptyVar, nDecimals: Variant = EmptyVar): Variant",;
"Funciones Unire" , "It's a XBase Str() function!")
* ERROR *
oFr:AddFunction( "function DireccionLegal(HbVar: String): Variant" , "Funciones Unire" , "Devuelve Direccion Legal de una persona.")
....
function CallUserFunction( FName , FParams )
local RES
* OK
if (FName == "XBASESTR" )
RES := Str(FParams[1], FParams[2], FParams[3])
*ERROR
elseif (FName == "DIRECCIONLEGAL")
RES := DirecioLegal( FParams[1] )
endif
return RES
Agradeceria algún ejemplo.
Gracias
Theler Hugo
Argentina
|
Arhivos xls y xlsm
|
Hola,¿ como puedo abrir y modificar un archivo xls, xlsx y xlsm ?
En una hoja especifica o en una hoja única
Gracias, Saludos
|
Arhivos xls y xlsm
|
Hola,¿ como puedo abrir y modificar un archivo xls, xlsx y xlsm ?
En una hoja especifica o en una hoja única
Gracias, Saludos
|
Arhivos xls y xlsm
|
It is much simpler using the FWH builtin function
GetExcelBook( cFileFullPath ) --> oBook
[code=fw:z86oyd7w]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> oBook := GetExcelBook<span style="color: #000000;">(</span> cExcelFileNameWithFullPath <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> != <span style="color: #00C800;">nil</span><br /> oBook:<span style="color: #000000;">Application</span>:<span style="color: #000000;">Visible</span> := .t.<br /> <span style="color: #00C800;">endif</span><br /> </div>[/code:z86oyd7w]
You can also opt for full code like this:
[code=fw:z86oyd7w]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> OpenExcelBook<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> cExcelFile := <span style="color: #ff0000;">"import.xlsx"</span><br /> <span style="color: #00C800;">local</span> oExcel, oBook, lOpened := .f.<br /><br /> <span style="color: #00C800;">if</span> File<span style="color: #000000;">(</span> cExcelFile <span style="color: #000000;">)</span><br /> cExcelFile := TrueName<span style="color: #000000;">(</span> cExcelFile <span style="color: #000000;">)</span> <span style="color: #B900B9;">// add full path</span><br /> CursorWait<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> oExcel := ExcelObj<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> != <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">TRY</span><br /> oBook := oExcel:<span style="color: #000000;">WorkBooks</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> cExcelFile <span style="color: #000000;">)</span><br /> lOpened := .t.<br /> CATCH<br /> END<br /> <span style="color: #00C800;">if</span> lOpened<br /> oExcel:<span style="color: #000000;">Visible</span> := .t.<br /> <span style="color: #00C800;">else</span><br /> ? <span style="color: #ff0000;">"Can not open "</span> + cExcelFile<br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">else</span><br /> ? <span style="color: #ff0000;">"Excel not installed"</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">else</span><br /> ? cExcelFile + <span style="color: #ff0000;">" not found"</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:z86oyd7w]
We recommend the first approach.
|
Arma MENU desde una Tabla
|
Estimados
Quiero Armar el menú desde una Tabla... mas o menos igual que desde un base de dato.
El tema que cuando quiero ejecutar la funcion que corresponde al items del menú NO me reconoce las variables que deben ir en dicha funcion.
[code=fw:1kvcqsri]<div class="fw" id="{CB}" style="font-family: monospace;">MAEREPLV:=CDX_Abrir<span style="color: #000000;">(</span><span style="color: #ff0000;">'MAEREPLV'</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">1</span>,<span style="color: #ff0000;">'MAEREPLV'</span><span style="color: #000000;">)</span><br /><span style="color: #000000;">(</span>MAEREPLV<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>ORDSETFOCUS<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><span style="color: #000000;">(</span>MAEREPLV<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>dbgotop<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">While</span> !<span style="color: #000000;">(</span>MAEREPLV<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>Eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> aadd<span style="color: #000000;">(</span> mReportesItems , <span style="color: #000000;">(</span>MAEREPLV<span style="color: #000000;">)</span>->DETALLE <span style="color: #000000;">)</span><br /> aadd<span style="color: #000000;">(</span> mReportesFunci , <span style="color: #ff0000;">'{||RepMaesDocu(EMPRESA,'</span>+str<span style="color: #000000;">(</span><span style="color: #000000;">(</span>MAEREPLV<span style="color: #000000;">)</span>->CODIINT,<span style="color: #000000;">10</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">',mCodiUSUA)}'</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #000000;">(</span>MAEREPLV<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>DbSkip<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">EndDo</span><br />ER_4<span style="color: #000000;">(</span>MAEREPLV<span style="color: #000000;">)</span><br /> </div>[/code:1kvcqsri]
y en en el Menu lo ejecuto así:
[code=fw:1kvcqsri]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">For</span> Xmenu = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">(</span>mReportesItems<span style="color: #000000;">)</span><br /> <br /> <span style="color: #0000ff;">MENUITEM</span> mReportesItems<span style="color: #000000;">[</span>Xmenu<span style="color: #000000;">]</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> mReportesItems<span style="color: #000000;">[</span>Xmenu<span style="color: #000000;">]</span> ;<br /> BLOCK &<span style="color: #000000;">(</span>mReportesFunci<span style="color: #000000;">[</span>Xmenu<span style="color: #000000;">]</span><span style="color: #000000;">)</span> <br /> <br /> <span style="color: #00C800;">Next</span> Xmenu<br /> </div>[/code:1kvcqsri]
cuando selecciono la opcion del menu me dice que No existe la variable EMPRESA... esta variable es una variable Static y tiene un TEXTO
cual es mi error.... <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
muchas gracias
David
|
Arma MENU desde una Tabla
|
Mira \samples\TESTMNU.PRG
Salu2.
|
Arquivo PNG
|
Olá,
Como desenhar arquivos png ?
|
Arquivo PNG
|
Vagner,
Revisa samples\TestImg.prg
Verás como puedes visualizar archivos PNG
|
Arquivo PNG
|
Gracias Antonio,
Vou tentar <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
|
Arquivo PNG
|
Olá Antonio,
Testei com o TImage, mas não ficou bom <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: -->
Print Screen da tela
[img:5zjyo1n2]http://www.kssoftware.com.br/vagner/Teste1.jpg[/img:5zjyo1n2]
Arquivo Png Original :
[img:5zjyo1n2]http://www.kssoftware.com.br/vagner/Teste1.png[/img:5zjyo1n2]
Ele perdeu totalmente a transparência <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: -->
|
Arquivo PNG
|
Só para Lembrar <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P -->
|
Arquivo.PNG
|
Como faço para usar bitmap no formato PNG ??
Assin não tá funcionando.
[code=fw:3ggr1c4x]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">Button</span> obtn <span style="color: #0000ff;">Prompt</span> <span style="color: #ff0000;">"Papel"</span> ;<br /> File<span style="color: #ff0000;">".<span style="color: #000000;">\i</span>magens<span style="color: #000000;">\i</span>cones<span style="color: #000000;">\S</span>air.PNG"</span> ;<br /> <span style="color: #0000ff;">Of</span> oBar <span style="color: #0000ff;">Action</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span></div>[/code:3ggr1c4x]
Obrigado.
|
Arquivo.PNG
|
Hola
Revisa este link
[url:2mpwxdxg]http://forums.fivetechsupport.com/viewtopic.php?f=6&t=18563&start=0&hilit=png[/url:2mpwxdxg]
[url:2mpwxdxg]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=18833[/url:2mpwxdxg]
[url=http://img339.imageshack.us/i/pngy.jpg/:2mpwxdxg][img:2mpwxdxg]http://img339.imageshack.us/img339/2624/pngy.jpg[/img:2mpwxdxg][/url:2mpwxdxg]
|
Arquivo.PNG
|
Obrigado Patricio.. Vou verificar sua dica..
|
Arquivo.PNG
|
Estimados
Con windows XP funciona muy bien pero con windows 7 profesional 64bit muestra de esta forma los archivos PNG
[url=http://img199.imageshack.us/i/pngconwin7profesional64.png/:hptn5lyn][img:hptn5lyn]http://img199.imageshack.us/img199/5629/pngconwin7profesional64.png[/img:hptn5lyn][/url:hptn5lyn]
Uploaded with [url=http://imageshack.us:hptn5lyn]ImageShack.us[/url:hptn5lyn]
habra alguna actualizacion del la libreria [b:hptn5lyn]fwpngx.lib[/b:hptn5lyn]
|
Arquivo.PNG
|
Patricio
No hay ninguna actualizacion, actualmente no tengo como hacer las pruebas en 64bit <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
voy a instalar win7 64 virtualizado a ver si puedo contruirte la libreria para 64bit
|
Arquivo.PNG
|
Gracias Daniel
Espero tus comentarios..
|
Arrancando la maquina virtual de Harbour desde Android !!!
|
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=11&t=21405&start=0">viewtopic.php?f=11&t=21405&start=0</a><!-- l -->
|
Arrastrar Objeto
|
Buen Dia a todos.Por que al arrastrar un objeto, btnbmp o SSay y moverlo de abajo hacia arriba de derecha a izquierda deja un rastro gris. Tengo FWH 24 y lo compile tanto con harbour 41.0 como xhabour 0.99.51 De antemano agradezco la ayuda qu eme puedan proporcionar y le mando un afectuoso saludos.paco soriano.
|
Arrastrar Objeto
|
Paco,Estás usando la cláusula DESIGN ?Puedes poner un pequeño ejemplo de como lo haces ? gracias,
|
Arrastrar Objeto
|
Gracias Antonio por responder , este es el codigo#INCLUDE "FiveWin.ch"#define FW_NORMAL 400#define D_WIDTH 4#define D_HEIGHT 13STATIC oConfigSTATIC oWndSTATIC cFormFUNCTION MAIN() LOCAL oBmp, oFont DEFINE FONT oFont NAME "ARIAL" SIZE 0, -12 DEFINE WINDOW oWnd TITLE "Arrastrar" COLOR CLR_BLUE,CLR_YELLOW @ 15,40 BITMAP oBmp FILE "BALANCE.BMP" OF oWnd UPDATE DESIGN ACTIVATE WINDOW oWndRETURN(.T.)--------------------- fin de codigo ---------------------se supone que se debe ver como lo hace en el siguiente link.. muchas gracias.[img:k6zye9g0]http://img45.imageshack.us/my.php?image=rastroqo7.png[/img:k6zye9g0][/code]
|
Arrastrar Objeto
|
Usas XP ó Vista ? (se me olvidó preguntarte) <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Arrastrar Objeto
|
Antonio.Perdon por no poner el S.O.. pero ahi te va es Windows XP.Lo extraño es que si lo muevo hacia abajo no deja el trazo. ya le puse un brush NULL y nada sigue igual... si voy a otra ventana y regreso se borra el trazo o las lineas grises.muchas gracias..saludos
|
Arrastrar Objeto
|
Aqui está funcionando bien con FWH 8.05 y Vista.Aqui tienes el EXE por si quieres probarlo:<!-- m --><a class="postlink" href="http://rapidshare.com/files/124514139/test.zip.html">http://rapidshare.com/files/124514139/test.zip.html</a><!-- m -->
|
Arrastrar Objeto
|
YA VIII!!!!!Y si funciona muy bien, tendre que actualizarme. Solo un detalle se puede que en ves de que salga el cuadro gris que salieran puntitos, o que en ves de gris fuera de otro color al momento qu elo mueves que fuera caulquier otro color , azul, cyan, amarillo... si se puede? cambiar linea por puntos y gris por otro color???Bueno muchas gracias, la verdad es que tenia un par de dias probando y no me permitia hacer otras cosas por estar buscandole mofique CONTROL, SSAY, vi setcapture chekdos, showbox y nada. Pero se que es mi version y eso ya es avance. Muchas gracias.saludos
|
Arrastrar y Soltar desde un objeto TREEVIEW
|
Saludos foristas,
Alguien ha intentado o sabe como arrastrar un objeto treeview a otro objeto treeview.
La idea es poder copiar partes de un arbol e ingresarlos a otro arrastrando y soltando.
Alguna Pista?
|
Arrastrar y Soltar desde un objeto TREEVIEW
|
Hola, e intentado activar la data del objeto oTree:lDrag := .T., pero al parecer se coloca en modo diseño porque arrastra todo el objeto tree y lo deja en la posicion donde lo suelto.
¿Alguien tiene una pista?
|
Arrastrar y Soltar desde un objeto TREEVIEW
|
Herbert,
Revisa FWH\samples\testdrp3.prg que muestra como hacer arrastrar y soltar en FWH.
No lo he probado con un TreeView pero debería funcionar de forma similar, pruébalo y me comentas, gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Arrastrar y Soltar desde un objeto TREEVIEW
|
Excelente Maestro, Ahora si funciona adecuadamente. Muchas gracias, en adelante revisare los samples antes de colocar una pregunta.
Saludos,
|
Arrastras y actualizar...
|
Hola de nuevo a todos los del foro!
Tengo un cliente de recursos humanos que ha solicitado poder visualizar su información en forma de arbor y al arrastrar, por ejemplo, un departamento a otro lugar del árbol, este se mueva pero con toda la información que va pegada a esa sección... ¿eso lo podemos hacer con FWH ?
Saludos
Laura Edith Hernández H.
|
Arrastras y actualizar...
|
Laura,
No, de momento el drag & drop en trees no está soportado en FWH
|
Array (C level) to reference variable (PRG level)
|
This is an example how to create an array from low level (C code) and assign it to a local variable by reference (PRG code):
[code=fw:ccriwni4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> a<br /><br /> Test<span style="color: #000000;">(</span> @a <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> ValType<span style="color: #000000;">(</span> a <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> Len<span style="color: #000000;">(</span> a <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <hbapiitm.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> TEST <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> PHB_ITEM pArray = hb_itemNew<span style="color: #000000;">(</span> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span>;<br /><br /> hb_arrayNew<span style="color: #000000;">(</span> pArray, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// 4 elements</span><br /> <br /> hb_arraySetC<span style="color: #000000;">(</span> pArray, <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"Hello"</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// a string</span><br /> hb_arraySetNL<span style="color: #000000;">(</span> pArray, <span style="color: #000000;">2</span>, <span style="color: #000000;">123</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// a number</span><br /> hb_arraySetL<span style="color: #000000;">(</span> pArray, <span style="color: #000000;">3</span>, <span style="color: #00C800;">TRUE</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// a logical</span><br /> hb_arraySetDL<span style="color: #000000;">(</span> pArray, <span style="color: #000000;">4</span>, <span style="color: #000000;">11223344</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// a date</span><br /> <br /> hb_itemCopy<span style="color: #000000;">(</span> hb_param<span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, HB_IT_ANY <span style="color: #000000;">)</span>, pArray <span style="color: #000000;">)</span>;<br /> hb_itemRelease<span style="color: #000000;">(</span> pArray <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /> </div>[/code:ccriwni4]
|
Array (desde C) a variable por referencia (desde PRG)
|
Aqui teneis un ejemplo de como crear un array desde código C y asignarlo a una variable pasada por referencia desde PRG:
[code=fw:23ctblw1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> a<br /><br /> Test<span style="color: #000000;">(</span> @a <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> ValType<span style="color: #000000;">(</span> a <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> Len<span style="color: #000000;">(</span> a <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <hbapiitm.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> TEST <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> PHB_ITEM pArray = hb_itemNew<span style="color: #000000;">(</span> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span>;<br /><br /> hb_arrayNew<span style="color: #000000;">(</span> pArray, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// 4 elements</span><br /> <br /> hb_arraySetC<span style="color: #000000;">(</span> pArray, <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"Hello"</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// a string</span><br /> hb_arraySetNL<span style="color: #000000;">(</span> pArray, <span style="color: #000000;">2</span>, <span style="color: #000000;">123</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// a number</span><br /> hb_arraySetL<span style="color: #000000;">(</span> pArray, <span style="color: #000000;">3</span>, <span style="color: #00C800;">TRUE</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// a logical</span><br /> hb_arraySetDL<span style="color: #000000;">(</span> pArray, <span style="color: #000000;">4</span>, <span style="color: #000000;">11223344</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// a date</span><br /> <br /> hb_itemCopy<span style="color: #000000;">(</span> hb_param<span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, HB_IT_ANY <span style="color: #000000;">)</span>, pArray <span style="color: #000000;">)</span>;<br /> hb_itemRelease<span style="color: #000000;">(</span> pArray <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /> </div>[/code:23ctblw1]
|
Array - Ayuda please
|
Sigo con el asunto del array.
Lo que necesito hacer es "cargar" un array con los datos de dos de los campos de una DBF y luego hacer un browse de dos columnas con ese array para que, al hacer doble click sobre una fila realice una acción.
Estuve viendo el ejemplo testarr5.prg pero no me sirve ya que al array lo carga con la función directory( "*.prg" ).
Lo que necesito es un ejemplo completo de como cargarlo y como hojearlo.
Gracias.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Array - Ayuda please
|
que tal Rolando, espero esto te sirva:
(lalias)->(dbgotop())
do while (lalias)->(!eof())
aadd(adatosh,{(lalias)->columna1,(lalias)->columna2})
(lalias)->(dbskip())
enddo
TWBrowse():lHScroll:= .f.
@ 34,02 LISTBOX agets[8] FIELDS "";
HEADERS 'Columna 1','Columna2';
FIELDSIZES 60,100;
ON DBLCLICK haceralgo();
SIZE 228,82 OF ODlg PIXEL
agets[8]:bLine:= {|nAt| nAt:= agets[8]:nAt, If( Len(adatosh) <1 .or. nAt>Len(adatosh),Array(2),;
{adatosh[nAt,1],;
transform(adatosh[nAt,2],'999,999,999.99')
})}
agets[8]:SetArray( adatosh )
saludos.
Alex.
|
Array - Ayuda please
|
Pan chancay.... (expresion que significa.... fácil.....)
local aArray:={}
DO WHILE !EOF()
AADD(aArray , {((cAlias)->MODELO) , ((cAlias)->CHASIS)})
DBSKIP()
ENDDO
IF LEN(aArray) = 0 // por si no se lleno el arreglo
AADD(aArray,{"",""})
ENDIF
DEFINE DIALOG oDlg RESOURCE 1009 OF oWnd
REDEFINE LISTBOX oLbx ;
FIELDS aArray[oLbx:nAt, 1], aArray[oLbx:nAt, 2] ;
HEADERS "MODELO", "CHASSIS" ;
ON DBLCLICK oDlg:End() ; // aqui le pones alguna funcion
SIZES 100, 100 ;
ID 102 OF oDlg
oLbx:SetArray(aArray)
oLbx:cTooltip:='Doble click para selectar ítem y salir'
ACTIVATE DIALOG oDlg CENTER
....
|
Array <> String
|
Hi,
Exist or not functions to convert array to str and str to array ? Can't find at this moment ... If not exist , maybe you can share with working solution ?
Thanks !
|
Array <> String
|
Rimantas,
This may help you:
[code=fw:3ji0trkc]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br />extern HBCharacter<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> c := <span style="color: #ff0000;">"Hello"</span><br /><br /> ASSOCIATE <span style="color: #00C800;">CLASS</span> String WITH TYPE Character<br /><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> c<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> c <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">CLASS</span> String<br /><br /> <span style="color: #00C800;">METHOD</span> GetChar<span style="color: #000000;">(</span> nIndex <span style="color: #000000;">)</span> OPERATOR <span style="color: #ff0000;">"[]"</span><br /><br /> <span style="color: #00C800;">METHOD</span> ClassName<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">INLINE</span> <span style="color: #ff0000;">"CHARACTER"</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #00C800;">METHOD</span> GetChar<span style="color: #000000;">(</span> nIndex <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> String<br /><br /><span style="color: #00C800;">return</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> <span style="color: #00C800;">Self</span>, nIndex, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span></div>[/code:3ji0trkc]
|
Array <> String
|
Rimantas,
simple function to save an array into a string, the fields separated with ";"
[code=fw:k9imdh1m]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> SaveArray2String <span style="color: #000000;">(</span>aArray<span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> i<br /> <span style="color: #00C800;">LOCAL</span> c := <span style="color: #ff0000;">""</span><br /><br /> <span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> Len <span style="color: #000000;">(</span>aArray<span style="color: #000000;">)</span><br /> c += aArray<span style="color: #000000;">[</span>i<span style="color: #000000;">]</span>+<span style="color: #ff0000;">";"</span><br /> <span style="color: #00C800;">NEXT</span><br /> c := <span style="color: #0000ff;">Left</span> <span style="color: #000000;">(</span>c, Len<span style="color: #000000;">(</span>c<span style="color: #000000;">)</span><span style="color: #000000;">-1</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// remove the last ;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">(</span>c<span style="color: #000000;">)</span><br /> </div>[/code:k9imdh1m]
|
Array <> String
|
[quote="StefanHaupt":2ywlazqk]Rimantas,
simple function to save an array into a string, the fields separated with ";"
[/quote:2ywlazqk]
Hi Stefan ,
Thanks , something similar I did at this moment . Simply I was thinking that alreday exist solution .
With best regards !
|
Array <> String
|
[quote="Antonio Linares":z1ri7muv]Rimantas,
This may help you:
[code=fw:z1ri7muv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br />extern HBCharacter<br /> </div>[/code:z1ri7muv][/quote:z1ri7muv]
Interesting ... Thanks Antonio !
With best regards !
|
Array BUG?
|
I make a array with arr := array(30) and then aFill(arr,{}).
When I now say aadd(arr[1],{1,2,3,4}]) all arrays in arr become this aadd() not only arr[1]!
Whe i fill the arr with aeval(arr,{|,index|aadd(arr[index],{1,2,3,4}}) then is it ok.
I use xHarbour.
|
Array BUG?
|
It is not a bug. It is the expected behavior.
AFill( aArray, {} ) results in filling all elements of aArray with reference to the pointer of the same array {}
Let us see this example:
x := y := {} // both x and y contain the pointer to the same array.
So whether we use the variable x or y, we are operating on the same array.
AAdd( x, 1 ) // this is same as AAdd( y, 1 ) because x and y hold reference to the same array.
Now x[ 1 ] contains 1 and y[ 1 ] also contains 1
AFill( aArray, Array(0) ) is the recommended way. Each element is assigned with pointer to a different array.
|
Array BUG?
|
Thanks much! Is now clear.
|
Array Browsing using TwBrowse (Standard)
|
Hello All,
I am developing a multi selection using two TwBrowse list box with add and remove buttons. One listbox working on table and other working on an array (containing selected items).
The problem is when user presses Remove button, I delete an element from array using ADEL. As a result the last element of array becomes NIL and TwBrowse gives error.
Is there any workaround ?
TIA
Milan.
|
Array Browsing using TwBrowse (Standard)
|
Use ASize() after ADel() to truncate the array.
EMG
|
Array Browsing using TwBrowse (Standard)
|
Dear Enrico,
Yes it does solve the problem. Thanks.
Milan.
[quote="EnricoMaria":1btoab9f]Use ASize() after ADel() to truncate the array.
EMG[/quote:1btoab9f]
|
Array Question
|
Hi Everybody,
I may be overlooking something simple but it has been awhile since I have worked with array's.
I have set up an array using:
aIDocList := {}
DO WHILE ! EOF()
aAdd( aIDocList, {DropList->Name, DropList->BMPFile} )
skip
ENDDO
I now need to allow the user to select the first item from a combobox in a dialog, store that value to cItem1 while storing the second value to cItem2.
I am stuck at this point ... any ideas?
|
Array Question
|
Jeff,
I suggest creating two arrays. Use the one you wish for the combobox, then after the user makes the selection, extract the related one from the second array by the location of the selection in the first array. Was that clear?
James
|
Array Question
|
Hi James,
I thought of doing that but I could not figure out how to get the item number from the array when selected from a resource dialog box.
If you could help with that one, I'll be all set.
|
Array Question
|
[code:22eu8yef]oLbx:nAt[/code:22eu8yef]
EMG
|
Array Question
|
Jeff,
James is right about needing a single dimension array for your combobox because a combobox cannot handle multidimension arrays directly. However, you may have some unstated reason for wanting to create aIDocList as a multidimensional array for use as such somewhere else in your program. If that is the case, then just download the file "TestComb.zip" from the link below for a sample of how to do that. The example is in 16 bit FiveWin, but works exactly the same in 32 bits...
<!-- m --><a class="postlink" href="http://www.leadersoft.com/software/testcomb.zip">http://www.leadersoft.com/software/testcomb.zip</a><!-- m -->
- Roger
|
Array Question
|
Jeff, here it is if you just want to see the code without having to download the sample....
*----------------------------
* testcomb.prg
#include "fivewin.ch"
PROCEDURE Main()
LOCAL aNames := {},aIDocList := {},cItem := "",;
cItem1 := "",cItem2 := "",;
oDlg,oCbx,oBtn
USE Droplist ALIAS Droplist NEW
DO WHILE !EOF()
aAdd( aNames, DropList->Name )
aAdd( aIDocList, {DropList->Name, DropList->BMPFile} )
SKIP
ENDDO
DEFINE DIALOG oDlg TITLE "TestCombo for Jeff Barnes" ;
FROM 1,5 TO 10,40
// Here is the important part, using a 1-dimension array for ITEMS, and
// then using the selection to pull data from a multi-dimension array...
@ 2,5 COMBOBOX oCbx VAR cItem ITEMS aNames ;
SIZE 40,40 PIXEL OF oDlg ;
ON CHANGE (cItem1 := aIDocList[oCbx:nAt,1], ;
cItem2 := aIDocList[oCbx:nAt,2], ;
oDlg:Update() )
@ 20, 5 SAY cItem1 SIZE 30,12 PIXEL OF oDlg UPDATE
@ 20,65 SAY cItem2 SIZE 40,12 PIXEL OF oDlg UPDATE
@ 40,5 BUTTON oBtn PROMPT "Cancel" SIZE 25,12 PIXEL OF oDlg ;
ACTION (oDlg:End() )
ACTIVATE DIALOG oDlg
RETURN
*-------------
|
Array Question
|
Thanks Enrico / James.
|
Array Question
|
Jeff,
>I thought of doing that but I could not figure out how to get the item number from the array when selected from a resource dialog box.
As Enrico or Roger showed, or:
aArray2[ ascan( aArray1, cItem ) )
James
|
Array Question
|
Thanks Roger.
I ended up using the 2 separate arrays but I like your solution ... I will keep this one for next time <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.