Find the answer to your Linux question:
Results 1 to 3 of 3
Discovered the joy of using Glade to create nice pretty gui's, however I think I'm doing this a bit goofy..... I have a computer simulation run (go through a whole ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    2

    Coding with Glade

    Discovered the joy of using Glade to create nice pretty gui's, however I think I'm doing this a bit goofy.....

    I have a computer simulation run (go through a whole bunch of iterations) once a user presses a button. All the code is pretty much in the "on_button1_clicked" function. Does what I want - the user (aka a student) can enter some variables and then the simulation runs using the inputed data. However, now the window is unresponsive until the simulation finishes. So no exit button, for example.

    There is probably a better way of doing this, but googling didn't reveal it. Anyone on here use Glade and have any ideas? Can a "on_button_clicked" function be activated while another button clicked function is doing its thing? Or should I be putting my simulation iterations somewhere else?

  2. #2
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    You should fork your code when that happens =)
    New Users, please read this..
    Google first, then ask..

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Posts
    2
    "fork" - thanks, I'll have to look into that!

    My, probably silly, way of solving it was to run gtk_main_iteration during my simulation iteration. It looks pretty good. I have a nice gui, it pipes to gnuplot for some run time pretty pics, and students can enter constants and retrieve data. Although Im sure my students will thoroughly test it for any flaws

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...