Giter Site home page Giter Site logo

Comments (12)

glennawatson avatar glennawatson commented on March 29, 2024 1

Thankyou, I'll have a look later in the week. This sample was only recently added.

from reactiveui.samples.

suc8899 avatar suc8899 commented on March 29, 2024 1

It's work ok,IEnumerable change to IList,thank you @rallets @glennawatson

from reactiveui.samples.

suc8899 avatar suc8899 commented on March 29, 2024

@glennawatson

from reactiveui.samples.

glennawatson avatar glennawatson commented on March 29, 2024

Thanks for the issue. Please edit to bring back the full issue template otherwise gotta close this one.

from reactiveui.samples.

glennawatson avatar glennawatson commented on March 29, 2024

See https://github.com/reactiveui/ReactiveUI.Samples/issues/new?assignees=&labels=bug&template=bug_report.md&title=%5BBUG%5D+Summary+of+item for an example

from reactiveui.samples.

suc8899 avatar suc8899 commented on March 29, 2024

@glennawatson issues have been fixed

from reactiveui.samples.

rallets avatar rallets commented on March 29, 2024

Hi @suc8899 can you try to remove
initialValue: Enumerable.Empty<ItemDto>()
From ItemsViewModel.cs, line 88 ?

from reactiveui.samples.

suc8899 avatar suc8899 commented on March 29, 2024

@rallets I have tried it, the problem is still not solved

from reactiveui.samples.

rallets avatar rallets commented on March 29, 2024

@glennawatson not sure why, but now the code that was working, it throws an exception. It's related to the property being an IEnumerable, but the ListBox DataBinding is expecting a IList or IListSource. All the packages are up to date. I have a fix that consists in replacing IEnumerable to IList, but I'm wondering if you have any tips on what this can be related to, or if it's a smell of another problem.
I have sent a PR #542 that fixes the problem. @suc8899 if you want you can try that branch.

The exception is:

PropertyBinderImplementation: view.lstDetails.DataSource Binding received an Exception! - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.ArgumentException: Complex DataBinding accepts as a data source either an IList or an IListSource. (Parameter 'value')
   at System.Windows.Forms.ListControl.set_DataSource(Object value)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.InvokeOneParameter(Object obj, BindingFlags invokeAttr, Binder binder, Object parameter, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
   at ReactiveUI.PropertyBinderImplementation.<>c__DisplayClass11_0`3.<BindToDirect>g__SetThenGet|0(Object paramTarget, Object paramValue, Object[] paramParams) in /_/src/ReactiveUI/Bindings/Property/PropertyBinderImplementation.cs:line 296
   at ReactiveUI.PropertyBinderImplementation.<>c__DisplayClass11_0`3.<BindToDirect>b__7(<>f__AnonymousType0`2 x) in /_/src/ReactiveUI/Bindings/Property/PropertyBinderImplementation.cs:line 318
   at System.Reactive.Linq.ObservableImpl.Select`2.Selector._.OnNext(TSource value) in /_/Rx.NET/Source/src/System.Reactive/Linq/Observable/Select.cs:line 39

from reactiveui.samples.

glennawatson avatar glennawatson commented on March 29, 2024

Possibly an update with .NET 6? Seems to be a hard requirement by winforms anyway.

Thanks for your fix, @suc8899 if you can confirm if that merge fixes it for you?

from reactiveui.samples.

glennawatson avatar glennawatson commented on March 29, 2024

Thanks @suc8899 closing the issue now

from reactiveui.samples.

github-actions avatar github-actions commented on March 29, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from reactiveui.samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.