Macro Language Reference > Macros > Tag > tprotect
  
tprotect
Description
Controls primitive modify/delete/rename protection on streams.
Syntax
tprotect ( stream:s flags:n )
stream
The name of the stream to which protection should be applied
flags
A cumulative value calculated by specifying the actions that are not permitted for a frame:
1
Modify (tfprotect and tprotect)
2
Delete (tfprotect and tprotect)
4
Rename (tprotect only)
8
Not applicable - Create
16
Save (tprotect only)
32
Update (tprotect only)
64
Move (tfprotect only)
128
Resize horizontally (tfprotect only)
256
Resize vertically (tfprotect only)
Additional Information
The tfprotect and tprotect macros were implemented to control change permissions on frames and tags respectively. For now, these are equivalent to the cmsetrights and cmtxtrights that used to be part of the ODBC extension. This extension is not available in the Unicode version, hence the need for some macros that work in all versions.
The macros are quite primitive as there are no dialog box equivalents. The permissions system is also quite basic in that it offers the lowest level of protection. For example, if a tag has modify protection set, it will not be possible to add or remove a password. It will also not be possible to add or remove the tflock property.
Related Links