michaellperry / assisticant Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I'm interested in using Assisticant in my new async-heavy API backend, but Assisticant doesn't seem to support async at all.
So I had the idea of forcing my async code to run synchronously inside Computed<T>._update
by using .Result
on a task it calls. Unfortunately, this doesn't really work. My update method calls an async method that (1) asynchronously reads from the database, storing the results in a ObservableDictionary
and then (2) returns ObservableDictionary<,>.Values.ToList()
.
Let's say my update method runs on "thread 1". It turns out that after reading from the database, the remainder of the async method runs in "thread 2" and then the .Result
is returned to thread 1. Thus, the dependency is not recorded because it was accessed on the wrong thread.
Questions:
ObservableBase
might be a less confusing name than Precedent
?And I am baffled by that: https://assisticant.net/documentation.html
Hello Michael,
Thanks for your recent fixes. I just pushed an example code to my fork of assisticant (https://github.com/smasihemami/Assisticant/tree/ListSlot) to be able to better discuss my current issue with you.
In the example, on changing the sample id definition mode (either defined by first x number of characters or characters preceding the first "_" character in the file name), the list of sample IDs shown in the CheckedComboBox changes. Hence the number of Sample IDs changes.
On this change, all the items in the CheckedComboBox should be initially selected. This happens on startup of the Storyboard application, but on changing the Sample ID definition mode, it does not happen, although I re-populate the list of selected items (line 25 in StoryboardParametersModel.cs). As far as I remember from my old way of doing it with Prism, I was setting IsSelectAllActive to false before changing the SelectedItemsOverride observable collection (in this example, it's called SelectedSampleIDs) and back to true right after finishing, so that CheckedComboBox synchronizes its internal state with SelectedItemsOverride collection. But with Assisticant, I'm not sure how to do that. Is there a way to force an update by Assisticant on a specific computed? Or better say, is there a way to control when a computed gets updated?
Hello Michael,
First of all, I should express my highest gratitudes and excitements towards using your absolutely awesome library. I'm greatly happy that such a library exists. My happiness is just beyond words.
I have an issue regarding binding XceedWPFToolkit.CheckComboBox.SelectedItemsOverride to an (ObservableList exposed as IEnumerable). When I bind XceedWPFToolkit.CheckComboBox.ItemsSource to an (ObservableList exposed as IEnumerable), it correctly shows the items. But on changing the selection from UI, Assisticant does not trigger an update on all the computeds (i.e. those properties depending on that observable list).
Previously, when using XceedWPFToolket.CheckComboBox together with Prism framework, I was binding XceedWPFToolkit.CheckComboBox.SelectedItemsOverride to (an ObservableCollection exposed as ICollection) and it was working fine.
I also tried to cast IEnumerable to ICollection but it didn't make any difference.
On top of this, I am wondering how to make sure a property depending on an ObservableList gets updated on a change in that ObservableList. I followed your great tutorials, but yet there seems to be still something missing in my mind.
Would highly appreciate if you be kind to shed some light on this matter.
Assisticant's ObservableCollection<> class has base classes that support both System.Collections.Generic.ILIst and System.Collections.ILIst.
Assisticant's ObservableDictionary does not implement both System.Collections.Generic.IDictionary and System.Collections.IDictionary. Only the former generic form is implemented.
This prevents ObservableDictionary from being passed to a utility method as an untyped System.Collections.IDictionary. Instead, methods must know the fully typed signature of the incoming ObservableDictionary or IDictionary<TKey, TValue>.
Hi,
I have a viewmodel that has a property like:
public string this[string area] => _areaNotifications[area];
In XAML I use:
Text="{Binding Path=[Dashboard]}"
This works in Design mode and creates the desired looks, but in runtime Text property is null!
Does Assisticant support DotNet Core 3.1 without introducing dependencies on other frameworks? I see .Core listed as (portable), but in the build targets, I see .NET Framework 4.5, Silverlight, and Xamarin for the .Core project.
Hi ! I have seen your library and it is very nice library for mvvm support . I have a query. How can it provide support for editable objects and IDataErrorInfo objects. I want to use them using your library.
Thanks
Any plans for Assisticant supporting .NET Standard?
I want know how i can use entity framework with Assisticant, when i should pass business logic to Model and can i load data on ViewModel, and i want know is there any disorder?
I'm dynamically creating columns as required in my program, and binding cell values and properties etc on my datagrid to indexes into an ObservableList, accessed through an IEnumerable.
Works fine until the observable list is modified, then any time I change the list or reload the data from the list I get this error:
System.Windows.Data Error: 17 : Cannot get 'Item[]' value (type 'Object') from 'IsDirty' (type 'ObservableCollection
1'). BindingExpression:Path=IsDirty[0]; DataItem='PlatformProxy
1' (HashCode=6556909); target element is 'DataGridCell' (Name=''); target property is 'NoTarget' (type 'Object') ArgumentOutOfRangeException:'System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Strangely, the error does not exist prior to modifying the data in the list, and is 100 percent repeatable, and occurs across multiple bindings of different types.
Stranger still, the view still looks correct. Just throws a ton of errors in the background.
For example, with this IsDirty[] collection, setting the values all to true before loading up the data, no issues. Setting the value to true again causes no errors (probably doesn't raise an event internally to Assisticant?)
However, if the values start at false, and I change any of them to true, each element will throw an error every time it is changed or reloaded, but will still display correctly (bolded text through converter).
Call ShowModal in a command from the course model. Days binding on the modal dialog does not work. Updates for the rest of the application will not work until the modal dialog is dismissed. The command object captures updates so that it can invoke them when the command is finished.
Hey Michaell,
thank you for this cool lib. I've always searched for a knockout-style lib for wpf. After diving in your code I've found out, that the PlatformProxy<>
on the WPF-platform only supports IDataErrorInfo
. INotifyDataErrorInfo
is only supported on the Universal-Platform. Is there a possibility to get a PlatformProxy<>
which implements INotifyDataErrorInfo
without recompiling Assinsticant? It would be cool to have the choice which interface my viewmodels are wrapped in.
Greetings,
Christian
ICollectionView collectionView = CollectionViewSource.GetDefaultView(this.SearchResultList) as CollectionView;
collectionView .Group is not working it was a working code. not confirm what is this.
Hi
I would like to know how I could pass a Parameter with MakeCommand?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.