GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MY (n)

NAME

my - invoke any method of current object

CONTENTS

Synopsis
Description
Examples
Keywords

SYNOPSIS

package require TclOO

my methodName ?arg ...?


   








\L’|0u-1v’\l’75u+3n_’\L’0u+1v-0u’\l’|0u-1.5n_’



\L’|0u-1v’\L’0u+1v-0u’\l’|0u-1.5n_’





DESCRIPTION

The my command is used to allow methods of objects to invoke any method of the object (or its class). In particular, the set of valid values for methodName is the set of all methods supported by an object and its superclasses, including those that are not exported. The object upon which the method is invoked is always the one that is the current context of the method (i.e. the object that is returned by self object) from which the my command is invoked.

Each object has its own my command, contained in its unique namespace.

EXAMPLES

This example shows basic use of my to use the variables method of the oo::object class, which is not publically visible by default:

oo::class create c {
    method count {} {
        my variable counter
        print [incr counter]
    }
}
c create o
o count              -> prints "1"
o count              -> prints "2"
o count              -> prints "3"


SEE ALSO

next(n), oo::object(n), self(n)

KEYWORDS

method, method visibility, object, private method, public method

Search for    or go to Top of page |  Section n |  Main Index


TclOO MY (n) 0.1

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.