David Cuny's GUI

new topic     » topic index » view thread      » older message » newer message

hey i'm using david cuny's gui and i want to make a dialog box that will
track the progress of a fairly cpu intensive operation...so like it's
doin a whole bunch of stuff and while it's doing it says like
"64% done" and "24 seconds elapsed" and all stuff like that

what i'm trying to do right now is set up the dialog:

new_dialog("Progress", 0, 0, 50, 6, {})
add_control(1, BUTTON, "&Cancel", 4, 2, 12, 0, {CANCEL_BUTTON})
add_control(2, LABEL, "", 2, 2, 0, 0, {})  -- progress indicator

okay and then what i want to do is: (in pseudocode)

while get_dialog(EXIT_STATE) != CANCELLED do
  progress = do_stuff()
  set_attrib(2, TITLE, sprintf("%d precent done", progress))
  show_dialog()
end while

except it doesn't really work...and i can't really do edit_dialog()
at all because then it would wait for a key to be pressed or
whatever :\

any suggestions?

--

Mike Burrell
http://mikpos.base.org/
mikpos at hempseed.com

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu