« first day (1043 days earlier)      last day (3106 days later) » 

12:04 AM
Me neither
alas, no C# client-side web language yet
blast, the CallerMemberName thing may compile, but the params having to be last is going to break me :(
I suppose I could just pass an object array
 
12:33 AM
Sanity check... I'm trying to set a numberformat using CultureInfo, and well, no sanity there.
The NumberGroupSeparator is like the comma between groups of 3 digits, right? Like 1,234,567.8
And NumberGroupSizes is an int[]... which I can't even figure out how to make one of, much less populate it or set the NGS to be one of
Regardless, it seems to default to 3, and if I don't mess around with it, it seems to stay 3.
Then there's NumberDecimalSeparator, which is the decimal point in 1,234.5
So here's the thing:
I can change NDS to comma, which changes my string to 1,234,5. Cool (ish).
I can change NGS to period, which SHOULD change my string to 1.234,5. This is what I want.
But it ignores my NGS string change.
Any thoughts on how I can get it to see changes to my NGS the same way that it's seeing changes to my NDS?
 
 
5 hours later…
6:01 AM
heya anyone out there?
I am looking for solution for customized autocomplete textbox . i.e. i want autocomplete textbox data to be filled based on text inserted in another autocomplete textbox. is that possible?
 
 
5 hours later…
11:06 AM
Afternoon
 
11:48 AM
@franssu got my GP uploaded to github.com/tb2johm/GeneticWalker, now it's not done. but it's getting there soon
 
 
1 hour later…
1:15 PM
hey
python :S
 
yes!
who doesn't love python??
you don't have to avoid using different types in returns and you can return many things at once! can it get any better? :)
 
I'm not a huge fan of dynamic typing
 
actually me neither, I miss the compiler type checks when in Python, on the other hand it's a lot quicker to just start a small project than C/C++ and I actually don't have any windows computer at home, so no C#
I guess I could have installed mono, but I haven't, so...
 
are you on macos ?
 
1:30 PM
yep
in my youth I hated mac and everything it stood for, then I went to university and saw the mac book and realised that it actually was great compared to other PC laptops at the time, and also that the OS was great as well
 
I had my first mac 24 years ago :p
I took it to the dump last month
it was still working
I bought a high end pc laptop 2,5 years ago
I'm trying to sell it, people won't buy it at less than a third of its price
 
24 years? how old are you??
 
31
 
was it a Macintosh?
 
yep
LCIII
 
1:39 PM
those I hated :)
 
it was so awesome
 
hadn't really tried then though
my first PC was a 286 larget screen than yours :P
 
hi!
 
hi
 
hi mat
 
1:41 PM
by the way, I think that all computers should lose half of its value for each year...
 
I was wondering if this would be a good place to discuss some theory about TreeView stuff
 
so 1/3 for 2.5 would probably be fair
however owners (and sellers) of mac's doesn't seem to agree with me in my price philosophy :)
 
@Markus that's what I thought too, that's why I put it at 1/3 of the price. Not a single contact in one week.
@Mat'sMug I think it is
 
hey guys, anyone know how i can add boolean values to a combobox in xaml?
 
but... 2.5 years would be x /2 /2 so x/4
@Mat go ahead and ask, if someone can answer they will
 
1:45 PM
so, I have an ObservableCollection<TestMethod> and currently binding in a ListView:
 
@user how do you want to show it?
 
works wonders... but quite impractical
 
@Markus just a simple dropdown combobox which has the options as true or false
 
whats impractical about it?
 
I'd want groupings by {Binding Outcome} or {Binding QualifiedMemberName.QualifiedModuleName}...
 
1:46 PM
wait, just add two values to a combobox?
 
do I need to create a new class to deal with the groupings, or it can all be done with XAML?
 
@Markus yep
        <ComboBox Grid.Row="5" Grid.Column="1" VerticalAlignment="Center" Margin="3" Width="150" HorizontalAlignment="Left"
            <ComboBoxItem Name="True" Content="True"/>
            <ComboBoxItem Name="False" Content="False"/>
                  Visibility="{Binding DataTypeBool, Converter={StaticResource BooleanTrueToVisibleFalseToCollapsed}}"
                  />
 
I think it can be done in XAML hold on and I'll have a look
 
this wasn't working :/
awesome thanks
 
morning
 
1:52 PM
@user what have you done?? ...
<ComboBox Grid.Row="5" Grid.Column="1" VerticalAlignment="Center" Margin="3" Width="150" HorizontalAlignment="Left">
    <ComboBoxItem Content="True"/>
    <ComboBoxItem Content="False"/>
</ComboBox>
 
@Markus thanks! the actual xaml is on github if you wanted to have a look
 
