FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour HELP for a test with DSAY
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
HELP for a test with DSAY
Posted: Sat Nov 13, 2010 09:15 PM
I must show on a control dsay the records from a archive


Code (fw): Select all Collapse
#include "fivewin.ch"
#include "Dsay.ch"


Function Test()
Local oWnd
Local oAnimation
lOCAL aItems

DEFINE FONT oFontanimation NAME "MS Sans Serif" SIZE 0,-36 BOLD
DEFINE WINDOW oWnd

          @ 10, 2 DYNAMIC SAY  oAnimation ;
                         FONT oFontanimation  ;
                         SIZE 700,100 PIXEL CENTERED COLOR CLR_GRAY, CLR_WHITE ;
                         VERTICAL SCROLL SPEED 50 WRAP OF oWnd


USE MESSAGGI ALIAS MESSAGGI

     MESSAGGI->(dbgotop())
     DO WHILE !Messaggi->(eof())
      //  aadd(aItems,("New message from "+STR(Messaggi->FROM)+" TO "+STR(Messaggi->TO)))
        oAnimation:SetText("New message from "+STR(Messaggi->FROM)+" TO "+STR(Messaggi->TO) )
        MESSAGGI->(dbskip())
     ENDDO



ACTIVATE WINDOW oWnd
RETURN NIL




But when I compile and execute this let me say settext error method why ?
Best Regards, Saludos



Falconi Silvio
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: HELP for a test with DSAY
Posted: Mon Nov 15, 2010 11:39 AM
Silvio,

you didn´t define a variable for the text of dsay

Try this

Code (fw): Select all Collapse
@ 10, 2 DYNAMIC SAY  oAnimation VAR cSay;
                         FONT oFontanimation  ;
                         SIZE 700,100 PIXEL CENTERED COLOR CLR_GRAY, CLR_WHITE ;
                         VERTICAL SCROLL SPEED 50 WRAP OF oWnd
kind regards

Stefan
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: HELP for a test with DSAY
Posted: Mon Nov 15, 2010 12:50 PM

thanks I saw
but this is not the problem
I can show onlt the last record
But I want show all record or all record have the field "READ" = .F.

Best Regards, Saludos



Falconi Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: HELP for a test with DSAY
Posted: Mon Nov 15, 2010 12:54 PM
FOUND THE SOLUTION!!!



Code (fw): Select all Collapse
#include "fivewin.ch"
#include "Dsay.ch"


Function Test()
Local oWnd
Local oAnimation
lOCAL aItems
Local  cSay:=""

DEFINE FONT oFontanimation NAME "MS Sans Serif" SIZE 0,-36 BOLD
DEFINE WINDOW oWnd

         @ 10, 2 DYNAMIC SAY  oAnimation VAR cSay;
                         FONT oFontanimation  ;
                         SIZE 700,100 PIXEL CENTERED COLOR CLR_GRAY, CLR_WHITE ;
                         VERTICAL SCROLL SPEED 50 WRAP OF oWnd

USE MESSAGGI ALIAS MESSAGGI

     MESSAGGI->(dbgotop())
     DO WHILE !Messaggi->(eof())
      //  aadd(aItems,("New message from "+STR(Messaggi->FROM)+" TO "+STR(Messaggi->TO)))

        csay += "New message from "+STR(Messaggi->FROM)+" TO "+STR(Messaggi->TO) +CRLF  +CRLF +CRLF

        MESSAGGI->(dbskip())

     ENDDO

       oAnimation:SetText(csay )


ACTIVATE WINDOW oWnd
RETURN NIL
Best Regards, Saludos



Falconi Silvio

Continue the discussion