|
"Dennis B." wrote in message <ja2ese$a4r$1@newscl01ah.mathworks.com>...
> Hi Guys,
>
> I got a Problem since Matlab Version 2011a:
>
> Warning: Possible deprecated use of set on a Java object with an HG Property 'UserData'.
> > In sc_gdlconfigdlggui>i_create_gcdconfig at 253
> In sc_gdlconfigdlggui at 50
> In sc_gdlconfigdlg at 69
> In sc_maindlggui>mdconfigcriteria_callback at 2664
> In sc_maindlggui at 135
>
> The problematic command is: set(Table_ja, 'UserData', 'Rule_st');
>
> Anyone an idea?
>
> My Matlab-Version:
> -------------------------------------------------------------------------------------
> MATLAB Version 7.12.0.635 (R2011a)
> MATLAB License Number: 490273
> Operating System: Microsoft Windows XP Version 5.1 (Build 2600: Service Pack 3)
> Java VM Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
> -------------------------------------------------------------------------------------
Usually it is better to use the internal setter/getter methods of Java components. So, instead of:
set(javaObj, 'Property',value)
You would use this:
javaObj.setProperty(value)
However, since UserData is an internal Matlab object that does not have a corresponding setter/getter method, you can use this instead:
setappdata(javaObj,'UserData',value);
value = getappdata(javaObj,'UserData');
Yair Altman
http://UndocumentedMatlab.com
|