Does mathworks support a classdef inspector?

I was wonder if the following feature exists. I want to inspect a classdef just like i inspect a figure.
e.g. inspect(figure)
This allow me too change the properties via GUI.
Is there a similar command for a classdef?
i.e something like inspect(myClassDef) ?
I can't seem to find any documentation explaining if this is supported or not?

Answers (4)

Matt J
Matt J on 21 Jan 2013
Edited: Matt J on 21 Jan 2013
If obj is an instance of your class, you can use the variable editor to change its properties
openvar obj
There would be restrictions, possibly, if the property is private,protected, etc...

6 Comments

I'm aware that you can edit the value via the workspace variables. Thanks for the suggestion but unfortunately this doesn't help me with my mission.
I need something GUI based that is not inbuilt to the debug enviorment. If i compile the program this editior will not be avaliable. Even within the matlab enviroment it's not nearly a nice as the inspect command. The inspector has more advance gui to handle different types of variables for example it can have a pull down menus.
e.g inspect(figure)
PaperUnits has a pull down with options:
centimeters, inches, normaisation, points.
The openvar only has this declared as a string.
I need something more like the inspector ? Any ideas how this can be done.
I used the classdef to write sort of mini-API's. If it was possible to have a generic GUI which could be compiled it would save me alot of time continuous write GUI's for each classdef.
Matt J
Matt J on 21 Jan 2013
Edited: Matt J on 21 Jan 2013
Well, you could write your own GUI using GUIDE...
I don't see how there could be a generic GUI provided for you because, in general, the classdef doesn't carry advance information about what kind of data your properties will hold and what range of values they would take on. For example, how can a GUI let you set a property via a pull-down menu, unless it is told in advance somehow what list of values that menu should include?
You might be able to hack on HGSETGETPLUS to build an automated gui.
One thing to keep in mind is that as a general policy, Mathworks does not allow their development tool GUIs to be compiled.
Not sure what that means, Walter. What are "development tool GUIs"? I've compiled lots of GUIDE-generated GUIs in the past.
Look at http://www.mathworks.com/products/compiler/supported/compiler_support.html and notice how many places it says "All GUI provided with toolbox" as being unsupported for code generation. Likewise you cannot compile GUIDE -itself-.
So if Mathworks were to provide the class definition inspector GUI then probably they would not allow it to be compiled.

Sign in to comment.

Bryan
Bryan on 21 Jan 2013
Thanks for the feedback. I've put in a ticket.
It's unfortunate this doesn't exist. The link you sent to uiinspect helps as i assume this can be compiled. But it's the controls are a bit shabby.
Matts confirmed my feelings about the declarations. I would expect some declaration to allow the GUI understand valid values. e.g centimeters, inches, normaisation, points.
I could create my own gui, however the guide options are not great. Ideally i need a tree view control. Their is and undocumented "uitree" function. But it really doesn't have all the features required for this sort of gui. For example you can't put in a pull down menu on a node. So it would probably make more sense to do this in java or c# but i have little coding experiance in those domains. :-( Or perhaps their is a nice ActiveX control avaliable?
I think some sort of classdef inspector would be a nice feature for mathworks to support! I have asked the same question a couple of years ago during a meeting with mathworks (I worked for ST micro-electronics at the time). I was hoping the feature may have appear :-/

Categories

Find more on Software Development in Help Center and File Exchange

Products

Asked:

on 21 Jan 2013

Edited:

on 8 Mar 2014

Community Treasure Hunt

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

Start Hunting!