﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Issues  » BOTranslations on SFUserControl Mishandled when using Miscellaneous Events</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Fri, 17 Apr 2026 15:46:21 GMT</lastBuildDate><ttl>20</ttl><item><title>BOTranslations on SFUserControl Mishandled when using Miscellaneous Events</title><link>http://forum.strataframe.net/FindPost31135.aspx</link><description>I believe I've found a bug when using BOTranslations on SFUserControls involving the BusinessLayer.CopyEventHandlersFrom method.&lt;br/&gt;&lt;br/&gt;&lt;div&gt;I have a BO that implements a "Miscellaneous Event" (in my case, the FieldPropertyChanging event.) The BO is used both on a form and a SFUserControl, using BOTranslations. During the form's initialization, a call is made eventually to the BusinessObjectTranslator.TranslateBusinessObjects method, which eventually calls the BusinessLayer.CopyEventHandlersFrom method.&lt;br/&gt;&lt;br/&gt;&lt;div&gt;For all the "standard" events, CopyEventHandlersFrom calls the GetValidInvocationList method to weed out any handlers that shouldn't be copied. However, the code which handles the Miscellaneous events doesn't do this. &amp;nbsp;Instead, it just makes a direct copy of the destination BO's miscellaneous events to the sourceBO. &amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;Therefore, CopyEventHandlersFrom leaves the sourceBO with duplicated events (sourceBO's original event + destBO's event). &amp;nbsp;When the event is raised, a call is eventually made to the destBO's event handler, which promptly causes an exception.&lt;br/&gt;&lt;br/&gt;&lt;div&gt;(Just for comparison, when using a CFD, the routine BusinessLayer.PushEventsFrom is called, which handles this situation correctly)</description><pubDate>Mon, 16 Apr 2012 13:38:05 GMT</pubDate><dc:creator>Kirk M Sherhart</dc:creator></item></channel></rss>