Hi there!
Let me state my dilema. I’m most sure that there must be working codes
that does what I want.
Usually, a function is just a “black box” that you feed “something”,
then it “does something to it”, and it throws out “something else”.
i.e. hometown = find_hometown(employee)
Well, I’d like to have a dialog where you can choose from a list, click
ok and the dialog would return an answer
i.e. hometown = mydlg.find_hometown(employee_array)
My logics dilema is that, find_hometown must do the following:
- Instance the dialog
- Fill a Wx::Choice with employee_array
- show modal
- Let the user choose and click OK
- Do some SQL magic to retrieve the hometown of the selected item
- Return the value
- Destroy the dialog.
Everything is ok with this procedure, except that:
As in ruby, the last eval is what is returned, how can I self.distroy
the dialog if the return value must be the LAST line of code in the
function?
I’ve noticed that MessageDialog displays such effect, but, I’d really
like to know the logic behind it.
Thx everyone!
–
Carlos Troncoso Phillips