MsgInfo Vs Say

MsgInfo Vs Say

Postby swpoint » Thu Aug 02, 2007 9: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
swpoint
 
Posts: 5
Joined: Thu Aug 02, 2007 9:20 am

Postby Antonio Linares » Thu Aug 02, 2007 10:28 am

Eugenio,

Do it this way:
Code: Select all  Expand view  RUN
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 49 guests