Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2981 Error when trying to edit a table parameter in simulation #2986

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

rwmcintosh
Copy link
Member

Fixes #2981

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Type of change

Please mark relevant options with an x in the brackets.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires documentation changes (link at least one user or developer documentation issue):
  • Algorithm update - updates algorithm documentation/questions/answers etc.
  • Other (please describe):

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Integration tests
  • Unit tests
  • Manual tests
  • No tests required

Reviewer checklist

Mark everything that needs to be checked before merging the PR.

  • Check if the code is well documented
  • Check if the behavior is what is expected
  • Check if the code is well tested
  • Check if the code is readable and well formatted
  • Additional checks (document below if any)
  • Check if documentation update issue(s) are created if the option This change requires a documentation update above is selected

Screenshots (if appropriate):

Questions (if appropriate):

@rwmcintosh rwmcintosh added this to the Version 12 milestone Oct 4, 2024
@rwmcintosh rwmcintosh self-assigned this Oct 4, 2024
Comment on lines +151 to +174

public class TableParameterPresenter : TableParameterPresenter<ITableFormulaView>, ITableParameterPresenter
{
public TableParameterPresenter(ITableFormulaView view, IParameterTask parameterTask, IFormulaFactory formulaFactory, ICloner cloner) :
base(view, parameterTask, formulaFactory, cloner)
{
// default import function disabled when context is not specified
view.ImportVisible = CanImport;
}

protected override DataRepository ImportTablePoints()
{
// default import function disabled when context is not specified
throw new System.NotImplementedException();
}

protected override TableFormula TablePointsToTableFormula(DataRepository importedTablePoints)
{
// default import function disabled when context is not specified
throw new System.NotImplementedException();
}

public override bool CanImport => false;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class went missing as I moved presenters around to get table formula view in MoBi.

This particular presenter did not allow import from Excel

protected override DataRepository ImportTablePoints()
{
// default import function disabled when context is not specified
throw new System.NotImplementedException();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NotImplementedException?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the interface requires these methods, but to satisfy the button for import, however, in this case the button is hidden with the comment that import is not allowed. We could return DataRepos and TableFormula or return null to avoid this ugly sight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

V12: Error when trying to edit a table parameter in simulation
2 participants