Hey,

Alright, noted.  However I still need to get this to work.  At this point it
seems that the LayoutManager lifecycle is already put into another Thread. 
How else could it be that I can get it working slightly better with the use
of Threads, and get 100% successrate if I wait long enough in Debug mode?
Still.  It's nowhere near a good solution, and I can't have the users go
through debug mode :-)




Carsten Driesner wrote:
> 
> Fhomasp wrote:
>> Hey, thanks
>>
>> I'm not very used to working with proxies.
>>
>> Some new info about my issue here has come to light.  It would seem that
>> both your suggested approaches work occasionally.  That is, both only
>> works
>> in debug mode.  Which makes me assume that it is a Threading issue.
>> However attempting to control the sequence of the Threads doesn't work at
>> all.  For example:
>>
>> public void layoutEvent(EventObject eventObject, short i, Object object)
>> {
>>         if (i == LayoutManagerEvents.UIELEMENT_VISIBLE &&
>> object.equals("private:resource/menubar/menubar")) {
>>                 SwingUtilities.invokeLater(new Runnable(){
>>
>>                     public void run() {
>>                         try {
>>                             addParagraafMenu();
>>                         } catch (Exception e) {
>>                             throw new
>> SeriousException(e.getMessage(),this,e);
>>                         }
>>                     }
>>                 });
>>
>>             }
>>         }
>>   
> Hi Fhomasp,
> 
> Please don't call your menu bar changes in another thread. You have to 
> make the changes directly in the layoutEvent call. OpenOffice.org is not 
> well prepared for multi threading.
> 
> Regards,
> Carsten
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/custom-menu-item-disappearing-after-printpreview-tp22741195p22804128.html
Sent from the openoffice - dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to