Hi all, I am currently working on a Shotwell feature that uses a dialog created from a Glade file. I attached the source code of the relevant class to this email, as it's a lot easier to explain if I can reference the code itself. So, in this dialog, the top part is created by Vala code as it creates either a set of radio buttons or a single label. The bottom part of the dialog (which contains a cancel button) is fixed and fully defined in the Glade file. Now, in my class's constructor, on line 38, I connect the "clicked" event for the cancel button to a method in the same class. Further down in the constructor, on line 49, there is an if statement. If the statement evaluates to true (i.e. the complex case with multiple radio buttons), the dialog works as expected. If that same statement evaluates to false, when I click on the cancel button, I get the following exception: alien_database_import_dialog_on_cancel_button_clicked: assertion `IS_ALIEN_DATABASE_IMPORT_DIALOG (self)' failed Considering that lines 38 and 49 are completely independent from each other, I fail to understand why it works in one case but not the other. I tried to run the application in gdb in order to understand but that didn't help, probably because my knowledge of gdb is very rudimentary. If anybody can shed light on this problem or tell me what procedure I should follow in order to debug it, that would be very much appreciated. Note: I am using valac 0.9.1 on Ubuntu 10.04. Thanks Bruno
Attachment:
AlienDatabaseImportDialog.vala
Description: Text Data