error on get value compiling from clipper

error on get value compiling from clipper

Postby Silvio » Wed Mar 17, 2010 10:46 am

on oldest clipper function I have


If ValType(uVar)<>"L"
oEdit:Value:=uVar
Endif

and


If lOk
If ValType(uVar)<>"L"
uVar:=oEdit:Value
Else
uVar:=oEdit:lChecked
Endif


How I can make on fwh ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: error on get value compiling from clipper

Postby anserkk » Wed Mar 17, 2010 11:15 am

Dear Mr.Silvio,

What is the error that you are getting ?

Instead of
Code: Select all  Expand view
oEdit:Value:=uVar


Try

Code: Select all  Expand view
oEdit:VarPut(uVar)


Regards

Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: error on get value compiling from clipper

Postby Silvio » Wed Mar 17, 2010 11:20 am

I try with varput and varget
and also with oEdit:oGet:=uVar
not run !!!


If I try with

If ValType(uVar)<>"L"
oEdit:varput(uVar)
Endif

MAKE THIIS ERROR


Application
===========
Path and name: C:\work\prg\fsdi2006\prg\testhil.Exe (32 bits)
Size: 2,116,608 bytes
Time from start: 0 hours 0 mins 2 secs
Error occurred at: 17-03-2010, 12:19:54
Error description: Error BASE/1004 Class: 'NIL' has no exported method: VARPUT
Args:
[ 1] = U
[ 2] = C Falconi Silvio

Stack Calls
===========
Called from: => VARPUT(0)
Called from: msgbox.prg => MSGEDIT(243)
Called from: main.prg => TEST_MSGEDIT(604)
Called from: main.prg => (b)TAPPLICATION:BUILDMENU(231)
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND(437)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND(1017)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(3347)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(966)
Called from: main.prg => TAPPLICATI
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: error on get value compiling from clipper

Postby anserkk » Wed Mar 17, 2010 11:44 am

Dear Mr.Silvio,

The following code is working fine here.

Code: Select all  Expand view
#include 'fivewin.ch'
//-------------------------------------------------------//
Function Main()
Local oDlg,oGet,oBtn,cTest:="Hello",lTest:=.F.

DEFINE DIALOG oDlg TITLE "Test"

@1,1 GET oGet VAR cTest OF oDlg
@3,3 BUTTON oBtn PROMPT "Test" OF oDlg ACTION Test(oGet,lTest)

ACTIVATE DIALOG oDlg

return nil

//-------------------------------------------------------//
Function Test(oGet,lTest)
if ValType(lTest) == "L"
    MsgInfo("Trying to assign Lgical Value to Get")
    oGet:VarPut(lTest)
    oGet:Refresh()
Endif

if ValType(oGet:Value) == "L"
    MsgInfo("Now Get var is having a Logical Value")
    oGet:VarPut(lTest)
    oGet:Refresh()
Else
    MsgInfo("Value in GET is not of a logical type")
Endif
MsgInfo("Everything OK")
Return NIL


Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: error on get value compiling from clipper

Postby Silvio » Wed Mar 17, 2010 12:08 pm

i THINK THE ERROR IS

If ValType(uVar)<>"L" <----------------------- i MADE <> "L" AND NOT =="L"
oEdit:varput(uVar)
oEdit:REFRESH()
Endif
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: error on get value compiling from clipper

Postby Daniel Garcia-Gil » Wed Mar 17, 2010 1:29 pm

Silvio...

Silvio wrote:Error description: Error BASE/1004 Class: 'NIL' has no exported method: VARPUT


you error come from oEdit object no exist, check if oEdit is a valid object
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 79 guests