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

2 Ansichten (letzte 30 Tage)
G A
G A am 24 Jan. 2014
Kommentiert: Image Analyst am 30 Dez. 2015
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.

Akzeptierte Antwort

Amit
Amit am 24 Jan. 2014
Open the fig in GUIDE. Right click on the figure and in the property inspector change the 'Name' to Version05.

Weitere Antworten (1)

Image Analyst
Image Analyst am 24 Jan. 2014
Bearbeitet: Image Analyst am 24 Jan. 2014
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 Kommentare
Mike Thompson
Mike Thompson am 30 Dez. 2015
@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 am 30 Dez. 2015
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by