Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: uisetcolor + activeX ->figure without focus, if compiled
Date: Wed, 19 Aug 2009 08:09:02 +0000 (UTC)
Organization: Rieter Automotive Management AG
Lines: 20
Message-ID: <h6gbut$mco$1@fred.mathworks.com>
References: <gpdqsp$29p$1@fred.mathworks.com> <gtphhd$ggg$1@fred.mathworks.com> <h61v4h$hgj$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1250669342 22936 172.30.248.37 (19 Aug 2009 08:09:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 19 Aug 2009 08:09:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 562591
Xref: news.mathworks.com comp.soft-sys.matlab:564375


This did not solve the problem. In the compiled version I still don't get back the focus.  - Matlab Compiler 4.10 (R2009a) 
Compile the following program (mcc -mv test.m). No matter you press ok or cancel in the colordialog, the program will crash in the compiled version. The not compiled version works fine.
----------------------
function test
f=figure;
 uicontrol('Parent',f,'Style', 'pushbutton',...
    'Position', [0 0 130 30],'String','Color',...
    'CallBack',@color_Callback);
actxcontrol('OWC.Spreadsheet.9', [150 150 300 300],f);
return

function color_Callback(hObject, eventdata, handles)
  c1=get(gcf,'Color');
  c = uisetcolor(c1, 'Entity color');
  uicontrol(hObject);
  disp('HALLO') ;
  if sum(c1==c)<3
    set(gcf,'Color',c);
  end
return