Una pregunta de recursos

Postby Pedro » Tue Jun 03, 2008 10:17 pm

Pedro wrote:
Antonio Linares wrote:Prueba asi:
Code: Select all  Expand view  RUN
ACTIVATE DIALOG oDlg ;
   ON INIT PonSays( oDlg, oFont, Textos( oDlg ) )

Y en PonSays() añade esto:
Code: Select all  Expand view  RUN
For nInd := 1 TO Len(aText)
   REDEFINE SAY oSay[nInd] PROMPT aText[nInd] ID nInd OF oDlg ;
      COLOR RGB(0,0,0),RGB(255,204,102) FONT oFont
   oSay[nInd]:Initiate()  // esto!
Next



Pues no va, Antonio, da un error de ejecución

Application
===========
Path and name: C:\Recibos\RECIBOS.Exe (32 bits)
Size: 606,208 bytes
Time from start: 0 hours 0 mins 2 secs
Error occurred at: 04-06-2008, 00:13:19
Error description: Error BASE/1005 Class: 'NIL' has no property: INITIATE
Args:
[ 1] = U
[ 2] = O Object

Stack Calls
===========
Called from: => _INITIATE(0)
Called from: gesh0200.prg => PONSAYSC(127)
Called from: gesh0200.prg => (b)DISCBAN(88)
Called from: DIALOG.PRG => TDIALOG:INITIATE(0)
Called from: DIALOG.PRG => TDIALOG:HANDLEEVENT(0)
Called from: => DIALOGBOX(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: gesh0200.prg => DISCBAN(88)
Called from: geshinic.prg => (b)MAIN(68)
Called from: BTNBMP.PRG => TBTNBMP:CLICK(0)
Called from: BTNBMP.PRG => TBTNBMP:LBUTTONUP(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: CONTROL.PRG => TCONTROL:HANDLEEVENT(0)
Called from: BTNBMP.PRG => TBTNBMP:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TMDIFRAME:ACTIVATE(0)
Called from: geshinic.prg => MAIN(90)

System
======
CPU type: Intel(R) Celeron(R) CPU 420 @ 1.60GHz 1600 Mhz
Hardware memory: 1016 megs

Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %

Compiler version: xHarbour build 1.1.0 Intl. (SimpLex)
Windows version: 5.1, Build 2600 Service Pack 2

Windows total applications running: 52
.................(aqui las aplicaciones ejecutándose)..........

Variables in use
================
Procedure Type Value
==========================
_INITIATE
Param 1: O Class: TSAY
Local 1: A Len: 1
Local 2: U
Local 3: N 0
PONSAYSC
Param 1: O Class: TDIALOG
Param 2: O Class: TFONT
Param 3: A Len: 15
Local 1: A Len: 15
Local 2: N 1
(b)DISCBAN
Param 1: O Class: TDIALOG
TDIALOG:INITIATE
Param 1: N 394406
Param 2: N 525480
Local 1: O Class: TDIALOG
Local 2: L .T.
Local 3: U
Local 4: U
Local 5: L .F.
Local 6: U
TDIALOG:HANDLEEVENT
Param 1: N 272
Param 2: N 394406
Param 3: N 525480
Local 1: O Class: TDIALOG
DIALOGBOX
Param 1: N 4194304
Param 2: C "DLGDISCO"
Param 3: N 722114
Param 4: O Class: TDIALOG
TDIALOG:ACTIVATE
Param 1: U
Param 2: U
Param 3: B {|| ... }
Param 4: L .T.
Param 5: U
Param 6: L .T.
Param 7: B {|| ... }
Param 8: U
Param 9: U
Param 10: L .F.
Local 1: O Class: TDIALOG
Local 2: N 722114
Local 3: U
Local 4: U
Local 5: U
Local 6: O Class: TDIALOG
DISCBAN
Local 1: D - -
Local 2: O Class: TDIALOG
Local 3: U
Local 4: A Len: 15
(b)MAIN
Param 1: O Class: TBTNBMP
TBTNBMP:CLICK
Local 1: O Class: TBTNBMP
TBTNBMP:LBUTTONUP
Param 1: N 27
Param 2: N 32
Param 3: O Class: TBTNBMP
Local 1: U
Local 2: L .T.
TWINDOW:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 1769504
TCONTROL:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 1769504
Local 1: O Class: TBTNBMP
Local 2: U
TBTNBMP:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 1769504
Local 1: O Class: TBTNBMP
_FWH
Param 1: N 1769504
Param 2: N 514
Param 3: N 0
Param 4: N 1769504
Param 5: N 6
Local 1: O Class: TBTNBMP
WINRUN
Param 1: N 722114
TMDIFRAME:ACTIVATE
Param 1: C "MAXIMIZED"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: U
Param 7: U
Param 8: B {|| ... }
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: B {|| ... }
Param 18: U
Param 19: U
Local 1: O Class: TMDIFRAME
Local 2: U
Local 3: U
MAIN
Local 1: O Class: TBITMAP
Local 2: O Class: TICON
Local 3: A Len: 2
Local 4: N 16056320

Linked RDDs
===========
DBF
DBFFPT
DBFCDX
DBFNTX
DBFBLOB

DataBases in use
================

Classes in use:
===============
1 HASHENTRY
2 HBCLASS
3 HBOBJECT
4 TFONT
5 TWINDOW
6 TCONTROL
7 TICON
8 TBRUSH
9 TBITMAP
10 TMDIFRAME
11 TMENU
12 TMENUITEM
13 TMDICLIENT
14 TMSGBAR
15 TRECT
16 TMSGITEM
17 TTIMER
18 TBAR
19 TBTNBMP
20 TDATABASE
21 TDIALOG
22 TXBROWSE
23 TXBRWCOLUMN
24 TSCROLLBAR
25 TGET
26 GET
27 TCLIPGET
28 TBUTTON
29 TSAY
30 ERROR
31 TREG32

Memory Analysis
===============
134 Static variables

Dynamic memory consume:
Actual Value: 0 bytes
Highest Value: 0 bytes

Un saludo
Pedro
Gracias Antonio, lo probaré, si funciona bien ya podemos poner los Says de los dialogos tomándolos directamente desde el recurso con el color del dialogo, y, si se cambia un texto no hay que tocar el prg, si no el recurso.

Un saludo
Pedro
User avatar
Pedro
 
Posts: 464
Joined: Tue Mar 21, 2006 7:30 pm
Location: Córdoba (España)

Postby Antonio Linares » Tue Jun 03, 2008 10:31 pm

Pedro,

Pruébalo así:
Code: Select all  Expand view  RUN
local oSay

For nInd := 1 TO Len(aText)
   REDEFINE SAY oSay PROMPT aText[nInd] ID nInd OF oDlg ;
      COLOR RGB(0,0,0),RGB(255,204,102) FONT oFont
   oSay[ nInd ] := oSay
   oSay[nInd]:Initiate()
Next
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42160
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Pedro » Wed Jun 04, 2008 2:24 pm

Antonio, en la linea nueva, da un error un tanto raro, dice que no está definido el ID 1 (ERROR FIVEWIN 1) y eso no es cierto, en el rc está perfectamente definido, te copio las primeras definiciones del rc

DLGDISCO DIALOG DISCARDABLE 68, 78, 322, 212
STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "Emision de recibos al banco"
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "SUFIJO", 1, "Static", WS_GROUP, 19, 8, 60, 8
CONTROL "PRESENTADOR", 2, "Static", WS_GROUP, 19, 35, 60, 8
CONTROL "C.I.F./N.I.F.", 3, "Static", WS_GROUP, 238, 35, 60, 8
CONTROL "ORDENANTE", 4, "Static", WS_GROUP, 19, 61, 60, 8
CONTROL "C.I.F./N.I.F.", 5, "Static", WS_GROUP, 238, 61, 60, 8
CONTROL "FECHA DE EMISION", 6, "Static", WS_GROUP, 19, 91, 82, 8
CONTROL "FECHA DE CARGO", 7, "Static", WS_GROUP, 134, 91, 90, 8
CONTROL "NOMBRE DEL BANCO", 8, "Static", WS_GROUP, 19, 118, 114, 8


Un saludo
Pedro
User avatar
Pedro
 
Posts: 464
Joined: Tue Mar 21, 2006 7:30 pm
Location: Córdoba (España)

Previous

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 47 guests