Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-dev] Exception and problems when using getSelectedObject()

Lorenz B. buehmann at informatik.uni-leipzig.de
Sun Feb 5 05:37:24 PST 2017


That doesn't matter and it's not clear which view is asked for. You have
to handle the case when the value can be NULL in any case.

> But, I tried to select a property and the error remains the same.
> --------------------------------------------
> En date de : Dim 5.2.17, Lorenz B. <buehmann at informatik.uni-leipzig.de> a écrit :
>
>  Objet: Re: [protege-dev] Exception and problems when using getSelectedObject()
>  À: protege-dev at mailman.Stanford.EDU
>  Date: Dimanche 5 février 2017, 11h44
>  
>  
>    
>  
>      
>    
>    
>      Ehm, a NullPointerException should be obvious...
>  
>      if no property is selected resp. the last was
>  unselected, the
>      returned value will be NULL of course. 
>  
>      Hi,
>        I am developing a protege plugin and I want to get the
>  selected
>        object property from an
>  owlobjectPropertySelectorPanel, So I
>        introduced this line to check such requirement
>        JLabel lab=new
>  JLabel(objectPropPanel.getSelectedObject().asOWLObjectProperty().getIRI().getFragment());An
>        exception at this line was raised(captured from the
>  console or
>        log)
>        NullPointerException: null ..... (XYZ.java:81)
>          Could you please help me, was my use of
>  getSelectedObject is
>          incorrect?
>          Thank you in advance. 
>  
>          
>          View this message in context: Exception
>            and problems when using getSelectedObject()
>  
>          Sent from the Protege
>            Developer mailing list archive at Nabble.com.
>  
>          
>  
>          
>          
>  
>          _______________________________________________
>  protege-dev mailing list
>  protege-dev at lists.stanford.edu
>  https://mailman.stanford.edu/mailman/listinfo/protege-dev
>  
>         
>      
>        -- 
>  Lorenz Bühmann
>  AKSW group, University of Leipzig
>  Group: http://aksw.org - semantic web
>  research center
>      
>    
>  
>  
>  -----La pièce jointe associée suit-----
>  
>  _______________________________________________
>  protege-dev mailing list
>  protege-dev at lists.stanford.edu
>  https://mailman.stanford.edu/mailman/listinfo/protege-dev
>  
> _______________________________________________
> protege-dev mailing list
> protege-dev at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-dev
>
>
-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-dev/attachments/20170205/c137f657/attachment.html>


More information about the protege-dev mailing list