Skip to main content

non blocking Popup

4 replies [Last post]
Anonymous

Hi again,

Sorry for bugging you all the time.

I was wondering if there was a way to display a non thread blocking popup /
dialog.
The idea is to displaya message to the user that is not of primary
importance and that does not require immediate action. The popup could just
display on top of the current screen and the application would continue it's
life normally .. without waiting for th dialog to be disposed of.
The use case is an incoming message notification. The user would get a popup
saying " you have a new message from xxxx" . Then if a new message comes in
before the user interacted with the dialog, the popup would chage and say
"you have received XX new messages". If the first dialog blocks the main
thread then other new messages couldn't come in , no ?
Or have I missunderstood how dialog really work ?

Thanks (as always) for your great support.

Cheers

Alex
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Shai Almog

Hi Alex,
there will be a modeless dialog in the next drop which does exactly
that.

Thanks,
Shai.

> Hi again,
>
> Sorry for bugging you all the time.
>
> I was wondering if there was a way to display a non thread blocking
> popup / dialog.
> The idea is to displaya message to the user that is not of primary
> importance and that does not require immediate action. The popup
> could just display on top of the current screen and the application
> would continue it's life normally .. without waiting for th dialog
> to be disposed of.
> The use case is an incoming message notification. The user would
> get a popup saying " you have a new message from xxxx" . Then if a
> new message comes in before the user interacted with the dialog,
> the popup would chage and say "you have received XX new messages".
> If the first dialog blocks the main thread then other new messages
> couldn't come in , no ?
> Or have I missunderstood how dialog really work ?
>
>
> Thanks (as always) for your great support.
>
> Cheers
>
> Alex

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

nafs
Offline
Joined: 2008-06-10

hmm... admittedly I have'nt used Dialogs much, but why wait for the next drop for this?
Cant you just create the Dialog within a new Thread to make it modeless? For ex:

new Thread(new Runnable() { void run() { Dialog.show() } }).start()

Shai Almog

That would work in theory the main issue with doing something like
this is the potential race condition where your next call to show()
might occur before the Dialog.show() started.
This will cause the dialog to hide something else. Sure you can
workaround this but it is getting painful which is why I added the
modeless support for dialogs too.

> hmm... admittedly I have'nt used Dialogs much, but why wait for the
> next drop for this?
> Cant you just create the Dialog within a new Thread to make it
> modeless? For ex:
>
> new Thread(new Runnable() { void run() { Dialog.show() } }).start()
> [Message sent by forum member 'nafs' (nafs)]
>
> http://forums.java.net/jive/thread.jspa?messageID=286212
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Alex

Ok !

Thanks

On Sun, Jul 13, 2008 at 6:13 AM, Shai Almog wrote:

> That would work in theory the main issue with doing something like this is
> the potential race condition where your next call to show() might occur
> before the Dialog.show() started.
> This will cause the dialog to hide something else. Sure you can workaround
> this but it is getting painful which is why I added the modeless support for
> dialogs too.
>
>
> hmm... admittedly I have'nt used Dialogs much, but why wait for the next
>> drop for this?
>> Cant you just create the Dialog within a new Thread to make it modeless?
>> For ex:
>>
>> new Thread(new Runnable() { void run() { Dialog.show() } }).start()
>> [Message sent by forum member 'nafs' (nafs)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=286212
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
>> For additional commands, e-mail: users-help@lwuit.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
[att1.html]