Skip to content

Fix issue 718 -- display#723

Merged
dominikbach merged 2 commits intodevelopfrom
718-warning-when-running-display-with-full-file-path
Jun 17, 2024
Merged

Fix issue 718 -- display#723
dominikbach merged 2 commits intodevelopfrom
718-warning-when-running-display-with-full-file-path

Conversation

@teddphil
Copy link
Copy Markdown

@teddphil teddphil commented Jun 16, 2024

Fixes #718

Cause of the issue

The issue happened at line 32 in pspm_display. This is a line that is iteratively used when pspm_display is running. Initially, the varargin is set to be the input of pspm_display. In default, varargin is empty, so the line is not actually executed. In the next iteration, varargin becomes a multi-cell cell array, which is when nargin is no longer 0. This will not consider the situation that pspm_display actually has an input.
I am not fully clear what gui_State.gui_Callback is used for, since it is not really called much in this function. Therefore, I set a situation to identify whether it is processing the user's input as varargin, and this situation is determined in line 38 of the new version.

Changes proposed in this pull request:

  • This pull request updates the checking of input variable for display. If the varargin{1} refers to user's input, as a file name or a file path, it will no longer call str2func. The situation for determining the input is a file name or a file path is that the varargin{1} ends with .mat.

@teddphil teddphil linked an issue Jun 16, 2024 that may be closed by this pull request
@teddphil
Copy link
Copy Markdown
Author

It works now. The UI is ugly. I need to make a new pull request for the UI.
image

@teddphil teddphil changed the title Update pspm_display.m Fix issue 718 -- pspm_display Jun 17, 2024
@teddphil teddphil changed the title Fix issue 718 -- pspm_display Fix issue 718 -- display Jun 17, 2024
@teddphil teddphil self-assigned this Jun 17, 2024
@teddphil teddphil requested a review from dominikbach June 17, 2024 03:18
@teddphil teddphil added this to the v7.0 milestone Jun 17, 2024
@teddphil teddphil marked this pull request as ready for review June 17, 2024 03:18
@teddphil teddphil added the Completed & Waiting for Review Completed and waiting for review label Jun 17, 2024
@dominikbach dominikbach merged commit d469d3a into develop Jun 17, 2024
@dominikbach dominikbach deleted the 718-warning-when-running-display-with-full-file-path branch June 17, 2024 06:26
@teddphil teddphil removed the Completed & Waiting for Review Completed and waiting for review label Jun 24, 2024
@teddphil teddphil mentioned this pull request Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning when running Display with full file path

2 participants