Opened 8 years ago
Closed 8 years ago
#770 closed enhancement (fixed)
Raise an error if function name is blank for New Plugin Model
Reported by: | pkienzle | Owned by: | piotr |
---|---|---|---|
Priority: | minor | Milestone: | SasView 4.1.0 |
Component: | SasView | Keywords: | |
Cc: | Work Package: | SasView Bug Fixing |
Description
There is no error if the new plugin model name is blank, but the resulting function won't show up in the list of custom models.
Default the name to blank so that the user is required to provide a meaningful name.
Change History (10)
comment:1 Changed 8 years ago by smk78
comment:2 Changed 8 years ago by smk78
Don't understand how starting out with a blank function name helps any though? Wouldn't it be better to test for an empty string?
comment:3 Changed 8 years ago by butler
- Type changed from defect to enhancement
comment:4 follow-up: ↓ 8 Changed 8 years ago by piotr
Indeed it would be better to start with a predefined (default) name - the less the user has to add/modify the more "friendly" the control is, I guess.
comment:5 Changed 8 years ago by piotr
- Owner set to piotr
- Status changed from new to accepted
comment:6 Changed 8 years ago by piotr
Do we need to worry about the backend? Will sasmodels catch attempts to pass ".py"?
comment:7 Changed 8 years ago by Piotr Rozyczko <rozyczko@…
comment:8 in reply to: ↑ 4 Changed 8 years ago by pkienzle
Replying to piotr:
Indeed it would be better to start with a predefined (default) name - the less the user has to add/modify the more "friendly" the control is, I guess.
Reasons to leave the initial name blank:
- There is no meaningful default name.
- The current default of "MyFunction" works the first time, but the next time it will trigger an error because "override" is false (but see below*).
- Users who have created a model of the name "MyFunction" and want to share it on the marketplace will have to contend with other users who just left the default name.
Even if we do stay with a default name, the name "MyFunction" does not match the underscore naming style of the new models.
*Override is currently True, which is bad since it can destroy the previously created model. The default was changed to from False in response to the error on "Apply" when the model was incorrect; it should be change back to False to avoid accidental deletion of models.
comment:9 Changed 8 years ago by smk78
I tend to side with PaulK that NOT providing a name is best. But I think the issue here is that we don't provide any way from this window (or the Sum|Multi window) for the user to see what names are already in use - think how a normal load/save dialog box works. If we could let them see what was already there then PaulK's concern about my changing the default action of overwrite is also mitigated. But I found it, during testing, profoundly annoying that every little coding slip up required me to give a new model name until I understood what the overwrite box did. In which case, if you're providing an overwrite capability I don't see why you wouldn't enable it…
comment:10 Changed 8 years ago by Piotr Rozyczko <rozyczko@…
- Resolution set to fixed
- Status changed from accepted to closed
The same issue applies to the Sum|Multi case too.