FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC MsgInfo Vs Say
Posts: 5
Joined: Thu Aug 02, 2007 09:20 AM
MsgInfo Vs Say
Posted: Thu Aug 02, 2007 09:40 AM

I am trying to write my first program with fivewin for pc pocket pc.
I must do a program to check the article existence in a store.
The palmar must read a Bar Code and execute a seek
with that in an DBF archive.

I am trying this code:

include "Fwce.ch"

FUNCTION MAIN()

LOCAL oWnd1
LOCAL cVar2 := SPACE( 20 )

PUBLIC barcode := SPACE( 20 )

DEFINE WINDOW oWnd1

@ 1, 10 GET barcode SIZE 70, 20  valid cerca()
@ 3, 10 GET cVar2 SIZE 70, 20

ACTIVATE WINDOW oWnd1

RETURN NIL

function cerca()

msginfo(barcode)
@ 5,10 SAY barcode SIZE 70,20

return nil

thought I would insert in Cerca()
seek (barcode) and then
showing the article fields values
with Say
but this prg signals:

Argument error
conditional Args: [ 1]=U

msginfo shows the
value without problems.

how can I do?

Regards
Eugenio Belli

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
MsgInfo Vs Say
Posted: Thu Aug 02, 2007 10:28 AM
Eugenio,

Do it this way:
#include "Fwce.ch" 

FUNCTION MAIN() 

LOCAL oWnd1, oSay 
LOCAL cVar2 := SPACE( 20 ) 

PUBLIC barcode := SPACE( 20 ) 

DEFINE WINDOW oWnd1 

@ 1, 10 GET barcode SIZE 70, 20 valid cerca( oSay ) 
@ 3, 10 GET cVar2 SIZE 70, 20 

@ 5,10 SAY oSay VAR barcode SIZE 70,20 

ACTIVATE WINDOW oWnd1 

RETURN NIL 

function cerca( oSay ) 

msginfo(barcode) 

oSay:SetText( barcode )

return .T. // Valid functions must return a logical value
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion