M. Pehle
9/5/2006 3:36:00 PM
Joachim (München) schrieb:
> my user should be able to define variables, to define functions, to
> include scripts, to hack for-loops, to iterate over arrays &c: the full
> functionality of irb. Is that really possible with Kernel::eval ?
> Joachim
>
engl.: have a look on how fxri is dealing with that problem. there you
have an IRB integrated within a Fox GUI. i think it would be possible to
manipulate the GUI with its own IRB :) you also can run the fxirb.rb
from the fxri lib directory as a standalone. i also tried to write a
piece of code that has a command line like the DOS prompt and a GUI. i
used tk and got problems because of tk's need to be the main thread.
then i tried to write a version, where the single elements of the
program talk to a drb-server (ok, the GUI was the server (: ), but it is
not really nice to deal with.
ger.: guck dir mal an, wie fxri mit dem problem umgeht. dort ist die IRB
in einer Fox-GUI integriert. ich denke, es sollte sogar möglich sein,
die GUI mit ihrer eigenen IRB zu manipulieren :) du kannst die fxirb.rb
aus dem fxri-lib-verzeichnis auch eigenständig ausführen. ich hab auch
mal versucht, ein bisschen code zu schreiben, um kommandozeile und GUI
zu haben. ich hab tk benutzt und bekam probleme damit, dass tk immer
meint, der main-thread sein zu wollen. dann hab ich versucht, eine
version zu schreiben, bei der die einzelnen elemente des programms mit
einem drb-server kommunizieren (ok, die GUI war der server (: ), aber
damit lässt sich nicht besondern angenehm umgehen.
Mario (Berlin)