[fxruby-users] A problem about updating an FXRuby program layout recursively
AEtzold at gmx.de
Fri Sep 22 15:15:52 EDT 2006
I have a design question: assume we have an FXText field containing
The <best> Ruby version is the current one.
with "best" highlighted, and there is a choice of words
| most wonderful |, | cutest |, | most effective |
to replace "best". To do the replacement, I want to just click on any of
three buttons. I want to iterate through all of the words of the sentence and I
only know the choice of words for replacement at runtime.
Now, if I click on the | most wonderful | - button, I want to have
The most wonderful version of <Ruby> is the current one.
i.e., "best" gets changed to "most wonderful", the next word Ruby gets highlighted,
and there should be a choice of buttons of words replacing "Ruby", like
| the computing language invented by Matz |,
which should be shown instead of
| most wonderful |, | cutest |, | most effective |.
I have written a method with a lot of evals in it, which calls itself, when the user
clicks on a button, and updates its arguments (move to the next word etc.)
to do the trick of updating the buttons, but I can only show the first set of buttons and replace the first word - the new buttons
for the next set of replacement words don't appear.
I rather randomly tried to call "app.update, app.recalc" etc., but none worked.
What am I missing ?
Thank you very much
NEU: GMX DSL Sofort-Start-Set - blitzschnell ins Internet!
Echte DSL-Flatrate ab 0,- Euro* http://www.gmx.net/de/go/dsl
More information about the fxruby-users