previous chapter contents page top page next chapter

Proxy

Inherits from Stamp  




Class Description

Proxies are stand-ins for objects that can be mailed, beamed, printed, or filed. They are objects that represent larger items or collection of items. You often see viewable representations of proxies in Magic Cap. Minicards scattered over your desk are proxies standing for messages.

Programming information

Instantiate: rarely
Subclass: sometimes
Call its methods: often

You're not likely to create any objects of class Proxy. Instead, you'll use objects from Proxy's popular subclasses, such as class ContentProxy and class MiniCard. The other subclass is class TaskProxy, which stands in for Datebook tasks. You're not likely to use class TaskProxy unless you're working with the Datebook.

Methods defined by class Proxy

Class Proxy defines the following methods:

Method Description
AddToContainer Overridden to avoid recursively nested proxies
EachReference Overridden to include the proxy's target object if IsAlias is false
ExtractFromContainer Overridden to restore proxy flags after extracting the target
ScriptTarget Overridden to return the proxy's target as the target for scripts

Fields defined by class Proxy

Class Proxy defines the following fields:

Field Type Description
Inherited from SingleLinkable:
next Object Next item in view list
Inherited from Linkable:
previous Object Previous item in view list
Inherited from Viewable:
superview Viewable Container for this object
subview Viewable Object contained by this object
relativeOrigin Dot Origin relative to superview
contentSize Dot Size of content rectangle
viewFlags Unsigned Property settings
labelStyle TextStyle Text style of object's label
color Color Color of object's content
shadow Shadow Shadow drawn with object
sound Sound Sound associated with object
Inherited from Stamp:
image Image Image used to draw stamp
Defined by Proxy:
target Object The object for which this proxy is a stand-in; used by the
Target attribute
proxyFlags Unsigned Flags that control various aspects of the proxy object

Attributes defined by class Proxy

Class Proxy defines the following attributes:

Attribute Type Description
IsAlias Boolean False if the target object is treated as owned and true if
it's treated as noCopy
Target Object The object for which this proxy is a stand-in

Flags used by class Proxy

Class Proxy has two named flags you can set in the proxyFlags field. They're described here.

isAlias

#define isAliasBit               31

Set this flag if the proxy's target should be treated as if it's noCopy, that is, if the proxy is an alias to the the target. This flag shouldn't be set if the proxy owns the target object.

keepNameAsIs

#define keepNameAsIsBit          30

This proxy flag is used only by class MiniCard. A minicard with this flag set keeps its original object name , and doesn't set its name to be its target's label.