<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/wordpress-mu-1.2.3-2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: If You Use OnUpdate, Your Code Must Be Perfect</title>
	<link>http://blogs.teamb.com/craigstuntz/2008/05/05/37816</link>
	<description>News of interest to Delphi, .NET, and InterBase developers</description>
	<pubDate>Sat, 05 Jul 2008 19:55:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=wordpress-mu-1.2.3-2.2.1</generator>

	<item>
		<title>By: Alister Christie</title>
		<link>http://blogs.teamb.com/craigstuntz/2008/05/05/37816#comment-3535</link>
		<author>Alister Christie</author>
		<pubDate>Tue, 06 May 2008 22:29:24 +0000</pubDate>
		<guid>http://blogs.teamb.com/craigstuntz/2008/05/05/37816#comment-3535</guid>
		<description>I somewhat share your concern for OnUpdate events and they have annoyed me within the Delphi IDE when they go wrong - they are however very convenient.  An OnUpdate event with a couple lines of code that enables or disables a button(s) can replace a whole bunch of annoying code that needs to be called from numerous places.  In this they are a great way of simplifying code, however when they do go wrong it can be very nasty.</description>
		<content:encoded><![CDATA[<p>I somewhat share your concern for OnUpdate events and they have annoyed me within the Delphi IDE when they go wrong - they are however very convenient.  An OnUpdate event with a couple lines of code that enables or disables a button(s) can replace a whole bunch of annoying code that needs to be called from numerous places.  In this they are a great way of simplifying code, however when they do go wrong it can be very nasty.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Skachkov</title>
		<link>http://blogs.teamb.com/craigstuntz/2008/05/05/37816#comment-3533</link>
		<author>Michael Skachkov</author>
		<pubDate>Tue, 06 May 2008 07:46:42 +0000</pubDate>
		<guid>http://blogs.teamb.com/craigstuntz/2008/05/05/37816#comment-3533</guid>
		<description>2 cents:

if you want to simulate radiobuttons behavior with menu items, then you will have to use OnUpdate handlers for actions linked to that items. this is because AutoCheck, Checked and GroupIndex properties are not synchronized between themselves (I mean all at the same time). Thus you may have situation when user selects one menu item twice and all items are unchecked. there is no elegant way of controlling that (smth. like AllowAllUp property would be very appreciated). the only way is to write OnUpdate handlers.</description>
		<content:encoded><![CDATA[<p>2 cents:</p>
<p>if you want to simulate radiobuttons behavior with menu items, then you will have to use OnUpdate handlers for actions linked to that items. this is because AutoCheck, Checked and GroupIndex properties are not synchronized between themselves (I mean all at the same time). Thus you may have situation when user selects one menu item twice and all items are unchecked. there is no elegant way of controlling that (smth. like AllowAllUp property would be very appreciated). the only way is to write OnUpdate handlers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xepol</title>
		<link>http://blogs.teamb.com/craigstuntz/2008/05/05/37816#comment-3531</link>
		<author>Xepol</author>
		<pubDate>Mon, 05 May 2008 18:11:51 +0000</pubDate>
		<guid>http://blogs.teamb.com/craigstuntz/2008/05/05/37816#comment-3531</guid>
		<description>I get those a LOT out of the IDE.    The problem is similar to OnClose in TForm.  You really need to catch any exceptions you might raise and handle them or you can never seem to get any further.</description>
		<content:encoded><![CDATA[<p>I get those a LOT out of the IDE.    The problem is similar to OnClose in TForm.  You really need to catch any exceptions you might raise and handle them or you can never seem to get any further.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stanleyxu</title>
		<link>http://blogs.teamb.com/craigstuntz/2008/05/05/37816#comment-3530</link>
		<author>stanleyxu</author>
		<pubDate>Mon, 05 May 2008 17:16:29 +0000</pubDate>
		<guid>http://blogs.teamb.com/craigstuntz/2008/05/05/37816#comment-3530</guid>
		<description>Even you do not use OnUpdate, it will consume your CPU usage.
http://stanleyxu2005.blogspot.com/2008/01/performance-issue-of-taction.html</description>
		<content:encoded><![CDATA[<p>Even you do not use OnUpdate, it will consume your CPU usage.<br />
<a href="http://stanleyxu2005.blogspot.com/2008/01/performance-issue-of-taction.html" rel="nofollow">http://stanleyxu2005.blogspot.com/2008/01/performance-issue-of-taction.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Novo</title>
		<link>http://blogs.teamb.com/craigstuntz/2008/05/05/37816#comment-3529</link>
		<author>David Novo</author>
		<pubDate>Mon, 05 May 2008 15:50:57 +0000</pubDate>
		<guid>http://blogs.teamb.com/craigstuntz/2008/05/05/37816#comment-3529</guid>
		<description>Why single OnUpdate out for this.... Many things suffer the same problem...

OnPaint
OnMouseMove (in general, its impossible to get out of this without moving the mouse and triggering the A/V)

OnUpdate is usually smarter than the help makes them seem to be. For instance, onUpdate of actions attached to menu items are only triggered if the menu items are visible.</description>
		<content:encoded><![CDATA[<p>Why single OnUpdate out for this&#8230;. Many things suffer the same problem&#8230;</p>
<p>OnPaint<br />
OnMouseMove (in general, its impossible to get out of this without moving the mouse and triggering the A/V)</p>
<p>OnUpdate is usually smarter than the help makes them seem to be. For instance, onUpdate of actions attached to menu items are only triggered if the menu items are visible.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
