From: Geoff Chambers on
This question was asked previously and I could only reply to the
author. Sorry, Willie, I thought I was asking the Group. <g>

I am trying to assign a value to an object that has an ASSIGN TEXT
method. Since this is a reserve word, I'm told I need to do this:

LOCAL oFF AS IFormulaFieldDefinition
LOCAL oFFS AS IFormulaFieldDefinitions

oFFS:= SELF:oDoc:FormulaFields // oDOC is the report object
oFF := oFFS:GetItemByName("Test") // formula name
DebugOutput(oFF:Text) // this is OK it returns Test the value in the
formula
IVarPut(oFF,#Text,"A new Test") // assign wouldn't work, so I tried
this, still not working

But no success, thought maybe someone got this working.
From: Karl Faller on
Geoff,
>I am trying to assign a value to an object that has an ASSIGN TEXT
>method. Since this is a reserve word, I'm told I need to do this:
I just tried:
LOCAL @@Text AS STRING
and got "variable Text is declared but not referenced", // notice the
"Text",

so added a
@@Text := "HU"
and the compiler accepts this, so maybe you could use this road?

Karl
From: Geoff Schaller on
Show us the code for the text assign please.

(It should work with the @@ convention Robert created)



"Geoff Chambers" <gchambers02(a)msn.com> wrote in message
news:36547d60-d408-4c54-a178-974db16d1cf7(a)d2g2000yqa.googlegroups.com:

> This question was asked previously and I could only reply to the
> author. Sorry, Willie, I thought I was asking the Group. <g>
>
> I am trying to assign a value to an object that has an ASSIGN TEXT
> method. Since this is a reserve word, I'm told I need to do this:
>
> LOCAL oFF AS IFormulaFieldDefinition
> LOCAL oFFS AS IFormulaFieldDefinitions
>
> oFFS:= SELF:oDoc:FormulaFields // oDOC is the report object
> oFF := oFFS:GetItemByName("Test") // formula name
> DebugOutput(oFF:Text) // this is OK it returns Test the value in the
> formula
> IVarPut(oFF,#Text,"A new Test") // assign wouldn't work, so I tried
> this, still not working
>
> But no success, thought maybe someone got this working.

From: Geoff Chambers on
This is generated by the Automation Server, the access works but I
can't use the assign. It could be the OLE Control itself. I'm learning
that the DLL I use may not provide all of the methods that are suppose
to be available.

ASSIGN Text(;
uParam001; // AS STRING
) CLASS IFormulaFieldDefinition
// Gets or sets formula field text.

LOCAL oMethod AS cOleMethod
LOCAL uRetValue AS USUAL

oMethod := cOleMethod{}
oMethod:symName := String2Symbol("Text")
oMethod:iMemberid := 157
oMethod:wInvokeKind := INVOKE_PROPERTYPUT
oMethod:nParams := 1
oMethod:cParamTypes := VTS_BSTRW

uRetValue := SELF:__Invoke(oMethod, DWORD(_BP+16),PCount())

RETURN (uRetValue)
ACCESS Text( ) CLASS IFormulaFieldDefinition
// Gets or sets formula field text.

LOCAL oMethod AS cOleMethod
LOCAL uRetValue AS USUAL

oMethod := cOleMethod{}
oMethod:symName := String2Symbol("Text")
oMethod:iMemberid := 157
oMethod:wInvokeKind := INVOKE_PROPERTYGET
oMethod:bRetType := VT_BSTR

uRetValue := SELF:__Invoke(oMethod, DWORD(_BP+16),PCount())

RETURN (uRetValue)



On Mar 5, 8:59 pm, "Geoff Schaller"
<geo...(a)softxwareobjectives.com.au> wrote:
> Show us the code for the text assign please.
>
> (It should work with the @@ convention Robert created)
>
> "Geoff Chambers" <gchamber...(a)msn.com> wrote in message
>
> news:36547d60-d408-4c54-a178-974db16d1cf7(a)d2g2000yqa.googlegroups.com:
>
>
>
> > This question was asked previously and I could only reply to the
> > author. Sorry, Willie, I thought I was asking the Group. <g>
>
> > I am trying to assign a value to an object that has an ASSIGN TEXT
> > method. Since this is a reserve word, I'm told I need to do this:
>
> > LOCAL oFF AS IFormulaFieldDefinition
> > LOCAL oFFS AS IFormulaFieldDefinitions
>
> > oFFS:= SELF:oDoc:FormulaFields  // oDOC is the report object
> > oFF := oFFS:GetItemByName("Test")  // formula name
> > DebugOutput(oFF:Text)  // this is OK it returns Test the value in the
> > formula
> > IVarPut(oFF,#Text,"A new Test") // assign wouldn't work, so I tried
> > this, still not working
>
> > But no success, thought maybe someone got this working.- Hide quoted text -
>
> - Show quoted text -