Commit bd45b155 authored by Matthew Dawson's avatar Matthew Dawson
Browse files

Fix Data holding instances of objects.

Default properties hold the same handle.  So construct in the constructer.


git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_refactor@8678 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent 96cc23fb
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -5,9 +5,9 @@ classdef Data < handle
    % out the data from the gui and logic.
    
    properties
        left_cond = HierarchicalGrid();
        top_cond = HierarchicalGrid();
        result_grid = TableGrid();
        left_cond = [];
        top_cond = [];
        result_grid = [];
        function_name = [];
        function_inputs = [];
        settings = [];
@@ -28,6 +28,10 @@ classdef Data < handle
        % outputs:
        %   object:Data - created object
        function object = Data()    
            object.left_cond = HierarchicalGrid();
            object.top_cond = HierarchicalGrid();
            object.result_grid = TableGrid();
        
            object.left_cond.addlistener('AddedOuterCell', @(src, event) left_grid_added_cell(object, src, event))
            object.top_cond.addlistener('AddedOuterCell', @(src, event) top_grid_added_cell(object, src, event))
        end