@@ -3131,7 +3131,7 @@ void MCObject::DoGetProperties(MCExecContext& ctxt, uint32_t part, bool p_effect
31313131 getarrayprop (part, (Properties)table[tablesize].value , ep, kMCEmptyName , p_effective);
31323132 else
31333133 {
3134- MCAutoStringRef t_unicode_prop ;
3134+ MCAutoStringRef t_prop ;
31353135 // MERG-2013-05-07: [[ RevisedPropsProp ]] Special-case the props that could
31363136 // be either Unicode or native (ensure minimal encoding is used).
31373137 // MERG-2013-06-24: [[ RevisedPropsProp ]] Treat the short name specially to ensure
@@ -3141,36 +3141,46 @@ void MCObject::DoGetProperties(MCExecContext& ctxt, uint32_t part, bool p_effect
31413141 if (isunnamed ())
31423142 ep.clear ();
31433143 else
3144- getprop (part, P_SHORT_NAME, ep, p_effective);
3144+ {
3145+ getstringprop (ctxt, part, P_SHORT_NAME, p_effective, &t_prop);
3146+ ep . setvalueref (*t_prop);
3147+ }
31453148 break ;
31463149 case P_LABEL:
3147- getstringprop (ctxt, part, P_UNICODE_LABEL, p_effective, &t_unicode_prop );
3148- if (!MCStringIsNative (*t_unicode_prop ))
3150+ getstringprop (ctxt, part, P_UNICODE_LABEL, p_effective, &t_prop );
3151+ if (!MCStringIsNative (*t_prop ))
31493152 {
31503153 if (gettype () == CT_STACK)
31513154 t_token = " unicodeTitle" ;
31523155 else
31533156 t_token = " unicodeLabel" ;
31543157 }
3155- ep . setvalueref (*t_unicode_prop );
3158+ ep . setvalueref (*t_prop );
31563159 break ;
31573160 case P_TOOL_TIP:
3158- getstringprop (ctxt, part, P_UNICODE_TOOL_TIP, p_effective, &t_unicode_prop );
3159- if (!MCStringIsNative (*t_unicode_prop ))
3161+ getstringprop (ctxt, part, P_UNICODE_TOOL_TIP, p_effective, &t_prop );
3162+ if (!MCStringIsNative (*t_prop ))
31603163 t_token = " unicodeToolTip" ;
3161- ep . setvalueref (*t_unicode_prop );
3164+ ep . setvalueref (*t_prop );
31623165 break ;
31633166 case P_TEXT:
31643167 if (gettype () == CT_BUTTON)
31653168 {
3166- getstringprop (ctxt, part, P_UNICODE_TEXT, p_effective, &t_unicode_prop );
3167- if (!MCStringIsNative (*t_unicode_prop ))
3169+ getstringprop (ctxt, part, P_UNICODE_TEXT, p_effective, &t_prop );
3170+ if (!MCStringIsNative (*t_prop ))
31683171 t_token = " unicodeText" ;
3169- ep . setvalueref (*t_unicode_prop );
3172+ ep . setvalueref (*t_prop );
31703173 break ;
31713174 }
31723175 default :
3173- getprop (part, (Properties)table[tablesize].value , ep, p_effective);
3176+ {
3177+ MCExecValue t_value;
3178+ getprop (ctxt, part, (Properties)table[tablesize].value , p_effective, t_value);
3179+ MCAutoValueRef t_value_ref;
3180+ MCExecTypeConvertAndReleaseAlways (ctxt, t_value . type, &t_value . type + 1 , kMCExecValueTypeValueRef , &(&t_value_ref));
3181+ if (!ctxt . HasError ())
3182+ ep . setvalueref (*t_value_ref);
3183+ }
31743184 break ;
31753185 }
31763186 }
0 commit comments