GUI edit box with the desktop path MAC
이전 댓글 표시
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?
채택된 답변
추가 답변 (1개)
Walter Roberson
2016년 1월 13일
Why are you not using
set(handles.edit1, 'String' fullfile(getenv('HOME'), 'Desktop'))
댓글 수: 1
Kamuran
2016년 1월 13일
simply because I didn't know that :)
카테고리
도움말 센터 및 File Exchange에서 Desktop에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!