Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10320 for branches


Ignore:
Timestamp:
01/08/14 17:26:32 (11 years ago)
Author:
tsteinre
Message:

fixed NullReference Bug in StatisticsView

Location:
branches/DataPreprocessing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab 3.3.sln

    r10095 r10320  
    18701870    HideSolutionNode = FALSE
    18711871  EndGlobalSection
     1872  GlobalSection(Performance) = preSolution
     1873    HasPerformanceSessions = true
     1874  EndGlobalSection
    18721875EndGlobal
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/StatisticsView.cs

    r10316 r10320  
    1 using System;
    2 using System.Collections.Generic;
    3 using System.ComponentModel;
    4 using System.Drawing;
    5 using System.Data;
    6 using System.Linq;
    7 using System.Text;
    8 using System.Windows.Forms;
     1using System.Windows.Forms;
    92using HeuristicLab.Core.Views;
    103using HeuristicLab.MainForm;
    114using HeuristicLab.MainForm.WindowsForms;
    12 using HeuristicLab.Problems.DataAnalysis;
    13 using HeuristicLab.Data.Views;
    145
    156namespace HeuristicLab.DataPreprocessing {
     
    2617    public StatisticsView() {
    2718      InitializeComponent();
    28       var logic = Content.StatisticsLogic;
    29       txtRows.Text = logic.GetRowCount().ToString();
    30       txtColumns.Text = logic.GetColumnCount().ToString();
    31       txtNumericColumns.Text = logic.GetNumericColumnCount().ToString();
    32       txtNominalColumns.Text = logic.GetNominalColumnCount().ToString();
    3319    }
    3420
    3521    protected override void OnContentChanged() {
    3622      base.OnContentChanged();
     23      if (Content != null) {
     24        var logic = Content.StatisticsLogic;
     25        txtRows.Text = logic.GetRowCount().ToString();
     26        txtColumns.Text = logic.GetColumnCount().ToString();
     27        txtNumericColumns.Text = logic.GetNumericColumnCount().ToString();
     28        txtNominalColumns.Text = logic.GetNominalColumnCount().ToString();
     29        txtMissingValuesTotal.Text = logic.GetMissingValueCount().ToString();
     30      }
    3731    }
    3832  }
Note: See TracChangeset for help on using the changeset viewer.