@Mat, did you mean "thanks I have found it" or "thanks for looking at it"?
 
@Markus problem is I want to keep the visibility binding for the combobox
 
@Markus I figured the markup could be useful for context, I meant thanks for this:
9 mins ago, by Markus
I think it can be done in XAML hold on and I'll have a look
:)
 
@user ok, but what did you want to bind the visibility to?
@Mat ok, just checking so I don't spend time searching for it if you already had found it
 
1:59 PM
@Markus I have shown the binding in the code above, the binding itself works as it has been tested with other tools
 
@user ok, I see what you are trying to do.. hold on while I look at Mat's problem, in any case your xaml syntax seems fault to me...
 
nah, I've only ever used a HierarchicalDataTemplate when the ViewModel was actually hierarchical...
 
I see, that might be the case for me as well, I'm looking in to it now
 
@Markus Okay thanks!
Yeah... i'm still pretty new to xaml so I've been experimenting a lot XD
 
@Mat'sMug You can do it by code behind through ICollectionView.GroupDescriptions property or you can include a CollectionViewSource bound to your observableCollection in the Resources clause of your control in your XAML, then you need to bind the ListView to the new resource.
 
2:03 PM
@AlessandroRossi you mean bind the TreeView to the new resource right? this sounds very much like a good plan :)
 
Yes, look for sample in google
samples
 
definitely will! thanks!
 
awesome, bookmarked :)
 
user4433485
Hellow!
 
2:13 PM
Oh, end of coffee break? :)
 
user4433485
haha
 
user4433485
Yes and I finished a webdesign sketch
 
user4433485
You want to see it? :3
 
sure
 
user4433485
 
2:21 PM
Oh noo! you must have misspelled a lot!
 
user4433485
lol:D
 
user4433485
Stupid Mercedes :-D
 
user4433485
Any suggestions?
 
put a renault twingo in place of the benz
:D
 
user4433485
Lol I'm afraid I can get fired from my own work for a mercedes already, imagine for a Renault Twingo :p
 
user4433485
2:25 PM
I'm a mechanic besides my study as developer at a Audi dealer :p
 
in my dreams I buy an A1
 
user4433485
I own a R8 in my dreams:p
 
@Markus any idea how to create the combobox?
 
user4433485
currently "leasing" a Audi TT 2015
 
mechanic? then maybe you can answer why many brand new audi engines drink more oil than my 20 year old range rover
 
user4433485
2:27 PM
Let me guess. Station?
 
@user not yet, still on Mat'r problem event though he might have solved it...
Station?
 
user4433485
I hear alot complaining about Audi station using alot of Oil
 
I think it's more that the oil level get's low while driving than the stations using to much oil in the service
 
audi station is the name of a car I think ? but not the same name in france I think
 
user4433485
Can be cylinder problems like the Golf MK4
 
2:29 PM
but it's like 1/4 of the cars or something.. well well I guess it wasn't you that designed the engine as well?
 
user4433485
Station is a carrosserie style like coupé and hatchbacks
 
user4433485
haha No sorry, I am more into the old cars :3 without computer stuff
 
I thought Avant was the global audi name for "station"
 
user4433485
I barely drive my brand new Audi TT :) BMW E30 M3 all the time
 
ah ok, station = "break" in france :)
 
user4433485
2:31 PM
it is @Markus but most people don't know that:)
 
user4433485
However
 
user4433485
Sportback is also station:) Audi A3 Sportback
 
is it?
 
user4433485
Well it's not a sedan either
 
user4433485
 
user4433485
2:32 PM
station :)
 
user4433485
Avant is somewhat bigger
 
@user the Converter you have specified in your example, is that something you have done or is it wpf standard?
 
@Markus converter is something I have made
 
So as an audi representant (but not dealer), would you recommend and older A8 over a newer A4?
@user ok
 
user4433485
As Audi representant wich I am not actually, I don't do the sale stuff :) I would recommend a newer A4. however, I would buy something older, Audi 80 or so
 
2:38 PM
so theres one thing I don't understand with your code. what are you trying to hide with the visibility binding?
is it the combobox or another control?
 
user4433485
If you go Maffiosi go Mercedes 180 I freaking love that car with the AMG style / Evo 2 kit
 
but a A8 is almost as cheap as a 80 so why not go for that?
 
user4433485
A8 cheap ? in what country do you live?
 
yes a little more in fuel, and insurance and so on, but come on... the comfort
 
user4433485
OH wait, I live in the only region with Road Tax, prices are completly different in the Netherlands
 
user4433485
2:40 PM
Audi A8 4.2L Quattro from 1995 is not cheap
 
