« first day (1534 days earlier)      last day (3640 days later) » 

18:49
@ReedCopsey ping when you have a minute I was told you could help me with task cancellation and have a strong opinion about it - please take a look at github.com/petkaantonov/bluebird/issues/415
Maybe no strong opinion but he probably knows the right way to do it.
Well, if he knows the right way we'd be very grateful :)
19:05
I'm trying to deserialise np.absoluteradio.co.uk/nowplaying/aim_abr.xml into a class. When I used xsd.exe to make a class for it to deserialise to it generates this: pastebin.com/YMQHEk8Y which is totally unworkable because the root object's only property is 'public object[] Items'
I don't want the three objects under the root object to be treated as an array but as three different properties
I hope that makes sense
May 22 at 19:50, by Johan Larsson
1. Copy some xml into clipboard
2. Create a new class in VS, delete everything in it
3. edit > paste special > paste xml as classes
4. Profit
Paste XML As Classes
The operation failed due to System.ArgumentException: Unable to find a type of reference that is appropriate for this file: "System".
Also, that does the same thing as xsd.exe, no?
dunno, think it produces cleaner code but not sure
Could you possibly try generating a class for me? Maybe my install is broken.
19:25
sure
nevermind, I did it in a different type of project
and the paste special thing worked
then copy-pasted it to my project
did it generate cleaner code?
yeah
little known but handy tool
 
4 hours later…
F4z
F4z
23:35
My ObservableCollection wont update.
invalidoperationexception?
or no ui update?
F4z
F4z
ui update
ore you creating the collection only once?
F4z
F4z
it's very vague. but I just don't know how to trigger the update method.
Bindings are per instance
F4z
F4z
23:36
bindings and all are good
oc notifies on changes
what does the relevant xaml look like?
And do you set datacontext?
F4z
F4z
just that I have a listbox and it reads files from a directory and loads them into the listbox on start but i have another page where I create something and it's supposed to add it to the listbox but it doesn;t
lst_Accounts.DataContext = ItemCollection;
i've added that to the startup
i need a way to update my listbox
how can i trigger it using code?
just bind itemssource of the listbox to the oc and wpf will handle the rest
F4z
F4z
        ItemCollection.Add(new ItemProperties());
        lst_Accounts.ItemsSource = ItemCollection;
like that?
nope, looks wrong in a bunch of ways
F4z
F4z
23:39
wait.
hold on writing a small sample for you
F4z
F4z
ok
basically there is a method which only runs once. That's where I've added the load to listbox event. It adds it successfully.
once I open the "add" page and i return to the menu, the one time method wont run again instead the alternative is a activated or loaded event. this activates everytime i run into the main page, in that event i need to add the update method
I am confused by this, I have a line that says:
Process.Start(@"%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe");
but I get a The system cannot find the file specified exception. However if I copy that string into windows explorer and press enter, powershell starts right up.
Ah interesting, if I omit the %SystemRoot% and just use C:\Windows it works
F4z
F4z
23:47
@JohanLarsson I'll check
@JohanLarsson d:DataContext="{d:DesignInstance listBoxBox:ViewModel}"
that line is giving me an error
try rebuilding
or delete the line, it is just a designtime thing
building should work
F4z
F4z
worked.
I've got that working in my project. updates perfectly however I think I found the problem
I never ran it so dunno if it works
think it is right though
F4z
F4z
it is
hold on let me explain something
I have 2 pages. Page A and Page B. Page A has a ListBox. In Page A I've binded my Listbox to my ObservableCollectionand when I load Page A all the items are added. The loading is added into the

public p_Menu()
{
InitializeComponent();
}

This runs only once unless closed and reopened. (They are added by reading a folder through For each.. and then are added to the listbox). in Page A i have a button which takes me to Page B. From Page B I fill stuff in, it creates a file in a directory (this is the diretory which the for each reads and loads to the listbox) and when I go back, the listbo
I'm developing a windows phone app and it uses xaml and binding all that, If you can adjust to help me get the solution
this is why i need a way to trigger the ObservableCollection so when I go back, it will be updated WITHOUT closing and reopening the app
not the fault of the oc I think
I have never done any phone so dunno.
F4z
F4z
23:57
yes. oc seems fine, just UI not updating
i think it's just the method
hold on let me try somehting
try checking datacontext with snoop
F4z
F4z
what do you mean by snoop?
if it works for phone stuff
invaluable for troubleshooting wpf issues

« first day (1534 days earlier)      last day (3640 days later) »