Hi,

foreach's function parameters are: model, path, iter, userData(if there
is any, there also could be more than one)
The first three parameters: model, path, and iter, must be included when
you define the function, but you don't have to specifically pass them
because they will get pass automaticallly.

For example, you can write:

def MyFunction(model, path, iter, val):
  # get value from current row, column 1 of treemodel
  col1val = model.get_value(iter,1)
  print "value is: " + str(col1val)
  # set value in current row, column 2 of treemodel
  model.set_value(iter,2,val)

TreeModel.foreach(MyFunction, newValue)


good luck,
~ Yang


On Tue, 2003-11-18 at 16:06, David McCabe wrote:
> The docs don't say anything about what the arguments are that are
> passed to the function for TreeModel.foreach()
> 
> Does anybody know what arguments I'll get? Thanks!

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to