Automation error

Gauge for WPF Forum

Posted 13 years ago by 7Alpha7
Version: 11.1.0541
Avatar
Hello,

I am facing a problem I don't understand. Someone might have seen that, so I post in case. I have a workstation under Vista, with a project full of gauges. It works well. I want to deploy this project on a laptop under Vista also. It works excepted when I want to use a Led or a Switch. At this time I got an error on such a statement, using the setter property :

"oldValue has an uncorrect type for this property"

public bool IsBlinking { get { return led.LedState == LedState.Blinking; } set { led.LedState = (value ? LedState.Blinking : LedState.Off); } }

   à System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   à System.Windows.Automation.Provider.AutomationInteropProvider.RaiseAutomationPropertyChangedEvent(IRawElementProviderSimple element, AutomationPropertyChangedEventArgs e)
   à System.Windows.Automation.Peers.AutomationPeer.RaisePropertyChangedInternal(IRawElementProviderSimple provider, AutomationProperty propertyId, Object oldValue, Object newValue)
   à System.Windows.Automation.Peers.AutomationPeer.RaisePropertyChangedEvent(AutomationProperty property, Object oldValue, Object newValue)
   à ActiproSoftware.Windows.Controls.Gauge.Automation.Peers.LedAutomationPeer.a(LedState A_0, LedState A_1)
   à ActiproSoftware.Windows.Controls.Gauge.Led.a(DependencyObject A_0, DependencyPropertyChangedEventArgs A_1)
   à System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   à System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   à System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   à System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
   à System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
   à System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   à ActiproSoftware.Windows.Controls.Gauge.Led.set_LedState(LedState value)
   à sw7.acquisit.sys.win.gauges.Led.set_IsBlinking(Boolean value) 
The same code runs well under my workstation. Both are with the same Actipro releases and Vista SP2.

Comments (8)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

We were passing the LedState value to that changed event, but have tweaked it to pass a string representation. This falls in line with the type of the IValueProvider.Value property, which is the "source" of the event.

This should fix the issue you are seeing and will be included in the next maintenance release. Chances are the other box has some sort of screen reader or other automation client running.


Actipro Software Support

Posted 13 years ago by 7Alpha7
Avatar
Ok, I'm glad you are aware about that but what do you mean by "this" in "this should fix the issue" ? I'm afraid I don't understand very well.

Thank you.
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

The "this" refers to the change we made (i.e. the change that we implemented should fix the issue). Also, we weren't previously aware of this issue, so thank you for reporting it.


Actipro Software Support

Posted 13 years ago by 7Alpha7
Avatar
Allright I'll wait for the next maintenance release. But I have to add that there is also a problem of the same kind with the IsChecked property of the ToggleSwitch. There might be other troubles of the same kind on some other properties... I've not checked all of them.

[Modified at 02/28/2011 03:28 PM]
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

The ToggleSwitch actually implements a different automation interface then the Led and mimics how the native WPF ToggleButton interacts with the automation layer. If you are having problems with our ToggleSwitch, then I'd imagine you would have problems with the native ToggleButton as well.

If that is true, then it is most likely a third-party automation tool installed on the problem box that is causing the issue.


Actipro Software Support

Posted 13 years ago by 7Alpha7
Avatar
Hello,

I have not the time yet to investigate further. I'll let you know soon about it.
Posted 13 years ago by 7Alpha7
Avatar
I have not invastigated but I can say I have the trouble with the ToggleSwich in another computer with W7 Pro. The other one with the trouble is under Vista. Since it was production deployments tests I don't know at all what is the exception, the laptop was free from everything but what was needed. What is sure is that I don't have any exception on my dev computer; the two laptops fail to support the switches.
Posted 13 years ago by 7Alpha7
Avatar
With the last build I have noticed that the Automation Error had disappeared on the laptops, even with the Switches.

[Modified at 05/02/2011 04:07 AM]
The latest build of this product (v24.1.2) was released 0 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.