Path: news.mathworks.com!not-for-mail
From: "Todd Welti" <twelti@harman.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: twelti
Date: Mon, 10 Nov 2008 17:28:02 +0000 (UTC)
Organization: Harman Industries International
Lines: 19
Message-ID: <gf9qv2$4q$1@fred.mathworks.com>
References: <gevlj8$fpq$1@fred.mathworks.com>
Reply-To: "Todd Welti" <twelti@harman.com>
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 1226338082 154 172.30.248.37 (10 Nov 2008 17:28:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 10 Nov 2008 17:28:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 57524
Xref: news.mathworks.com comp.soft-sys.matlab:500025


"Todd Welti" <twelti@harman.com> wrote in message <gevlj8$fpq$1@fred.mathworks.com>...
> I have a strange problem.  I have a gui, with an edit box, with some default text in it.  The callback of the edit box executes when I click inside the box and then click outside the box, even though the text in the text box has not changed.  so: i open the gui, click on the first text bx, then click outside it, and the callback always executes, even though no change to the content of that text field.  I thought that somewhere, some other code was changing the contents of that field during initialization of the gui (perhaps a CreateFcn from another gui object), but i dont see that anywhere in the code.
> 
> anyone ever had this problem?


Further:

Hello Todd,

This is definitely a bug. I am reporting this to our developers. Thank you for bringing this up.

As a workaround, I have modified your file a little. I am storing the original string content ot edit2 as a guidata. Second, in the callback for edit2, I compare this with the current value of 'String'. If you have modified the content, only then the callback will execute.

Please let me know of your thoughts on this.

Sincerely,
Aditya Joshi