﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebAqua - Fatal error occurs when StackButton is added after WebFishEye loaded</title><link>http://www.intersoftsolutions.com/Community/WebAqua/Fatal-error-occurs-when-StackButton-is-added-after-WebFishEye-loaded/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Fatal error occurs when StackButton is added after WebFishEye loaded</title><link>http://www.intersoftsolutions.com/Community/WebAqua/Fatal-error-occurs-when-StackButton-is-added-after-WebFishEye-loaded/</link><pubDate>Tue, 02 Mar 2010 22:23:14 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;In your scenario, you will need to invoke the RefreshUIElement function in the WebFishEye in order to render the new stack button. Here is the modified snippet for the AddStackButtonWithDelay&lt;/p&gt;&lt;pre&gt;private void AddStackButtonWithDelay(double delayDuration)&lt;br /&gt;{&lt;br /&gt;    Storyboard toolbarDelay = new Storyboard() { BeginTime = TimeSpan.FromSeconds(delayDuration) };&lt;br /&gt;    toolbarDelay.Completed &amp;#43;= (s, e) =&amp;gt; { AddStackButton(); &lt;span style="color: rgb(255, 0, 0);"&gt;_MainToolbar.RefreshUIElement();&lt;/span&gt; };&lt;br /&gt;    toolbarDelay.Begin();&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;During OnClick event handler, you will also need to invoke this method as well. However, in the current version of WebFishEye this will result in an error. The proposed fix is to set the event parameter Handle property to True, currently the Handle property is not available. This fix will be available in the next build of WebFishEye. &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Fatal error occurs when StackButton is added after WebFishEye loaded</title><link>http://www.intersoftsolutions.com/Community/WebAqua/Fatal-error-occurs-when-StackButton-is-added-after-WebFishEye-loaded/</link><pubDate>Tue, 02 Mar 2010 09:34:52 GMT</pubDate><dc:creator>Rico</dc:creator><description>&lt;p&gt;It doesn't seem that you've grasped the full scope of the issue.  The button collection seems to be unmodifiable from any event or code after it has been loaded.  NOT JUST A CLICK EVENT.  For example, the following code demonstrates adding a StackButton on a 5 second delay.  This will also crash the FishEye when the button is clicked.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;        public MainPage()&lt;br /&gt;        {&lt;br /&gt;            InitializeComponent();&lt;br /&gt;&lt;br /&gt;            AddStackButton();&lt;br /&gt;            AddStackButtonWithDelay(5);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        private void AddStackButtonWithDelay(double delayDuration)&lt;br /&gt;        {&lt;br /&gt;            Storyboard toolbarDelay = new Storyboard() { BeginTime = TimeSpan.FromSeconds(delayDuration) };&lt;br /&gt;            toolbarDelay.Completed &amp;#43;= (s, e) =&amp;gt; AddStackButton();&lt;br /&gt;            toolbarDelay.Begin();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;br /&gt;        private void AddStackButton()&lt;br /&gt;        {&lt;br /&gt;            WebFishEyeButton button = _MainToolbar.FindButton("cmdTools");&lt;br /&gt;&lt;br /&gt;            if (button.StackButtons == null)&lt;br /&gt;            {&lt;br /&gt;                button.StackButtons = new ObservableCollection&amp;lt;WebFishEyeStackButton&amp;gt;();&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            string stackText = string.Format("StackButton{0}", _StackCounter&amp;#43;&amp;#43;);&lt;br /&gt;&lt;br /&gt;            WebFishEyeStackButton stackButton = new WebFishEyeStackButton();&lt;br /&gt;            stackButton.ItemName = stackText;&lt;br /&gt;            stackButton.Text = stackText;&lt;br /&gt;            stackButton.ImageSource = new BitmapImage(new Uri("Resources/toolbox.128.png", UriKind.Relative));&lt;br /&gt;&lt;br /&gt;            button.StackButtons.Add(stackButton);&lt;br /&gt;        }&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Fatal error occurs when StackButton is added after WebFishEye loaded</title><link>http://www.intersoftsolutions.com/Community/WebAqua/Fatal-error-occurs-when-StackButton-is-added-after-WebFishEye-loaded/</link><pubDate>Mon, 01 Mar 2010 23:39:06 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;Currently WebAqua will cause an error if we try to modify button collection during click event handler. A bug report has been submitted 
to the developer. We will inform you if there is any update or progress 
regarding this issue.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Fatal error occurs when StackButton is added after WebFishEye loaded</title><link>http://www.intersoftsolutions.com/Community/WebAqua/Fatal-error-occurs-when-StackButton-is-added-after-WebFishEye-loaded/</link><pubDate>Mon, 01 Mar 2010 15:57:29 GMT</pubDate><dc:creator>Rico</dc:creator><description>&lt;p&gt;

&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: &amp;quot;calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: rgb(31, 73, 125);"&gt;There is a serious issue with the WebAqua’s StackButtons. Adding StackButtons at runtime to any Button.StackButtons
collection after the toolbar has been shown, will result in a fatal exception
from the WebAqua assembly. Specifically the exception will surface the
next time the button containing the newly added StackButton is clicked. Here
is the resulting unhandled error. &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;System.NullReferenceException: Object reference not set to an instance of an object.&lt;br /&gt;   at ISNet.Silverlight.WebAqua.WebFishEye.ƒ__(WebFishEyeButton button)&lt;br /&gt;   at ISNet.Silverlight.WebAqua.WebFishEye.š__(Object sender, MouseEventArgs e)&lt;br /&gt;   at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)&lt;br /&gt;   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: &amp;quot;calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: rgb(31, 73, 125);"&gt;WebAqua version == &lt;strong&gt;2.0.1000.220&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: &amp;quot;calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: rgb(31, 73, 125);"&gt;&lt;/span&gt;&lt;/p&gt;To reproduce the error, simply call add a StackButton from a delayed (post load) event such as a user button click.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 11pt; font-family: &amp;quot;calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: rgb(31, 73, 125);"&gt;&lt;/span&gt;


</description></item></channel></rss>