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

2 visualizaciones (últimos 30 días)
G A
G A el 24 de En. de 2014
Comentada: Image Analyst el 30 de Dic. de 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.

Respuesta aceptada

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

Más respuestas (1)

Image Analyst
Image Analyst el 24 de En. de 2014
Editada: Image Analyst el 24 de En. de 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 comentarios
Mike Thompson
Mike Thompson el 30 de Dic. de 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 el 30 de Dic. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by