RE: Witango-Talk: Class Files

2003-06-26 Thread Ben Johansen
This got me for the longest time.
the best way to think the return variable is it is defining the
variable to use within the method.

So within you method do a final assign to this variable 
-example-
@ASSIGN NAME=returnValue
VALUE=@@method$AttribValue[1,@@Method$Attribute] SCOPE=method

NOTE: change the type to match what your returning

and when you call your method in the TAF do so within an 
-example-
@ASSIGN NAME=Protect SCOPE=local VALUE='@CALLMETHOD OBJECT=OOobj
SCOPE=local METHOD=GetStyle(@@local$StyVal,style:cell-protect)
METHODTYPE=invoke'

Then just use the values in the newly assigned variable.

Hope this helps ;-)

Ben Johansen - http://www.pcforge.com
Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm 
Authorized MDaemon Mail Server Reseller
http://www.pcforge.com/AltN.htm


-Original Message-
From: Fogelson, Steve [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 26, 2003 8:12 AM
To: Witango User Group (E-mail)
Subject: Witango-Talk: Class Files

Win2K sp3 server, R:Tango 2000, R:Base 6.5

I setup a class file with :
Return Value as Method Variable
Parameters: one variable in (StateID), two variables out (StateName,
StateAbbrev)

I understand that I have to reference the in variable with a method
scope within the class file. I assume within the class file I assign the
out variables with a scope of method.

How do I read the variables coming out of the class file within the
calling
taf file?

Is there something I am missing with the Return Value setting of Method
Variable?

Sorry for this question, I read the manual and it didn't make sense to
me.

Thanks

Steve Fogelson
Internet Commerce Solutions

TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf


TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf


RE: Witango-Talk: Class Files

2003-06-26 Thread Fogelson, Steve
Ben,

Thanks for the reply. I'm still having a little trouble.

I setup the class file (SelectState) with :
Return Value as Method Variable, returnValue, Array
Parameters: in (StateID), out (StateName, StateAbbrev)

I have a search action that executes properly and then a html action with
the following code:

@assign method$State_Name @var local$resultSet[1,State_Name]
@assign method$State_Abbrev @var local$resultSet[1,State_Abbrev]
@assign method$returnValue[1,1] @var method$State_Name
@assign method$returnValue[1,2] @var method$State_Abbrev

I taking one step at a time to debug, so I call the object with the
following:

@CALLMETHOD domain$Common SelectState(@var user$ArgBillToState)
ENCODING=NONE

but I get the following error:

[Search Action] [333] SearchState  
[Query] [333] SELECT S1.State_Name,S1.State_Abbrev FROM State S1 WHERE
(S1.State_ID=1) 
[ActionResults] [350] Minnesota MN  
[Changed Vars] [366] method$returnValue[1,1]=Minnesota
method$returnValue[1,2]=MN method$State_Abbrev=MN
method$State_Name=Minnesota 
[Error] [366] -10 Invalid or empty variable name.  
[Error] [366] -800 An error occurred while preparing the parameters for this
method invocation.  
[Error] [366] -806 An unspecified method call error occurred. SelectState  
[Error] [366] -801 An error occurred while invoking this method. SelectState


Any ideas

Thanks

Steve



-Original Message-
From: Ben Johansen [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 1:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Witango-Talk: Class Files


This got me for the longest time.
the best way to think the return variable is it is defining the
variable to use within the method.

So within you method do a final assign to this variable 
-example-
@ASSIGN NAME=returnValue
VALUE=@@method$AttribValue[1,@@Method$Attribute] SCOPE=method

NOTE: change the type to match what your returning

and when you call your method in the TAF do so within an 
-example-
@ASSIGN NAME=Protect SCOPE=local VALUE='@CALLMETHOD OBJECT=OOobj
SCOPE=local METHOD=GetStyle(@@local$StyVal,style:cell-protect)
METHODTYPE=invoke'

Then just use the values in the newly assigned variable.

Hope this helps ;-)

Ben Johansen - http://www.pcforge.com
Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm 
Authorized MDaemon Mail Server Reseller
http://www.pcforge.com/AltN.htm


-Original Message-
From: Fogelson, Steve [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 26, 2003 8:12 AM
To: Witango User Group (E-mail)
Subject: Witango-Talk: Class Files

Win2K sp3 server, R:Tango 2000, R:Base 6.5

I setup a class file with :
Return Value as Method Variable
Parameters: one variable in (StateID), two variables out (StateName,
StateAbbrev)

I understand that I have to reference the in variable with a method
scope within the class file. I assume within the class file I assign the
out variables with a scope of method.

How do I read the variables coming out of the class file within the
calling
taf file?

Is there something I am missing with the Return Value setting of Method
Variable?

Sorry for this question, I read the manual and it didn't make sense to
me.

Thanks

Steve Fogelson
Internet Commerce Solutions

TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf


TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf


RE: Witango-Talk: Class Files

2003-06-26 Thread Ben Johansen
Personally I take the lazy path

@assign method$State_Name @var local$resultSet[1,State_Name]
@assign method$State_Abbrev @var local$resultSet[1,State_Abbrev]
@assign method$returnValue[1,1] @var method$State_Name
@assign method$returnValue[1,2] @var method$State_Abbrev
all equals
@assign method$returnValue value=@@resutltSet

but the issue is in how you are calling the method.
@CALLMETHOD domain$Common SelectState(@var user$ArgBillToState)
ENCODING=NONE

I thought the object was supposed to remain in the local scope, if you
are using less than Witango 5. It might be scope

Try
@CALLMETHOD local$Common SelectState('@@user$ArgBillToState')
ENCODING=NONE
(that is if it is a string value)

-or-

I have not personally tried to reduce the @CALLMETHOD as you have
try 
@ASSIGN NAME=StateVals SCOPE=local VALUE='@CALLMETHOD
OBJECT=Common
SCOPE=local METHOD= SelectState('@@user$ArgBillToState')
METHODTYPE=invoke'

Hope this helps, If you want you can send the TCF off list to me ;-)


Ben Johansen - http://www.pcforge.com
Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm 
Authorized MDaemon Mail Server Reseller
http://www.pcforge.com/AltN.htm


-Original Message-
From: Fogelson, Steve [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 26, 2003 12:18 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Witango-Talk: Class Files

Ben,

Thanks for the reply. I'm still having a little trouble.

I setup the class file (SelectState) with :
Return Value as Method Variable, returnValue, Array
Parameters: in (StateID), out (StateName, StateAbbrev)

I have a search action that executes properly and then a html action
with
the following code:

@assign method$State_Name @var local$resultSet[1,State_Name]
@assign method$State_Abbrev @var local$resultSet[1,State_Abbrev]
@assign method$returnValue[1,1] @var method$State_Name
@assign method$returnValue[1,2] @var method$State_Abbrev

I taking one step at a time to debug, so I call the object with the
following:

@CALLMETHOD domain$Common SelectState(@var user$ArgBillToState)
ENCODING=NONE

but I get the following error:

[Search Action] [333] SearchState  
[Query] [333] SELECT S1.State_Name,S1.State_Abbrev FROM State S1 WHERE
(S1.State_ID=1) 
[ActionResults] [350] Minnesota MN  
[Changed Vars] [366] method$returnValue[1,1]=Minnesota
method$returnValue[1,2]=MN method$State_Abbrev=MN
method$State_Name=Minnesota 
[Error] [366] -10 Invalid or empty variable name.  
[Error] [366] -800 An error occurred while preparing the parameters for
this
method invocation.  
[Error] [366] -806 An unspecified method call error occurred.
SelectState  
[Error] [366] -801 An error occurred while invoking this method.
SelectState


Any ideas

Thanks

Steve



-Original Message-
From: Ben Johansen [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 1:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Witango-Talk: Class Files


This got me for the longest time.
the best way to think the return variable is it is defining the
variable to use within the method.

So within you method do a final assign to this variable 
-example-
@ASSIGN NAME=returnValue
VALUE=@@method$AttribValue[1,@@Method$Attribute] SCOPE=method

NOTE: change the type to match what your returning

and when you call your method in the TAF do so within an 
-example-
@ASSIGN NAME=Protect SCOPE=local VALUE='@CALLMETHOD OBJECT=OOobj
SCOPE=local METHOD=GetStyle(@@local$StyVal,style:cell-protect)
METHODTYPE=invoke'

Then just use the values in the newly assigned variable.

Hope this helps ;-)

Ben Johansen - http://www.pcforge.com
Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm 
Authorized MDaemon Mail Server Reseller
http://www.pcforge.com/AltN.htm


-Original Message-
From: Fogelson, Steve [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 26, 2003 8:12 AM
To: Witango User Group (E-mail)
Subject: Witango-Talk: Class Files

Win2K sp3 server, R:Tango 2000, R:Base 6.5

I setup a class file with :
Return Value as Method Variable
Parameters: one variable in (StateID), two variables out (StateName,
StateAbbrev)

I understand that I have to reference the in variable with a method
scope within the class file. I assume within the class file I assign the
out variables with a scope of method.

How do I read the variables coming out of the class file within the
calling
taf file?

Is there something I am missing with the Return Value setting of Method
Variable?

Sorry for this question, I read the manual and it didn't make sense to
me.

Thanks

Steve Fogelson
Internet Commerce Solutions

TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf


TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf