Here's the simplest pub-sub mechanism I can think of:

    https://gist.github.com/arteymix/28252bcc99fe7fdafaa4b254cecc8e11

I'm no expert in UX, but I think that it's good practice to handle
error locally (error on field, error label, etc..), because popups are
quite annoying and break the usage flow.

Le mercredi 28 juin 2017 à 22:08 -0400, Steven Oliver a écrit :
> 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?
> 
> My code is here if my explanation didn't make sense:
> https://github.com/steveno/balistica
> 
> Again thanks for all the help!
> 
> Steven N. Oliver
> _______________________________________________
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
-- 
Guillaume Poirier-Morency

Étudiant au baccalauréat en informatique à l'Université de Montréal
Stagiaire de recherche à l'IRIC

Mon blog: https://arteymix.github.io/
Mon projet de coopérative: https://pittoresque.github.io/
Clé PGP: B1AD6EA5

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to