View Issue Details

IDProjectCategoryView StatusLast Update
0001641NoesisGUIC++ SDKpublic2020-05-25 10:58
ReporterstevehAssigned Tosfernandez 
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
Product Version2.2.6 
Target Version3.0Fixed in Version 
Summary0001641: Assert focusing the selected item in a ListBox via a Style trigger
DescriptionUsing a Trigger+Action to focus an item in a list when it gets selected is raising an assert because a selection is occurring inside another selection change:

<Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
  <Setter Property="Template" Value="{StaticResource ListBoxItemTemplate}"/>
  <Setter Property="noesis:StyleInteraction.Triggers">
    <Setter.Value>
      <noesis:StyleTriggerCollection>
        <ei:DataTrigger
            Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"
            Value="True">
          <noesis:SetFocusAction/>
        </ei:DataTrigger>
      </noesis:StyleTriggerCollection>
    </Setter.Value>
  </Setter>
</Style>


The callstack of the assert:

>>> MyExe.exe!Noesis::Selector::InternalSelectRange(int start, int end) Line 660   C++
    MyExe.exe!Noesis::ListBox::SingleSelection(Noesis::ListBoxItem * lbi) Line 146   C++
    MyExe.exe!Noesis::ListBox::ItemClicked(Noesis::ListBoxItem * lbi, bool toggleSelection, bool shiftKeyDown, bool ctrlKeyDown) Line 305   C++
    MyExe.exe!Noesis::ListBox::ItemClicked(Noesis::ListBoxItem * lbi, bool toggleSelection) Line 284   C++
    MyExe.exe!Noesis::ListBoxItem::OnGotFocus(const Noesis::RoutedEventArgs & e) Line 195   C++
    MyExe.exe!Noesis::UIElement::OnIsFocusedChanged(const Noesis::DependencyPropertyChangedEventArgs & e) Line 2807   C++
    MyExe.exe!Noesis::UIElement::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args) Line 2003   C++
    MyExe.exe!Noesis::FrameworkElement::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args) Line 1636   C++
    MyExe.exe!Noesis::Control::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args) Line 442   C++
    MyExe.exe!Noesis::ContentControl::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args) Line 146   C++
    MyExe.exe!Noesis::ListBoxItem::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args_) Line 120   C++
    MyExe.exe!Noesis::DependencyObject::NotifyPropertyChanged(const Noesis::DependencyProperty * dp, Noesis::StoredValue * storedValue, const void * oldValue, const void * newValue, bool valueChanged, bool isBaseComponent, const Noesis::PropertyMetadata * metadata) Line 1155   C++
    MyExe.exe!Noesis::DependencyObject::InternalSetValue(const Noesis::DependencyProperty * dp, void * oldValue, const void * newValue, void * coercedValue, unsigned char priority, Noesis::Expression * newExpression, const Noesis::PropertyMetadata * metadata, Noesis::Value::Destination destination, bool isBaseComponent) Line 797   C++
    MyExe.exe!Noesis::DependencyObject::SetValue_<bool>(Noesis::Int2Type<0> __formal, const Noesis::DependencyProperty * dp, bool value, Noesis::Value::Destination destination) Line 168   C++
    MyExe.exe!Noesis::DependencyObject::SetReadOnlyProperty<bool>(const Noesis::DependencyProperty * dp, bool value) Line 62   C++
    MyExe.exe!Noesis::Keyboard::Focus(Noesis::UIElement * element, bool askOld, bool askNew, bool canBeNull) Line 442   C++
    MyExe.exe!Noesis::Keyboard::Focus(Noesis::UIElement * element) Line 149   C++
    MyExe.exe!Noesis::UIElement::Focus() Line 453   C++
    MyExe.exe!NoesisApp::SetFocusAction::Invoke(Noesis::BaseComponent * __formal) Line 30   C++
    MyExe.exe!NoesisApp::TriggerAction::CallInvoke(Noesis::BaseComponent * parameter) Line 47   C++
    MyExe.exe!NoesisApp::TriggerBase::InvokeActions(Noesis::BaseComponent * parameter) Line 76   C++
    MyExe.exe!NoesisApp::DataTrigger::Evaluate() Line 99   C++
    MyExe.exe!NoesisApp::DataTrigger::EvaluateBindingChange() Line 81   C++
    MyExe.exe!NoesisApp::PropertyChangedTrigger::OnBindingChanged(Noesis::DependencyObject * d, const Noesis::DependencyPropertyChangedEventArgs & __formal) Line 70   C++
    MyExe.exe!Noesis::Delegate<void __cdecl(Noesis::DependencyObject *,Noesis::DependencyPropertyChangedEventArgs const &)>::FreeFuncStub<void (__cdecl*)(Noesis::DependencyObject *,Noesis::DependencyPropertyChangedEventArgs const &)>::Invoke(Noesis::DependencyObject * <args_0>, const Noesis::DependencyPropertyChangedEventArgs & <args_1>) Line 391   C++
    MyExe.exe!Noesis::Delegate<void __cdecl(Noesis::DependencyObject *,Noesis::DependencyPropertyChangedEventArgs const &)>::operator()(Noesis::DependencyObject * <args_0>, const Noesis::DependencyPropertyChangedEventArgs & <args_1>) Line 155   C++
    MyExe.exe!Noesis::DependencyObject::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args) Line 513   C++
    MyExe.exe!Noesis::Freezable::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & e) Line 237   C++
    MyExe.exe!Noesis::DependencyObject::NotifyPropertyChanged(const Noesis::DependencyProperty * dp, Noesis::StoredValue * storedValue, const void * oldValue, const void * newValue, bool valueChanged, bool isBaseComponent, const Noesis::PropertyMetadata * metadata) Line 1155   C++
    MyExe.exe!Noesis::DependencyObject::InternalSetValue(const Noesis::DependencyProperty * dp, void * oldValue, const void * newValue, void * coercedValue, unsigned char priority, Noesis::Expression * newExpression, const Noesis::PropertyMetadata * metadata, Noesis::Value::Destination destination, bool isBaseComponent) Line 797   C++
    MyExe.exe!Noesis::ValueStorageManagerImpl<Noesis::Ptr<Noesis::BaseComponent> >::SetValue(Noesis::DependencyObject * dob, const Noesis::DependencyProperty * dp, Noesis::BaseComponent * value, unsigned char priority, Noesis::Expression * expression, const Noesis::PropertyMetadata * metadata, Noesis::Value::Destination destination) Line 234   C++
    MyExe.exe!Noesis::ValueStorageManager::SetValueObject(Noesis::DependencyObject * dob, const Noesis::DependencyProperty * dp, Noesis::BaseComponent * value, unsigned char priority, Noesis::Expression * expression, const Noesis::PropertyMetadata * metadata, Noesis::Value::Destination destination) Line 40   C++
    MyExe.exe!Noesis::DependencyProperty::SetValueObject(Noesis::DependencyObject * obj, Noesis::BaseComponent * value, unsigned char priority, Noesis::Expression * expression, const Noesis::PropertyMetadata * metadata, Noesis::Value::Destination destination) Line 210   C++
    MyExe.exe!Noesis::DependencyObject::InternalSetExpression(const Noesis::DependencyProperty * dp, Noesis::Expression * newExpression, unsigned char priority) Line 599   C++
    MyExe.exe!Noesis::DependencyObject::InternalInvalidateProperty(const Noesis::DependencyProperty * dp, unsigned char priority) Line 981   C++
    MyExe.exe!Noesis::DependencyObject::InvalidateProperty(const Noesis::DependencyProperty * dp, unsigned char priority) Line 218   C++
    MyExe.exe!Noesis::BindingExpression::OnDependencyPropertyChanged(Noesis::BaseComponent * sender, const Noesis::DependencyPropertyChangedEventArgs & args) Line 1747   C++
    MyExe.exe!Noesis::Delegate<void __cdecl(Noesis::BaseComponent *,Noesis::DependencyPropertyChangedEventArgs const &)>::MemberFuncStub<Noesis::BindingExpression,void (__cdecl Noesis::BindingExpression::*)(Noesis::BaseComponent *,Noesis::DependencyPropertyChangedEventArgs const &)>::Invoke(Noesis::BaseComponent * <args_0>, const Noesis::DependencyPropertyChangedEventArgs & <args_1>) Line 465   C++
    MyExe.exe!Noesis::Delegate<void __cdecl(Noesis::BaseComponent *,Noesis::DependencyPropertyChangedEventArgs const &)>::operator()(Noesis::BaseComponent * <args_0>, const Noesis::DependencyPropertyChangedEventArgs & <args_1>) Line 155   C++
    MyExe.exe!Noesis::Delegate<void __cdecl(Noesis::BaseComponent *,Noesis::DependencyPropertyChangedEventArgs const &)>::MultiDelegate::Invoke(Noesis::BaseComponent * <args_0>, const Noesis::DependencyPropertyChangedEventArgs & <args_1>) Line 577   C++
    MyExe.exe!Noesis::Delegate<void __cdecl(Noesis::BaseComponent *,Noesis::DependencyPropertyChangedEventArgs const &)>::operator()(Noesis::BaseComponent * <args_0>, const Noesis::DependencyPropertyChangedEventArgs & <args_1>) Line 155   C++
    MyExe.exe!Noesis::DependencyObject::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args) Line 514   C++
    MyExe.exe!Noesis::Visual::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args) Line 766   C++
    MyExe.exe!Noesis::UIElement::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args) Line 1887   C++
    MyExe.exe!Noesis::FrameworkElement::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args) Line 1636   C++
    MyExe.exe!Noesis::Control::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args) Line 442   C++
    MyExe.exe!Noesis::ContentControl::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args) Line 146   C++
    MyExe.exe!Noesis::ListBoxItem::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args_) Line 120   C++
    MyExe.exe!Noesis::DependencyObject::NotifyPropertyChanged(const Noesis::DependencyProperty * dp, Noesis::StoredValue * storedValue, const void * oldValue, const void * newValue, bool valueChanged, bool isBaseComponent, const Noesis::PropertyMetadata * metadata) Line 1155   C++
    MyExe.exe!Noesis::DependencyObject::InternalSetValue(const Noesis::DependencyProperty * dp, void * oldValue, const void * newValue, void * coercedValue, unsigned char priority, Noesis::Expression * newExpression, const Noesis::PropertyMetadata * metadata, Noesis::Value::Destination destination, bool isBaseComponent) Line 797   C++
    MyExe.exe!Noesis::DependencyObject::SetValue_<bool>(Noesis::Int2Type<0> __formal, const Noesis::DependencyProperty * dp, bool value, Noesis::Value::Destination destination) Line 168   C++
    MyExe.exe!Noesis::DependencyObject::SetValue<bool>(const Noesis::DependencyProperty * dp, bool value) Line 47   C++
    MyExe.exe!Noesis::Selector::SetIsSelected(Noesis::DependencyObject * element, bool value) Line 81   C++
    MyExe.exe!Noesis::Selector::OnItemSelected(Noesis::SelectionChangedEventArgs & e, Noesis::BaseComponent * item, int index) Line 1003   C++
    MyExe.exe!Noesis::Selector::UpdateSingleSelectedList(Noesis::SelectionChangedEventArgs & e, Noesis::BaseComponent * selectedItem, int selectedIndex) Line 913   C++
