Hi James,

To re-use a Method inside another Method - which happens to belong to the
same TCF:

Note: Re-instantiating the Object is not necessary.

-- Drag the Method into the Method:
-- Set your 'Object instance variable' to:
    Scope: Method
    Name: this

Or if you want to the <@CALLMETHOD> Metatag:

<@CALLMETHOD OBJECT="method$this"
METHOD="someMethod('parameter1','parameter2')">


The variable 'this' automatically refers to the current Class (TCF), and
because you are inside a Method - Method Scope is used.

Just be careful about doing this inside your On_Create Method - because then
your TCF is going to call itself before it has finished loading the first
time.

Hope this is what you are looking for. Cheers...

Scott Cadillac
http://xml-extra.net
[EMAIL PROTECTED]

VP, Research and Development
Plus International Corp.
604-460-1843
[EMAIL PROTECTED]
http://www.plusinternational.com

Vancouver, BC, Canada

Does your company have an Enterprise Information Portal? Check out Salsa at
www.plusinternational.com/flash/salsa.htm

----- Original Message -----
From: "James Macfarlane" <[EMAIL PROTECTED]>
To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 1:55 PM
Subject: Witango-Talk: Recursive TCF calls


> Hello all,
>
> I've got a retail application where I've built a TCF to display product
> info. Sometimes a product will have "related products". From inside my
> TCF file  need to call the same TCF to display each of the related
> products.
>
> Do I need to instantiate the object from inside the object before my
> method call and give a new instance name?
>
> - or -
>
> Do I assume the object exists (well, I'm already IN the object, so it
> must), then just make another call to my method?
>
> - or -
>
> Do I have to assign the scope of my original object call to something
> other than local?
>
> So far I just get:
>
> Error
> An error occurred while processing your request:
> File: ShowProduct.tcf
> Position: Show
> Class: Internal
> Main Error Number: -8
>
>
> Invalid value specified. Previous value has been used.
> SP2
>
>
>
>
> Thank you....James.
>
>
>
>

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to