The vgTcl Suite

Frequently Asked Questions


  1. I'm trying to embed a Tcl interpreter in my Vega app by loading /usr/local/PSI/demo/vginterp.pftcl as an object in my ADF. Why doesn't the interpreter respond?
    The vgObject containing vginterp.pftcl must be in the vgScene.

  2. How does vgTcl know which GL libraries to use?
    vgTcl and pfTcl are OpenGL only.

  3. Why do I get an invalid command name error when trying to execute Vega commands?
    Each Tcl interpreter must declare the extension modules it needs. For example, if your script will use the Performer, base Vega, and Vega Special Effects APIs:
    package require Pftcl_ogl
    package require Vgtcl_ogl
    package require Vgfxtcl_ogl

    Vgu_AutoPackageRequire will automatically perform the necessary package requires for all active modules.

  4. I don't want that pesky Tcl/Tk root window appearing over my Vega window. How can I get rid of it?
    That root window must exist (it establishes Tcl/Tk's connection to the X server), but it needn't be visible. The magic words are:
    wm withdraw .
    
    The next question is where to put that command. psish users can incorporate it in their personal ~/.psishrc file, or the system-wide /usr/local/lib32/tcl8.0/system.psishrc , or at the beginning of the vgTcl script. For a vgTcl C app, you can include the command in the PSITCLRC environment variable, or insert the following call after Psitcl_CreateInterp():
    Tcl_Eval( interp, "wm withdraw ." );
    
  5. Why can't I get an expression like
    { [vgGetProp $chan VGCHAN_STATSSEL] == VGCHAN_STATSOFF }
    
    to evaluate true?

    vgTcl manifest constants (such as #defines and enums) are stored in a private hashtable. vgTcl commands know to check that table to retrieve the actual value, but Tcl/Tk doesn't know anything about it. Use the vgtcl value command to obtain the actual value. The example above becomes:
    { [vgGetProp $chan VGCHAN_STATSSEL] == [vgtcl value VGCHAN_STATSOFF] }
    
  6. What's the reason for the PSITCLDISPLAY environment variable? Why not just use DISPLAY?
    To communicate using Tcl/Tk's send command, Tcl/Tk apps must have their root windows (called ".") open on the same X server. Root windows are opened on the server specified by DISPLAY. For flexibility, we'd like to be able to open subsequent GUI windows on a different X server; that is specified by PSITCLDISPLAY. This is simply a vgTcl convention. See Psi_Toplevel in /usr/local/lib32/PSI/PsiUtil.tcl.

  7. The Tcl/Tk send command fails with X server insecure (must use xauth-style authorization) when I try to communicate between different systems.
    This is due to a mismatch of X server security mechanisms. Tcl/Tk interprocess communication requires the more secure xauth instead of xhost. To activate the security model required by Tcl/Tk, see About Tcl/Tk and X server security

  8. Why does compiling code using Tcl/Tk die with weird errors?
    In some versions of IRIX there is an ancient obsolete Tcl header at /usr/include/tcl.h, which, due to the compiler's default search path, is being found before the desired /usr/local/include/tcl.h. Either:

  9. Why is psish dying with illegal instruction, segmentation fault in malloc(), etc?
    You are probably using an old version of /usr/lib32/libX11.so. Be sure the IRIX recommended patchset is installed. See http://support.sgi.com/ for patch information.

  10. Why do I get rld: Fatal Error: unresolvable symbol in .../libpf_ogl.so: vlDMBufferGetValid?
    You are probably using an old version of the rld runtime linker. Be sure the IRIX recommended patchset is installed. See http://support.sgi.com/ for patch information.

  11. Why do I get X Error of failed request: BadValue (integer parameter out of range for operation)... when attempting to reparent a Vega window on a multipipe system?
    Windows cannot be reparented across pipes. Ensure the ADF that creates the Vega window specifies the same screen as the Tcl/Tk window.

  12. After reconfiguring my system to use xauth, I cannot login. What happened?
    You may have introduced a syntax error into one of the Xsession* files. See About Tcl/Tk and X server security


Copyright 1998-1999 MultiGen-Paradigm Inc. -- ALL RIGHTS RESERVED
$Id: FAQ.html,v 2.10 1999/06/11 20:34:13 mew Exp $