Why Matlab is not changing the name of the GUI window?

조회 수: 4 (최근 30일)
G A
G A 2014년 1월 24일
댓글: Image Analyst 2015년 12월 30일
The names of my fig-file and main m-file are, for example, 'Version15.fig' and 'Version15.m' , however, after executing those files the name of the GUI window is still Version04 - without changing.

채택된 답변

Amit
Amit 2014년 1월 24일
Open the fig in GUIDE. Right click on the figure and in the property inspector change the 'Name' to Version05.

추가 답변 (1개)

Image Analyst
Image Analyst 2014년 1월 24일
편집: Image Analyst 2014년 1월 24일
If you want to write professional looking code, QA guidelines suggest, as an option, that you put the version of your software somewhere, like on a splash screen or title bar of your app, or on some static text on the GUI. Here's a snippet for how to put the version number in the title bar of your code:
%------------------------------
% Set up version number and display in title bar.
titleBar = sprintf('My app - Version %s', Version_Number);
set(handles.figMainWindow, 'Name', titleBar);
Somehow you set Version_Number to be what you want it to be. For example, you could hard code it into the code if you want (not what I do, but you could). This way whenever anyone runs your code they know what version they're running. You should also log the version number into your output (for example an Excel workbook). This is particularly important if you are using your software for any claim support or intellectual property (patent) work.
  댓글 수: 5
Mike Thompson
Mike Thompson 2015년 12월 30일
@Image Analyst - Thanks for your reply. I was looking for a programmatic way to access the version number that is entered in the compiler dialog:
It think it is best to have the version number only stored once, and the above dialog appears to be the most obvious place to put it. I just took over this project and I assumed that was the place to record the version number. It turns out that the previous developer has it stored in at least two other places for a total of three. I am also interested in accessing the "Author Name", "Email" and the other fields in the same dialog.
Image Analyst
Image Analyst 2015년 12월 30일
Sorry, I don't use their deploytool because of limitations that I hope one day they will remove (like the ability to specify where files are installed to). I'm not sure how to access the version number created by deploytool inside your program. Perhaps it's stored in the metadata of your executable and you can get it with fileinfo() - I don't know. Otherwise, call them and ask them - after all you've paid a huge amount of money for the compiler to may as well get your money's worth.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by