mathworks / mathworks/widgets-toolbox

BaseModel - isequal returns false between two models with the same property values

Open
#191 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
39
Forks
13
PR merge metrics
No merged PRs in 30d

Description

model1 = wt.model.BaseModel
model2 = wt.model.BaseModel
model3 = model1
model4 = copy( model1 )

isequal( model1, model2 ) should return TRUE
isequal( model1, model3 ) should return TRUE
isequal( model1, model4 ) should return TRUE

model1 == model2 returns FALSE, as expected
model1 == model3 returns TRUE, as expected
model1 == model4 returns FALSE, as expected

Potential fix: Ignore listeners, override isequal to ignore, and perform value comparison of model properties

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the BaseModel implementation and its existing equality behavior. Reproduce the four isequal and == cases from the issue, then compare models by their property values while accounting for listeners; done means the stated isequal cases pass without changing the documented == behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
matlab
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.