Creating Base Applications for TclPro Wrapper
This section describes how to create a Tcl interpreter that you can use with TclPro Wrapper, otherwise known as a base application. Base applications require special support for accessing files from the wrapped application's internal file archive.
Note: You can also use a base application as a regular Tcl interpreter for an unwrapped applications.
In general, writing a base application is the same as writing a regular Tcl interpreter. Typically, the only changes you have to make are:
- Include proWrap.h in your application (proWrap.h is located in the include subdirectory of the TclPro installation directory)
- Call Pro_WrapTclMain or Pro_WrapTkMain from your application instead of Tcl_Main or Tk_Main
- Link your application with the appropriate TclPro Wrapper library
Other than these changes, you write your base application as you would a regular interpreter and link it with all other libraries you would typically need to link with (for example, Tcl83s.lib, tbcload13s.lib, itcl32s.lib, etc.). See the appropriate section of "Creating Regular Tcl Interpreters" for detailed instructions.
Note: File access functions in the Tcl and Tk C libraries (for example, Tcl_OpenFileChannel and Tk_GetBitmap) access files in the internal archive of a wrapped application in the same manner as file access procedures in Tcl scripts (for example, source and open). See "How the Internal File Archive Works in a Wrapped Application" for more information on the internal file archive of a wrapped application.
http://www.ajubasolutions.com Voice: (650) 210-0100 Fax: (650) 210-0101 support@ajubasolutions.com |