ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcl-mac
tcl-mac
Re: [MACTCL] about package require
by Philip Aker other posts by this author
Oct 9 2005 9:17PM messages near this date
Re: [MACTCL] about package require | [MACTCL] (no subject)
Hello Nicolas,

If you go to terminal and type 'tclsh' <return> 
and then type 'set tcl_pkgPath' <return> 
then you should see the places valid for packages.

> > | in my c code, i'm doing Tcl_Eval(interp, "package require tdom"); 
> > to use
> > | tdom

If you then type 'package require tdom' <return> 
then after a moment the package should load.
If it does not load, then perhaps there is a problem with your 
installation.
Like maybe a missing or bad "pkgIndex.tcl" file.

In your C code, depending on what it is, you may have to manually set 
the "tcl_pkgPath" global before you do the eval.

> > | tdom is installed in /Library/Tcl/tdom0.8.0/
> > | does it mean that package require automatically search in this path?

Yes, but make sure the path is in the "tcl_pkgPath" list of paths and 
there is a valid "pkgIndex.tcl" file.

> > | can i move tdom to another path? and which command can i use to use 
> > it
> > | from the new path?

Your Tcl_Eval(interp, "package require tdom"); should be fine.

Philip



On Oct 7, 2005, at 11:41 AM, nico wrote:

>  hi
>  i ask it here because of mac path
> 
> > I don't know the answer to your question, but as this is a Tcl 
> > question
> > in general more than a question about the Mac-specific version of
> > Tcl/Tk, you may get more help at comp.lang.tcl. The folks there are
> > expert and very friendly.
> >
> > Cheers,
> >
> > Kevin Walzer, PhD
> > WordTech Software - "Tame the Terminal"
> > http://www.wordtech-software.com
> > sw at wordtech-software.com
> >
> > nico wrote:
> > | hi there,
> > | i'm a little bit confused about package require function
> > | i'm using tcltk-aqua in order to use tdom0.8.0.
> > |
> > | in my c code, i'm doing Tcl_Eval(interp, "package require tdom"); 
> > to use
> > | tdom
> > |
> > | tdom is installed in /Library/Tcl/tdom0.8.0/
> > | does it mean that package require automatically search in this path?
> > | can i move tdom to another path? and which command can i use to use 
> > it
> > | from the new path?
> > |
> > | thank you for help
> > |
> > | best regards
> > | nicolas

Philip Aker
http://www.aker.ca




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Tcl-mac mailing list
Tcl-mac@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-mac
Thread:
Nico Bats
Nico
Kevin Walzer
Nico
Lazzaro Nicoḷ Ciccolella
Philip Aker

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved