Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open a file

Status
Not open for further replies.

edwong

Programmer
Mar 26, 2003
30
US
Hi,
I have built a graphical interface (a search engine) using tk. I want to call my c++ function (for openning a file) when the graphical interface window appears, so the user can search for the words in the file.
How can I use binding to do that? Or any other methods will be appreciated
 
By far the easiest approach is to let SWIG build wrapper functions for your C/C++ library which exposes the functions as Tcl commands. Then it's just a matter of Tcl scripting, rather than writing C code. See the Tcl'ers Wiki ( page "Swig," If you prefer writing the interface code yourself, you might want to start you investigations with the page "How to write C-coded extensions for Tcl," - Ken Jones, President, ken@avia-training.com
Avia Training and Consulting, 866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top