|
"Andy " <theorigamist@gmail.com> wrote in message <h5f76f$obj$1@fred.mathworks.com>...
> I have written a help section for my GUI program in HTML, and I'm trying to call it with the following callback:
>
> function helpmenu_Callback(src,eventdata)
> web('myhelp.html','-notoolbar','-noaddressbox','-new');
> end
>
> Here's the relevant code creating the help menu:
>
> help=uimenu('Parent',f,...
> 'Label','Help');
> helpMenu=uimenu('Parent',help,...
> 'Label','Help',...
> 'Accelerator','H',...
> 'Callback',{@helpmenu_Callback});
>
> When I call the help, either by clicking it or by using Ctrl+'H', the help window shows up every time, but most of the time I get the following error:
>
> [ConditionalEventPump] Exception occurred during event dispatching:
> java.lang.NullPointerException
> at javax.swing.JComponent._paintImmediately(Unknown Source)
> at javax.swing.JComponent.paintImmediately(Unknown Source)
> at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
> at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
> at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
> at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
> at java.awt.event.InvocationEvent.dispatch(Unknown Source)
> at java.awt.EventQueue.dispatchEvent(Unknown Source)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.run(Unknown Source)
>
> Wrapping the web call in a try catch block doesn't catch this error. I can't tell if this error matters or not. (Like I said, it's not preventing the help window from showing properly.) Also, using the syntax stat=web(...) returns 0.
>
> Does anybody know what's going on?
>
> Thanks.
Update: the code
web('myhelp.html','-browser');
has not yet thrown an error. So it would seem this is coming from the MATLAB browser, and not my program.
|