>>> MyExe.exe!Noesis::Selector::OnSelectedIndexChanged(int oldIndex, int newIndex) Line 1048   C++
    MyExe.exe!Noesis::Selector::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args) Line 559   C++
    MyExe.exe!Noesis::ListBox::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs & args) Line 71   C++
    MyExe.exe!Noesis::DependencyObject::NotifyPropertyChanged(const Noesis::DependencyProperty * dp, Noesis::StoredValue * storedValue, const void * oldValue, const void * newValue, bool valueChanged, bool isBaseComponent, const Noesis::PropertyMetadata * metadata) Line 1155   C++
    MyExe.exe!Noesis::DependencyObject::InternalSetValue(const Noesis::DependencyProperty * dp, void * oldValue, const void * newValue, void * coercedValue, unsigned char priority, Noesis::Expression * newExpression, const Noesis::PropertyMetadata * metadata, Noesis::Value::Destination destination, bool isBaseComponent) Line 797   C++
    MyExe.exe!Noesis::DependencyObject::SetValue_<int>(Noesis::Int2Type<0> __formal, const Noesis::DependencyProperty * dp, int value, Noesis::Value::Destination destination) Line 168   C++
    MyExe.exe!Noesis::DependencyObject::SetValue<int>(const Noesis::DependencyProperty * dp, int value) Line 47   C++
    MyExe.exe!Noesis::Selector::SetSelectedIndex(int index) Line 112   C++
TagsNo tags attached.
PlatformAny

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-03-18 17:18 sfernandez New Issue
2020-03-18 17:18 sfernandez Reporter sfernandez => steveh
2020-03-18 17:18 sfernandez Assigned To => sfernandez
2020-03-18 17:18 sfernandez Status new => assigned
2020-03-18 17:18 sfernandez Target Version => 3.0.0
2020-05-25 10:58 jsantos Target Version 3.0.0 => 3.0