topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
tengo dos grupos y necesito un tercer grupo con report
|
Gente :
Estoy Tratando de crear un nuevo grupo en tiempo de ejecución , pero me arroja error
TRGroup no existe, alquien quien me oriente
Gracias,
[code=fw:h40pnvw6]<div class="fw" id="{CB}" style="font-family: monospace;"><br />REPORT oRpt ;<br /> ...<br /> GROUP oGrp1 ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">Left</span><span style="color: #000000;">(</span>TMP->Cuenta,<span style="color: #000000;">2</span><span style="color: #000000;">)</span> ;<br /> HEADER <span style="color: #0000ff;">Left</span><span style="color: #000000;">(</span>TMP->Cuenta,<span style="color: #000000;">2</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">' '</span>+ACONCUE->Descrip;<br /> FOOTER <span style="color: #ff0000;">'Total :'</span> ;<br /> <span style="color: #0000ff;">FONT</span> <span style="color: #000000;">5</span><br /><br /> GROUP oGrp2 ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">Left</span><span style="color: #000000;">(</span>TMP->Cuenta,<span style="color: #000000;">4</span><span style="color: #000000;">)</span> ;<br /> HEADER <span style="color: #0000ff;">Left</span><span style="color: #000000;">(</span>TMP->Cuenta,<span style="color: #000000;">4</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">' '</span>+ACONCUE->Descrip;<br /> FOOTER <span style="color: #ff0000;">'SubTotal :'</span> ;<br /> <span style="color: #0000ff;">FONT</span> <span style="color: #000000;">5</span><br /><br /> COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">" "</span>,<span style="color: #ff0000;">"Cuenta"</span> ;<br /> <span style="color: #00C800;">DATA</span> TMP->CUENTA ;<br /> <span style="color: #0000ff;">FONT</span> <span style="color: #000000;">2</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">9</span><br /><br /> COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">" "</span>,<span style="color: #ff0000;">"Ruc"</span> ;<br /> <span style="color: #00C800;">DATA</span> TMP->Ruc ;<br /> <span style="color: #0000ff;">FONT</span> <span style="color: #000000;">2</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span> <br /> ... <br /> ...<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> REPORT oRpt ;<br /> <span style="color: #0000ff;">ON</span> STARTGROUP iif<span style="color: #000000;">(</span>len<span style="color: #000000;">(</span>tmp->cuentat<span style="color: #000000;">)</span>=<span style="color: #000000;">8</span>,createnewgroup<span style="color: #000000;">(</span><span style="color: #000000;">)</span>,<span style="color: #000000;">)</span>;<br /> <span style="color: #0000ff;">ON</span> ENDGROUP iif<span style="color: #000000;">(</span>len<span style="color: #000000;">(</span>oRpt:<span style="color: #000000;">aGroups</span><span style="color: #000000;">)</span>=<span style="color: #000000;">3</span>, eval<span style="color: #000000;">(</span><span style="color: #000000;">{</span>||oRpt:<span style="color: #000000;">Delgroup</span><span style="color: #000000;">(</span><span style="color: #000000;">3</span><span style="color: #000000;">)</span>, oRpt:<span style="color: #000000;">Stabilize</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 /><br />END REPORT<br /><br /><br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> createnewgroup<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oGrp3:= TRGroup:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">{</span>|| tmp->cuenta <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span>|| tmp->cuenta+<span style="color: #ff0000;">" "</span>+aconcue->descrip<span style="color: #000000;">}</span>, <span style="color: #000000;">{</span>|| <span style="color: #ff0000;">"Subtotal"</span> <span style="color: #000000;">}</span>, , , oRpt<span style="color: #000000;">)</span> <span style="color: #B900B9;">// Abort TRGroup does not exist</span><br />oRpt:<span style="color: #000000;">Stabilize</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">Nil</span><br /> </div>[/code:h40pnvw6]
|
tengo la siguiente duda TTxtFile ayuda
|
Utilizo esta clase, pero alquerer modificar un archivo XML, me pone espacios en blanco o tabuladores, lo presento de la siguiente forma...
archivo original
<?xml version='1.0'?>
<person dataSource="144" dataSourceNbr="144">
<active>Y</active>
<faces>
<face>
<missing>N</missing>
<sample>Face_Ambient_Gallery/fm09351732.jpg</sample>
</face>
</faces>
</person>
archivo modificado con la clase TTxtFile
me pone espacion en datasource y por consiguiente me modifica la estructura, y tambien Face_Ambient_Gallery
<?xml version='1.0'?>
<person dataSource="115" dataSourceNbr="115">
<active>Y</active>
<faces>
<face>
<missing>N</missing>
<sample> Face_Ambient_Gallery/amo6709f.jpg</sample>
</face>
</faces>
</person>
si alguien tiene una solucion por favor ayudame es algo urgente tengo que modificar 10,000 archivos para subir a un servidor
|
tengo la siguiente duda TTxtFile ayuda
|
Que modificaciones tienes que hacer en los ficheros ? Quizá sea más simple hacer los cambios sobre los archivos en memoria usando MemoRead(), StrTran() y MemoWrit()
Al estar en 32 bits puedes manejar archivos muy grandes en memoria (hasta de 4 gigas)
|
tengo la siguiente duda TTxtFile ayuda
|
gracias port contestar
en primera hice un proceso que me generara XML dependiendo de una ruta, en donde tengo fotos,
quise crear el archivo XML pero al subirlo al servidor no me lo permitio, este archivo tiene los elementos que me pedine para poder subir informacion a una base de datos, lo cuiroso es que el arcihovo de ejemplo que viene acompañado de esta aplicacion me lo sube, la verdad cuando me mando el error el servisor al subir mi informacion no me sice nada solo n procesos fallados.
la alternativa que tuve fue modificar este archivo lo cual si me lo sube pero el incomveniente que tengo es que me archivo original me lo modifica, por ejemplo cuando modifico algun valor del archivo este me pone un tabulador y queda asi
<?xml version='1.0'?>
<person dataSource="215" dataSourceNbr="215">
<active>Y</active>
<faces>
<face>
<missing>N</missing> <sample>
Face_Ambient_Gallery/AAAA591121GAA.jpg</sample>
</face>
</faces>
</person>
el problema no es si fuera uno, eso depende de las fotos que me den, que pueden ser mas 100,000 de imagenes tendria que modificar 100,000 archivos
estos son los tag que tengo que modificar
<person dataSource="215" dataSourceNbr="215">
<sample>Face_Ambient_Gallery/AAAA591121GAA.jpg</sample>
utilizo la clasee TTxtFile(),
que me estara haciendo falta para que los campos me los respete
nruta := "Face_Ambient_Gallery/" + ltrim( aNam[nFoto] )
nxml := TTxtFile():New( ".\XML_1Face_2Fingers_Gallery\" + LTRIM(str(nCou))+ ".xml" )
IF nxml:Seek ( "dataSource" )
nxml:RepLine( 'dataSource="' + LTRIM(str(nJjjj)) + '" dataSourceNbr="' + LTRIM(str(nJjjj)) + '">' )
END IF
IF nxml:Seek ( "Face_Ambient_Gallery/" )
nxml:RepLine( "Face_Ambient_Gallery/" + alltrim(aNam[i]) + "</sample>" )
END IF
este es parte del codigo que utilizo para replazar estas lineas, hay alguna forma mejor
saludos
|
tengo la siguiente duda TTxtFile ayuda
|
Donde pone el tabulador ?
No se ve en el código que has puesto. Márcalo de alguna forma para que se vea, gracias
Has probado a hacer StrTran( cTexto, Chr( 9 ), "" ) ?
|
tengo la siguiente duda TTxtFile ayuda
|
alguien sabe como usar el ,![CDATA[]] al crear archivos xml, agradeceria su ayuda
|
tengo un array y necesito imprimirlo en columnas...
|
Hola.
Tengo un array y quiero que en la hoja aparezca en tres columnas, y si no entran en una hoja siga en las subsiguientes,
estoy usando la clase de THE FULL, y viendo como hizo el ejemplo de la factura. pero no se como encolumnarlos.
gracias.
|
tengo un array y necesito imprimirlo en columnas...
|
Cuantas columnas tiene el array?
|
tengo un array y necesito imprimirlo en columnas...
|
una, no es matricial.
a:= { , , , , , , }
|
tengo un problema urge por favor
|
tengo una funcion en c
void algo( par1, parm2...){
... odigo
}
el problema que tengo como la llama desde un prg
gracias
|
tengo un problema urge por favor
|
Tienes muchísimos ejemplos en C en source\winapi y source\function
Basicamente:
#pragma BEGINDUMP
#include <hbapi.h>
void algo( char *, char * );
HB_FUNC( ALGO )
{
algo( hb_parc( 1 ), hb_parc( 2 ) );
}
#pragma ENDDUMP
Y desde tu PRG llamas a ALGO( "uno", "dos" )
|
tengo un problema urge por favor
|
gracias por tu respueta,
estube analizando los ejemplos de c
y resolvi mi duda, pero aprecio el ejemplo que pones
gracias
|
tengo un tree y quiero insertar una rama un un lugar...
|
Hola.
Como la ordenación de las rams de un tree se me está haciendo dificil de entender.
quiero hacer esto
las ramas tienen dos campos, uno de ellos es "fecha" y lo que quiero es hacer un algoritmo para
buscar dentro de la rama que ya existen la fecha mas chica y antes de esa rama insertar la rama que quiero.
pregunta:
como se inserta una rama antes de una ya creada?
|
tengo un tree y quiero insertar una rama un un lugar...
|
Querido Gustavo,
Revisa el código de FWH\samples\pim.prg
ahí tienes ejemplos de todo lo que podemos hacer con los trees <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Pulsa el botón derecho del ratón sobre el tree
|
tengo una duda por favor
|
tengo un programa con extencion xxxx.ccp, como lo compilo para integrarlo en mi programa
saludos gracias
|
tengo una duda por favor
|
[quote="tomafa":3tgjvou4]tengo un programa con extencion xxxx.ccp, como lo compilo para integrarlo en mi programa
saludos gracias[/quote:3tgjvou4]
Depende de lo que usa para compilar
VERCE: Agregalo como un .c
XMATE: agregalo al proyecto
BAT: compilalo como un .c
|
teoria sobre objetos...?
|
hola.
tienen teoria sobre objetos en harbour? neecsito leer porque no me esta saliendo el tema de mover un grupo de datos entre clases y quiero aprender.
gracias
|
teoria sobre objetos...?
|
Hola Gustavo.
Puedes mirar esto.
[url]
<!-- m --><a class="postlink" href="https://www.kresin.ru/en/hrbfaq_3.html#Doc3">https://www.kresin.ru/en/hrbfaq_3.html#Doc3</a><!-- m -->
[/url]
Saludos.
Jose
|
teoria sobre objetos...?
|
gracias
|
terminate MDI child windows with <vk_escape>
|
I created an MDI window with 2 mdichild windows.
My child windows require clicking the close "X" button to shut them down.
how can I make the escape key shut down/close each MDICHILD windows without having to touch the mouse?
thank you
|
terminate MDI child windows with <vk_escape>
|
Don
This code snipit should work..
Rick Lipkin
[code=fw:4ebji2v4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #B900B9;">// key handler to trap key strokes ESC to quit //</span><br /> oWind:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">{</span>|nKey| <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span>nKEY = <span style="color: #000000;">27</span>, oWIND:<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><br /> </div>[/code:4ebji2v4]
|
terminate MDI child windows with <vk_escape>
|
Worked like a charm.
Thanks Rick.
|
test invoice
|
I wish a test invoice made with xbrowse with footer on total rows with these fields :
Item code
Item description
Measure
Qty
Tax
Unit Price
Descount
Total Price
to select a new item from an archive of products and edit each field
thanks
|
test sample
|
Anyone have A test sample of a dialogwith many buttons and vscroll at the right to scroll they ?thanks
|
test sample
|
This is a very basic sample:[code:26z5ruyy]#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL cVar := SPACE( 30 )
DEFINE DIALOG oDlg;
SIZE 800, 600
@ 0, 0 GET cVar
@ 3, 0 BUTTON "&Close";
ACTION oDlg:End()
oDlg:nStyle = NOR( oDlg:nStyle, WS_VSCROLL )
ACTIVATE DIALOG oDlg;
ON INIT IMPOSTASCROLL( oDlg );
CENTER
RETURN NIL
STATIC FUNCTION IMPOSTASCROLL( oDlg )
oDlg:oVScroll:SetRange( 1, 10 )
oDlg:oVScroll:nPgStep = 1
oDlg:oVScroll:bGoUp = { || SpostaControlli( oDlg, 30 ) }
oDlg:oVScroll:bGoDown = { || SpostaControlli( oDlg, -30 ) }
oDlg:oVScroll:bPageUp = { || SpostaControlli( oDlg, 30 ) }
oDlg:oVScroll:bPageDown = { || SpostaControlli( oDlg, -30 ) }
RETURN NIL
STATIC FUNCTION SPOSTACONTROLLI( oDlg, nStep )
LOCAL i
FOR i = 1 TO LEN( oDlg:aControls )
oDlg:aControls[ i ]:Move( oDlg:aControls[ i ]:nTop + nStep, oDlg:aControls[ i ]:nLeft )
NEXT
oDlg:Refresh()
RETURN NIL[/code:26z5ruyy]EMG
|
test sample
|
thank I 'm trying it I must implement it on my old class remember of tmiadialog ?
|
test using fw_unicode
|
Hi,
this little sample test does not work
I copy and paste some chinese characters like these ?????????
or I type some character using chinese keyboard
When get object looses focus all chinese characters disappear and appear a list of ??????
Any hints?
King regards
Marco
[code=fw:v26anrek]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br />ANNOUNCE RDDSYS<br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> oDlg<br /><span style="color: #00C800;">LOCAL</span> oCodice , cCodice := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">50</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> oDes_Eng , cDes_Eng := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">100</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> oDes_Chi , cDes_Chi := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">100</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> oFont<br /><span style="color: #00C800;">LOCAL</span> cFont := <span style="color: #ff0000;">"Courier New "</span><br /><span style="color: #00C800;">LOCAL</span> nSize := <span style="color: #000000;">24</span><br /><br /><br />FW_SetUnicode<span style="color: #000000;">(</span> .t. <span style="color: #000000;">)</span><br /><br /><br />MsgGet<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Insert"</span> , <span style="color: #ff0000;">"Font type"</span> , @cFont <span style="color: #000000;">)</span><br />MsgGet<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Insert"</span> , <span style="color: #ff0000;">"Font size"</span> , @nSize <span style="color: #000000;">)</span><br /><br /><br />SET DELETED <span style="color: #0000ff;">ON</span><br />SET EXCLUSIVE OFF<br /><br />USE <span style="color: #0000ff;">items</span><br /><span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> field->codice TAG CODICE <span style="color: #0000ff;">TO</span> <span style="color: #0000ff;">ITEMS</span><br /><span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> field->des_eng TAG DES_ENG <span style="color: #0000ff;">TO</span> <span style="color: #0000ff;">ITEMS</span><br />SET ORDER <span style="color: #0000ff;">TO</span> TAG CODICE<br />GO TOP<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> cFont <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span> , - nSize<br /><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">100</span> , <span style="color: #000000;">100</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">400</span> , <span style="color: #000000;">800</span> <span style="color: #0000ff;">PIXEL</span><br />@ <span style="color: #000000;">1</span> , <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Codice"</span> <span style="color: #0000ff;">OF</span> oDlg<br />@ <span style="color: #000000;">1</span> , <span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> oCodice <span style="color: #0000ff;">VAR</span> cCodice <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span> , <span style="color: #000000;">20</span><br /><br />@ <span style="color: #000000;">3</span> , <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Descri English"</span> <span style="color: #0000ff;">OF</span> oDlg<br />@ <span style="color: #000000;">3</span> , <span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> oDes_Eng <span style="color: #0000ff;">VAR</span> cDes_Eng <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span> , <span style="color: #000000;">20</span><br /><br />@ <span style="color: #000000;">5</span> , <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Descri Chinese"</span> <span style="color: #0000ff;">OF</span> oDlg<br />@ <span style="color: #000000;">5</span> , <span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> oDes_Chi <span style="color: #0000ff;">VAR</span> cDes_Chi <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span> , <span style="color: #000000;">20</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />@ <span style="color: #000000;">7</span> , <span style="color: #000000;">1</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Cerca"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> CERCA<span style="color: #000000;">(</span> oCodice , oDes_Eng , oDes_Chi <span style="color: #000000;">)</span><br />@ <span style="color: #000000;">7</span> , <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Salva"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> SALVA<span style="color: #000000;">(</span> oCodice , oDes_Eng , oDes_Chi <span style="color: #000000;">)</span><br />@ <span style="color: #000000;">7</span> , <span style="color: #000000;">20</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> PRINT_TEST<span style="color: #000000;">(</span> cFont <span style="color: #000000;">)</span><br /><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">Center</span><br /><br /><br /><span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> CERCA<span style="color: #000000;">(</span> oCodice , oDes_Eng , oDes_Chi <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> cCodice := oCodice:<span style="color: #000000;">varget</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">IF</span> DBSEEK<span style="color: #000000;">(</span> cCodice <span style="color: #000000;">)</span><br /><br /> oDes_Eng:<span style="color: #000000;">varput</span><span style="color: #000000;">(</span> items->des_eng <span style="color: #000000;">)</span><br /> oDes_Chi:<span style="color: #000000;">varput</span><span style="color: #000000;">(</span> items->des_chi <span style="color: #000000;">)</span><br /> oDes_Eng:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oDes_Chi:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> SALVA<span style="color: #000000;">(</span> oCodice , oDes_Eng , oDes_Chi <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> cCodice := oCodice:<span style="color: #000000;">varget</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">IF</span> DBSEEK<span style="color: #000000;">(</span> cCodice <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> DBRLOCK<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> REPLACE items->des_eng WITH oDes_Eng:<span style="color: #000000;">varget</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> REPLACE items->des_chi WITH oDes_Chi:<span style="color: #000000;">varget</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> DBRUNLOCK<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> PRINT_TEST<span style="color: #000000;">(</span> cFont <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oPrn := TPrinter<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// "Test" is the name for the printout</span><br /><br /> <span style="color: #00C800;">local</span> fntArial<br /> <span style="color: #00C800;">local</span> nRow := <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">LOCAL</span> nSize := <span style="color: #000000;">80</span><br /> <span style="color: #00C800;">LOCAL</span> oFont<br /><br /> MsgGet<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Insert"</span> , <span style="color: #ff0000;">"Font size"</span> , @nSize <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> fntArial <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span> , <span style="color: #000000;">-80</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> cFont <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span> , - nSize<br /><br /> oPrn:<span style="color: #000000;">StartPage</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> GO TOP<br /><br /> <span style="color: #B900B9;">// starts a new page</span><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> !EOF<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> nRow * <span style="color: #000000;">100</span> , <span style="color: #000000;">10</span> , field->codice , fntArial <span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> nRow * <span style="color: #000000;">100</span> , <span style="color: #000000;">1000</span> , field->des_eng , fntArial <span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> nRow * <span style="color: #000000;">100</span> , <span style="color: #000000;">3000</span> , field->des_chi , oFont <span style="color: #000000;">)</span><br /><br /> nRow ++<br /> SKIP<br /> <span style="color: #00C800;">ENDDO</span><br /><br /> oPrn:<span style="color: #0000ff;">EndPage</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// ends this page</span><br /><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> fntArial<br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /> oPrn:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><br /><br /><br /><span style="color: #0000ff;">INIT</span> PROCEDURE RddInit<br />REQUEST DBFFPT<br />REQUEST DBFCDX<br />rddSetDefault<span style="color: #000000;">(</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">)</span><br /><br /> </div>[/code:v26anrek]
|
test using fw_unicode
|
Please,
If you use Notepad or any other editor you have to save as UTF8 document
|
test using fw_unicode
|
In my prg files there are not chinese or strange characters
Can you compile it for me?
Many thanks
Marco
|
test using fw_unicode
|
[quote="MarcoBoschi":18yhcgf6]In my prg files there are not chinese or strange characters
Can you compile it for me?
Many thanks
Marco[/quote:18yhcgf6]
Marco, As before
If you are not going to use Unicode characters, still working like
If you use unicode characters in xHarbour the .prg file must be saved as UTF8 without BOM
In Harbour you can record as UTF or UTF without BOM, anyway
|
test using fw_unicode
|
Cristobal,
I tried as per your suggestion but the result is the same. Can you try Marco's sample yourself?
EMG
|
test using fw_unicode
|
Cristobal,
can you try ma sample?
Many thanks
Marco
|
test using fw_unicode
|
My email
navarro . cristobal at gmail . com
[url=http://postimage.org/:2o4ko603][img:2o4ko603]http://s4.postimg.org/5jyxm3fkt/marcob.png[/img:2o4ko603][/url:2o4ko603]
|
test using fw_unicode
|
Cristobal,
I' just sent the source and a dbf table
Gracias
|
test using fw_unicode
|
Look
[url=http://postimage.org/:y57lykx6][img:y57lykx6]http://s15.postimg.org/jmb2368wr/marcob1.png[/img:y57lykx6][/url:y57lykx6]
I just had to put Fw_SetUnico of (.T.) In the program and compile normally FiveDbu
|
test using fw_unicode
|
Cristobal,
can you send me your EXE to test it here?
EMG
|
test using fw_unicode
|
Sent
|
test using fw_unicode
|
Cristobal,
thank you, your EXE works fine here. But if I compile the PRG you sent me it doesn't work. I'm using latest FWH build 4. What am I missing? Any additional LIBs required?
EMG
|
test using fw_unicode
|
[quote="Enrico Maria Giordano":2vwvp735]Cristobal,
thank you, your EXE works fine here. But if I compile the PRG you sent me it doesn't work. I'm using latest FWH build 4. What am I missing? Any additional LIBs required?
EMG[/quote:2vwvp735]
No, standard libraries with Harbour
Which problem you have?
|
test using fw_unicode
|
Cristobal.
I just can't paste the chinese characters in the GET. When I try to paste them they change to question marks.
Any ideas?
EMG
|
test using fw_unicode
|
I'm using xHarbour. Does it make any differences?
EMG
|
test using fw_unicode
|
[quote="Enrico Maria Giordano":2fkcb3lj]Cristobal.
I just can't paste the chinese characters in the GET. When I try to paste them they change to question marks.
Any ideas?
EMG[/quote:2fkcb3lj]
Do not
In your program only thing I've done is add Fw_SetUnicode (.T.)
[url=http://postimage.org/:2fkcb3lj][img:2fkcb3lj]http://s13.postimg.org/xdcs32do7/marcob2.png[/img:2fkcb3lj][/url:2fkcb3lj]
|
test using fw_unicode
|
[quote="Enrico Maria Giordano":10oompa2]I'm using xHarbour. Does it make any differences?
EMG[/quote:10oompa2]
Ah! that may be
I think Mr Rao also used xHarbour and has not commented have any problem
I do not use much xHarbour
I will do tests and comment
|
test using fw_unicode
|
Cristobal,
thank you.
EMG
|
test using fw_unicode
|
Enrico
Maybe missing the code library of pages in your build xHarbour
I Harbour I have
echo %hdirl%\hbcpage.lib + >> b32.bc
Tell me I can help
|
test using fw_unicode
|
Cristobal,
I just tried with harbour: same problem. I retried you EXE and there are problems too. Try to paste twice in the first field.
EMG
|
test using fw_unicode
|
We can compare your buildh.bat with mine
[url=http://postimage.org/:1j7628bd][img:1j7628bd]http://s11.postimg.org/89q04bo2b/marcob3.png[/img:1j7628bd][/url:1j7628bd]
|
test using fw_unicode
|
Harbour Libs I use
[code=fw:24m17x2v]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aHLibs := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"hbwin.lib "</span> , <span style="color: #ff0000;">"gtgui.lib "</span> , <span style="color: #ff0000;">"hbrtl.lib "</span> , <span style="color: #ff0000;">"hbvm.lib "</span> ,;<br /> <span style="color: #ff0000;">"hblang.lib "</span> , <span style="color: #ff0000;">"hbmacro.lib "</span>, <span style="color: #ff0000;">"hbrdd.lib "</span> , <span style="color: #ff0000;">"rddntx.lib "</span> ,;<br /> <span style="color: #ff0000;">"rddcdx.lib "</span> , <span style="color: #ff0000;">"rddfpt.lib "</span> , <span style="color: #ff0000;">"hbsix.lib "</span> , <span style="color: #ff0000;">"hbdebug.lib "</span> ,;<br /> <span style="color: #ff0000;">"hbcommon.lib "</span>, <span style="color: #ff0000;">"hbpp.lib "</span> , <span style="color: #ff0000;">"hbcpage.lib "</span>, <span style="color: #ff0000;">"hbcplr.lib "</span> ,;<br /> <span style="color: #ff0000;">"hbct.lib "</span> , <span style="color: #ff0000;">"hbpcre.lib "</span> , <span style="color: #ff0000;">"xhb.lib "</span> , <span style="color: #ff0000;">"hbziparc.lib "</span>,;<br /> <span style="color: #ff0000;">"hbmzip.lib "</span> , <span style="color: #ff0000;">"hbzlib.lib "</span> , <span style="color: #ff0000;">"minizip.lib "</span>, <span style="color: #ff0000;">"png.lib "</span> ,;<br /> <span style="color: #ff0000;">"hbcurl.lib "</span> , <span style="color: #ff0000;">"hbusrrdd.lib "</span> <span style="color: #000000;">}</span><br /><br /><br /><br /> </div>[/code:24m17x2v]
|
test using fw_unicode
|
Cristobal,
I repeat (maybe you have missed that): your EXE has the same problem. Try to paste the chinese characters twice in the first GET.
EMG
|
test using fw_unicode
|
[quote="Enrico Maria Giordano":2t6f6u5y]Cristobal,
I repeat (maybe you have missed that): your EXE has the same problem. Try to paste the chinese characters twice in the first GET.
EMG[/quote:2t6f6u5y]
Enrico, yes you are right
Note that the width of the variables must be appropriate to the characters you'll paste
Change
[code=fw:2t6f6u5y]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">LOCAL</span> oCodice , cCodice := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">50</span> <span style="color: #000000;">)</span><br /> </div>[/code:2t6f6u5y]
With
[code=fw:2t6f6u5y]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">LOCAL</span> oCodice , cCodice := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">100</span> <span style="color: #000000;">)</span><br /> </div>[/code:2t6f6u5y]
Should be reviewed in detail this topic
|
test using fw_unicode
|
Cristobal,
ok, that's better. But still doesn't work with my EXE (both Harbour and xHarbour). Don't know why... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
EMG
|
test using fw_unicode
|
[quote="Enrico Maria Giordano":2ou8224x]Cristobal,
ok, that's better. But still doesn't work with my EXE (both Harbour and xHarbour). Don't know why... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
EMG[/quote:2ou8224x]
Please, look your mail
|
test using fw_unicode
|
With your new libs it's working fine! I don't understand. I'm using latest official libs from Fivetech. What's the difference?
EMG
|
test using fw_unicode
|
[quote="Enrico Maria Giordano":3sbd81cy]With your new libs it's working fine! I don't understand. I'm using latest official libs from Fivetech. What's the difference?
EMG[/quote:3sbd81cy]
Ok,
I do not understand why
I will review what may be the problem with the libraries that you have
It works well with xHarbour?
|
test using fw_unicode
|
Yes, with xHarbour is even better. With Harbour if I paste when there is not enough space I get question marks or other strange characters. While with xHarbour the paste just fills the available space.
EMG
|
test using fw_unicode
|
[quote="Enrico Maria Giordano":2hhb3z6l]Yes, with xHarbour is even better. With Harbour if I paste when there is not enough space I get question marks or other strange characters. While with xHarbour the paste just fills the available space.
EMG[/quote:2hhb3z6l]
Thanks for the info
|
test using fw_unicode
|
For Antonio:
so we have to wait for a build 5? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
test using fw_unicode
|
Thanks Guys
Have a Nice Sunday
Marco
|
test using fw_unicode
|
Enrico,
I am checking it with Rao and Cristobal, thanks
|
test.mak para xHarbour
|
Porfa, necesito un ejemplo de test.mak para compilar con xHarbour y BCC582.
Gracias, salu2.
|
test.mak para xHarbour
|
João,
Puedes usar el make bormake.zip que proporcionamos en la carpeta makes de FWH. Solo tienes que cambiar las librerías de Harbour a xHarbour basándote en FWH\samples\buildx.bat
|
test.mak para xHarbour
|
Ok. Gracias, Maestro...
|
testMap
|
I saw the sample of TestMap
I wish Fill with a color a part of a bitmap sample : on Red a state of Europe
1. How I can colorize this zone ?
2. How I can save the x,y to savethem on dbf and make the fill when I click on this record
sample
Espana x,y ->>>> RED floodfill on bitmap
Italy x,y -----> BLue
Germany x,y ----> Yellow
|
testMap
|
Silvio,
I think filling a unsymmetrical area is not possible.
What you an do is :
1. You need a empty[color=#0000FF:2b6mjs8z] [b:2b6mjs8z]WHITE map with black border-lines[/b:2b6mjs8z][/color:2b6mjs8z]
2. fill the selected area with a color
3. save the image with the country-name
How to create the different images :
1. load the [color=#FF0000:2b6mjs8z]blanc[/color:2b6mjs8z] image with PIXELFORMER
2. select a color
3. use the FILL-tool to fill a selected area
The Fill-tool detects the painted country-borders ( black lines )
Save the different BMP's to Your DBF-file
At runtime, You can change the image.
[size=150:2b6mjs8z]Italy[/size:2b6mjs8z]
[img:2b6mjs8z]http://www.pflegeplus.com/pictures/italy.png[/img:2b6mjs8z]
[size=150:2b6mjs8z]Spain[/size:2b6mjs8z]
[img:2b6mjs8z]http://www.pflegeplus.com/pictures/Spain.png[/img:2b6mjs8z]
[size=150:2b6mjs8z]France[/size:2b6mjs8z]
[img:2b6mjs8z]http://www.pflegeplus.com/pictures/France.png[/img:2b6mjs8z]
Best Regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
|
testMap
|
Uwe,
I have an old app made with fw + clipper 16 bit and I wish converte it on 32 bit
I converte it and not run ok
I have a Map of Italy
I have a dbf with coordinates x,y
then I have a xbrowse and made
oBrw:bChange:= {|| Disegna_cartina(oTree,oDlg,oCartina,oBrw) }
....
static Function Disegna_cartina(oTree,oDlg,oCartina,oBrw)
Local nRow,nCol
Local oldRec:= Provve->(Recno())
Local Hdc := oDlg:GetDc()
Local nLivello:= oBrw:oTreeItem:nLevel
IF nLivello = 3
nRow := provve->posx
nCol := provve->posy
oCartina:bPainted = { |hDC| FLOODFILL( hDC,nRow,nCol,12632256) }
Else
Endif
oDlg:UPDATE()
oDlg:refresh()
DeleteDC( hDC )
oDlg:ReleaseDC()
Return nil
But it put the color to everything on bitmap and not run ok perhaps the function FLOODFILL was changed ?
|
testMap
|
Silvio,
I would place a transparent BTNBMP without text on the needed position
that works fine and looks nicer.
From the browser You can call the button to be displayed.
Save button-top / left to Your DBF
Maybe also add fields for the Buttonsize to Your DBF.
As a extra You will have a action and Tooltip
Add ADJUST for different sizes in Button 1
[img:2gp1ro38]http://www.pflegeplus.com/pictures/positin1.png[/img:2gp1ro38]
Alphablended < AREA.BMP >
[img:2gp1ro38]http://www.pflegeplus.com/pictures/area.bmp[/img:2gp1ro38]
[img:2gp1ro38]http://www.pflegeplus.com/pictures/area1.bmp[/img:2gp1ro38]
[color=#FF0000:2gp1ro38][b:2gp1ro38]@ 150, 150[/b:2gp1ro38][/color:2gp1ro38] BTNBMP oBtn1 OF oWnd PIXEL ;
SIZE 48, 48 ;
FILE c_path1 + "area.bmp" ;
ACTION MsgInfo("Hello")
oBtn1:lTransparent := .T.
oBtn1:cTooltip := { "Show" + CRLF + ;
"the selected area","Area", 1, CLR_BLACK, 14089979 }
[color=#FF0000:2gp1ro38][b:2gp1ro38]@ 250, 350 [/b:2gp1ro38][/color:2gp1ro38]BTNBMP oBtn2 OF oWnd PIXEL ;
SIZE 55, 55 ;
ACTION MsgInfo("Hello")
oBtn2:SetColor( 0, 255 )
oBtn2:cTooltip := { "Show" + CRLF + ;
"the selected area","Area", 1, CLR_BLACK, 14089979 }
@ 250, 450 BTNBMP oBtn3 OF oWnd PIXEL ;
SIZE 64, 64 BORDER ADJUST ;
FILE c_path1 + "area1.bmp" ;
ACTION MsgInfo("Hello")
oBtn3:lTransparent := .T.
oBtn3:cTooltip := { "Show" + CRLF + ;
"the selected area","Area", 1, CLR_BLACK, 14089979 }
Best Regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
|
testMap
|
Uwe,
Look this please :
[img:5pm0zkv1]http://img849.imageshack.us/img849/770/azzn.jpg[/img:5pm0zkv1]
the problem I have allready small application on 16 bit oldest fw+clipper with a database
on this database there are fields with posx and posy for to draw with the function floodfill a zone of a map made witha Bitmap ( Italy)
the problem now is when I recompile this small Appp not run correctly and when I select a Region on database it must draw the zone
sample Sicily -> flood fill the sicily on the map
The coordinates cannot be wrong because on fw16 clipper app run ok
It not draw correctly
_ or thereis an error if the floodfill is changed
_or thereis an error when I use source code to make the dialog and controls ( on original app I used resources)
Now I try to found the coordinates on Bitmap
with this command :
oCartina:bLClicked = { | nRow, nCol, nFlags | NMSGBOX(nRow, nCol) }
But I have many problems to understand wich are the real coordinate of region to draw
because the command not return the coordinates or I make an error
|
testMap
|
[b:1ka1olh8][size=150:1ka1olh8]I found the problem is on Xbrowse Tree[/size:1ka1olh8][/b:1ka1olh8]
because I made two test
[b:1ka1olh8]First[/b:1ka1olh8] with NO TREE and on xbrowse and I can draw all regions of the Map as you can see here
[img:1ka1olh8]http://img824.imageshack.us/img824/6138/notree.jpg[/img:1ka1olh8]
[b:1ka1olh8]Second [/b:1ka1olh8] with Tree on Xbowse and it not draw any zone into map
[img:1ka1olh8]http://img545.imageshack.us/img545/8756/treebq.jpg[/img:1ka1olh8]
If YOU Why ?
|
testMap
|
Please see the solution here
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=25910&p=142190#p142190">viewtopic.php?f=3&t=25910&p=142190#p142190</a><!-- l -->
|
testads.prg
|
Hello,
With the following code I get an error.
[code=fw:343l0fht]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ads.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br />Request DBFCDX<br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> RddRegister<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ADS"</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> AdsSetServerType<span style="color: #000000;">(</span> ADS_LOCAL_SERVER <span style="color: #000000;">)</span><br /> RDDSetDefault<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ADT"</span> <span style="color: #000000;">)</span><br /><br /> XBROWSER <span style="color: #ff0000;">"FLDS.ADT"</span> FASTEDIT<br /> <br /> DbUseArea<span style="color: #000000;">(</span> .T., <span style="color: #ff0000;">"ADS"</span> , <span style="color: #ff0000;">"Customer"</span>, <span style="color: #ff0000;">"cust"</span> <span style="color: #000000;">)</span><br /> <br /> Browse<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> DbCloseArea<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:343l0fht]
[code=fw:343l0fht]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Application<br />===========<br /> Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\Pieter\sqlapp\testads.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;">2</span>,<span style="color: #000000;">772</span>,<span style="color: #000000;">480</span> bytes<br /> Compiler version: <span style="color: #000000;">xHarbour</span> <span style="color: #000000;">1.2</span><span style="color: #000000;">.3</span> Intl. <span style="color: #000000;">(</span>SimpLex<span style="color: #000000;">)</span> <span style="color: #000000;">(</span>Build <span style="color: #000000;">20150213</span><span style="color: #000000;">)</span><br /> FiveWin Version: <span style="color: #000000;">FWHX</span> <span style="color: #000000;">15.01</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;">3</span> secs <br /> Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">06</span>/<span style="color: #000000;">17</span>/<span style="color: #000000;">15</span>, <span style="color: #000000;">09</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">37</span><br /> Error description: <span style="color: #000000;">Error</span> ADSCDX/<span style="color: #000000;">6082</span> Open error: <span style="color: #000000;">Customer</span><br /><br />Stack Calls<br />===========<br /> Called <span style="color: #0000ff;">from</span>: => DBUSEAREA<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">testads</span>.prg => MAIN<span style="color: #000000;">(</span> <span style="color: #000000;">15</span> <span style="color: #000000;">)</span><br /><br />System<br />======<br /> CPU type: <span style="color: #000000;">Intel</span><span style="color: #000000;">(</span>R<span style="color: #000000;">)</span> Pentium<span style="color: #000000;">(</span>R<span style="color: #000000;">)</span> CPU N3540 @ <span style="color: #000000;">2</span>.16GHz <span style="color: #000000;">2166</span> Mhz<br /> Hardware memory: <span style="color: #000000;">3500</span> megs<br /><br /> Free System resources: <span style="color: #000000;">90</span> %<br /> GDI resources: <span style="color: #000000;">90</span> %<br /> User resources: <span style="color: #000000;">90</span> %<br /><br /> Windows total applications running: <span style="color: #000000;">4</span><br /> <span style="color: #000000;">1</span> , <br /> <span style="color: #000000;">2</span> , C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6<span style="color: #000000;">.0</span><span style="color: #000000;">.9600</span>.17810_none_a9edf0 <br /> <span style="color: #000000;">3</span> DDE <span style="color: #00C800;">Server</span> <span style="color: #0000ff;">Window</span>, C:\Windows\SYSTEM32\OLE32.DLL <br /> <span style="color: #000000;">4</span> Tussen taken schakelen, C:\Pieter\sqlapp\testads.exe <br /><br />Variables in use<br />================<br /> Procedure Type Value<br /> ==========================<br /> DBUSEAREA<br /> Param <span style="color: #000000;">1</span>: L .T.<br /> Param <span style="color: #000000;">2</span>: C <span style="color: #ff0000;">"ADS"</span><br /> Param <span style="color: #000000;">3</span>: C <span style="color: #ff0000;">"Customer"</span><br /> Param <span style="color: #000000;">4</span>: C <span style="color: #ff0000;">"cust"</span><br /> <span style="color: #00C800;">Local</span> <span style="color: #000000;">1</span>: U <br /> <span style="color: #00C800;">Local</span> <span style="color: #000000;">2</span>: U <br /> MAIN<br /><br />Linked RDDs<br />===========<br /> ADS<br /> ADT<br /> ADSCDX<br /> ADSNTX<br /> DBF<br /> DBFFPT<br /> DBFBLOB<br /> DBFCDX<br /> DBFNTX<br /><br />DataBases in use<br />================<br /><br />Classes in use:<br />===============<br /> <span style="color: #000000;">1</span> ERROR<br /> <span style="color: #000000;">2</span> HASHENTRY<br /> <span style="color: #000000;">3</span> HBCLASS<br /> <span style="color: #000000;">4</span> HBOBJECT<br /> <span style="color: #000000;">5</span> TFONT<br /> <span style="color: #000000;">6</span> TWINDOW<br /> <span style="color: #000000;">7</span> TDIALOG<br /> <span style="color: #000000;">8</span> TBRUSH<br /> <span style="color: #000000;">9</span> TCONTROL<br /> <span style="color: #000000;">10</span> TXBROWSE<br /> <span style="color: #000000;">11</span> TXBRWCOLUMN<br /> <span style="color: #000000;">12</span> TBTNBMP<br /> <span style="color: #000000;">13</span> TSCROLLBAR<br /> <span style="color: #000000;">14</span> TRECT<br /> <span style="color: #000000;">15</span> TREG32<br /><br />Memory Analysis<br />===============<br /> <span style="color: #000000;">229</span> <span style="color: #00C800;">Static</span> variables<br /><br /> Dynamic memory consume:<br /> Actual Value: <span style="color: #000000;">0</span> bytes<br /> Highest Value: <span style="color: #000000;">0</span> bytes<br /></div>[/code:343l0fht]
I have installed Advantage database server.
Does somebody know what the problem is?
Pieter
|
testads.prg
|
It should be RDDSetDefault( "ADS" )
"ADT" is AdsSetFileType( ADS_ADT )
[code=fw:2yopwqm1]<div class="fw" id="{CB}" style="font-family: monospace;">RDDSetDefault<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ADT"</span> <span style="color: #000000;">)</span></div>[/code:2yopwqm1]
Why don't you continue try ADO or ADORDD? I'm trying to move to SQL as your post.
|
testads.prg
|
Hi Dutch, thank you.
I compiled and run testads.prg in C:\Pieter\fwh\samples and it worked. Somehow in Pieter\sqlapp it does not work.
The application which we want to migrate to sql, still uses ads, therefor I want to understand ADS as well.
Pieter
|
testads.prg
|
Dear Peter,
You need some file for local server connection. These files must be in c:\windows\system32 or Application Folder.
adsloc32.dll
adslocal.cfg
ansi.chr
axcws32.dll
|
testads.prg
|
Hey, it works now also in the other directory. (I copied the files adsloc32.dll and and ace32.dll from fwh\samples to my application directory sqlapp. Thanks for you help:D
|
testads.prg
|
Hi Pieter,
My pleasure, I recommend you to try ADORDD (Contribute by Antonio F.).
|
testads.prg
|
Hi Dutch
Yes!, I am very interested in this ADORDD from Antonio F. It could be a solution for my companies xharbour application to migrate to sql. So first I will try an example, to get an understanding of this ADORDD <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Pieter
|
testads.prg
|
Hello everyone!
Maybe someone here can help me understand a bit more about ADORDD. As I read some of the documentation it seems to me like the tables must reside on a shared directory. For example; f:\Data\Customers.dbf (or whatever other name) and have a mapping to drive f: with read/write permissions.
If this is so, then what helps you avoid a user who is working late and after exiting your app double clicks on my computer and sees a drive F: and by curiosity double clicks on the folder Data. There he/she sees "customers.dbf" and decides to drag the file to the trashcan --only to see what happens? Or maybe drag it to a USB key and takes it outside the facility? If you have any large number of users, what guarantees this is not happening?
This would not be possible with a real client-server -- I mean a two tier system as any typical sql engine such as ADS.
So my question really is: --Is it possible to use ADORDD with msSQL or MySQL and **not** have the database stored on a share? I mean, store it somewhere where no-one has read/write access and is not a public site.
Thank you,
Reinaldo.
|
testads.prg
|
Reinaldo,
Surely Antonio Ferreira can provide us a good advise regarding this
|
testads.prg
|
Reinaldo,
You must read the readme.pdf file at github.
1) All the working tables (database) reside always in the sql server of your choice
2) If you choose to have true locks and exclusive/shared use then you must have a share where ADORDD keeps:
a) tLocks.dbf - Lock control. You must indicate in the corresponding SET the rdd to use.
It must be a rdd that supports true locks as DBFCDX, ADS or any other.
This file only has field CODLOCK with a string tablename+recordnr and its use to control the lock.
When you request a lock ADORDD seeks the tablename+record you are using in SQL and if it finds it tries to lock it if not append a new one locking it.
Since the locking its done by the rdd if station goes down the lock will be released.
You can even delete the file exiting your app to avoid that gets too big with records that you will not use again soon.
b) tablename.ctrl . to check use exclusive / shared control for each table Its only a empty file that wll be opened in exclusive or shared mode and works like a semaphore.
These files are automatically created by ADORDD when needed.
If a user deletes then ADORDD will create them again every time you request a lock.
Of course in the meantime any locks requests will return .F.
Also the user will not be able to delete the file as long as the application is running.
After it doesnt matter.
So you dont have to worry about this.
On the other hand if you choose not to have true locks and trust that ADO and the server to do the job you wont need any of this. Simply SET ADO FORCE LOCKS OFF.
Resuming: You database can be wherever you want and only if you need true locks (like we) you must have that share.
If you are working on WAN you will need probably a VPN to access that share.
|
testbrw.rc
|
Hola, Perdon pero soy nuevo en esto, trato de abrir desde el workshop el testbrw.rc pero me marca un error id 742, cannot open files:windows.h, como lo puedo abrir
Gracias
Elias oros
|
testbrw.rc
|
El RC esta hecho con el editor de recursos de Pelles "C", puedes abirlo con ese editor de recursos.
Si lo quieres abrir con Workshop, abre .RC con un editor de texto y quita los archivos #include, guarda el RC y listo, se puede abrir sin problema desde workshop.
No lo he probado pero supongo que tendras que quitar tambien la linea que dice LANGUAGE......
|
testbrw.rc
|
Gracia Rene, de hecho lo hice como me indicas pero no me toma el recurso.
Gracias.
|
testbrw.rc
|
Agrega la ruta a donde estan los archivos de cabecera, en este caso los de VCE:
#include "c:\vce\include\arm\windows.h"
#include "c:\vce\include\arm\commctrl.h"
|
testbrw.rc
|
ya lo anexe pero no me da el browse
Perdon no tendras un ejemplor de listbox o algo similar
gracias.
Elias Oros.
|
testbrw.rc
|
Enviado a tu privado.
|
testcalr.prg
|
I am wanting to experiment with testcalr.prg, so I copy and rename it prgcalr.prg.
It compiles and links fine( just like testcalr.prg ), but when trying to run it , these errors appear.
Maybe obvious, but not to me.
Thanks,
Bruce S.
Application
===========
Path and name: C:\fwh\samples\PRGCALR.exe (32 bits)
Size: 1,764,352 bytes
Compiler version: Harbour 3.1.0dev (Rev. 17222)
FiveWin Version: FWH 12.06
Windows version: 5.1, Build 2600 Service Pack 3
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 30/07/12, 22:51:25
Error description: Error FiveWin/3 Cannot create Dialog Box:
Resource: CALENDAR
Stack Calls
===========
Called from: .\source\classes\DIALOG.PRG => CREATEDLGERROR( 538 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 273 )
Called from: PRGCALR.prg => MAIN( 128 )
System
======
CPU type: AMD Athlon(tm) 64 Processor 3000+ 1800 Mhz
Hardware memory: 1024 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 15
1 , C:\Program Files\Common Files\Real\Update_OB\realsched.exe
2 , C:\Program Files\Internet Explorer\iexplore.exe
3 , C:\Program Files\Messenger\msmsgs.exe
4 , C:\Program Files\TeamViewer\Version7\TeamViewer.exe
5 , C:\WINDOWS\Explorer.EXE
6 AcrobatTrayIcon, C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrotray.exe
7 AvgTrayMainWnd, C:\Program Files\AVG\AVG2012\avgtray.exe
8 Command Prompt - BUILDH PRGCALR, C:\WINDOWS\system32\cmd.exe
9 N.O.I ver 1.31a, C:\Sat\NOI.exe
10 NVSVCPMMWindowClass, C:\WINDOWS\system32\nvsvc32.exe
11 Netsession Hidden Window, C:\Documents and Settings\Bruce\Local Settings\Application Data\Akamai\netsession_win.exe
12 QTPlayer Tray Icon, C:\Program Files\QuickTime\qttask.exe
13 TF_FloatingLangBar_WndTitle, C:\WINDOWS\system32\ctfmon.exe
14 WinAMRestoreWnd, C:\Program Files\iTunes\iTunesHelper.exe
15 {NetworkMagicUserContext9D8F61C7-BFA2-459b-9243-426A1D514B03}, C:\Program Files\Common Files\Pure Networks Shared\Platform\nmctxth.exe
Variables in use
================
Procedure Type Value
==========================
CREATEDLGERROR
Param 1: O Class: ERROR
TDIALOG:ACTIVATE
Param 1: O Class: TDIALOG
Local 1: C "CALENDAR"
Local 2: C " "
MAIN
Param 1: U
Param 2: U
Param 3: U
Param 4: L .F.
Param 5: U
Param 6: L .T.
Param 7: B {|| ... }
Param 8: U
Param 9: U
Param 10: L .F.
Param 11: L .F.
Local 1: N 0
Linked RDDs
===========
DBF
DBFFPT
DBFBLOB
DBFNTX
DataBases in use
================
Classes in use:
===============
1 ERROR
2 HBCLASS
3 HBOBJECT
4 TWINDOW
5 TDIALOG
6 TBRUSH
7 TCONTROL
8 TCALENDAR
9 TREG32
10 TSTRUCT
11 TBUTTON
12 TDATEPICK
13 TCOMBOBOX
14 TGET
15 GET
16 TCLIPGET
17 TSAY
18 TCHECKBOX
19 TSCROLLBAR
Memory Analysis
===============
206 Static variables
Dynamic memory consume:
Actual Value: 0 bytes
Highest Value: 0 bytes
|
testcalr.prg
|
You should also rename testcalr.rc to prgcalr.rc
|
testcalr.prg
|
The problem is because you have not copied/renamed the .rc file
Please make a copy of testcalr.rc and name it as your new prg name ie prgcalr.rc
Definitely it will work. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Regards
[b:gekxeo3y]Anser[/b:gekxeo3y]
|
testcalr.prg
|
Renaming the .rc file works fine
Thanks,
Bruce S.
|
testpop.prg
|
I'm trying testpop.prg but I get no error message (connection succesful) and no received messages. What am I missing?EMG
|
testpop.prg
|
Are you really referring to TestPop.Prg ? This program in samples folder is only for "Testing Popup Menus in FiveWin" and does not connect to anything. TestPop.Prg demonstrates the popupmenu as intended. Are you referring to some other program or am I missing something ?
|
testpop.prg
|
Sorry, it was testpop3.prgEMG
|
testpop.prg
|
Enrico,Maybe these old messages will help.Regards,JamesFalconi Silvio escribió en mensaje <3ae462d1@servidor3a.dimasoft.es>...>I COMPILED AND LINKED TESTPOP3.PRG>> I insert this line :>> oInMail = TPop3():New( "mail server",, "myuser", "mypass" ) // mail server IP>>>1. Mail server can I use also the name of my provider example> <!-- w --><a class="postlink" href="http://www.supereva.it">www.supereva.it</a><!-- w --> )> My mail server is webmail.supereva.it>2 my user My code user>3. MY pass My pass of my post email>> I proved this program but the program not run :>the program not create error but I not saw any messages>How can I do to see the messages .....and put it on a databases ?>Have you an example ?-----------------------------------From: "Mariano Triñanes" <mariano@sistemahalley.com.ar>Subject: Re: TPOP3 CLASSDate: Monday, April 23, 2001 1:02 PMHi,As you told, you passed <!-- w --><a class="postlink" href="http://www.supereva.it">www.supereva.it</a><!-- w --> as a parameter, you must resolve it to ip address first, using Gethostbyname function. By the way, are you sure <!-- w --><a class="postlink" href="http://www.supereva.it">www.supereva.it</a><!-- w --> host is offering pop services and not webmail? How do you resolve it? easy[code:2hfmkres]if WsaStartup() == 0
cIp := gethostbyname("yourhost.com")
WsaCleanUp()
endif[/code:2hfmkres]and cIP variable, is the one you must use...The username and password of course, are the ones that you use, in string format.Cheersmariano
|
testpop.prg
|
Thank you, James, but I already use the IP address of my POP3 server.EMG
|
testpop3
|
hi to all
I'm trying testpop3 but it does not work...
[code=fw:32ojou5a]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> GetMail<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oInMail, cIP<br /> <br /> cIP := GetHostByName<span style="color: #000000;">(</span> <span style="color: #ff0000;">"pop3.aruba.it"</span><span style="color: #000000;">)</span><br /> <br /> oWnd:<span style="color: #000000;">SetMsg</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Geting Internet email..."</span> <span style="color: #000000;">)</span><br /> <br /> oInMail = TPop3<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> cIP, <span style="color: #000000;">110</span> , <span style="color: #ff0000;">"myemail@mydomain.it"</span>, <span style="color: #ff0000;">"mypsw"</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// mail server IP</span><br /> <br /> oInMail:<span style="color: #000000;">bConnecting</span> = <span style="color: #000000;">{</span> || oWnd:<span style="color: #000000;">SetMsg</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Connecting to xxx.xxx.xxx.xxx"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <br /> oInMail:<span style="color: #000000;">bConnected</span> = <span style="color: #000000;">{</span> || oWnd:<span style="color: #000000;">SetMsg</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Connected"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <br /> oInMail:<span style="color: #000000;">bDone</span> = <span style="color: #000000;">{</span> || ReadEmails<span style="color: #000000;">(</span> oInMail <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> oInMail:<span style="color: #000000;">GetMail</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> ReadEmails<span style="color: #000000;">(</span> oInMail <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> n<br /><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Total emails: "</span> + Str<span style="color: #000000;">(</span> Len<span style="color: #000000;">(</span> oInMail:<span style="color: #000000;">aMsgs</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span> oInMail:<span style="color: #000000;">aMsgs</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> oInMail:<span style="color: #000000;">aMsgs</span><span style="color: #000000;">[</span> n <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span></div>[/code:32ojou5a]
in MailErr.log I get: 10-11-2017 10:45:01: 3 -ERR [AUTH] Authentication failed.
<!-- e --><a href="mailto:myemail@mydomain.it">myemail@mydomain.it</a><!-- e --> and mypsw works when I logged in webmail
any help?
|
testpop3
|
I'm using this function:
[code=fw:6fbpxrsr]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> GETMAIL<span style="color: #000000;">(</span> cServer, cUser, cPassword <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> lOk := .F.<br /><br /> <span style="color: #00C800;">LOCAL</span> oCli<br /><br /> <span style="color: #00C800;">LOCAL</span> aMail, aPar, cMsg, oAtt<br /><br /> <span style="color: #00C800;">LOCAL</span> i<br /><br /> <span style="color: #00C800;">TRY</span><br /> oCli = TIPClientPOP<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"pop://"</span> + STRTRAN<span style="color: #000000;">(</span> cUser, <span style="color: #ff0000;">"@"</span>, <span style="color: #ff0000;">"&at;"</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">":"</span> + cPassword + <span style="color: #ff0000;">"@"</span> + cServer <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">(</span> oCli <span style="color: #000000;">)</span>; <span style="color: #00C800;">BREAK</span>; <span style="color: #00C800;">ENDIF</span><br /><br /> oCli:<span style="color: #000000;">oUrl</span>:<span style="color: #000000;">cUserid</span> = cUser<br /><br /> <span style="color: #00C800;">IF</span> !oCli:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>; <span style="color: #00C800;">BREAK</span>; <span style="color: #00C800;">ENDIF</span><br /><br /> aMail = oCli:<span style="color: #000000;">RetrieveAll</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">FOR</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">(</span> aMail <span style="color: #000000;">)</span> - <span style="color: #000000;">1</span><br /> aPar = aMail<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span>:<span style="color: #000000;">GetMultiParts</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">(</span> aPar <span style="color: #000000;">)</span> = <span style="color: #000000;">0</span><br /> cMsg = <span style="color: #ff0000;">"Data: "</span> + aMail<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span>:<span style="color: #000000;">GetFieldPart</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Date"</span> <span style="color: #000000;">)</span> + CRLF +;<br /> <span style="color: #ff0000;">"Oggetto: "</span> + aMail<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span>:<span style="color: #000000;">GetFieldPart</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Subject"</span> <span style="color: #000000;">)</span> + CRLF +;<br /> <span style="color: #ff0000;">"Mittente: "</span> + aMail<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span>:<span style="color: #000000;">GetFieldPart</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"From"</span> <span style="color: #000000;">)</span> + CRLF + CRLF +;<br /> <span style="color: #ff0000;">"Messaggio: "</span> + CRLF + CRLF + aMail<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span>:<span style="color: #000000;">GetBody</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> cMsg = <span style="color: #ff0000;">"Data: "</span> + aMail<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span>:<span style="color: #000000;">GetFieldPart</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Date"</span> <span style="color: #000000;">)</span> + CRLF +;<br /> <span style="color: #ff0000;">"Oggetto: "</span> + aMail<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span>:<span style="color: #000000;">GetFieldPart</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Subject"</span> <span style="color: #000000;">)</span> + CRLF +;<br /> <span style="color: #ff0000;">"Mittente: "</span> + aMail<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span>:<span style="color: #000000;">GetFieldPart</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"From"</span> <span style="color: #000000;">)</span> + CRLF + CRLF +;<br /> <span style="color: #ff0000;">"Messaggio: "</span> + CRLF + CRLF + BODY<span style="color: #000000;">(</span> aPar <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">WHILE</span> <span style="color: #000000;">(</span> oAtt := aMail<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span>:<span style="color: #000000;">NextAttachment</span><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;">IF</span> !EMPTY<span style="color: #000000;">(</span> oAtt:<span style="color: #000000;">GetFileName</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> cMsg += CRLF + <span style="color: #ff0000;">"Allegato: "</span> + oAtt:<span style="color: #000000;">GetFileName</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #B900B9;">// IF !oAtt:DetachFile(); BREAK; ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDDO</span><br /><br /> ? cMsg<br /> <span style="color: #00C800;">NEXT</span><br /><br /> lOk = .T.<br /> CATCH<br /> END<br /><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> oCli <span style="color: #000000;">)</span>; oCli:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>; <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">RETURN</span> lOk<br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> BODY<span style="color: #000000;">(</span> aPar <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> cMsg := <span style="color: #ff0000;">""</span><br /><br /> <span style="color: #00C800;">LOCAL</span> i<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> aPar <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">(</span> aPar<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span>:<span style="color: #000000;">GetFieldPart</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Content-Disposition"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> cMsg += aPar<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span>:<span style="color: #000000;">GetBody</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">NEXT</span><br /><br /> <span style="color: #00C800;">RETURN</span> ALLTRIM<span style="color: #000000;">(</span> cMsg <span style="color: #000000;">)</span></div>[/code:6fbpxrsr]
EMG
|
testpop3
|
thank you Enrico
I trying TIPClientPOP() with this code:
[code=fw:yypxz2sr]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> GETMAIL<span style="color: #000000;">(</span> <span style="color: #ff0000;">"pop3.mydomain.it"</span>, <span style="color: #ff0000;">"user@mydomainit"</span>, <span style="color: #ff0000;">"myPassword"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> lOk := .F.<br /><br /> <span style="color: #00C800;">LOCAL</span> oCli<br /><br /> <span style="color: #00C800;">LOCAL</span> aMail, aPar, cMsg, oAtt<br /><br /> <span style="color: #00C800;">LOCAL</span> i<br /> <br /> oCli = TIPClientPOP<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"pop://"</span> + STRTRAN<span style="color: #000000;">(</span> cUser, <span style="color: #ff0000;">"@"</span>, <span style="color: #ff0000;">"&at;"</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">":"</span> + cPassword + <span style="color: #ff0000;">"@"</span> + cServer <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"STEP1"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">(</span> oCli <span style="color: #000000;">)</span>; <span style="color: #00C800;">BREAK</span>; <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"STEP2"</span><span style="color: #000000;">)</span><br /> oCli:<span style="color: #000000;">oUrl</span>:<span style="color: #000000;">cUserid</span> = STRTRAN<span style="color: #000000;">(</span> cUser, <span style="color: #ff0000;">"@"</span>, <span style="color: #ff0000;">"&at;"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> !oCli:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>; <span style="color: #00C800;">BREAK</span>; <span style="color: #00C800;">ENDIF</span><br /> <br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"STEP3"</span><span style="color: #000000;">)</span><br /> <br /> aMail = oCli:<span style="color: #000000;">RetrieveAll</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span></div>[/code:yypxz2sr]
but never show MSGINFO("STEP3")
why?
thank you
|
testpop3
|
Can you send me the exact sample are you trying to get to work so I can test it here?
EMG
|
testpop3
|
I call GetMailZ from my menu GetMail(oWnd)
here you are:
[code=fw]
// Testing FiveWin new Internet incoming mail (POP3 protocol) Class
#include "FiveWin.ch"
STATIC FUNCTION GETMAIL( "pop3.dominio.it", "info@dominio.it", "password" )
LOCAL lOk := .F.
LOCAL oCli
LOCAL aMail, aPar, cMsg, oAtt
LOCAL i
TRY
oCli = TIPClientPOP():New( "pop://" + STRTRAN( cUser, "@", "&at;" ) + ":" + cPassword + "@" + cServer )
msginfo("STE1")
IF EMPTY( oCli ); BREAK; ENDIF
msginfo("STEP2")
oCli:oUrl:cUserid = STRTRAN( cUser, "@", "&at;" )
IF !oCli:Open(); BREAK; ENDIF
msginfo("STEP3")
aMail = oCli:RetrieveAll()
FOR i = 1 TO LEN( aMail ) - 1
aPar = aMail[ i ]:GetMultiParts()
IF LEN( aPar ) = 0
cMsg = "Data: " + aMail[ i ]:GetFieldPart( "Date" ) + CRLF +;
"Oggetto: " + aMail[ i ]:GetFieldPart( "Subject" ) + CRLF +;
"Mittente: " + aMail[ i ]:GetFieldPart( "From" ) + CRLF + CRLF +;
"Messaggio: " + CRLF + CRLF + aMail[ i ]:GetBody()
ELSE
cMsg = "Data: " + aMail[ i ]:GetFieldPart( "Date" ) + CRLF +;
"Oggetto: " + aMail[ i ]:GetFieldPart( "Subject" ) + CRLF +;
"Mittente: " + aMail[ i ]:GetFieldPart( "From" ) + CRLF + CRLF +;
"Messaggio: " + CRLF + CRLF + BODY( aPar )
ENDIF
WHILE ( oAtt := aMail[ i ]:NextAttachment() ) != NIL
IF !EMPTY( oAtt:GetFileName() )
cMsg += CRLF + "Allegato: " + oAtt:GetFileName()
// IF !oAtt:DetachFile(); BREAK; ENDIF
ENDIF
ENDDO
msginfo(cMsg)
NEXT
lOk = .T.
CATCH
END
IF !EMPTY( oCli ); oCli:Close(); ENDIF
RETURN lOk
STATIC FUNCTION BODY( aPar )
LOCAL cMsg := ""
LOCAL i
FOR i = 1 TO LEN( aPar )
IF EMPTY( aPar[ i ]:GetFieldPart( "Content-Disposition" ) )
cMsg += aPar[ i ]:GetBody()
ENDIF
NEXT
RETURN ALLTRIM( cMsg )
|
testpop3
|
Sorry, I can't help you without a full working sample of the problem. All I can say is that it is working fine if the correct parameters are provided.
EMG
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.