Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
GUI

Journal Journal: Just when I was learning to do it right

Playing with Tcl/Tk, Java Swing in the last few years, I had almost forgotten how innovative GUI programming can be. I have vague memories of attempting to fix few GUI response issues in these and throwing everything but the kitchen sing at the problem to fix it (or to leave behind a bigger mess).

I recently did some brain dead programming with Gtk and took the wise step of reading the manual more closely, because I did not want to get caught in the threading.Threads all over again and I discovered gobjects. Sanity seems to be restored for the time being. I sincerely hope that I am having a no-you-are-doing-it-wrong moment, or else GUI programming has not improved at all in the last five years or more. Nevertheless, still had to use a few hacks to get what I want.

Lessons learned:

  1. Reading the tutorial end to end is not enough.
  2. gobject.idle_add is a honking good idea. But remember to return False (for what?).
  3. With ScrolledWindow use add_with_view_port for some and just add for different UI elements (which ones?).
  4. Learn to compromise or use ugly hacks (where?)
  5. etc. (how?)

~ musically_ut

Slashdot Top Deals

So you think that money is the root of all evil. Have you ever asked what is the root of money? -- Ayn Rand

Working...