blocket.se/sodermanland/… here's one for 13000 SEK (about €1300)
 
@Markus Basically a listview item is selected and some properties determine the datatype of the item, this code is part of my user control which displays a combobox or textbox depending on the datatype
 
user4433485
Tax would be like 150-180 euro monthly for a diesel
 
@Markus the visability hides or shows only the relevent type of box
 
ok then I get it. but the true / false text in the combobox has no connection to the visibility?
 
user4433485
2:41 PM
What car do you drive @Markus ?
 
no just the combobox itself
 
diesel? who said anything about a diesel? I'm not talking about tractors here :)
@user what do you mean?
 
user4433485
@Markus Well I don't know about your country but what are the gasoline prices? :p
 
the visibility will hide or show the entire combobox @Markus
 
@Kath first of all, all my cars are old, but it's a range rover, a porsche and I also own (but don't drive a BMW)
 
user4433485
2:43 PM
You've got a porsche? 924? 944? 911? whutwhut
 
yes, but the choice in the box will do nothing?
911
 
user4433485
I bought a porsche 924 2 weeks ago. it does not do anything yet but working on it :p
 
for now yes the choice will do nothing
 
user4433485
Cool :3
 
<ComboBox Grid.Row="5" Grid.Column="1" VerticalAlignment="Center" Margin="3" Width="150" HorizontalAlignment="Left" Visibility="{Binding DataTypeBool, Converter={StaticResource BooleanTrueToVisibleFalseToCollapsed}}">
            <ComboBoxItem Name="True" Content="True"/>
            <ComboBoxItem Name="False" Content="False"/>
<ComboBox/>
So try that
 
user4433485
2:47 PM
I need to fix the headgasket (correct english? :P)
 
the 924 will soon become a classic I think.. they won't ever get to the value of a 911, but there's not so many of them left, just look at the 914, that has gone up a whole lot the last years
 
user4433485
google translated :p
 
correct
 
user4433485
a old 911 costs like 112.000 euro here
 
but that shouldn't be any problems for a mechanic! :)
 
user4433485
2:48 PM
Nope! need to fix the rust etc as well
 
hehe ok but my is not that old :) it's a -91 (964)
 
user4433485
the problem is time :)
 
yes
 
user4433485
I prefer old cars. like I said I drive a Bmw e30 M3 while I've got a Audi TT 2015 from work
 
e30 M3! nice!
 
user4433485
2:49 PM
I prefer to drive myself instead of a computer :)
 
hehe maybe not if you have over 600bhp :)
not that I have ever driven anything that powerful
 
user4433485
haha Maybe! never try'd that out !
 
I'm going to drive a F430 soon :)
 
user4433485
my dad owns a plymouth barracuda that's sick
 
user4433485
cool !
 
user4433485
2:51 PM
I would also want to try ferrari testarossa
 
hehe well that won't turn anyways so no electronics neede there :)
replacing the twingo?
@user did it work?
 
@Markus says "Error 101 Expected '>'." on the combobox opening tag line
 
my gf offered me 2 laps at a local track
 
user4433485
replace your lovely twingo for a Clio RS.. I am sure you won't regret it :D
 
my coworker has a clio rs f1 team
 
2:53 PM
Oh sorry the last line should - OF COURSE - be </ComboBox> my bad
 
I think he regrets it :/
 
user4433485
How? To fast for him? :p
 
everythings has been replaced
 
that's not a clio rs F1 team right? like it's more like a name than the real F1?
 
since km 0
 
user4433485
2:54 PM
the only thing I can imagine, is regretting the gasoline prices
 
everything broke
 
user4433485
ouch
 
user4433485
if you want quality => German cars
 
peugeot :p
 
user4433485
Please.. no :p
 
2:55 PM
new 308 :D
 
user4433485
Volkswagen MK7 GTI vs Peugeot 308?
 
@Markus you hero! thanks! :D
 
I'm biased, I support my country :p
 
how about the citroen c6? (of course not as a sports car)
 
user4433485
mdr
 
user4433485
2:59 PM
Markus, what was your first car?
 
Ford Granade Ghia 2.6 -77
ohhhhhh
 
user4433485
waow bad boy
 
going on week end
cu!
 
user4433485
My first Mitsubishi Evolution 7. crashed it in like 3 weeks
 
user4433485
cya @franssu
 
user4433485
3:01 PM
8*
 
(mine peugeot 106 :p)
 
user4433485
Bought a Golf convertible 75HP after that one ^^
 
user4433485
Time for weekend <3 cya later ='D
 
