Thread: [Java-gnome-developer] broken link
Brought to you by:
afcowie
From: Khiraly <khi...@gm...> - 2005-01-10 20:21:34
|
Hi! In the ,,Writing multithreaded applications'' section on the webseite, this link does not work: http://java-gnome.sourceforge.net/docs/javadoc/index.html Plese correct it. -- Khiraly <khi...@gm...> |
From: Jeff M. <ku...@gm...> - 2005-01-10 20:26:50
|
On Mon, 10 Jan 2005 21:21:27 +0100, Khiraly <khi...@gm...> wrote: > Hi! > > In the ,,Writing multithreaded applications'' section on the webseite, > this link does not work: > > http://java-gnome.sourceforge.net/docs/javadoc/index.html > > Plese correct it. The nice thing about a wiki is that anybody can fix a broken link. I just corrected the link. > > -- > Khiraly <khi...@gm...> > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer > -- Jeffrey Morgan "The highest reward for a man's toil is not what he gets for it, but what he becomes by it" - Jon Ruskin |
From: Joao V. <jvi...@ya...> - 2005-01-10 20:33:31
|
Seems like it's fixed... But, BTW, to write a multithread app shouldn't you just use java.lang.Thread, like you do with any Java app? Cheers, J.V. --- Khiraly <khi...@gm...> escreveu: > Hi! > > In the ,,Writing multithreaded applications'' section on the webseite, > this link does not work: > > http://java-gnome.sourceforge.net/docs/javadoc/index.html > > Plese correct it. > > -- > Khiraly <khi...@gm...> _______________________________________________________ Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis |
From: Phil R. <pr...@ab...> - 2005-01-10 21:05:28
|
Even in normal Swing apps all gui modifications must be done from inside the Swing thread (Swing is not thread safe as far as I can tell) using the |javax.swing.SwingUtilities.invokeLater(Runnable r)| method, otherwise weird things start to happen. In the same way |org.gnu.glib.CustomEvents.addEvent(Runnable r)| should be used when modifying the GUI in Gtk/Gnome applications. I haven't tried not using this method, but I assume strange things may also happen. My question is why do people not want to design GUIs to be thread safe??? Phil Joao Victor wrote: >Seems like it's fixed... > >But, BTW, to write a multithread app shouldn't you just use java.lang.Thread, like you do with any >Java app? > >Cheers, >J.V. > > > --- Khiraly <khi...@gm...> escreveu: > > >>Hi! >> >>In the ,,Writing multithreaded applications'' section on the webseite, >>this link does not work: >> >>http://java-gnome.sourceforge.net/docs/javadoc/index.html >> >>Plese correct it. >> >>-- >>Khiraly <khi...@gm...> >> >> > > > > > > >_______________________________________________________ >Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis > > >------------------------------------------------------- >The SF.Net email is sponsored by: Beat the post-holiday blues >Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. >It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt >_______________________________________________ >java-gnome-developer mailing list >jav...@li... >https://lists.sourceforge.net/lists/listinfo/java-gnome-developer > > > |
From: Andrew C. <an...@op...> - 2005-01-11 00:05:12
|
On Mon, 2005-10-01 at 21:05 +0000, Phil Rendell wrote: > In the same way=20 > |org.gnu.glib.CustomEvents.addEvent(Runnable r)| should be used when=20 > modifying the GUI in Gtk/Gnome applications. That's right. You do need to use CustomEvents.addEvent() I tested using it in the demo app I wrote (I've posted here about it before - if you don't know what I'm talking about, see=20 http://research.operationaldynamics.com/ but note that link is subject to change) Frankly, I hate this usage model. It's extraordinarily annoying because you're forced to make anything you want to pass in as a parameter a field of the class as opposed to just a local variable [as local variables are out of scope when you write an anonymous inner class to implement the Runnable which is the argument to addEvent()] I'm not sure what a better approach would be, but surely in Java land someone can think of something better. AfC Sydney --=20 Andrew Frederick Cowie Helping you succeed at flawlessly executing Massive Changes and Upgrades to your Mission Critical Systems http://www.operationaldynamics.com/ Sydney New York Toronto London |
From: Joao V. <jvi...@ya...> - 2005-01-11 02:21:21
|
Err... sorry but i didn't understand the problem very well yet. BTW, there's a doc about it here: http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html I've read parts of it, but still didn't understand (maybe i'm too sleepy...). I think the reason why i didn't understand is because i've used threads many times on Swing apps, and i've never used invokeLater. Let me picture a simple example so we can work on it: Suppose you're making a chat client, where you have a List widget showing the online users. Suppose you have a thread which is listening for new packets. Everytime this thread receives a "New user" msg packet, it adds a new user to the List widget, and calls repaint (i think it's not necessary to call repaint on this situation, but whatever). So in this example there's no use of invokeLater, even though the widget is being updated by a thread. Would this somehow "break" something? I mean... i think i've done that sometimes, never seen any problem :P Cheers, J.V. _______________________________________________________ Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis |
From: Joao V. <jvi...@ya...> - 2005-01-11 02:52:09
|
Ok, i've read some more, i think i understand it now... still find it pretty odd though. Maybe later i'll put some more info about this issue on that topic on the website... i think it's needed, to make it more clear. Time to sleep now... Cheers, J.V. --- Joao Victor <jvi...@ya...> escreveu: > Err... sorry but i didn't understand the problem very well yet. BTW, there's a doc about it > here: > > http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html > > I've read parts of it, but still didn't understand (maybe i'm too sleepy...). I think the reason > why i didn't understand is because i've used threads many times on Swing apps, and i've never > used > invokeLater. Let me picture a simple example so we can work on it: > > Suppose you're making a chat client, where you have a List widget showing the online users. > Suppose you have a thread which is listening for new packets. Everytime this thread receives a > "New user" msg packet, it adds a new user to the List widget, and calls repaint (i think it's > not > necessary to call repaint on this situation, but whatever). > > So in this example there's no use of invokeLater, even though the widget is being updated by a > thread. Would this somehow "break" something? I mean... i think i've done that sometimes, never > seen any problem :P > > Cheers, > J.V. > > > > > > > > _______________________________________________________ > Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - > Internet rápida e grátis > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer > __________________________________________________ Converse com seus amigos em tempo real com o Yahoo! Messenger http://br.download.yahoo.com/messenger/ |
From: Jerry H. <wa...@la...> - 2005-01-11 03:30:40
|
The reason is that only a single thread can be in the UI code at a time. This is true of most UI frameworks, including another popular Java one, SWT. I do not know about Swing, as I don't use it. The proper way to run code that modifies the UI is to dispatch it to the UI thread using the UI thread's mainLoop. invokeLater accomplishes this. It schedules the code to be run later. Typical main loop programming. Does Swing not do this? If swing doesn't do it, likely Swing has synchronization internally: which adds some sort of performance hit. I think the main loop style of programming UI applications is much nicer. It provides a very clean abstraction... it's sort of like sending a message to the UI telling it to do something. On Mon, 2005-01-10 at 23:20 -0300, Joao Victor wrote: > Err... sorry but i didn't understand the problem very well yet. BTW, th= ere's a doc about it here: >=20 > http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html >=20 > I've read parts of it, but still didn't understand (maybe i'm too sleep= y...). I think the reason > why i didn't understand is because i've used threads many times on Swin= g apps, and i've never used > invokeLater. Let me picture a simple example so we can work on it: >=20 > Suppose you're making a chat client, where you have a List widget showi= ng the online users. > Suppose you have a thread which is listening for new packets. Everytime= this thread receives a > "New user" msg packet, it adds a new user to the List widget, and calls= repaint (i think it's not > necessary to call repaint on this situation, but whatever). >=20 > So in this example there's no use of invokeLater, even though the widge= t is being updated by a > thread. Would this somehow "break" something? I mean... i think i've do= ne that sometimes, never > seen any problem :P >=20 > Cheers, > J.V. >=20 >=20 >=20 >=20 > =09 > =09 > =09 > _______________________________________________________=20 > Yahoo! Acesso Gr=E1tis - Instale o discador do Yahoo! agora. http://br.= acesso.yahoo.com/ - Internet r=E1pida e gr=E1tis >=20 >=20 > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer --=20 Jerry Haltom <wa...@la...> |
From: Weiqi G. <wei...@gm...> - 2005-01-11 03:57:22
|
JavaLobby is running a great presentation on exactly this issue. http://javalobby.org/eps/galbraith-swing-2/ On Mon, 10 Jan 2005 23:20:40 -0300 (ART), Joao Victor <jvi...@ya...> wrote: > Err... sorry but i didn't understand the problem very well yet. BTW, ther= e's a doc about it here: >=20 > http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html >=20 > I've read parts of it, but still didn't understand (maybe i'm too sleepy.= ..). I think the reason > why i didn't understand is because i've used threads many times on Swing = apps, and i've never used > invokeLater. Let me picture a simple example so we can work on it: >=20 > Suppose you're making a chat client, where you have a List widget showing= the online users. > Suppose you have a thread which is listening for new packets. Everytime t= his thread receives a > "New user" msg packet, it adds a new user to the List widget, and calls r= epaint (i think it's not > necessary to call repaint on this situation, but whatever). >=20 > So in this example there's no use of invokeLater, even though the widget = is being updated by a > thread. Would this somehow "break" something? I mean... i think i've done= that sometimes, never > seen any problem :P >=20 > Cheers, > J.V. >=20 > _______________________________________________________ > Yahoo! Acesso Gr=C3=A1tis - Instale o discador do Yahoo! agora. http://br= .acesso.yahoo.com/ - Internet r=C3=A1pida e gr=C3=A1tis >=20 > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer >=20 --=20 Weiqi Gao (=E9=AB=98=E4=B8=BA=E5=A5=87) wei...@gm... http://www.weiqigao.com/blog/ |
From: Khiraly <khi...@gm...> - 2005-01-10 22:10:56
|
2005-01-10, h keltez=E9ssel 17:33-kor Joao Victor ezt =EDrta: > Seems like it's fixed... I can't acces the page. (I wanted just read it).=20 For me I have this result: The requested URL /docs/javadoc/index.html was not found on this server. Apache/1.3.33 Server at java-gnome.sourceforge.net Port 80 |
From: Jeff M. <ku...@gm...> - 2005-01-10 22:14:29
|
On Mon, 10 Jan 2005 23:10:49 +0100, Khiraly <khi...@gm...> wrote: > 2005-01-10, h keltez=E9ssel 17:33-kor Joao Victor ezt =EDrta: > > Seems like it's fixed... >=20 > I can't acces the page. (I wanted just read it). >=20 > For me I have this result: >=20 > The requested URL /docs/javadoc/index.html was not found on this server. > Apache/1.3.33 Server at java-gnome.sourceforge.net Port 80 Try to refresh your page. The updated url is /docs/javadoc-2.8.2/index.htm= l. >=20 >=20 > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer >=20 --=20 Jeffrey Morgan "The highest reward for a man's toil is not what he gets for it, but what he becomes by it" - Jon Ruskin |