Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Control.getDisplay() for [a]syncExec

The right way is to store the display somewhere and access it.  It's
possible that the
widget will get disposed by the ui-thread while the other thread is asking
for the display.

Steve



                                                                                                                                           
                      hudsonr@xxxxxxxxxx                                                                                                   
                      Sent by:                        To:      platform-swt-dev@xxxxxxxxxxx                                                
                      platform-swt-dev-admin@         cc:                                                                                  
                      eclipse.org                     Subject: [platform-swt-dev] Control.getDisplay() for [a]syncExec                     
                                                                                                                                           
                                                                                                                                           
                      07/11/02 01:33 PM                                                                                                    
                      Please respond to                                                                                                    
                      platform-swt-dev                                                                                                     
                                                                                                                                           
                                                                                                                                           




Control.getDisplay() says that it cannot be called from another thread.  I
don't see any reason for this.  It would be a convenient way to get a
Display from a background thread.

Is the JavaDOC out of data?  Didn't this method used to call getParent()
(which calls checkWidget()) instead of accessing the parent field?





Back to the top