3:24 PM
hey guys, I have a little question, I have a listView with a grid on the data template, 3 columns and the third columns is "*" because I want the label at the edge of the screen, but it is not, what could it be ?
this is the code
<ListBox ItemsSource="{Binding Data}" Grid.Row="4" Grid.ColumnSpan="10">
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Height" Value="60" />
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<Grid.ColumnDefinitions>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
 
byebye!
have a nice weekend
 
4:04 PM
@AlexanderRojas Format code as code
and grids are really tricky in items controls
 
I used ctrl + k u.u
 
doesn't look like it...
But assuming you got your grid working correctly, the label wouldn't be at the edge of the screen in that setup unless it had HorizontalAlignment="Right"
 
I apologize
 
set background colors of your grid and labels and see where they actually are
 
but the label has the HorizontalAlignment
 
4:06 PM
that always helps me
 
Or use snoop/live visual tree
it will show you where your borders are
 
if i had to guess the items control containing your grid template is not going to the edge of the screen
so the grid is just maxing out at itemscontrol size
 
the grid of the listbox doesn't fill the width of the screen, it's so small
 
set listbox horizontal alignment to stretch
 
not working
 
4:10 PM
then maybe you have to look at the control that contains your listbox
ah my bad
set horizontalcontentalignment to stretch
<Grid>
    <ListBox HorizontalContentAlignment="Stretch">
        <ListBoxItem>
            <Grid Background="Red">
                <Label Content="Test" />
            </Grid>
        </ListBoxItem>
    </ListBox>
</Grid>
 
@Julien very thanks, that worked
10pts for you :D
 
 
3 hours later…
7:24 PM
hi all
 
When unsubscribing from events after a child window closes, what is the best practise to invoke the 'tidy up' method(s)?
I not sure if just putting it all in the destructor is a good idea
but putting it in the closed event doesnt feel right either
 
Definitley not the "destructor"
which isn't really a destructor
Whats wrong with the "closed' event?
 
7:42 PM
Not sure why it doesnt feel right
maybe because its a public event, so other objects make be subscribing trying to do bad things
*may be
ergo a private event that is fired after Closed has completely
*completed
 
Even if other objects subscribed, all that matters is that you got called
and you are doing your own cleanup
 
Okay
 
Classes should clean themselves up, so it shouldn't matter if other stuff happened
btw, what you think is a destructor is actually a finalizer
 
Ah thanks
I guess because c# is managed, there is a bit of sandbox magic happening?
 
yeah
and finalizers are weird
and not always called IIRC
so make sure you know what the heck you are doing before messing with one
 
7:58 PM
Heh okay
 
8:32 PM
in general, you don't want finalizers unless absolutely necessary
because they also do horrible things to the GC/perf/etc
 
Okay well I planned to call the Dispose method on the Window's Closed event
Does anyone use any neat IDisposable patterns here?
Wondering about recursing through a list of IDisposable when the root Dispose() method is called
If only reflection wasn't so slow you could iterate through all class level members to see if they implemented it
 
8:50 PM
myObj as IDisposable
if (myObj != null)
    myObj.Dispose()
seems pretty simple...
though in reality, very few of your objects should be disposable anyways
 
very few? Isnt that making some strong assumptions?
For example, If I pass a long running object foo into 1000 objects of type bar, and each one subscribes to an event in foo, then the contents of all 1000 will remain in memory until the main process exits
 
Thats not really what IDisposable is for
IDisposable is for cleaning up unmanaged resources
I usually use a different method to do event handler clean up and the like
 
Oh I see
Do you just call it unsubscribe () or something?
 
Something like that
Stop and Close can work depending on the context
I think I've used Unsubscribe at least once
 
hmm it's an interesting topic to me
 
9:04 PM
naming things?
 
The whole subject of tidying up managed portions of code, and standardising this pattern across project or framework-wide
ive picked up and app and there are basically no unsubscribe events in it and am planning how to go about it
 
ah, good idea
event handler leaks are really annoying
 
well im pretty sure they've tried to remedy these by setting the references to null at various points
but its not really clear in the code!
 
Yeah, and that doesn't always work as well as you might hope
unless the event owner sets it to null
 
oh yeah that sounds pretty hacky indeed
okay I know its bad, but thats actually quite a neat way of clearing event subscribers that have added themselves via a lambda expression
 
9:27 PM
True, though if you had assigned the lambda expression to a variable before hand you can still remove them normally
 
9:38 PM
as in
`event Action<int> foo;
Action<int> bar;
void Main() {
foo += bar = (i) => { };
}`
then foo -= bar;
to remove
 
right
though thats abusing assigment a little bit
it is valid
 
9:56 PM
Thanks for your time @BradleyDotNET :)
 
no problem
 
have a nice weekend everyone :)
 

« first day (1043 days earlier)      last day (3106 days later) »