>>>>> Brock Rycenga writes:
Brock> Has anyone ever had problems with their call back routine not
Brock> being recognized in a loop? Here is an excerpt from my code (no
Brock> laughing, please).
Brock> This is just a simple "walk" of a proprietary MIB, using
Brock> getnext. If I use a sequence of getnext calls (without the
Brock> while loop), everything works just fine. When I put the 'set
Brock> result [$sid getnext $vblist $callbk]' inside the while loop,
Brock> the script does not function properly. I get the following
Brock> error: Error: invalid command name: "Convert and Print". This
Brock> almost seems like it is more related to a general Tcl issues
Brock> (i.e., something I'm doing wrong); as opposed to a Scotty
Your observation that this is a general Tcl question is correct. The
interpreter processes the while loop in your script before it ever has
a chance to read the definition of the ConvertAndPrint procedure. Hence,
the callback procedure is undefined. Move your while loop to the end
of the script and things will work much better.
-- Juergen Schoenwaelder Technical University Braunschweig <email@example.com> Dept. Operating Systems & Computer Networks Phone: +49 531 391 3289 Bueltenweg 74/75, 38106 Braunschweig, Germany Fax: +49 531 391 5936 <URL:http://www.ibr.cs.tu-bs.de/~schoenw/>
-- !! This message is brought to you via the `tkined & scotty' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to <firstname.lastname@example.org>. !! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.
This archive was generated by hypermail 2b29 : Mon Jan 08 2001 - 15:27:54 MET