Hello,
I was trying to show a dialog via GTK+. Here is a sample code I'm using: http://paste.ubuntu.com/483058/ On my system when I click the button, the application freezes. This happens on every kind of dialog. But apparently, this is not the case for other users so I guess the problem is on my system. My question is, how can I diagnose what is going wrong and hopefully fix it? By the way, the dialogs gst-browser has works. And my system is Salix 13.1.1 (64-bit). GLib: 2.24.1, GTK+: 2.20.1.
Canol Gökel
|
On 08/24/2010 09:55 PM, ZuLuuuuuu wrote:
> I was trying to show a dialog via GTK+. Here is a sample code I'm using: > > http://paste.ubuntu.com/483058/ > > On my system when I click the button, the application freezes. This happens > on every kind of dialog. But apparently, this is not the case for other > users so I guess the problem is on my system. My question is, how can I > diagnose what is going wrong and hopefully fix it? I actually can reproduce this. Gwen, any ideas? Paolo _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
Ok I understand the problem, run message launches a new inner loop.
But with our gtk event loop we should use showAll, showModalOnAnswer:, ... Paolo can you merge the dialog extentions in extensions.st into the Gtk binding ? Canol can you replace in cbShowDialogAbout run by showAll ? Cheers, Gwen On Wed, Aug 25, 2010 at 9:57 AM, Paolo Bonzini <[hidden email]> wrote: > On 08/24/2010 09:55 PM, ZuLuuuuuu wrote: >> >> I was trying to show a dialog via GTK+. Here is a sample code I'm using: >> >> http://paste.ubuntu.com/483058/ >> >> On my system when I click the button, the application freezes. This >> happens >> on every kind of dialog. But apparently, this is not the case for other >> users so I guess the problem is on my system. My question is, how can I >> diagnose what is going wrong and hopefully fix it? > > I actually can reproduce this. Gwen, any ideas? > > Paolo > > _______________________________________________ > help-smalltalk mailing list > [hidden email] > http://lists.gnu.org/mailman/listinfo/help-smalltalk > _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
On 08/25/2010 10:51 AM, Gwenaël Casaccio wrote:
> Ok I understand the problem, run message launches a new inner loop. > But with our gtk event loop we should use showAll, showModalOnAnswer:, ... Hmm, #run is overridden by GtkImpl.st to not use a new event loop. It uses a Smalltalk semaphore and the outer event loop. Since events are run in their own Process, everything should work without blocking the outer event loop. Paolo _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
This should work
run [ <category: 'services'> | signals sema answer modal destroyed | destroyed := false. sema := Semaphore new. modal := self getModal. self setModal: true. signals := { self connectSignal: 'response' to: [ :dialog :integer | answer := integer. sema signal ] selector: #'value:value:'. self connectSignal: 'unmap' to: sema selector: #signal. self connectSignal: 'delete-event' to: [ :dialog :event | answer := Gtk gtkResponseDeleteEvent. sema signal. true ] selector: #'value:value:'. self connectSignal: 'destroy' to: [ destroyed := true. true ] selector: #value }. self showAll. Processor activeProcess detach. sema wait. destroyed ifFalse: [ self setModal: modal; hideAll. signals do: [ :each | self disconnectSignal: each ] ]. ^ answer ] On Wed, Aug 25, 2010 at 10:54 AM, Paolo Bonzini <[hidden email]> wrote: > On 08/25/2010 10:51 AM, Gwenaël Casaccio wrote: >> >> Ok I understand the problem, run message launches a new inner loop. >> But with our gtk event loop we should use showAll, showModalOnAnswer:, ... > > Hmm, #run is overridden by GtkImpl.st to not use a new event loop. It uses > a Smalltalk semaphore and the outer event loop. Since events are run in > their own Process, everything should work without blocking the outer event > loop. > > Paolo > _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
Free forum by Nabble | Edit this page |