From: <no...@so...> - 2001-12-28 01:06:32
|
Bugs item #487220, was opened at 2001-11-29 12:35 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112997&aid=487220&group_id=12997 Category: 61. Tk_Win Functions Group: 8.3.4 Status: Open Resolution: None Priority: 5 Submitted By: Don Porter (dgp) >Assigned to: Don Porter (dgp) Summary: Tk_GetNumWindows not as documented Initial Comment: Tk_GetNumWindows man page says: Tk_GetNumMainWindows returns a count of the number of main windows currently open in the process. It does not do that; rather it returns the number of main windows in the current thread only. One effect of this difference can be seen running this script in tclsh (--enable-threads): # FILE: test.tcl package require Thread load /usr/local/lib/libtk8.3.so Tk set id [thread::create] thread::send $id {load {} Tk} thread::send $id { pack [label .l -text "I'm the created thread"] } # END FILE test.tcl Destroy the toplevel window that does not contain the label (the one from the main thread, not the created thread), and tclsh will exit. This is because Tk_MainLoop() sees a count of zero main windows remaining and exits. ---------------------------------------------------------------------- >Comment By: Jeffrey Hobbs (hobbs) Date: 2001-12-27 17:06 Message: Logged In: YES user_id=72656 Since the docs were written before threading, is it recommended to change the docs to say "thread" instead of "process", or to correct the code? ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112997&aid=487220&group_id=12997 |