Re: Missing bindings when running a Tk app from C



On 29 jan, 15:44, SimonG <si...@xxxxxxxxxxxxxx> wrote:
In my previous post (Getting focus in Tk app started from C++ ) I
incorrectly assummed that the problem was due to focus not being
correctly assigned. I was wrong about that. The problem is that when
the interpreter is started through a C++ program most of the bindings
are missing. I presume that this is desired behaviour but I don't
understand why or what the recommended way is to restore the bindings
to their script defaults. The following program illustrates the
problem - running as a script gives 37 'Listbox' bindings and 10 'all'
bindings. Running the same program from the C++ gives 0 'Listbox'
bindings and 8 'all' bindings.


#include "tk.h"

static int appInitProc(Tcl_Interp *interp) {

Tk_Init(interp);

Maybe you forgot Tcl_Init(interp), which has to be done before
Tk_Init(interp).

--Koen
.



Relevant Pages

  • Re: How to use packages?
    ... > For example (given the name as.exe for the assembler): ... > The only output to this program will be text output specifying success or ... I think what you want to do in this case is make your own interpreter ... bindings, and one for local variable bindings; ...
    (comp.lang.lisp)
  • Re: How to use packages?
    ... A simple interpreter is very easy to write in Lisp: ... > bindings, and one for local variable bindings; ... Is there any sample code out there describing this process? ...
    (comp.lang.lisp)
  • Re: Environment "Aha"
    ... hashtable (environment) is created to hold the bindings. ... how environments can be implemented in a slow interpreter, ...
    (comp.lang.lisp)
  • Re: Missing bindings when running a Tk app from C
    ... the interpreter is started through a C++ program most of the bindings ... The following program illustrates the ... Running the same program from the C++ gives 0 'Listbox' ...
    (comp.lang.tcl)
  • Re: Update from Datasource to the database with sqlDataAdapter
    ... Anyway, if your bindings are set up correctly, and you delete a row, you ... if you have a listBox and you want to remove Item 20 (assuming it's ... from the datatable the deletecommand doesn?t have a row to operate on. ... > From: Ori Anavim ...
    (microsoft.public.dotnet.framework.adonet)