accessing BLT vectors from C

genehilton at my-deja.com genehilton at my-deja.com
Fri Apr 28 21:11:32 CEST 2000


In article <20000427220821.63091 at nms.otc.telstra.com.au>,
Greg

Thanks for the input.  I had figured out the PYVEC stuff - where I am
right now is that it is either a linking or a threading problem.  If you
dig about 5 layers down in the source for blt (mostly in bltVector.c and
bltUtil.c) I find that the reason my code doesn't find PY_VEC0 is that
it can't find the Uid (unique identifier not User ID) - that is
Blt_FindUid returns false.  On further examination I see that there are
two different instances of Blt_FindUid() linked (or threaded?), one by
_tkinter and one by my module - so Blt_FindUid() sees the static
variable uidInitialized=0 so a new Uid hash table is built.  Furthermore
if I add a print statment to Blt_FindUid() to print the address
Blt_FindUid() I get a different address if it is called by _tkinter (via
PMW) or if it is called by my module.  I think its all a matter of
understanding how  my code gets loaded vs _tkinter.  I think I should be
able to straighten this out when I find a few hours.  Any bright ideas
are certainly welcome however.

Gene

>
> What is the value of bltname?  The names that Pmw give to Blt vectors
> are PY_VEC0, PY_VEC1, PY_VEC2, etc.  You can see what Tcl calls are
> being made by calling Pmw.tracetk().  For example, this Pmw:
>     v = Pmw.Blt.Vector(1)


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list