Sriram Rajagopal01 schrieb: > 1. There is a Tree widget in my app(the BWidget Tree). I need to > populate this tree using the variables contained in a list,on launching > the vtcl app. I have written a separate TCL script “mod_populate”. This > file has a procedure mod_populate::add_elements that contains the logic > to populate the tree. The way is obviously to call the > mod_populate::add_elements proc whenever the app is launched. How to do > this? I tried calling the proc in the –selectcommand option for the Tree > but it didn’t work.
First, you don't seem to have discovered the function list: "Window / Function List". For your convenience there are two predefined procs: in "init" you can put all your preparations that don't need the GUI yet, in "main" the rest that needs the GUI or at least the basic elements of it. They are called at the end of the generated project code. In the function list you can add procs and call them from the initial functions or from every command edit field in the attribute editor. If your project is not extraordinarily big you can skip using external files and just add procs. If you do have external tcl code, include it by using the "source" command. If you are defining procs externally, watch the scope for the "source" command if called from a proc; you might want to use the "uplevel" command. Josh -- Man is the only creature on earth enabled to take a warm meal while flying! Loriot ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ vtcl-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/vtcl-user
