GUI edit box with the desktop path MAC
Ältere Kommentare anzeigen
Hello, I am trying to set the box with the desktop path in Mac I get the user name using
if true
user_name = java.lang.System.getProperty('user.name');
set(handles.edit1,'String',['/Users/',user_name,'/Desktop']);
end
This is working in windows pc but not in mac. I receive The following error occurred converting from char to opaque: Undefined function 'opaque' for input arguments of type 'char'.
Any idea why it is not working?
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 13 Jan. 2016
Why are you not using
set(handles.edit1, 'String' fullfile(getenv('HOME'), 'Desktop'))
1 Kommentar
Kamuran
am 13 Jan. 2016
simply because I didn't know that :)
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!