topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
raro funcionamiento de la tecla escape | Fernando,Cambia esta línea así:[code:241bngxq]
ACTIVATE DIALOG oDlg NoWait Valid ( oWnd:PostMsg( WM_CHAR, VK_ESCAPE ), .T. )
[/code:241bngxq] |
raro funcionamiento de la tecla escape | Antonio,Gracias por la respuesta. El cambio que me indicas funciona correctamente siempre y cuando el valid cierre el cuadro de dialogo.Con que se cambie el valid a .F. ya pasa dos veces por el msginfo[code:wdf67ilm]ACTIVATE DIALOG oDlg NoWait Valid ( oWnd:PostMsg( WM_CHAR, VK_ESCAPE ), .F. )[/code:wdf67ilm]
El objetivo que busco es que al pulsar "esc" valide si los get's están activos y si es así, los desactive y no cierre la ventana. Y si los get's estan desactivados cierre la ventana. Adjunto ejemplo
[code:wdf67ilm]#include 'Fivewin.ch'
#include "Splitter.ch"
Procedure Main()
local oWndMain, oMenu
Define Window oWndMain Title "Ventana principal" Mdi
Set Message To "" Keyboard Clock Date Of oWndMain 2007
MENU oMenu 2007
MENUITEM '&Child' MESSAGE 'Ventana child' Action ps_Child( oWndMain )
ENDMENU
oWndMain:SetMenu( oMenu )
Activate Window oWndMain MAXIMIZED;
Valid msgnoyes('¿Abandonar el programa?', 'Salir')
return
*---------------------------------------------------------------------
static Procedure ps_Child( oWndMain )
local oWnd, oBar, oBtn1, oBtn2
Define Window oWnd MdiChild Title 'Ventana child' of oWndMain
Set Message To "" Of oWnd 2007
Define ButtonBar oBar Size 50, 45 Of oWnd 2007
Define Button oBtn1 Of oBar Prompt 'Otro' TOP
Define Button oBtn2 Of oBar Prompt 'Edit' TOP
Activate Window oWnd On Init ps_Init(oWnd, oBar) Valid .F.
return
*---------------------------------------------------------------------
static procedure ps_Init( oWnd, oBar )
local oDlg, oGet, cVar, oOutLook, aRect, oSplit
local nWidth, nHeight
Define Dialog oDlg Of oWnd TRANSPARENT STYLE nOR( WS_CHILD, WS_VISIBLE )
@ 0, 0 Get oGet Var cVar Of oDlg Size 50, 12
Define OutLook2003 oOutLook Of oWnd PROMPTS "Accesos"
oWnd:oLeft := NIL
aRect := oOutLook:aDialogs[ 1 ]:GetCliRect()
@ 0, aRect:nRight SPLITTER oSplit ;
VERTICAL _3DLOOK ;
PREVIOUS CONTROLS oOutLook ;
HINDS CONTROLS oDlg ;
SIZE 4, oWnd:nHeight - 70 PIXEL ;
OF oWnd
ACTIVATE DIALOG oDlg NoWait Valid .F. ( oWnd:PostMsg( WM_CHAR, VK_ESCAPE ), .F. )
oWnd:bResized := {|| oSplit:AdjClient(), oOutlook:refresh(.t.) }
oDlg:Move( 0, oSplit:nRight,,, .F. )
nWidth := oDlg:nWidth
nWidth += oOutLook:nWidth
nWidth += oSplit:nWidth
nHeight := oDlg:nHeight
nHeight += oBar:nHeight
nHeight += oWnd:oMsgBar:nHeight
oWnd:SetSize(nWidth, nHeight, .F.)
oWnd:bResized := {|| oSplit:AdjClient(), oDlg:SetSize( oWnd:nWidth - oOutLook:nWidth - oSplit:nWidth - 8, oSplit:nHeight - 1, .t. ),;
oDlg:refresh(.t.), oOutlook:refresh(.t.) }
oWnd:bValid := {|| ps_Salir(oGet, oDlg)}
return
*---------------------------------------------------------------------
static function ps_Salir(oGet, oDlg)
if oGet:lActive
oGet:Disable()
return .F.
endif
msginfo('1')
oDlg:bValid := NIL
oDlg:End()
return .T.
[/code:wdf67ilm] |
raro funcionamiento de la tecla escape | Fernando,El problema es que una vez que el GET se deshabilita, la tecla ESC ya no va a ser procesada.El que ESC se procese dos veces puedes controlarlo con:SetDialogEsc( .F. )No te serviría un botón de la barra que al pulsarlo sea para salir ? como si se pulsase la X de cierre de la ventana |
raro funcionamiento de la tecla escape | Antonio,con SetDialogEsc(.F.) ya hace justo lo que quiero.Muchisimas gracias por tu ayuda.[quote:2yjj1zjg]No te serviría un botón de la barra que al pulsarlo sea para salir ? como si se pulsase la X de cierre de la ventana[/quote:2yjj1zjg]En las aplicaciones tengo definido un botón para realizar esa tarea. El problema es que cuando están en modo edición y se equivocan pulsan "Esc" y se les cierra la ventana lo que provoca cabreo hacia la aplicación.Con los cambios que me has indicado ya controlo lo que quería, muchisimas gracias, de nuevo.Adjunto ejemplo definitivo:Get por defecto desabilitadoAl pulsar en el botón "edit" se habilita y manda la instrucción SetDialogEsc(.F.)Si se pulsa la tecla "Esc" o el botón "Salir", comprueba si esta en edición. si no lo esta cierra la ventana y si lo está pregunta si se quiere cancelar la edición.[code:2yjj1zjg]#include 'Fivewin.ch'
#include "Splitter.ch"
Procedure Main()
local oWndMain, oMenu
Define Window oWndMain Title "Ventana principal" Mdi
Set Message To "" Keyboard Clock Date Of oWndMain 2007
MENU oMenu 2007
MENUITEM '&Child' MESSAGE 'Ventana child' Action ps_Child( oWndMain )
ENDMENU
oWndMain:SetMenu( oMenu )
Activate Window oWndMain MAXIMIZED;
Valid msgnoyes('¿Abandonar el programa?', 'Salir')
return
*---------------------------------------------------------------------
static Procedure ps_Child( oWndMain )
local oWnd, oBar, oBtn1, oBtn2
Define Window oWnd MdiChild Title 'Ventana child' of oWndMain
Set Message To "" Of oWnd 2007
Define ButtonBar oBar Size 50, 45 Of oWnd 2007
Define Button oBtn2 Of oBar Prompt 'Edit' TOP
Define Button oBtn1 Of oBar Prompt 'Salir' TOP Action oWnd:End()
Activate Window oWnd On Init ps_Init(oWnd, oBar, oBtn2) Valid .F.
return
*---------------------------------------------------------------------
static procedure ps_Init( oWnd, oBar, oBtn2 )
local oDlg, oGet, cVar, oOutLook, aRect, oSplit
local nWidth, nHeight
Define Dialog oDlg Of oWnd TRANSPARENT STYLE nOR( WS_CHILD, WS_VISIBLE )
@ 0, 0 Get oGet Var cVar Of oDlg Size 50, 12
oGet:Disable()
Define OutLook2003 oOutLook Of oWnd PROMPTS "Accesos"
oWnd:oLeft := NIL
aRect := oOutLook:aDialogs[ 1 ]:GetCliRect()
@ 0, aRect:nRight SPLITTER oSplit ;
VERTICAL _3DLOOK ;
PREVIOUS CONTROLS oOutLook ;
HINDS CONTROLS oDlg ;
SIZE 4, oWnd:nHeight - 70 PIXEL ;
OF oWnd
ACTIVATE DIALOG oDlg NoWait Valid ( oWnd:PostMsg( WM_CHAR, VK_ESCAPE ), .F. )
oWnd:bResized := {|| oSplit:AdjClient(), oOutlook:refresh(.t.) }
oDlg:Move( 0, oSplit:nRight,,, .F. )
nWidth := oDlg:nWidth
nWidth += oOutLook:nWidth
nWidth += oSplit:nWidth
nHeight := oDlg:nHeight
nHeight += oBar:nHeight
nHeight += oWnd:oMsgBar:nHeight
oWnd:SetSize(nWidth, nHeight, .F.)
oWnd:bResized := {|| oSplit:AdjClient(), oDlg:SetSize( oWnd:nWidth - oOutLook:nWidth - oSplit:nWidth - 8, oSplit:nHeight - 1, .t. ),;
oDlg:refresh(.t.), oOutlook:refresh(.t.) }
oWnd:bValid := {|| ps_Salir(oGet, oWnd, oDlg)}
oBtn2:bAction := {|| SetDialogEsc( .F. ), oGet:Enable(), oGet:SetFocus() }
return
*---------------------------------------------------------------------
static function ps_Salir(oGet, oWnd, oDlg)
if oGet:lActive
if MsgYesNo('¿Desea cancelar la modificación de los datos?', 'Cancelar la modificiación')
oGet:Disable()
oWnd:SetFocus()
oDlg:SetFocus()
SetDialogEsc( .T. )
else
oGet:SetFocus()
endif
return .F.
endif
msginfo('1')
oDlg:bValid := NIL
oDlg:End()
return .T.
[/code:2yjj1zjg] |
raro funcionamiento de la tecla escape | Fernando,Me alegro de que lo hayas conseguido <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
raro funcionamiento de la tecla escape | En el ejemplo definitivo con SetDialogEsc( .F. ) me había liado.Es mas sencillo todavía, lo único que debo hacer es incluir al comienzo del programa SetDialogEsc( .F. )Con eso puedo incluso llamar directamente a ownd:close desde el valid del cuadro de dialogo[code:3lv6b5hj]ACTIVATE DIALOG oDlg NoWait Valid oWnd:End()[/code:3lv6b5hj]
[code:3lv6b5hj]#include 'Fivewin.ch'
#include "Splitter.ch"
Procedure Main()
local oWndMain, oMenu
SetDialogEsc( .F. )
Define Window oWndMain Title "Ventana principal" Mdi
Set Message To "" Keyboard Clock Date Of oWndMain 2007
MENU oMenu 2007
MENUITEM '&Child' MESSAGE 'Ventana child' Action ps_Child( oWndMain )
ENDMENU
oWndMain:SetMenu( oMenu )
Activate Window oWndMain MAXIMIZED;
Valid msgnoyes('¿Abandonar el programa?', 'Salir')
return
*---------------------------------------------------------------------
static Procedure ps_Child( oWndMain )
local oWnd, oBar, oBtn1, oBtn2
Define Window oWnd MdiChild Title 'Ventana child' of oWndMain
Set Message To "" Of oWnd 2007
Define ButtonBar oBar Size 50, 45 Of oWnd 2007
Define Button oBtn2 Of oBar Prompt 'Edit' TOP
Define Button oBtn1 Of oBar Prompt 'Salir' TOP Action oWnd:End()
Activate Window oWnd On Init ps_Init(oWnd, oBar, oBtn2) Valid .F.
return
*---------------------------------------------------------------------
static procedure ps_Init( oWnd, oBar, oBtn2 )
local oDlg, oGet, cVar, oOutLook, aRect, oSplit
local nWidth, nHeight
Define Dialog oDlg Of oWnd TRANSPARENT STYLE nOR( WS_CHILD, WS_VISIBLE )
@ 0, 0 Get oGet Var cVar Of oDlg Size 50, 12
oGet:Disable()
Define OutLook2003 oOutLook Of oWnd PROMPTS "Accesos"
oWnd:oLeft := NIL
aRect := oOutLook:aDialogs[ 1 ]:GetCliRect()
@ 0, aRect:nRight SPLITTER oSplit ;
VERTICAL _3DLOOK ;
PREVIOUS CONTROLS oOutLook ;
HINDS CONTROLS oDlg ;
SIZE 4, oWnd:nHeight - 70 PIXEL ;
OF oWnd
ACTIVATE DIALOG oDlg NoWait Valid oWnd:End()
oWnd:bResized := {|| oSplit:AdjClient(), oOutlook:refresh(.t.) }
oDlg:Move( 0, oSplit:nRight,,, .F. )
nWidth := oDlg:nWidth
nWidth += oOutLook:nWidth
nWidth += oSplit:nWidth
nHeight := oDlg:nHeight
nHeight += oBar:nHeight
nHeight += oWnd:oMsgBar:nHeight
oWnd:SetSize(nWidth, nHeight, .F.)
oWnd:bResized := {|| oSplit:AdjClient(), oDlg:SetSize( oWnd:nWidth - oOutLook:nWidth - oSplit:nWidth - 8, oSplit:nHeight - 1, .t. ),;
oDlg:refresh(.t.), oOutlook:refresh(.t.) }
oWnd:bValid := {|| ps_Salir(oGet, oWnd, oDlg)}
oBtn2:bAction := {|| oGet:Enable(), oGet:SetFocus() }
return
*---------------------------------------------------------------------
static function ps_Salir(oGet, oWnd, oDlg)
if oGet:lActive
if MsgYesNo('¿Desea cancelar la modificación de los datos?', 'Cancelar la modificiación')
oGet:Disable()
oWnd:SetFocus()
oDlg:SetFocus()
else
oGet:SetFocus()
endif
return .F.
endif
msginfo('1')
return .T.
[/code:3lv6b5hj] |
rbbtn Pintado defectuoso... | Amigos:
Usando rbbtn desde recursos me pinta un rectángulo del color del boton aunque el boton tiene la clausula Round
Estoy usando estos botones en dialogos y ventanas en lugar de otros botones.
Ejemplo:
Esta definido como Owner Draw en el recurso...
REDEFINE RBBTN oBoton3 ID 150 OF oDlg ;
ACTION ( lSale:=.t. , oDlg:End()) ;
PROMPT "&Borrar" CENTER BORDER ROUND ROUNDSIZE 5
oBoton3:SetFont(oFont4 )
Con round roundsize 20 o 25 queda espectacular, lastima que se ve el recuadro del color del boton por fuera del borde del boton
Gracias y Saludos
Ruben Fernandez |
rbbtn Pintado defectuoso... | Hola
a modo consulta, el tipo de boton que usas en el recurso es [b:tltp16i7]CONTROL CUSTOM CLASS TRBTN[/b:tltp16i7] |
rbbtn Pintado defectuoso... | Si Patricio, uso ese tipo en el recurso.
El boton funciona perfecto, (bien con bitmaps, bien con 2 lineas, excelente), el unico inconveniente es que con roundsize 20 o 25 que queda muy bien
a la vista, el color de boton no respeta el borde y se muestra el rectangulo.
Gracias y saludos
Ruben Fernandez |
rbbtn Pintado defectuoso... | Estimados agregue una imagen para ver si alguien me da un idea de como solucionarlo.
Gracias
<!-- m --><a class="postlink" href="http://img695.imageshack.us/img695/4388/rbbtn.jpg">http://img695.imageshack.us/img695/4388/rbbtn.jpg</a><!-- m --> |
rbbtn en FVW10.6 sería posible usar SkinButtons() | Hola Antonio:
Seria posible que los rbtns usados solos (no en la ribbon), puedan aceptar la clausula SkinButtons()
Muchas gracias y saludos
Ruben Fernandez |
rbbtn en FVW10.6 sería posible usar SkinButtons() | Ruben
SkinButton() es una funcion que trabaja sobre los botones standar de api de window, la clase TRBtn es propia de fivewin y es totalmente parametrizable com todos sus colores
puedes revisar en el comando y verificar la forma de creacion: <!-- m --><a class="postlink" href="http://wiki.fivetechsoft.com/doku.php?id=fivewin_comandos_ribbonbar">http://wiki.fivetechsoft.com/doku.php?i ... _ribbonbar</a><!-- m -->
y las datas desde aqui: <!-- m --><a class="postlink" href="http://wiki.fivetechsoft.com/doku.php?id=fivewin_clase_trbtn">http://wiki.fivetechsoft.com/doku.php?i ... lase_trbtn</a><!-- m -->
o bien puedes mirar internamente la clase |
rbbtn en FVW10.6 sería posible usar SkinButtons() | Gracias Daniel:
No he podido hacerlo funcionar.. aqui el ejemplo
REDEFINE RBBTN oBoton2 ID 250 OF oDlg NORMAL ;
ACTION ( lRegistroSale:=.t., oDlg:End()) BITMAP "SALIR2" ;
PROMPT "&Cancelar" LEFT BORDER ROUND ;
GRADIANT { { 1/3, nRGB( 254, 154, 128 ), nRGB( 254, 154, 128 ) } , ;
{ 2/3, nRGB( 252, 85, 40 ), nRGB(181, 61, 29 ) } } ;
LINECOLORS RGB( 249, 194, 179 ), RGB( 181, 61, 29 )
oBoton2:SetFont(oFont3)
oBoton2:cToolTip := { " " + CRLF + "Cancelar y Salir", "No guardar" }
Alguna sugerencia? Gracias |
rbbtn question | I will change the backgroundcolor from a SAY-Button of this class. I can use bClrText for textcolor with no problems but the color of background i cannot change at runtime!? |
rbbtn question | I think Say button is painted always transparently |
rbbuton sacarle el MsgBeep() | Hola a todos:
Hay alguna manera de sacarle el sonido (un Msgbeep(),creo) a los rbbuton cuando
se usan las teclas aceleradoras, no sucede con el click del raton, a la clase trbutton ya le saque el MsgBeep que tiene
pero sigue haciendo el sonido con las teclas aceleradoras..
Gracias |
rbdesingner.prg | Patricio,
Aqui lo tienes <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
[url:3f4og187]http://code.google.com/p/fivewin-contributions/downloads/detail?name=rbdesign.exe&can=2&q=[/url:3f4og187] |
rbdesingner.prg | Estimados
en xharbour no se puede recuperar un prg con ribbon creado con rbdesigner
ya que las funciones HB_COMPILEFROMBUF() y HB_HRBRUN() no estan disponibles
alguien me puede enviar el ejemplo c:\fwh\samples\rbdesigner.EXE compilado en harbour 3.0 para poder cargar un ribbon ya creado
en xharbour se tiene que declarar estas funciones por eso no funciona
[code=fw:p2kh61my]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> HB_COMPILEFROMBUF<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> HB_HRBRUN<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:p2kh61my]
desde ya muchas gracias |
rbdesingner.prg | Gracias antonio
ahora funciona, solo un detalle lo que he podido ver hasta ahora
no respeta SET LAYOUT (RIGTH) al recuperar los pone a la izquierda
mmm...
Ahora si lo esta respetando srt layout right!! , seguro alguna cosa que hice mal..
todo bien ahora.. |
rbtn disable | On the ribbon I saw the method disable() or enable() of rbtn class not work correctly
any idea ? |
rbtn disable | Hello Silvio
Please post a container sample with the error
this sample working fine
[code=fw:2czq2lcd]<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;">"ribbon.ch"</span><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> oWnd<br /> <span style="color: #00C800;">local</span> oBtn1, oBtn2, oBtn3<br /> <br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Testing Ribbon Button"</span><br /> <br /> <br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> RBBTN oBtn1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Button 1"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">20</span> BORDER <span style="color: #0000ff;">ROUND</span> ;<br /> <span style="color: #0000ff;">ACTION</span> oBtn2:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">40</span>, <span style="color: #000000;">10</span> RBBTN oBtn2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Button 2"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">20</span> BORDER <span style="color: #0000ff;">ROUND</span>;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"button 2"</span> <span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">70</span>, <span style="color: #000000;">10</span> RBBTN oBtn3 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Button 3"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">20</span> BORDER <span style="color: #0000ff;">ROUND</span>;<br /> <span style="color: #0000ff;">ACTION</span> oBtn2:<span style="color: #000000;">Enable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">WHEN</span> ! oBtn2:<span style="color: #000000;">lActive</span><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2czq2lcd] |
rbtn disable | Daniel,
I have rbtn on RibonBar
sample
Local aMenuRibbon := { "Favoriti","Hardware","Software","Manuali","Prestiti","Magazzino","Utilità","Aiuto" }
::obar:=TRibbonBar():New(::oWndMain, aMenuRibbon,,,,135,25 )
....
ADD GROUP oGroup[1] RIBBON ::obar TO OPTION 2 PROMPT "Gestione Hardware" width 155
@ 9,5 ADD BUTTON oBtns[1] PROMPT "Anagrafica" BITMAP "RB_HARDWARE" GROUP oGroup[1] ;
ROUND SIZE 75,70 ;
ACTION Perform("GMI110()",oItem[ 1],oBtns[ 1])
FUNCTION Perform(cModulo,oItem,oBtnB)
LOCAL oDlg, cMod, cDes, bX, oSay
LOCAL oDMod, oDPer, aMod
LOCAL oDFac, oDCom, oFnt
DEFAULT oItem:=NIL
DEFAULT oBtnB:=NIL
IF !Empty(oItem)
oItem:Disable()
ENDIF
IF !Empty(oBtnB)
[b:2215zp6m] oBtnB:Disable()[/b:2215zp6m]
ENDIF
*oMOpc:=oItem
*oBBar:=oBtnB
oApp:oMOpc:=oItem
oApp:oBBar:=oBtnB
oDMod:=Apri_Dbf("Moduli")
cMod:=Upper(SubStr(cModulo,1,AT("(",cModulo)-1))
IF (oDMod)->(DbSeek(cMod)) .AND. (oDMod)->Status="*" .AND. ;
AScan({cMod+"()"},{|_1|TYPE(_1)=="U"})=0 //
CursorWait()
cDes:=(oDMod)->Descri
Chiudi_Dbf("Moduli",oDMod)
oDPer:=Apri_Dbf("Permessi")
IF ((oDPer)->(DbSeek(cUser+cMod)) .AND. (oDPer)->Permesso) ;
.OR. cUser=cMain
lABC:=IF((oDPer)->ABC="A",.T.,.F.)
Chiudi_Dbf("Permesso",oDPer)
IF cUser=cMain
lDemo:=IF(Empty(lDemo),.F.,lDemo)
lABC:=.T.
ENDIF
USE
Reg_Activ(cDes)
SysRefresh()
CursorWait()
bX:={|| &cModulo}
Eval(bX)
Memory(-1)
Sysrefresh()
CursorArrow()
ELSE
Tone(5000)
Tone(3000)
Chiudi_Dbf("Permesso",oDPer)
MsgAlert("Non hai il permesso per entrare in questo modulo.","Verifica!")
IF !Empty(oItem)
oItem:Enable()
ENDIF
IF !Empty(oBtnB)
[b:2215zp6m]oBtnB:Enable()[/b:2215zp6m]
ENDIF
ENDIF
ELSE
Tone(3000)
Chiudi_Dbf("Moduli",oDMod)
MsgInfo("Il modulo "+cMod+oemtoansi(", non Š disponibile!"),"Informazioni...")
IF !Empty(oItem)
oItem:Enable()
ENDIF
IF !Empty(oBtnB)
[b:2215zp6m] oBtnB:Enable()[/b:2215zp6m]
ENDIF
ENDIF
RETURN (NIL) |
rbtn disable | Hello Silvio
Could you provide a small and self contained example to reproduce it ? thanks |
rbtn disable | oK
i FOUND THE ERRROR
i MADE A same VARIABLE PUBLIC, DATA AND LOCAL .
Sorry.. |
rc to Prg | I saw many sample and test but none run ok
I need to converte my old rc into prg sources
with software I can try ? |
rc/res to source | Is there a tool to convert a resource dialog to hardcoded- dbase style?
Thanks in advance
Otto |
rc/res to source | \fwh\samples\rc2prg.prg |
rc/res to source | I use ResEdit in this case: open the DLL- Res- or RC-File with ResEdit and click on "Datei / Quelltext anzeigen / c/c++-Quelltext" (I use the german version of ResEdit). |
rc/res to source | but you can save the rc on @x,y ... ?
and how ?
I see only for a sample
// Generated by ResEdit 1.5.5
// Copyright (C) 2006-2010
// <!-- m --><a class="postlink" href="http://www.resedit.net">http://www.resedit.net</a><!-- m -->
HINSTANCE hInst = GetModuleHandle(0);
WNDCLASSEX wcex;
ZeroMemory(&wcex, sizeof wcex);
wcex.cbSize = sizeof wcex;
wcex.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
wcex.lpszMenuName = 0;
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = DefWindowProc;
wcex.hInstance = hInst;
wcex.hIcon = LoadIcon(0, (LPCTSTR)IDI_APPLICATION);
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.lpszClassName = WndClass00;
RegisterClassEx(&wcex);
HFONT hfont0 = CreateFont(-11, 0, 0, 0, 0, FALSE, FALSE, FALSE, 1, 0, 0, 0, 0, ("MS Sans Serif"));
HWND hwnd = CreateWindowEx(0, ("WndClass0"), ("Dialog"), WS_CAPTION | WS_VISIBLE | WS_GROUP | WS_POPUP | WS_SYSMENU, 0, 0, -29651874, 522, 0, 0, hInst, 0);
HWND hCtrl0_0 = CreateWindowEx(0, ("TxBrowse"), (""), 0x50010000, 15, 21, 545, 174, hwnd, (HMENU)700, hInst, 0);
SendMessage(hCtrl0_0, WM_SETFONT, (WPARAM)hfont0, FALSE);
HWND hCtrl0_1 = CreateWindowEx(0, WC_BUTTON, (""), WS_VISIBLE | WS_CHILD | WS_TABSTOP, 563, 114, 47, 81, hwnd, (HMENU)710, hInst, 0);
SendMessage(hCtrl0_1, WM_SETFONT, (WPARAM)hfont0, FALSE);
HWND hCtrl0_2 = CreateWindowEx(0, WC_BUTTON, (""), WS_VISIBLE | WS_CHILD | WS_TABSTOP, 611, 114, 47, 81, hwnd, (HMENU)715, hInst, 0);
SendMessage(hCtrl0_2, WM_SETFONT, (WPARAM)hfont0, FALSE);
HWND hCtrl0_3 = CreateWindowEx(0, WC_EDIT, 0, WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_BORDER | ES_AUTOHSCROLL | ES_PASSWORD | ES_WANTRETURN, 107, 223, 549, 39, hwnd, (HMENU)550, hInst, 0);
SendMessage(hCtrl0_3, WM_SETFONT, (WPARAM)hfont0, FALSE);
HWND hCtrl0_4 = CreateWindowEx(0, WC_BUTTON, ("Q"), WS_VISIBLE | WS_CHILD | WS_TABSTOP, 14, 270, 63, 55, hwnd, (HMENU)500, hInst, 0);
SendMessage(hCtrl0_4, WM_SETFONT, (WPARAM)hfont0, FALSE);
HWND hCtrl0_5 = CreateWindowEx(0, WC_BUTTON, ("W"), WS_VISIBLE | WS_CHILD | WS_TABSTOP, 78, 270, 63, 55, hwnd, (HMENU)501, hInst, 0);
SendMessage(hCtrl0_5, WM_SETFONT, (WPARAM)hfont0, FALSE); |
rc/res to source | And rc2prg not run ok because it not respect the right coordinates
On windows Seven we saw there is a leak memory and we tried to make all dialog on sources code for this problem and insert on rc only some bitmaps ans insert ona folder the other bitmaps.
the Exe is fast and not lose memory |
rc2dll32.bat calls for screen32.obj | Just started with FWH and happily got all tutor0x working. Need to convert 16 bit resources and using rc2Dll32 and it calls screen32.obj in borland. Doesn't exist. Can someone send me a copy. To: <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->Thanks muchHarvey |
rc2dll32.bat calls for screen32.obj | Harvey,RC2DLL32.bat uses screen32.c, which it is provided in FWH\DLL folder. |
rc2prg actualizado | Antonio y Daniel
El archivo de samples rc2prg ha sido actualizado. Es seguro que faltan, aún, algunos objetos que utilizamos en WS o en PellesC, sin embargo la mayoría se incluyeron. Descargarlo desde:
<!-- m --><a class="postlink" href="http://www.mediafire.com/file/h3r3ddo6y0va8w4/rc2prg.prg">http://www.mediafire.com/file/h3r3ddo6y ... rc2prg.prg</a><!-- m -->
Saludos
Armando |
rc2prg actualizado | Armando,
Muchas gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Lo incluimos para el próximo build de FWH con tu permiso, |
rc2prg actualizado | Se colabora con lo que se puede, Antonio.
[quote="Antonio Linares":1vd4e4cw]Armando,
Muchas gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Lo incluimos para el próximo build de FWH con tu permiso,[/quote:1vd4e4cw] |
rc2prg actualizado | Armando,
Y se agradece de corazón <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Esta unión que tenemos entre todos nosotros, compartiendo, aprendiendo de todos, es lo que nos hace tan fuertes |
rctoprg - Utilidad nueva | Buenas.
[url:2d8o4dk0]https://drive.google.com/folderview?id=0B7Y1b0fXI8iCTnJKQVBjUHgzVW8&usp=sharing[/url:2d8o4dk0]
Esa utilidad sirve para pasar de un .RC a PRG, por ahora solo los controles que mas utilizo,
quien quiera aportar bienvenido sea, son los fuentes los que publico.
gracias. |
rctoprg - Utilidad nueva | sorry I tried with Harbor and xharbour and make errors
[b:52i2846f]on harbour [/b:52i2846f]
[code=fw:52i2846f]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">Harbour</span>.Exe Source\rctoprg.prg /m /n0 /gc1 /es2 /a /iC:\Work\fwh\include /iC:\work\HARBOUR\Include /jI18n\Main.hil /iinclude;c:\work\fwh\include;C:\work\HARBOUR\include /oObj\rctoprg.c<br />Harbour <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">(</span>r1406271520<span style="color: #000000;">)</span><br />Copyright <span style="color: #000000;">(</span>c<span style="color: #000000;">)</span> <span style="color: #000000;">1999</span><span style="color: #000000;">-2014</span>, http:<span style="color: #B900B9;">//harbour-project.org/</span><br />Compiling <span style="color: #ff0000;">'Source<span style="color: #000000;">\r</span>ctoprg.prg'</span>...<br />Lines <span style="color: #000000;">4700</span>, Functions/Procedures <span style="color: #000000;">1</span><br />Generating C source output <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'Obj<span style="color: #000000;">\r</span>ctoprg.c'</span>... Done.<br /><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">Bcc32</span>.Exe -M -c -DHB_OS_WIN_32 -DHB_FM_STATISTICS_OFF -DHB_NO_DEFAULT_API_MACROS -DHB_NO_DEFAULT_STACK_MACROS -IC:\Work\fwh\include -IC:\work\bcc7\Include\windows\sdk\;C:\work\HARBOUR\Include -nObj Obj\rctoprg.c<br />Embarcadero C++ <span style="color: #000000;">7.00</span> <span style="color: #00C800;">for</span> Win32 Copyright <span style="color: #000000;">(</span>c<span style="color: #000000;">)</span> <span style="color: #000000;">1993</span><span style="color: #000000;">-2015</span> Embarcadero Technologies, Inc.<br />Obj\rctoprg.c:<br /><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">Harbour</span>.Exe Source\TRctoprg.prg /m /n0 /gc1 /es2 /a /iC:\Work\fwh\include /iC:\work\HARBOUR\Include /jI18n\Main.hil /iinclude;c:\work\fwh\include;C:\work\HARBOUR\include /oObj\TRctoprg.c<br />Harbour <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">(</span>r1406271520<span style="color: #000000;">)</span><br />Copyright <span style="color: #000000;">(</span>c<span style="color: #000000;">)</span> <span style="color: #000000;">1999</span><span style="color: #000000;">-2014</span>, http:<span style="color: #B900B9;">//harbour-project.org/</span><br />Compiling <span style="color: #ff0000;">'Source<span style="color: #000000;">\T</span>Rctoprg.prg'</span>...<br />Source\TRctoprg.prg<span style="color: #000000;">(</span><span style="color: #000000;">194</span><span style="color: #000000;">)</span> Error E0021 Incorrect number <span style="color: #0000ff;">of</span> arguments in <span style="color: #00C800;">AT</span> <br />Passed: <span style="color: #000000;">3</span>, expected: <span style="color: #000000;">2</span><br />Source\TRctoprg.prg<span style="color: #000000;">(</span><span style="color: #000000;">200</span><span style="color: #000000;">)</span> Error E0021 Incorrect number <span style="color: #0000ff;">of</span> arguments in <span style="color: #00C800;">AT</span> <br />Passed: <span style="color: #000000;">3</span>, expected: <span style="color: #000000;">2</span><br />Source\TRctoprg.prg<span style="color: #000000;">(</span><span style="color: #000000;">206</span><span style="color: #000000;">)</span> Error E0021 Incorrect number <span style="color: #0000ff;">of</span> arguments in <span style="color: #00C800;">AT</span> <br />Passed: <span style="color: #000000;">3</span>, expected: <span style="color: #000000;">2</span><br />Source\TRctoprg.prg<span style="color: #000000;">(</span><span style="color: #000000;">212</span><span style="color: #000000;">)</span> Error E0021 Incorrect number <span style="color: #0000ff;">of</span> arguments in <span style="color: #00C800;">AT</span> <br />Passed: <span style="color: #000000;">3</span>, expected: <span style="color: #000000;">2</span><br />Source\TRctoprg.prg<span style="color: #000000;">(</span><span style="color: #000000;">218</span><span style="color: #000000;">)</span> Error E0021 Incorrect number <span style="color: #0000ff;">of</span> arguments in <span style="color: #00C800;">AT</span> <br />Passed: <span style="color: #000000;">3</span>, expected: <span style="color: #000000;">2</span><br />Source\TRctoprg.prg<span style="color: #000000;">(</span><span style="color: #000000;">238</span><span style="color: #000000;">)</span> Error E0021 Incorrect number <span style="color: #0000ff;">of</span> arguments in <span style="color: #00C800;">AT</span> <br />Passed: <span style="color: #000000;">3</span>, expected: <span style="color: #000000;">2</span><br /><span style="color: #000000;">6</span> errors<br /><br />No code generated.<br /> </div>[/code:52i2846f]
[b:52i2846f]on xharbour [/b:52i2846f] it is compiled but then make this error
[code=fw:52i2846f]<div class="fw" id="{CB}" style="font-family: monospace;">Application<br />===========<br /> Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\Work\Errori\rctoprg\rctoprg.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;">3</span>,<span style="color: #000000;">675</span>,<span style="color: #000000;">648</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;">20150603</span><span style="color: #000000;">)</span><br /> FiveWin version: <span style="color: #000000;">FWHX</span> <span style="color: #000000;">17.02</span><br /> C compiler version: <span style="color: #000000;">Borland</span>/Embarcadero C++ <span style="color: #000000;">7.0</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.1</span>, Build <span style="color: #000000;">7600</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;">5</span> secs <br /> Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">06</span>/<span style="color: #000000;">04</span>/<span style="color: #000000;">17</span>, <span style="color: #000000;">10</span>:<span style="color: #000000;">44</span>:<span style="color: #000000;">51</span><br /> Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1110</span> Argument error: <span style="color: #0000ff;">SUBSTR</span><br /> Args:<br /> <span style="color: #000000;">[</span> <span style="color: #000000;">1</span><span style="color: #000000;">]</span> = U <br /> <span style="color: #000000;">[</span> <span style="color: #000000;">2</span><span style="color: #000000;">]</span> = N <span style="color: #000000;">1</span><br /> <span style="color: #000000;">[</span> <span style="color: #000000;">3</span><span style="color: #000000;">]</span> = N <span style="color: #000000;">-1</span><br /><br />Stack Calls<br />===========<br /> Called <span style="color: #0000ff;">from</span>: => <span style="color: #0000ff;">SUBSTR</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>: <span style="color: #000000;">Source</span>\TRctoprg.prg => TRCTOPRG:<span style="color: #000000;">DIALOGO</span><span style="color: #000000;">(</span> <span style="color: #000000;">144</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Source</span>\TRctoprg.prg => TRCTOPRG:<span style="color: #000000;">DESCARGARATXT</span><span style="color: #000000;">(</span> <span style="color: #000000;">183</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Source</span>\TRctoprg.prg => TRCTOPRG:<span style="color: #000000;">GENERARRC</span><span style="color: #000000;">(</span> <span style="color: #000000;">304</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Source</span>\TRctoprg.prg => <span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>TRCTOPRG:<span style="color: #000000;">PANTALLA</span><span style="color: #000000;">(</span> <span style="color: #000000;">348</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BUTTON</span>.PRG => TBUTTON:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">(</span> <span style="color: #000000;">179</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TBUTTON:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span> <span style="color: #000000;">1685</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;">3325</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: => SENDMESSAGE<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: #000000;">COMMAND</span><span style="color: #000000;">(</span> <span style="color: #000000;">416</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\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span> <span style="color: #000000;">914</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: => DIALOGBOX<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>: <span style="color: #000000;">Source</span>\TRctoprg.prg => TRCTOPRG:<span style="color: #000000;">PANTALLA</span><span style="color: #000000;">(</span> <span style="color: #000000;">350</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Source</span>\rctoprg.prg => MAIN<span style="color: #000000;">(</span> <span style="color: #000000;">22</span> <span style="color: #000000;">)</span></div>[/code:52i2846f] |
rctoprg - Utilidad nueva | Hoy lo veo, AT no se usa en harbour tengo entendido. Voy a modificar el archivo fuente.
gracias. |
rctoprg - Utilidad nueva | AT es una function que es usada en Harbour
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=34161#p202408">viewtopic.php?f=3&t=34161#p202408</a><!-- l --> |
rctoprg - Utilidad nueva | por favor, enviame el archivo que estas utilizando que te produce el error. gracias.
gusmavf arroba gmail punto com |
rdd filter | I can not find that filter DBSETFILTER(&bFilter,cFilter) is applied to the database . Please can somebody explain why ?
[code:b439gmd0]
STATIC FUNCTION listmete( oWnd )
*--------------------------
local oDlg, oCol
local oBrw
local nfor,x,cFilter:="",bFilter:=""
local V_me_mc_serl:= space(7)
REQUEST ADS
rddRegister( "ADS", 1 )
rddsetdefault( "ADS" )
AdsSetDeleted(.T.)
SET SERVER LOCAL
SET FILETYPE TO CDX
select 1
USE cust
INDEX ON upper(cust->cu_acct) TO cust
INDEX ON upper(cust->cu_name) TO cust1
INDEX ON upper(cust->cu_coun) TO cust2
INDEX ON upper(cust->cu_city) TO cust3
INDEX ON upper(cust->cu_gove) TO cust4
INDEX ON upper(cust->cu_stre) TO cust5
INDEX ON upper(cust->cu_phon) TO cust6
INDEX ON upper(cust->cu_fax ) TO cust7
INDEX ON upper(cust->cu_mobi) TO cust8
INDEX ON upper(cust->cu_man ) TO cust9
INDEX ON upper(cust->cu_appr) TO cust10
set INDEX TO cust
select 2
USE cont
INDEX ON cont->CT_CU_ACCT+dtoc(cont->ct_strd) TO cont
INDEX ON cont->CT_CU_acct TO cont1
INDEX ON cont->ct_strd TO cont2
INDEX ON cont->ct_endd TO cont3
INDEX ON cont->CT_machno TO cont4
INDEX ON cont->CT_mamc TO cont5
INDEX ON cont->ct_paymet TO cont6
INDEX ON cont->ct_payamt TO cont7
INDEX ON cont->ct_currenc TO cont8
INDEX ON cont->ct_excmet TO cont9
INDEX ON cont->ct_excamt TO cont10
INDEX ON cont->ct_minvol TO cont11
INDEX ON cont->ct_ctna TO cont12
SET INDEX TO cont1
select 3
use mach
index on mach->MC_CU_ACCT to mach
index on UPPER(mach->MC_CU_name) to mach1
index on UPPER(mach->MC_ct_ctna) to mach2
index on UPPER(mach->MC_model) to mach3
index on UPPER(mach->MC_TYPE)+UPPER(mach->MC_model) to mach4
index on (mach->MC_serial) to mach5
index on UPPER(mach->MC_meres) to mach6
index on UPPER(mach->MC_brn) to mach7
index on UPPER(mach->MC_gateway) to mach8
set index to mach5
go top
select 4
use mete
index on mete->ME_mc_serl to mete
index on str(mete->year) + str(mete->month) to mete1
index on mete->me_date to mete2
set index to mete
if MsgGet( "Serial Machine", "Enter Serial Machine", @V_me_mc_serl,;
"..\lupa.bmp" )
select 3
use mach
set index to mach5
MSGINFO(IndexKey())
if ! DbSeek( (V_me_mc_serl ))
MsgAlert( "I don't find that serial" )
endif
endif
? V_me_mc_serl
cFilter :="mete->me_mc_serl" + '=="' + (V_me_mc_serl) + '"'
? cFilter
bFilter = "{||"+cFilter+"}"
? bFilter
select 4
use mete
DBSETFILTER(&bFilter,cFilter)
mete->(DBGOTOP())
DEFINE DIALOG oDlg of oWnd FROM 0,0 TO 45,128 TITLE "Meter reads browse "
oBrw := TXBrowse():New( oDlg )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:nHeaderLines := 1
oBrw:nFooterLines := 1
oBrw:nDataLines := 1
oBrw:lFooter := .t.
oBrw:SetRDD()
oBrw:CreateFromCode()
oBrw:nTop = 0
oBrw:nLeft = 0
oBrw:nWidth = 1000
oBrw:nHeight =600
for nFor := 1 to Fcount()
if nFor=27
oBrw:aCols[ nFor ]:cHeader := FieldName( nFor )
oBrw:aCols[ nFor ]:cFooter := alltrim(STR(TOTALEM2(),12,0))
loop
endif
*oBrw:aCols[ nFor ]:cHeader := FieldName( nFor )
*oBrw:aCols[ nFor ]:cFooter := FieldName( nFor )
next
*oBrw:CreateFromCode()
*oBrw:UpStable() // Corrects same page stabilizing Bug
oBrw:Refresh(.t.) // Repaint the ListBox
ACTIVATE DIALOG oDlg ON INIT (oBrw:SetSize( 1000, 600 ),BuildButtons( oDlg ),oDlg:Refresh(.t.),oBrw:Refresh(.t.))
RETURN NIL
[/code:b439gmd0] |
rdd filter | Ehab:
Try with the traditional way
select 4
use mete
DBSETFILTER( {| | mete->me_mc_serl == V_me_mc_serl },;
"mete->me_mc_serl == V_me_mc_serl" ))
mete->(DBGOTOP())
Good luck, Armando |
rdd filter | a strange problem has occured . I did the syntax before . The reult of of program is a previous result of another machine serial not the serial entered . I do not have any other function withthe same name !!!!
[code:f9bac0z2]
STATIC FUNCTION listmete( oWnd )
*--------------------------
local oDlg, oCol
local oBrw
local nfor,cFilter:="",bFilter:="",x:=""
local V_me_mc_serl:= space(7)
REQUEST ADS
rddRegister( "ADS", 1 )
rddsetdefault( "ADS" )
AdsSetDeleted(.T.)
SET SERVER LOCAL
SET FILETYPE TO CDX
select 1
USE cust
INDEX ON upper(cust->cu_acct) TO cust
INDEX ON upper(cust->cu_name) TO cust1
INDEX ON upper(cust->cu_coun) TO cust2
INDEX ON upper(cust->cu_city) TO cust3
INDEX ON upper(cust->cu_gove) TO cust4
INDEX ON upper(cust->cu_stre) TO cust5
INDEX ON upper(cust->cu_phon) TO cust6
INDEX ON upper(cust->cu_fax ) TO cust7
INDEX ON upper(cust->cu_mobi) TO cust8
INDEX ON upper(cust->cu_man ) TO cust9
INDEX ON upper(cust->cu_appr) TO cust10
set INDEX TO cust
select 2
USE cont
INDEX ON cont->CT_CU_ACCT+dtoc(cont->ct_strd) TO cont
INDEX ON cont->CT_CU_acct TO cont1
INDEX ON cont->ct_strd TO cont2
INDEX ON cont->ct_endd TO cont3
INDEX ON cont->CT_machno TO cont4
INDEX ON cont->CT_mamc TO cont5
INDEX ON cont->ct_paymet TO cont6
INDEX ON cont->ct_payamt TO cont7
INDEX ON cont->ct_currenc TO cont8
INDEX ON cont->ct_excmet TO cont9
INDEX ON cont->ct_excamt TO cont10
INDEX ON cont->ct_minvol TO cont11
INDEX ON cont->ct_ctna TO cont12
SET INDEX TO cont1
select 3
use mach
index on mach->MC_CU_ACCT to mach
index on UPPER(mach->MC_CU_name) to mach1
index on UPPER(mach->MC_ct_ctna) to mach2
index on UPPER(mach->MC_model) to mach3
index on UPPER(mach->MC_TYPE)+UPPER(mach->MC_model) to mach4
index on (mach->MC_serial) to mach5
index on UPPER(mach->MC_meres) to mach6
index on UPPER(mach->MC_brn) to mach7
index on UPPER(mach->MC_gateway) to mach8
set index to mach5
go top
select 4
use mete
index on mete->ME_mc_serl to mete
index on str(mete->year) + str(mete->month) to mete1
index on mete->me_date to mete2
set index to mete
if MsgGet( "Serial Machine", "Enter Serial Machine", @V_me_mc_serl,;
"..\lupa.bmp" )
select 3
use mach
set index to mach5
MSGINFO(IndexKey())
if ! DbSeek( (V_me_mc_serl ))
MsgAlert( "I don't find that serial" )
endif
endif
? V_me_mc_serl
cFilter :="mete->me_mc_serl" + '=="' + (V_me_mc_serl) + '"'
? cFilter
bFilter = "{||"+cFilter+"}"
? bFilter
/*select 4
use mete
DBSETFILTER(&bFilter,cFilter)
mete->(DBGOTOP())*/
*V_me_mc_serl:="0731370"
select 4
use mete
DBSETFILTER( {| | 4->me_mc_serl == V_me_mc_serl },;
"4->me_mc_serl == V_me_mc_serl" )
4->(DBGOTOP())
DEFINE DIALOG oDlg of oWnd FROM 0,0 TO 45,128 TITLE "Meter reads browse "
oBrw := TXBrowse():New( oDlg )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:nHeaderLines := 1
oBrw:nFooterLines := 1
oBrw:nDataLines := 1
oBrw:lFooter := .t.
oBrw:SetRDD()
oBrw:CreateFromCode()
oBrw:nTop = 0
oBrw:nLeft = 0
oBrw:nWidth = 1000
oBrw:nHeight =600
for nFor := 1 to Fcount()
if nFor=27
oBrw:aCols[ nFor ]:cHeader := FieldName( nFor )
oBrw:aCols[ nFor ]:cFooter := alltrim(STR(TOTALEM2(),12,0))
loop
endif
*oBrw:aCols[ nFor ]:cHeader := FieldName( nFor )
*oBrw:aCols[ nFor ]:cFooter := FieldName( nFor )
next
*oBrw:CreateFromCode()
*oBrw:UpStable() // Corrects same page stabilizing Bug
oBrw:Refresh(.t.) // Repaint the ListBox
ACTIVATE DIALOG oDlg ON INIT (oBrw:SetSize( 1000, 600 ),BuildButtons( oDlg ),oDlg:Refresh(.t.),oBrw:Refresh(.t.))
RETURN NIL
[/code:f9bac0z2] |
rdd filter | [b:2htksdaz]DON'T USE VARIABLE NAMES IN THE FILTERS !!!!!!![/b:2htksdaz]
I've been told it THOSANDS OF TIMES !!!!!!!!
ADS cannot resolve what is INSIDE your program, if you use ALIAS in your field names, ADS cannot go inside you program to see the value of "mete->" so it cannot resolve the filter expression.
You also have an error when creating indexes, Don't use ALIAS, Alias should be used only in the program to make reference to the data fields, but not in indexes or any other operation. |
rdd filter | Rene,
>You also have an error when creating indexes, Don't use ALIAS, Alias should be used only in the program to make reference to the data fields, but not in indexes or [b:3kll0m2h]any other operation.[/b:3kll0m2h]
Are you saying that with ADS you cannot do something like:
(cAlias)->(eof())
If not, how does ADS keep track of workareas?
(I have never used ADS.)
James |
rddads harbour ads 81 | hi , i need this lib, rddads 81.038 and 8.011 to harbour 2.0, someone can help me to download cvs and compile this??
very thanks |
rddads harbour ads 81 | Norberto,
Do you mean for Harbour or xharbour ? |
rddads harbour ads 81 | Antonio, i want use last harbour, but i dont know how compile rddads to this version i need in 8.1.18 and 7.001 version of ads. i want use last cvs of xharbour too, but i dont know if they correct an error related to an strange character in ads filelds, xharbour last version of cvs is stable? why fivetech release an march version?? thanks |
rddads.lib y ace32.lib | Hola a todos
quisiera saber si alguien me puede enviar los lib de ADS
[b:3058yry4]rddads.lib y ace32.lib [/b:3058yry4]
para harbour de borland 7
[quote:3058yry4]Harbour Build Info
---------------------------
Version: Harbour 3.2.0dev (r1506171039)
Compiler: Borland/Embarcadero C++ 7.0 (32-bit)
Platform: Windows 7 6.1.7601 Service Pack 1
PCode version: 0.3
ChangeLog last entry: 2015-06-17 12:39 UTC+0200 Przemy
czta.onet.pl)
ChangeLog ID: 716cab68c697e983fa5871ca8045bd2318948b73
Built on: Jun 21 2015 11:56:11
Build options: (Clipper 5.3b) (Clipper 5.x undoc)
---------------------------
[/quote:3058yry4]
desde ya mchas gracias |
re | antonio agradezco te hayas en verdad tomado la molestia de leer el codigo, realmente no se como haces para leer todos los codigo que la gente manda, es un esfuerzo apreciable, la variables que me dices la defino despues, creo es la tercera y es yo diria una pirateria de mi parte ya que originalmente es la suma de las otras dos, de todos modos cuando estaba en el dialogo funcionaba pero cuando agregue el folder y las puse en la pestaña dejo de funcionar por lo que el folder no me permite refrescar el say, no le nuscare la 5 pata al gata asi que lo volvere a poner en un dialogo y lo que tenia en la segunda pestaña lo pondre a traves de un boton para que el usuario lo pida si necesita verlo, de todos modos gracias por un poco de tu valiosisimo tiempo se que debes de andar en cosas mas serias |
re | Estamos para ayudarnos <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
re-compiling Hernan's Twbrowse with FWH 908 | To All
Having difficulty re-compiling Hernan's TwBrowse class using the FWH 908 with the same batch file I have always used
[code=fw:17qzw1dy]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ECHO OFF<br />CLS<br /><br />c:\xharbour\bin\harbour SOURCE\WBROWSE.PRG /n /i\fwh908\include;c:\xharbour\include /oOBJ\WBROWSE.C<br />c:\xharbour\bin\harbour SOURCE\TMULTISE.PRG /n /i\fwh908\include;c:\xharbour\include /oOBJ\TMULTISE.C<br /><br />c:\borland\bcc55\bin\bcc32 -M -c -D__HARBOUR__ -Ic:\xharbour\include -oOBJ\WBROWSE.OBJ OBJ\WBROWSE.C<br />@del OBJ\WBROWSE.c<br />c:\borland\bcc55\bin\bcc32 -M -c -D__HARBOUR__ -Ic:\xharbour\include -oOBJ\TMULTISE.OBJ OBJ\TMULTISE.C<br />@del OBJ\TMULTISE.c<br /><br />c:\borland\bcc55\bin\bcc32 -M -c -D__HARBOUR__ -Ic:\xharbour\include;c:\fwh908\include -oOBJ\WBRWLINE.OBJ SOURCE\WBRWLINE.C<br /><br />@del LIB\TWBRW32.LIB<br /><br />c:\borland\bcc55\bin\tlib c:\twbNOADS\lib\TWBRW32.LIB + OBJ\WBROWSE.OBJ<br />c:\borland\bcc55\bin\tlib c:\twbNOADS\lib\TWBRW32.LIB + OBJ\WBRWLINE.OBJ<br />c:\borland\bcc55\bin\tlib c:\twbNOADS\lib\TWBRW32.LIB + OBJ\TMULTISE.OBJ<br /><br /> </div>[/code:17qzw1dy]
Here are the errors :
[code=fw:17qzw1dy]<div class="fw" id="{CB}" style="font-family: monospace;"><br />xHarbour Compiler build <span style="color: #000000;">1.2</span><span style="color: #000000;">.1</span> <span style="color: #000000;">(</span>SimpLex<span style="color: #000000;">)</span> <span style="color: #000000;">(</span>Rev. <span style="color: #000000;">6406</span><span style="color: #000000;">)</span><br />Copyright <span style="color: #000000;">1999</span><span style="color: #000000;">-2009</span>, http:<span style="color: #B900B9;">//www.xharbour.org <!-- m --><a class="postlink" href="http://www.harbour-project.org/">http://www.harbour-project.org/</a><!-- m --></span><br />Compiling <span style="color: #ff0000;">'SOURCE<span style="color: #000000;">\W</span>BROWSE.PRG'</span>...<br /><br />Lines <span style="color: #000000;">4113</span>, Functions/Procedures <span style="color: #000000;">72</span><br />Generating C source output <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'OBJ<span style="color: #000000;">\W</span>BROWSE.C'</span>...<br />Done.<br />xHarbour Compiler build <span style="color: #000000;">1.2</span><span style="color: #000000;">.1</span> <span style="color: #000000;">(</span>SimpLex<span style="color: #000000;">)</span> <span style="color: #000000;">(</span>Rev. <span style="color: #000000;">6406</span><span style="color: #000000;">)</span><br />Copyright <span style="color: #000000;">1999</span><span style="color: #000000;">-2009</span>, http:<span style="color: #B900B9;">//www.xharbour.org <!-- m --><a class="postlink" href="http://www.harbour-project.org/">http://www.harbour-project.org/</a><!-- m --></span><br />Compiling <span style="color: #ff0000;">'SOURCE<span style="color: #000000;">\T</span>MULTISE.PRG'</span>...<br /><br />Lines <span style="color: #000000;">198</span>, Functions/Procedures <span style="color: #000000;">6</span><br />Generating C source output <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'OBJ<span style="color: #000000;">\T</span>MULTISE.C'</span>...<br />Done.<br />Borland C++ <span style="color: #000000;">5.5</span><span style="color: #000000;">.1</span> <span style="color: #00C800;">for</span> Win32 Copyright <span style="color: #000000;">(</span>c<span style="color: #000000;">)</span> <span style="color: #000000;">1993</span>, <span style="color: #000000;">2000</span> Borland<br />OBJ\WBROWSE.C:<br /><span style="color: #000000;">Borland</span> C++ <span style="color: #000000;">5.5</span><span style="color: #000000;">.1</span> <span style="color: #00C800;">for</span> Win32 Copyright <span style="color: #000000;">(</span>c<span style="color: #000000;">)</span> <span style="color: #000000;">1993</span>, <span style="color: #000000;">2000</span> Borland<br />OBJ\TMULTISE.C:<br /><span style="color: #000000;">Borland</span> C++ <span style="color: #000000;">5.5</span><span style="color: #000000;">.1</span> <span style="color: #00C800;">for</span> Win32 Copyright <span style="color: #000000;">(</span>c<span style="color: #000000;">)</span> <span style="color: #000000;">1993</span>, <span style="color: #000000;">2000</span> Borland<br />SOURCE\WBRWLINE.C:<br /><span style="color: #000000;">Warning</span> W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">677</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWSELBOX<br />Warning W8069 SOURCE\WBRWLINE.C <span style="color: #000000;">677</span>: <span style="color: #000000;">Nonportable</span> pointer conversion in <span style="color: #00C800;">function</span> HB_FUN_WBRWSELBOX<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">760</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Warning W8069 SOURCE\WBRWLINE.C <span style="color: #000000;">760</span>: <span style="color: #000000;">Nonportable</span> pointer conversion in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">772</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Warning W8069 SOURCE\WBRWLINE.C <span style="color: #000000;">772</span>: <span style="color: #000000;">Nonportable</span> pointer conversion in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">820</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">820</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">822</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">825</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">826</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">831</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Error E2342 SOURCE\WBRWLINE.C <span style="color: #000000;">832</span>: <span style="color: #000000;">Type</span> mismatch in parameter <span style="color: #ff0000;">'pAtext'</span> <span style="color: #000000;">(</span>wanted <span style="color: #ff0000;">'_HB_ITEM *'</span>, got <span style="color: #ff0000;">'int'</span><span style="color: #000000;">)</span> in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Error E2342 SOURCE\WBRWLINE.C <span style="color: #000000;">832</span>: <span style="color: #000000;">Type</span> mismatch in parameter <span style="color: #ff0000;">'pAsizes'</span> <span style="color: #000000;">(</span>wanted <span style="color: #ff0000;">'_HB_ITEM *'</span>, got <span style="color: #ff0000;">'int'</span><span style="color: #000000;">)</span> in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Error E2342 SOURCE\WBRWLINE.C <span style="color: #000000;">832</span>: <span style="color: #000000;">Type</span> mismatch in parameter <span style="color: #ff0000;">'pAJustify'</span> <span style="color: #000000;">(</span>wanted <span style="color: #ff0000;">'_HB_ITEM *'</span>, got <span style="color: #ff0000;">'int'</span><span style="color: #000000;">)</span> in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Error E2342 SOURCE\WBRWLINE.C <span style="color: #000000;">832</span>: <span style="color: #000000;">Type</span> mismatch in parameter <span style="color: #ff0000;">'pTextColor'</span> <span style="color: #000000;">(</span>wanted <span style="color: #ff0000;">'_HB_ITEM *'</span>, got <span style="color: #ff0000;">'int'</span><span style="color: #000000;">)</span> in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Error E2342 SOURCE\WBRWLINE.C <span style="color: #000000;">832</span>: <span style="color: #000000;">Type</span> mismatch in parameter <span style="color: #ff0000;">'pBkColor'</span> <span style="color: #000000;">(</span>wanted <span style="color: #ff0000;">'_HB_ITEM *'</span>, got <span style="color: #ff0000;">'int'</span><span style="color: #000000;">)</span> in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Error E2342 SOURCE\WBRWLINE.C <span style="color: #000000;">832</span>: <span style="color: #000000;">Type</span> mismatch in parameter <span style="color: #ff0000;">'pFont'</span> <span style="color: #000000;">(</span>wanted <span style="color: #ff0000;">'_HB_ITEM *'</span>, got <span style="color: #ff0000;">'int'</span><span style="color: #000000;">)</span> in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">843</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_reta'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWLINE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">875</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_reta'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_AWBRWROWDIM<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">977</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_reta'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWRECT<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">1013</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8069 SOURCE\WBRWLINE.C <span style="color: #000000;">1013</span>: <span style="color: #000000;">Nonportable</span> pointer conversion in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">1014</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8069 SOURCE\WBRWLINE.C <span style="color: #000000;">1014</span>: <span style="color: #000000;">Nonportable</span> pointer conversion in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">1015</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8069 SOURCE\WBRWLINE.C <span style="color: #000000;">1015</span>: <span style="color: #000000;">Nonportable</span> pointer conversion in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">1033</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8069 SOURCE\WBRWLINE.C <span style="color: #000000;">1033</span>: <span style="color: #000000;">Nonportable</span> pointer conversion in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">1042</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8069 SOURCE\WBRWLINE.C <span style="color: #000000;">1042</span>: <span style="color: #000000;">Nonportable</span> pointer conversion in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">1051</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8069 SOURCE\WBRWLINE.C <span style="color: #000000;">1051</span>: <span style="color: #000000;">Nonportable</span> pointer conversion in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">1181</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">1182</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">1186</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_param'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Error E2342 SOURCE\WBRWLINE.C <span style="color: #000000;">1187</span>: <span style="color: #000000;">Type</span> mismatch in parameter <span style="color: #ff0000;">'pTextColor'</span> <span style="color: #000000;">(</span>wanted <span style="color: #ff0000;">'_HB_ITEM *'</span>, got <span style="color: #ff0000;">'int'</span><span style="color: #000000;">)</span> in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Error E2342 SOURCE\WBRWLINE.C <span style="color: #000000;">1187</span>: <span style="color: #000000;">Type</span> mismatch in parameter <span style="color: #ff0000;">'pBkColor'</span> <span style="color: #000000;">(</span>wanted <span style="color: #ff0000;">'_HB_ITEM *'</span>, got <span style="color: #ff0000;">'int'</span><span style="color: #000000;">)</span> in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Error E2342 SOURCE\WBRWLINE.C <span style="color: #000000;">1187</span>: <span style="color: #000000;">Type</span> mismatch in parameter <span style="color: #ff0000;">'pFont'</span> <span style="color: #000000;">(</span>wanted <span style="color: #ff0000;">'_HB_ITEM *'</span>, got <span style="color: #ff0000;">'int'</span><span style="color: #000000;">)</span> in <span style="color: #00C800;">function</span> HB_FUN_WBRWPANE<br />Warning W8065 SOURCE\WBRWLINE.C <span style="color: #000000;">1662</span>: <span style="color: #000000;">Call</span> <span style="color: #0000ff;">to</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'_reta'</span> with no prototype in <span style="color: #00C800;">function</span> HB_FUN_FWDISPBEGIN<br />*** <span style="color: #000000;">9</span> errors in Compile ***<br />TLIB <span style="color: #000000;">4.5</span> Copyright <span style="color: #000000;">(</span>c<span style="color: #000000;">)</span> <span style="color: #000000;">1987</span>, <span style="color: #000000;">1999</span> Inprise Corporation<br />TLIB <span style="color: #000000;">4.5</span> Copyright <span style="color: #000000;">(</span>c<span style="color: #000000;">)</span> <span style="color: #000000;">1987</span>, <span style="color: #000000;">1999</span> Inprise Corporation<br />Warning: <span style="color: #ff0000;">'OBJ<span style="color: #000000;">\W</span>BRWLINE.OBJ'</span> file not found<br />TLIB <span style="color: #000000;">4.5</span> Copyright <span style="color: #000000;">(</span>c<span style="color: #000000;">)</span> <span style="color: #000000;">1987</span>, <span style="color: #000000;">1999</span> Inprise Corporation<br /> </div>[/code:17qzw1dy]
I am at a loss here
Rick Lipkin |
re-compiling Hernan's Twbrowse with FWH 908 | To All
Apparently there have been many modifications to the include files .. I re-installed fwh904 and re-created Hernan's library ..
This is going to be a problem for some if there is a xHarbour pCode change anytime soon and those that are using the newer FWH libraries.
Rick Lipkin |
re-compiling Hernan's Twbrowse with FWH 908 | That is the main reason I'm converting all my tsbrowse code to xbrowse. 3rd party products are too hard to maintain with the changes, and the newer code reflects work by many people which makes it more powerful. Also, bug fixes come more rapidly, and the user base is large enough to catch little problems quickly. |
re-compiling Hernan's Twbrowse with FWH 908 | Hi Rick
Did you have any luck with this issue - I use Hernans browse all through my projects.
Cheers
Colin |
re-compiling Hernan's Twbrowse with FWH 908 | Rick,
Please rename all _par... _stor... and _ret... functions calls with "hb" in front:
hb_par..., hb_stor... and hb_ret... |
re-compiling Hernan's Twbrowse with FWH 908 | Rick,
the error only occurs compiling wbrwline.c, so you can use the obj-file created using the include files of an older xharbour release. All prg-files can be compiled with the last xharbour.
All c-files are not affected by pcode changes, because they are only compiled with bcc. |
re-compiling Hernan's Twbrowse with FWH 908 | Thanks for the suggestions .. I just switched jobs to another large state gov agency .. I missed taking a few of my 3rd party libs with me and had to re-create them.
The quick work around was to use the FWH904 libs and I was able to re-create my library .. but I will take Antonio up on his advice .. I am moving away from twbrowse in favor of xbrowse ..
Thanks
Rick Lipkin |
re-compiling Hernan's Twbrowse with FWH 908 | Rick,
compile the wbrwline.c this way :
\bcc55\bin\bcc32 -M -c -D__HARBOUR__ -I\xhrb\include;\fwh\include;\bcc55\include -owbrwline.OBJ wbrwline.C > make.log
and include wbrwline.obj generate, and execute this .bat :
em @ECHO OFF
CLS
\xhrb\bin\harbour SOURCE\wbrowse.PRG /n /i\fwh\include;\xhrb\include /oOBJ\wbrowse.C
\xhrb\bin\harbour SOURCE\tmultise.PRG /n /i\fwh\include;\xhrb\include /oOBJ\tmultise.C
rem INICIO Modulos C Generados por Harbour !!!
\bcc55\bin\bcc32 -M -c -D__HARBOUR__ -I\xhrb\include;\bcc55\include -oOBJ\wbrowse.OBJ OBJ\wbrowse.C
\bcc55\bin\bcc32 -M -c -D__HARBOUR__ -I\xhrb\include;\bcc55\include -oOBJ\tmultise.OBJ OBJ\tmultise.C
rem @del OBJ\*.C
@del LIB\twbrw.LIB
echo + obj\wbrowse.OBJ & >tmplib.bc
echo + obj\wbrwline.OBJ & >>tmplib.bc
echo + obj\tmultise.OBJ >>tmplib.bc
\bcc55\bin\tlib LIB\twbrw.LIB @tmplib.bc
@del tmplib.bc
sorry my english.
Regards. |
re.prg | Silvio
Look this links
<!-- m --><a class="postlink" href="http://www.mediafire.com/?if123opaq1kdjob">http://www.mediafire.com/?if123opaq1kdjob</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.mediafire.com/?g5q96xz77g378wp">http://www.mediafire.com/?g5q96xz77g378wp</a><!-- m -->
Both are modified code from original rc2prg
Armando |
re.prg | How converte output prg into fivewin code (@ x,y) from re.prg
it now save the prg but only with redefine commands.
I need to save with sources because on W7 the resources leak memory of pc
and I try to converte each mine rc dialogs into source code
Any help ? |
re.prg | For a sample Look it please
If we run RE.prg
We have a resources rc and we can show it
[img:odjqm248]http://img41.imageshack.us/img41/3544/test1dl.jpg[/img:odjqm248]
If we use Rc2prg.prg and thenwe compile the test.prg ( I save on test.prg test.rc)
we have this
[img:odjqm248]http://img20.imageshack.us/img20/2135/test2dz.jpg[/img:odjqm248]
[b:odjqm248]BUT IT IS TOO BIG MORE THAN THE ORIGINAL DIALOG [/b:odjqm248]
[b:odjqm248]WHY ?[/b:odjqm248] |
re.prg | [quote:1ixyomf2]BUT IT IS TOO BIG MORE THAN THE ORIGINAL DIALOG
WHY ?[/quote:1ixyomf2]
Silvio, I have noticed this too...
It seems to be that in resources, the Font size is 8 pixels, but from code, you can not specify this Font Size directly to the Dialog, but only to the text on It... |
re.prg | try it please
[b:2ixnjd9g]Resource code [/b:2ixnjd9g]
[code=fw:2ixnjd9g]<div class="fw" id="{CB}" style="font-family: monospace;">LIBROS_EDIT <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">24</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">330</span>, <span style="color: #000000;">230</span><br /><span style="color: #0000ff;">STYLE</span> WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_SYSMENU|WS_VISIBLE<br />CAPTION <span style="color: #ff0000;">"LIBROS_EDIT"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">{</span><br /> CONTROL <span style="color: #ff0000;">"Título"</span>, <span style="color: #000000;">200</span>, <span style="color: #ff0000;">"Static"</span>, WS_GROUP, <span style="color: #000000;">15</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">26</span>, <span style="color: #000000;">9</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">100</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">50</span>, <span style="color: #000000;">12</span>, <span style="color: #000000;">175</span>, <span style="color: #000000;">12</span><br /> CONTROL <span style="color: #ff0000;">"Código"</span>, <span style="color: #000000;">201</span>, <span style="color: #ff0000;">"Static"</span>, WS_GROUP, <span style="color: #000000;">230</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">8</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">255</span>, <span style="color: #000000;">12</span>, <span style="color: #000000;">60</span>, <span style="color: #000000;">12</span><br /> CONTROL <span style="color: #ff0000;">"Tít. Orig."</span>, <span style="color: #000000;">202</span>, <span style="color: #ff0000;">"Static"</span>, WS_GROUP, <span style="color: #000000;">15</span>, <span style="color: #000000;">27</span>, <span style="color: #000000;">28</span>, <span style="color: #000000;">9</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">102</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">50</span>, <span style="color: #000000;">26</span>, <span style="color: #000000;">175</span>, <span style="color: #000000;">12</span><br /> CONTROL <span style="color: #ff0000;">"Autor"</span>, <span style="color: #000000;">203</span>, <span style="color: #ff0000;">"Static"</span>, WS_GROUP, <span style="color: #000000;">15</span>, <span style="color: #000000;">42</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">8</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">103</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">50</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">12</span><br /> CONTROL <span style="color: #ff0000;">"Materia"</span>, <span style="color: #000000;">204</span>, <span style="color: #ff0000;">"Static"</span>, WS_GROUP, <span style="color: #000000;">15</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">27</span>, <span style="color: #000000;">8</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">104</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">50</span>, <span style="color: #000000;">54</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">12</span><br /> CONTROL <span style="color: #ff0000;">"Idioma"</span>, <span style="color: #000000;">205</span>, <span style="color: #ff0000;">"Static"</span>, WS_GROUP, <span style="color: #000000;">15</span>, <span style="color: #000000;">70</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">8</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">105</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">50</span>, <span style="color: #000000;">68</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">12</span><br /> CONTROL <span style="color: #ff0000;">"Propietario"</span>, <span style="color: #000000;">206</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">15</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">33</span>, <span style="color: #000000;">8</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">106</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">50</span>, <span style="color: #000000;">82</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">12</span><br /> CONTROL <span style="color: #ff0000;">"Ubicación"</span>, <span style="color: #000000;">207</span>, <span style="color: #ff0000;">"Static"</span>, WS_GROUP, <span style="color: #000000;">15</span>, <span style="color: #000000;">98</span>, <span style="color: #000000;">33</span>, <span style="color: #000000;">8</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">107</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">50</span>, <span style="color: #000000;">96</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">12</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">108</span>, <span style="color: #ff0000;">"SysTabControl32"</span>, 0x00000000, <span style="color: #000000;">15</span>, <span style="color: #000000;">114</span>, <span style="color: #000000;">300</span>, <span style="color: #000000;">86</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">109</span>, <span style="color: #ff0000;">"TBtnBmp"</span>, WS_TABSTOP, <span style="color: #000000;">16</span>, <span style="color: #000000;">203</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">8</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">110</span>, <span style="color: #ff0000;">"TBtnBmp"</span>, WS_TABSTOP, <span style="color: #000000;">16</span>, <span style="color: #000000;">212</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">8</span><br /> CONTROL <span style="color: #ff0000;">"&Aceptar"</span>, IDOK, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">208</span>, <span style="color: #000000;">203</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">16</span><br /> CONTROL <span style="color: #ff0000;">"&Cancelar"</span>, IDCANCEL, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">264</span>, <span style="color: #000000;">203</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">16</span><br /><span style="color: #000000;">}</span></div>[/code:2ixnjd9g]
[b:2ixnjd9g]source code[/b:2ixnjd9g]
[code=fw:2ixnjd9g]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.Ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> LIBROS_EDIT<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> oDlgLIBROS_EDIT<br /><span style="color: #00C800;">LOCAL</span> oFnt<br /><span style="color: #00C800;">LOCAL</span> oGet100, nGet100<br /><span style="color: #00C800;">LOCAL</span> oGet101, nGet101<br /><span style="color: #00C800;">LOCAL</span> oGet102, nGet102<br /><span style="color: #00C800;">LOCAL</span> oGet103, nGet103<br /><span style="color: #00C800;">LOCAL</span> oGet104, nGet104<br /><span style="color: #00C800;">LOCAL</span> oGet105, nGet105<br /><span style="color: #00C800;">LOCAL</span> oGet106, nGet106<br /><span style="color: #00C800;">LOCAL</span> oGet107, nGet107<br /><span style="color: #00C800;">LOCAL</span> oFold32108<br /><span style="color: #00C800;">LOCAL</span> oTBMP109<br /><span style="color: #00C800;">LOCAL</span> oTBMP110<br /><span style="color: #00C800;">LOCAL</span> oBtIDOK<br /><span style="color: #00C800;">LOCAL</span> oBtIDCANCEL<br /> <br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFnt <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"MS Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-8</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">45</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">79</span>,<span style="color: #000000;">113</span> ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"LIBROS_EDIT"</span> ;<br /> <span style="color: #0000ff;">FONT</span> oFnt<br /><br />@ <span style="color: #000000;">14</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Título"</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">26</span>, <span style="color: #000000;">9</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt<br /><br />@ <span style="color: #000000;">12</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">GET</span> oGet100 <span style="color: #0000ff;">VAR</span> nGet100 ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">175</span>, <span style="color: #000000;">12</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt ;<br /> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">14</span>, <span style="color: #000000;">230</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Código"</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">24</span>, <span style="color: #000000;">8</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt<br /><br />@ <span style="color: #000000;">12</span>, <span style="color: #000000;">255</span> <span style="color: #0000ff;">GET</span> oGet101 <span style="color: #0000ff;">VAR</span> nGet101 ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">12</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt ;<br /> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">27</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Tít. Orig."</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">28</span>, <span style="color: #000000;">9</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt<br /><br />@ <span style="color: #000000;">26</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">GET</span> oGet102 <span style="color: #0000ff;">VAR</span> nGet102 ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">175</span>, <span style="color: #000000;">12</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt ;<br /> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">42</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Autor"</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">8</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt<br /><br />@ <span style="color: #000000;">40</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">GET</span> oGet103 <span style="color: #0000ff;">VAR</span> nGet103 ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">12</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt ;<br /> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">56</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Materia"</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">27</span>, <span style="color: #000000;">8</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt<br /><br />@ <span style="color: #000000;">54</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">GET</span> oGet104 <span style="color: #0000ff;">VAR</span> nGet104 ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">12</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt ;<br /> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">70</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Idioma"</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">24</span>, <span style="color: #000000;">8</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt<br /><br />@ <span style="color: #000000;">68</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">GET</span> oGet105 <span style="color: #0000ff;">VAR</span> nGet105 ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">12</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt ;<br /> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">84</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Propietario"</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">33</span>, <span style="color: #000000;">8</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt<br /><br />@ <span style="color: #000000;">82</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">GET</span> oGet106 <span style="color: #0000ff;">VAR</span> nGet106 ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">12</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt ;<br /> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">98</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Ubicación"</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">33</span>, <span style="color: #000000;">8</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt<br /><br />@ <span style="color: #000000;">96</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">GET</span> oGet107 <span style="color: #0000ff;">VAR</span> nGet107 ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">12</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt ;<br /> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">114</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">FOLDER</span> oFold32108 ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">86</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt ;<br /> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">203</span>, <span style="color: #000000;">16</span> <span style="color: #0000ff;">BTNBMP</span> oTBMP109 ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">56</span>, <span style="color: #000000;">8</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt ;<br /> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">212</span>, <span style="color: #000000;">16</span> <span style="color: #0000ff;">BTNBMP</span> oTBMP110 ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">56</span>, <span style="color: #000000;">8</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt ;<br /> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">203</span>, <span style="color: #000000;">208</span> <span style="color: #0000ff;">BUTTON</span> oBtIDOK ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">16</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt ;<br /> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">203</span>, <span style="color: #000000;">264</span> <span style="color: #0000ff;">BUTTON</span> oBtIDCANCEL ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">16</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlgLIBROS_EDIT ;<br /> <span style="color: #0000ff;">FONT</span> oFnt ;<br /> <span style="color: #0000ff;">PIXEL</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgLIBROS_EDIT<br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">0</span><br /><br /><span style="color: #B900B9;">//------------------------------------------------------------------------------</span><br /><br /> </div>[/code:2ixnjd9g] |
re.prg | Silvio,
remember that in rc the sizes and positions are shown in DIALOG UNITS, that are not PIXELS. That's the reason when we change the dialog's font everything resizes. |
re.prg | Carlos,
I not believe on 2011 we not have Ide run , I need create forms no resources because it eat the resources of system (w7)
I found an app vrmm of ricardo marques , it seems run ok , it a simply form application , then it save on prg good
Antonio must insert this app on new fwh , it can be usefull for the community |
re.prg | To get the same size object in dialog units divide window units by 2.05 |
re.prg | @James,
not sure about that. It depends on the font used in the DIALOG's declaration (in .rc). The real conversion can be a little bit tricky, remember the 16BIT (or something like that) of the REDEFINE DIALOG command in FWH, even 16 bits rc are different.
[code=fw:tymr6kk4]<div class="fw" id="{CB}" style="font-family: monospace;">pixelX = <span style="color: #000000;">(</span>dialogunitX * baseunitX<span style="color: #000000;">)</span> / <span style="color: #000000;">4</span><br />pixelY = <span style="color: #000000;">(</span>dialogunitY * baseunitY<span style="color: #000000;">)</span> / <span style="color: #000000;">8</span><br /> </div>[/code:tymr6kk4]
from [url:tymr6kk4]http://support.microsoft.com/kb/145994[/url:tymr6kk4]
A dialog unit is based on the size of the dialog box font, normally 8-point MS Sans Serif. A horizontal unit is the average width of the dialog box font divided by four. A vertical unit is the average height of the font divided by eight. |
re.prg | Carlos,
Thanks for clarifying that. I found that number something like 10 years ago and it was just a rough estimate which worked for what I was doing at the time. Your explanation will be more useful and generic.
Regards,
James |
re.prg | Carlos,
do you have an Idea to converte rc form into right prg on Re.prg ?
If I can design ( move) each control and save on prg , this is a dream.... |
re.prg | It seems the problem is in this part of the RC2PRG.PRG code. I have not tried to figure it out yet. I don't know where the 14 and 7 came from. Carlos, any ideas?
Regards,
James
[code=fw:s18og8um]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Dialog-Coordinates</span><br /><br /><span style="color: #00D7D7;">#define</span> FNTX <span style="color: #000000;">14</span><br /><span style="color: #00D7D7;">#define</span> FNTY <span style="color: #000000;">7</span><br /><br /><span style="color: #00C800;">Function</span> xCo<span style="color: #000000;">(</span>c,x<span style="color: #000000;">)</span><br /><span style="color: #00C800;">if</span> x == <span style="color: #00C800;">NIL</span><br /> <span style="color: #00C800;">return</span> Ltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span><span style="color: #000000;">(</span>Val<span style="color: #000000;">(</span>c<span style="color: #000000;">)</span>*FNTX<span style="color: #000000;">)</span>/<span style="color: #000000;">8</span>,<span style="color: #000000;">6</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> Ltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>val<span style="color: #000000;">(</span>c<span style="color: #000000;">)</span>+<span style="color: #000000;">(</span><span style="color: #000000;">(</span><span style="color: #000000;">(</span>Val<span style="color: #000000;">(</span>c<span style="color: #000000;">)</span>+Val<span style="color: #000000;">(</span>x<span style="color: #000000;">)</span><span style="color: #000000;">)</span>*FNTX<span style="color: #000000;">)</span>/<span style="color: #000000;">8</span><span style="color: #000000;">)</span>,<span style="color: #000000;">6</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Function</span> yCo<span style="color: #000000;">(</span>c,x<span style="color: #000000;">)</span><br /><span style="color: #00C800;">if</span> x == <span style="color: #00C800;">NIL</span><br /> <span style="color: #00C800;">return</span> Ltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span><span style="color: #000000;">(</span>Val<span style="color: #000000;">(</span>c<span style="color: #000000;">)</span>*FNTY<span style="color: #000000;">)</span>/<span style="color: #000000;">4</span>,<span style="color: #000000;">6</span>, <span style="color: #000000;">0</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> Ltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>val<span style="color: #000000;">(</span>c<span style="color: #000000;">)</span>+<span style="color: #000000;">(</span><span style="color: #000000;">(</span><span style="color: #000000;">(</span>Val<span style="color: #000000;">(</span>c<span style="color: #000000;">)</span>+Val<span style="color: #000000;">(</span>x<span style="color: #000000;">)</span><span style="color: #000000;">)</span>*FNTY<span style="color: #000000;">)</span>/<span style="color: #000000;">4</span><span style="color: #000000;">)</span>,<span style="color: #000000;">6</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> </div>[/code:s18og8um] |
re.prg | May be those values are the font sizes in use in 16 bits resources, may be they should be changed to the font sizes in the FONT at DIALOG's definition. |
re.prg | Dear Friends
Any solution for it ? |
re.prg | I tried but it make the same |
read JSON | Hello friends,
Do we have any FW/Harbour functions to read such a JSON data?
Thank you in advance
Otto
[code=fw:3bt5xaqn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><br /><span style="color: #B900B9;">// 'JSON' data included </span><br /><span style="color: #00C800;">data</span> = <span style="color: #ff0000;">'[{"expanded":true,"folder":true,"key":"1","title":"Item1","children":[{"key":"2","title":"Item2"},{"key":"3","title":"Item3"},{"key":"4","title":"Item4"},{"key":"5","title":"Item5"}]},{"folder":true,"key":"6","title":"Item6","children":[{"key":"7","title":"Item7"},{"key":"8","title":"Item7"},{"key":"9","title":"Item8"}]},{"expanded":true,"folder":true,"key":"_2","title":"Itemwithnorecno","children":[{"folder":true,"key":"11","title":"Item11","children":[{"key":"12","title":"Item12"},{"key":"13","title":"Item13"},{"key":"14","title":"Item14"},{"key":"15","title":"Item15"}]},{"folder":true,"key":"16","title":"Item16","children":[{"key":"17","title":"Item17"},{"key":"18","title":"Item18"},{"key":"19","title":"Item19"}]}]}]'</span>;<br /><br /><br /> </div>[/code:3bt5xaqn] |
read JSON | Dear Otto, I do not know if I understand well what you need
[code=fw:bsw9kjve]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">local</span> hDatos := <span style="color: #000000;">{</span> => <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> <span style="color: #00C800;">data</span> := <span style="color: #ff0000;">'[{"expanded":true,"folder":true,"key":"1","title":"Item1","children":[{"key":"2","title":"Item2"},{"key":"3","title":"Item3"},{"key":"4","title":"Item4"},{"key":"5","title":"Item5"}]},{"folder":true,"key":"6","title":"Item6","children":[{"key":"7","title":"Item7"},{"key":"8","title":"Item7"},{"key":"9","title":"Item8"}]},{"expanded":true,"folder":true,"key":"_2","title":"Itemwithnorecno","children":[{"folder":true,"key":"11","title":"Item11","children":[{"key":"12","title":"Item12"},{"key":"13","title":"Item13"},{"key":"14","title":"Item14"},{"key":"15","title":"Item15"}]},{"folder":true,"key":"16","title":"Item16","children":[{"key":"17","title":"Item17"},{"key":"18","title":"Item18"},{"key":"19","title":"Item19"}]}]}]'</span><br /> hb_JsonDecode<span style="color: #000000;">(</span> <span style="color: #00C800;">data</span>, @hDatos <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">(</span> hDatos <span style="color: #000000;">)</span><br /> </div>[/code:bsw9kjve] |
read JSON | Dear Cristobal,
Thank you. Yes, I can see all the data. But I need the order and then I have to convert it into a DBF.
When I make changes in the tree, I get a JSON file as a response.
Best regards,
Otto
[img:ez25sdrj]https://mybergland.com/fwforum/clipb.jpg[/img:ez25sdrj] |
read JSON | Dear Cristobal,
xBrowse handles the response perfectly. But in my case, I only have harbour - no FW.
Best regards,
Otto
[img:3jsapjpx]https://mybergland.com/fwforum/hashtoxbrowse.jpg[/img:3jsapjpx] |
read JSON | Otto,
I also want the Json into a Dbf and i'm very close to succeed i think. The sample will show severall stages of data, but I think that there is usefull code insite for you issues.
It's a working sample, but a error at the end that i need to look into.. Just not able to write the dbf.
The // comments is for my thinking, so not directed to you, but maybe they can help
[code=fw:2p0t0nqi]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oWnd, oActiveX1, oActiveX2, cTemp<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"FiveWin multiple ActiveX support"</span><br /><br /> @ <span style="color: #000000;">9</span>,<span style="color: #000000;">5</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Hash"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">ACTION</span> TestHash<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> TestHash<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> hDatos := <span style="color: #000000;">{</span> => <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> aTest := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> aResult := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> aFields := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> m<br /><br /> <span style="color: #00C800;">local</span> uResponse, cCookies, I<br /><br /> uResponse := <span style="color: #ff0000;">'{"uprid":"2550","productId":"2550","stockId":"-1","referenceId":"0","isBundle":"0","bundledProducts":"[]","status":"1","quantity":"0","maximumQuantity":"null","ean":"98745123456","sku":"skuData","model":"APITEST","hsCode":"","name":"Noyca","price":"0.0000","taxClassId":"3","taxRate":"21.0000","isPhysical":"1","isDigital":"0","isQuotation":"0","url":"onderhoud<span style="color: #000000;">\/</span>api-test","urlAbs":"https:<span style="color: #000000;">\/</span><span style="color: #000000;">\/</span><!-- m --><a class="postlink" href="http://www.maveco-webshop.be">http://www.maveco-webshop.be</a><!-- m --><span style="color: #000000;">\/</span>onderhoud<span style="color: #000000;">\/</span>api-test","attributesString":"","backOrder":0,"onHome":0,"layover":0,"configurationAllowCheckout":0,"configurationStockCheck":0,"attributes":[],"description":"Memo<b>Data<<span style="color: #000000;">\/</span>b>","addonInstagramEnabled":"0","addonInstagram":"0","addonOcsEnabled":"0","dateAdded":"2021-10-30 18:40:57","lastModified":"2021-10-30 19:17:39","descriptions":{"description":"Memo<b>Data<<span style="color: #000000;">\/</span>b>","extra":"","intro":""},"images":["5101000.jpg","","","","","","","","","","",""],"image_alt":["","","","","","","","","","","",""],"discounts":{"name":"0","groupDiscount":"0.00","groupDiscountCategory":"0.00","groupDiscountProduct":"0.00"},"category":{"id":"888982","name":"Onderhoud","categoryIds":"888982","cPath":"888982"},"quantities":{"quantity":"0","physicalQuantity":"0","minimumQuantity":"0","maximumQuantity":null,"externalQuantity":"0","quantityStep":"1","trackQuantity":"1"},"prices":{"basePrice":"0.0000","normalPrice":"0.0000","price":"0.0000","specialPrice":"0.0000","purchasePrice":"0.0000"},"manufacturer":{"id":0,"name":"","image":""},"dimensions":{"type":"0","width":0,"height":0,"area":0,"weight":0},"reviews":{"count":0,"avg":0},"resources":[],"addons":{"multicatalog":{"enabled":false},"layover":{"enabled":true}}}'</span><br /><br /> hb_JsonDecode<span style="color: #000000;">(</span> uResponse, @hDatos <span style="color: #000000;">)</span> <span style="color: #B900B9;">// -> Hash</span><br /> <span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">(</span> hb_hKeys<span style="color: #000000;">(</span> hDatos <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// -> Array</span><br /> <span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">(</span> hb_hValues<span style="color: #000000;">(</span> hDatos <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// -> Array</span><br /> <span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">(</span> hDatos <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// simple key</span><br /> cCookies := <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> hb_HHasKey<span style="color: #000000;">(</span> hDatos, <span style="color: #ff0000;">"name"</span> <span style="color: #000000;">)</span>, hb_hGet<span style="color: #000000;">(</span> hDatos, <span style="color: #ff0000;">"name"</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Not Found"</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span>cCookies<span style="color: #000000;">)</span> <span style="color: #B900B9;">// Found</span><br /><br /> <span style="color: #B900B9;">// complex key a array insite a field // "prices":{"basePrice":"0.0000","normalPrice":"0.0000","price":"0.0000","specialPrice":"0.0000","purchasePrice":"0.0000"}</span><br /> <span style="color: #B900B9;">// Extract 1 complex key if the keyname is known</span><br /> <span style="color: #00C800;">if</span> hb_HHasKey<span style="color: #000000;">(</span> hDatos, <span style="color: #ff0000;">"prices"</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Found"</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">(</span> hb_hKeys<span style="color: #000000;">(</span> hDatos<span style="color: #000000;">[</span><span style="color: #ff0000;">"prices"</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// is showing the items insite the sub array</span><br /> <span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">(</span> hb_hValues <span style="color: #000000;">(</span>hDatos<span style="color: #000000;">[</span><span style="color: #ff0000;">"prices"</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// -> Array</span><br /> <span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">(</span> hDatos<span style="color: #000000;">[</span><span style="color: #ff0000;">"prices"</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Items and Values subarray</span><br /> <span style="color: #B900B9;">// At this point, I could stuff the data insite a dbf. I have fields and values</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Not Found"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #B900B9;">// extract all keys, not knowing if there are subarray (keys)</span><br /> aTest = hb_hKeys<span style="color: #000000;">(</span> hDatos <span style="color: #000000;">)</span> <span style="color: #B900B9;">// -> Array</span><br /> <span style="color: #0000ff;">xbrowse</span><span style="color: #000000;">(</span>aTest<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>aTest<span style="color: #000000;">)</span><br /> cZoek = aTest<span style="color: #000000;">[</span>i<span style="color: #000000;">]</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span>cZoek<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> hb_HHasKey<span style="color: #000000;">(</span> hDatos, cZoek <span style="color: #000000;">)</span><br /> aResult = hDatos<span style="color: #000000;">[</span>cZoek<span style="color: #000000;">]</span> <span style="color: #B900B9;">// -> Array</span><br /> <span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">(</span> aResult <span style="color: #000000;">)</span> <span style="color: #B900B9;">// is showing the items, also the subitems</span><br /><br /> <span style="color: #B900B9;">// Here I want to build a array (aFields) with all the keys that are seen, with there values.</span><br /> <span style="color: #B900B9;">// not working</span><br /><br /> <span style="color: #00C800;">for</span> m = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">(</span>aResult<span style="color: #000000;">)</span><br /> aadd<span style="color: #000000;">(</span>aFields,aResult<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span> m<br /><br /> <span style="color: #B900B9;">//XBrowse( aResult ) // is showing the items insite the sub array</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #B900B9;">//XBrowse( aFields ) // is showing the items insite the sub array</span><br /> <span style="color: #B900B9;">// Build the dbf with the array.</span><br /><br /> <span style="color: #B900B9;">// Maybe better to build a single Hash with all fields. Than a hashtodbf save can be done.</span><br /><br /> <span style="color: #00C800;">next</span><br /><br /><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:2p0t0nqi] |
read JSON | Functions that can help are here...
<!-- m --><a class="postlink" href="http://www.fivetechsoft.com/harbour-docs/api.html">http://www.fivetechsoft.com/harbour-docs/api.html</a><!-- m --> |
read JSON | Hello Mark,
thank you for your help.
Yes, with xBrowse I can read the JSON file perfectly.
But in my case, I cannot use xBrowse because it is a pure HARBOR application and therefore the FIVEWIN components cannot be used.
But I've come a little further. I lack the knowledge about trees. I think I can do it for my application. It is then not universally applicable, but good for my purpose.
Best regards,
Otto
[img:1x1fb086]https://mybergland.com/fwforum/jsontreexbrowse.jpg[/img:1x1fb086] |
read JSON | Hello friends,
Correctly resolving this JSON file is not that easy.
But with the HARBOURINO preprocessor, I brought the source code into a clear and maintainable form.
HARBOURINO preprocessor is a game changer.
Best regards,
Otto
[img:1rlfyp9v]https://mybergland.com/fwforum/hrbprepro.jpg[/img:1rlfyp9v] |
read JSON | Hello friends,
Now I am very close that all the changes inside the tree are saved in a DBF file.
This DMS is becoming a great tool.
Does someone use Help&Manual. In practice, this is doing the same.
But you have the advantage that the text is stored in HTML and not in a proprietary format. And that you can extend as you like.
Best regards,
Otto
[img:7b529ziq]https://mybergland.com/fwforum/treetodbf.jpg[/img:7b529ziq]
[img:7b529ziq]https://mybergland.com/fwforum/portobello.gif[/img:7b529ziq] |
read a big xml file | [quote="kajot":264n2mug]https://mega.nz/file/xeFx3SCS#LOZWjmZzyMM1HZ61g7OwNTYYUhUFfmgGhpYocPbbtTk
best regards
kajot[/quote:264n2mug]
Try
[code=fw:264n2mug]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">Static</span> aValues := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> XmlTree<span style="color: #000000;">(</span> <span style="color: #ff0000;">"JPK_FAKTURA_22-06-2023.xml"</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">(</span> aValues <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;">static</span> <span style="color: #00C800;">function</span> XmlTree<span style="color: #000000;">(</span> cXml <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oXmlDoc<br /> <span style="color: #00C800;">local</span> oRoot<br /> <span style="color: #00C800;">local</span> cPrompt<br /> <span style="color: #00C800;">local</span> cData<br /> <span style="color: #00C800;">local</span> oTree<br /><br /> <span style="color: #00C800;">TRY</span><br /> oXmlDoc := TXmlDocument<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> cXml <span style="color: #000000;">)</span><br /> CATCH<br /> ? <span style="color: #ff0000;">"TXmlDocument class can not read "</span> + cXml<br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> END<br /> oRoot := oXmlDoc:<span style="color: #000000;">oRoot</span><br /> cPrompt := <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> Empty<span style="color: #000000;">(</span> oRoot:<span style="color: #000000;">cName</span> <span style="color: #000000;">)</span>, cFileNoPath<span style="color: #000000;">(</span> cXml <span style="color: #000000;">)</span>, oRoot:<span style="color: #000000;">cName</span> <span style="color: #000000;">)</span><br /> cData := <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> Empty<span style="color: #000000;">(</span> oRoot:<span style="color: #000000;">cData</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Empty Value"</span>, oRoot:<span style="color: #000000;">cData</span> <span style="color: #000000;">)</span><br /> AAdd<span style="color: #000000;">(</span> aValues, <span style="color: #000000;">{</span> cPrompt, cData, oRoot:<span style="color: #000000;">oChild</span>, oRoot:<span style="color: #000000;">oNext</span>, oRoot:<span style="color: #000000;">oPrev</span>, oRoot:<span style="color: #000000;">oParent</span>, oRoot:<span style="color: #000000;">Path</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: #00C800;">if</span> !Hb_IsNil<span style="color: #000000;">(</span> oRoot:<span style="color: #000000;">oChild</span> <span style="color: #000000;">)</span><br /> SubTree<span style="color: #000000;">(</span> oRoot:<span style="color: #000000;">oChild</span> <span style="color: #000000;">)</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;">static</span> <span style="color: #00C800;">function</span> SubTree<span style="color: #000000;">(</span> oNode <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> cPrompt<br /> <span style="color: #00C800;">local</span> cData<br /> <br /> <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> oNode != <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">(</span> oNode:<span style="color: #000000;">aAttributes</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">//Valtype( oNode:aAttributes ) = "H"</span><br /> HEVal<span style="color: #000000;">(</span> oNode:<span style="color: #000000;">aAttributes</span>, <span style="color: #000000;">{</span> | cKey, cValue | AAdd<span style="color: #000000;">(</span> aValues, <span style="color: #000000;">{</span> cKey, cValue, , , , , oNode:<span style="color: #000000;">Path</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> <span style="color: #000000;">)</span> <br /> <span style="color: #00C800;">endif</span><br /><br /> cPrompt := <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> Empty<span style="color: #000000;">(</span> oNode:<span style="color: #000000;">cName</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">""</span>, oNode:<span style="color: #000000;">cName</span> <span style="color: #000000;">)</span><br /> cData := <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> Empty<span style="color: #000000;">(</span> oNode:<span style="color: #000000;">cData</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Empty Value"</span>, oNode:<span style="color: #000000;">cData</span> <span style="color: #000000;">)</span><br /> AAdd<span style="color: #000000;">(</span> aValues, <span style="color: #000000;">{</span> cPrompt, cData, oNode:<span style="color: #000000;">oChild</span>, oNode:<span style="color: #000000;">oNext</span>, oNode:<span style="color: #000000;">oPrev</span>, oNode:<span style="color: #000000;">oParent</span>, oNode:<span style="color: #000000;">Path</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: #00C800;">if</span> !Hb_IsNil<span style="color: #000000;">(</span> oNode:<span style="color: #000000;">oChild</span> <span style="color: #000000;">)</span><br /> SubTree<span style="color: #000000;">(</span> oNode:<span style="color: #000000;">oChild</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> oNode := oNode:<span style="color: #000000;">oNext</span><br /> <span style="color: #00C800;">enddo</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:264n2mug] |
read a big xml file | I have a problem reading xml file size 10 MB
I got memory error |
read a big xml file | Look,
[url:2tmjrgpg]https://forums.fivetechsupport.com/viewtopic.php?f=3&t=41458&p=248394&sid=3b23fdf448fbc9cd8928267bceec3161&sid=3a0c7077a827c241633517df09a94590#p248394[/url:2tmjrgpg]
[url:2tmjrgpg]https://forums.fivetechsupport.com/viewtopic.php?f=3&t=42812&p=257620&hilit=LoadXml&sid=fc98e0df73f1a0d29fe4104097df32c7&sid=3a0c7077a827c241633517df09a94590#p257620[/url:2tmjrgpg]
[url:2tmjrgpg]https://forums.fivetechsupport.com/viewtopic.php?f=6&t=28650&p=160640&hilit=LoadXml&sid=fc98e0df73f1a0d29fe4104097df32c7&sid=3a0c7077a827c241633517df09a94590#p160640[/url:2tmjrgpg]
Regards, saludos. |
read a big xml file | I got error 9600
hb_xgrab can't allocate memory
xml file has 10GB
best regards
KAJOT |
read a big xml file | Hi... (sorry... I was out for a while...)
Kajot,
10Gb XML should be an issue even for Chrome or IE(Edge)
Can you post the XML in soma place for download? (or give an URL)
Regards, Euclides |
read a big xml file | How can I post you this xml file ? |
read a big xml file | [quote="kajot":ydeb3osh]How can I post you this xml file ?[/quote:ydeb3osh]
[url:ydeb3osh]https://mega.nz[/url:ydeb3osh]
Regards, saludos. |
read a big xml file | <!-- m --><a class="postlink" href="https://mega.nz/file/xeFx3SCS#LOZWjmZzyMM1HZ61g7OwNTYYUhUFfmgGhpYocPbbtTk">https://mega.nz/file/xeFx3SCS#LOZWjmZzy ... pYocPbbtTk</a><!-- m -->
best regards
kajot |
read a big xml file | Have you tried like this?
[code=fw:1ksi67gr]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">LOCAL</span> vXML, oText, TempText, aText, cXML<br /><br /> cXML := cDirPleno + <span style="color: #ff0000;">"<span style="color: #000000;">\"</span> + ALLTRIM( "</span>REMESSA\PROTOCOLOS\<span style="color: #ff0000;">" ) + ;<br /> ALLTRIM( ( cAlias )->CHAVE ) + ;<br /> "</span>-CCe<span style="color: #ff0000;">"+ALLTRIM(STR( ( cAlias )->CODI ) ) + "</span>.xml<span style="color: #ff0000;">"<br /><br /> IF .NOT. FILE( cXML )<br /> // MENS<br /> ENDIF<br /><br /> vXML := cXML<br /><br /> oText = TTxtFile():New( vXML ) // Read Mode<br /><br /> oText:nMaxLineLength := 5120<br /><br /> TempText = oText:ReadLine()<br /></span></div>[/code:1ksi67gr]
Regards, saludos. |
read a big xml file | How can I use
oText:ReadLine()
with
TXmlDocument():New( )
KAJOT |
read a big xml file | [quote="kajot":1fl6pm9p]How can I use
oText:ReadLine()
with
TXmlDocument():New( )
KAJOT[/quote:1fl6pm9p]
what do you need to use that for? |
read a big xml file | [code=fw:30ymux8r]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\FWH\SAMPLES\KAJOTXML.PRG</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// LOCAL oText := TTxtFile():New( "leandro.xml" ) // only test</span><br /> <span style="color: #00C800;">LOCAL</span> oText := TTxtFile<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;">"FAKTURA.xml"</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// KAJOT</span><br /> <span style="color: #00C800;">LOCAL</span> n, cText := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">LOCAL</span> cImptxt, cTexto, oPrn, oFont, nLin, nLinha<br /><br /> <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span> .NOT. oText:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> ? <span style="color: #ff0000;">"impossible Open"</span><br /><br /> oText:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> QUIT<br /><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #B900B9;">// number max. lines.</span><br /> oText:<span style="color: #000000;">nMaxLineLength</span> := <span style="color: #000000;">350000</span> <span style="color: #B900B9;">// KAJOT - Look this.</span><br /><br /> oText:<span style="color: #000000;">RecCount</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// ONLY TEST</span><br /> <span style="color: #B900B9;">// FOR n = 1 TO 5120</span><br /><br /> <span style="color: #00C800;">FOR</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">330000</span> <span style="color: #B900B9;">// FACTURA.XML -> 326.642 lines. KAJOT</span><br /><br /> oText:<span style="color: #000000;">ReadLine</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> cText += oText:<span style="color: #000000;">ReadLine</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oText:<span style="color: #000000;">Skip</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">NEXT</span><br /><br /> cTexto := ALLTRIM<span style="color: #000000;">(</span> cText <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// ? cTexto</span><br /><br /> <span style="color: #0000ff;">PRINTER</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Imprimindo um TXT"</span> PREVIEW <span style="color: #0000ff;">MODAL</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"COURIER NEW"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, - <span style="color: #000000;">8</span> <span style="color: #0000ff;">OF</span> oPrn<br /><br /> oPrn:<span style="color: #000000;">SetPage</span><span style="color: #000000;">(</span> <span style="color: #000000;">9</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// A4</span><br /> oPrn:<span style="color: #000000;">SetPortrait</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// Vertical</span><br /><br /> <span style="color: #0000ff;">PAGE</span><br /><br /> nLin := <span style="color: #000000;">1</span><br /><br /> <span style="color: #00C800;">FOR</span> nLinha = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> MLCOUNT<span style="color: #000000;">(</span> cTexto, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span><br /><br /> SYSREFRESH<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oPrn:<span style="color: #000000;">CmSay</span><span style="color: #000000;">(</span> nLin := nLin + .<span style="color: #000000;">4</span>, <span style="color: #000000;">1.5</span>, MEMOLINE<span style="color: #000000;">(</span> cTexto, <span style="color: #000000;">100</span>, nLinha <span style="color: #000000;">)</span>, oFont <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> nLin > <span style="color: #000000;">25</span><br /><br /> nLin := <span style="color: #000000;">1</span><br /><br /> <span style="color: #0000ff;">ENDPAGE</span><br /><br /> <span style="color: #0000ff;">PAGE</span><br /><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">NEXT</span><br /><br /> <span style="color: #0000ff;">ENDPAGE</span><br /><br /> <span style="color: #0000ff;">ENDPRINT</span><br /><br /> oFont:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oText:<span style="color: #000000;">Close</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;">// FIN / END</span><br /> </div>[/code:30ymux8r]
Regards, saludos. |
read mailbox | Hi,
How can I read information from my mailbox ? |
read mailbox | Hello,
what email system do you have?
Best regards,
Otto |
read mailbox | Yandex, Mail, GMail |
read mailbox | Hello,
I am sorry I only did some work for Outlook.
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=33215&p=234030&hilit=email&sid=ea0ea3b37c9ba3b8aac6530741f32678#p234030">viewtopic.php?f=3&t=33215&p=234030&hilit=email&sid=ea0ea3b37c9ba3b8aac6530741f32678#p234030</a><!-- l -->
Best regards,
Otto |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.