[Vala] Gui error handling



Message: 1
Date: Wed, 28 Jun 2017 22:08:54 -0400
From: Steven Oliver <oliver steven gmail com>
To: vala-list <vala-list gnome org>
Subject: [Vala] Best way to handle errors in a GUI application?
Message-ID:
        <CA+HG2Vhgbgd8WA+-7pe-6SoNs0mP5Gp4jCsqzTRr=KL7Q20aJQ mail gmail com>
Content-Type: text/plain; charset="UTF-8"

After getting some great help after my last post, I have run into another
issue I'm not sure how to solve. How do people recommend you handle errors
when making a GUI application? I planned on taking the obvious approach of
a pop-up message dialog that tells the user what they've done wrong, or
what went wrong, but that has turned out to not be quite so easy. My code
is architected such that the Application class creates the Main Window
object which in turn creates a Gtk.Box object. So if the error occurs in
the Box object, how do I create a message dialog tied to the main window?
Do I have to pass the main window object around? Or is there a better way
to do this that I'm missing?

Hi,
 I am not active in Vala coding right now, but I still read the digest.

For all kinds of useful reasons, just like your "passing around the
main window" — have a look into a thing called "pubsub", or "Publish
Subscribe."

It's not a library, it's an idea. Once you get it, you will wonder how
you ever lived without it!

Good luck,
/d


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]