The point is we can not define a buttonbar of a dialog within the same function (or method) that defines the dialog itself, whether from resource or source. The buttonbar has to be defined in the INIT clause of the ACTIVATE DIALOG command.
Yes, I understand that was your point.
My point was to show that you do not need to pass lots of variables to a function if you use an object. My point was separate from yours, and I apologize if you thought I was being critical of your solution. I was just showing a way that Tim's variable passing problem could be solved with the use of an object.
Tim said:
Each variable would have to be passed to the button bar control when it's a separate function, and that can be a lot of variables.
This can be solved this way:
ACTIVATE DIALOG oDlg ON INIT myFunction( oCustomer )
James