The keyword CLASSDEFAULTVIEW

[Autolink] Menu

Beginning with WARP 4 Fixpack #1 there is a new keyword to set the default view for a class of files. The syntax for this keyword is:

 
  Class WPDataFile (?)

  Key Name         Value          Description
  ----------------------------------------------------------------------
  CLASSDEFAULTVIEW view_name      "view name" is the name of the view as
                                  it appears in the'context menu for the
                                  object. For convenience, spaces or
                                  control characters such as carriage
                                  returns, line feeds, or tabs may be
                                  omitted (or replaced with a blank).

                                  Note that this changes the default
                                  view for new objects - not for
                                  existing objects!

For example, to change the default view for new .FLC files to Video Editor you may use the following code:

 
/* sample code to change the default view for new .FLC files          */

  call rxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
  call SysLoadFuncs

  say SysSetObjectData( 'C:\OS2\APPS\KLONDIKE.FLC',,
                        'CLASSDEFAULTVIEW="Video Editor"' )

To get another example for using this feature, see the file \OS2\SETDEFV.CMD .


[Back: The keyword DOS_AUTOEXEC]
[Next: The keyword ICONPOS]