Changeset 2592


Ignore:
Timestamp:
02/14/13 20:02:54 (11 years ago)
Author:
olhsha
Message:

null-pointer exception after deletening a comment is semi-fixed: that is no null-pointer exception because there are checking "if(_itemDescription)" in two places. If it is the case then nothing happens. However, the reason why _itemDescription gets forgotten after deleating a comment is unclear. In principle can be deployed after testing, but just it will not be that convenient for a user, if after each comment delete the infor-panel gets totally refreshed.

Location:
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/browser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/browser/CommentsPanel.as

    r2591 r2592  
    125125                        if(service) {
    126126                                var commentsCount:int = service.comments.length;
    127                                 _itemDescription.commentsCount = commentsCount;
     127                               
     128                                if (_itemDescription != null) {_itemDescription.commentsCount = commentsCount;}
    128129                               
    129130                                if(commentsCount > 0) {
  • ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/browser/infoPage.mxml

    r2572 r2592  
    7575                       
    7676                        private function get commentsLabel():String{
     77                                if (_itemDescription == null) {return "info panel has been reloaded";};
    7778                                return "Comments (" + _itemDescription.commentsCount + ")";
    7879                        }
Note: See TracChangeset for help on using the changeset viewer.