« first day (1011 days earlier)      last day (3138 days later) » 

1:14 PM
Sup doods
 
1:28 PM
hi Asheh
 
2:23 PM
hii
 
2:41 PM
big star citizen demo next week
im excited
 
3 weeks holidays next week :)
 
3:07 PM
Nice.
My internship ends in two weeks, and then I go back to uni a few weeks later. Excited to get back to uni, none of this windows business.
 
ahah
what are you developing on at uni ?
 
Mostly c/c++ on *nix recently.
We start with java on whatever platform you want, but it needs to compile on the red hat machines for the graders.
My internship was "make us a win8 surface app in C#" which was very interesting, but it confirmed I don't really like front end work.
Also I hate XAML.
I can do HTML. It makes sense and has clear divide between semantic meaning and making it pretty, which XAML just doesn't do.
The annoying thing is I'm going to get a fulltime offer here doing the same thing, and it's probably going to be the best offer I get.
 
do you have an internship supervisor ?
you have to have someone in the company who knows your job better than you and from who you can learn, otherwise you're wasting your time
 
3:29 PM
There is not really, but I've learned quite a bit anyway.
Spent a lot of time reading about how MVVM works, and spent a while bothering ##csharp on irc.freenode.net about if I was doing it right.
I do have a supervisor, but they can only really help with general c# questions, nobody here has used WPF.
But I feel I learned quite a bit about C#/WPF, I just don't really like parts of WPF. I think that's normal for any UI toolkit though.
Also, at the very least I can now afford food/housing for the next two semesters of uni.
 
having real people, expert in your domain just sitting next to you is a totally different thing
 
Yeah, but that's just not an option here, sadly. It's a steel company, all the other programmers are EE or CPE.
 
I thought a lot of campany where hiring
here in paris there's a big shortage of developers
 
Hm. Maybe I could go there.
I'm in the US, and there is some hiring, but there doesn't seem to be any kind of meaningful shortage.
 
where are you from ?
 
3:39 PM
Originally from north east USA, Vermont. Been going to uni in Michigan, and my internship is in Indiana.
What about you?
 
Paris
all my life
 
you can afford housing and food expenses for two semesters from an internship ? that's not too bad...
 
I mean I'm going to uni way up in the middle of nowhere so housing is dirt cheap.
 
@Scuzzball MSU?
 
MTU
 
3:44 PM
ahh
kinda expensive school though isn't it
 
It is, but I get in-state price because my father went there.
Out of state prices are just ridiculous.
 
ahhh
 
how much is it ?
roughly
 
out of state prices?
 
wow
 
3:47 PM
Instate for one semester 7000 USD
Out of state 15000 USD
Just for tuition.
 
yeah. U! S! A!... hah.
 
Indeed.
Yeah I am just going into debt for tuition and stuff, but I'm paying for food/housing on my own.
 
yeah
 
how many semesters are there ?
 
typically there are two...
 
3:55 PM
in the complete cursus I mean
to graduate
 
8 is "standard"
Many people end up with 9 though.
Also they require you to stay in their dorms for at least the first year, and that's insane expensive as well.
Anyway actual WPF question:
I have a combo box, and I want the dropdown to have a monospaced font.
https://gist.github.com/anonymous/bd3da25e127e64654118
I have the FontFamily set on the window, and that (appears to, the size does at least) work in most places, but it wasn't working in the dropdown.
So I added the style for ComboBoxItem, and it made the dropdown elements purple, but still not monospaced.
 
Check in the ItemTemplate if it has any FontStyle properties
 
check the value's source with snoop
 
So I'm looking at the combo box with snoop,but I can't get to the dropdown as snoop needs to refresh to get new elements, and if you click away the dropdown goes away.
The selected element, that displays after you select it does show up, and it looks like that is inheiriting from Window correctly, but it's not purple so I don't think it counts as a ComboBoxItem?
 
maybe just add a combobox item outside of a combobox just for testing
 
4:04 PM
Okay.
Okay so they do show up as font family monospace. But they are very much not monospace. Am I just trying to make the text monospace wrong?
Oh and now someone needs me to do other things for a bit. Sorry for leaving in the middle of asking questions.
 
4:40 PM
Hey can anyone lend some advice on this issue? I've got a method that loads two different sets of grades, based on a toggle button being selected (higher or ordinary), which is working fine.

But now I need to figure out how to load a third set of grades if, higher is toggled and the subject is "Mathematics". This is the method as it stands, hope that makes sense:
 
Sounds like you just need an if statement
so you'll need to be more specific as to what is confusing, since thats dead simple to write
 
okay I'll have another look at that, may have over complicated things as usual lol
 
5:13 PM
@BradleyDotNET btw what's the name of that popular programming training site? You mentioned it on here before, they offer training in different languages for a fee.
 
I doubt that was me
 
okay maybe it was someone else
anyways I've figured out my earlier question I think.
 
I know some people swear by pluralsight
but they have more information videos than training
 
is this along the right line, where HigherMaths is a string "Mathematics"
if(IsHigher && SelectedSubjectName.Equals(HigherMaths))
cool I'll check that site out
 
That statement seems reasonable
String compares are always ugly, so if that could be an enum it would be better
but for being stuck with strings, seems alright to me
 
5:25 PM
okay how would you go abut using an enum in this situation? always interested in new ways of doing things.
 
Or a guid ;)
Is this for a project, going into production, or just classwork?
 
A "subject" enum
instead of storing the strings, use the enum values
The fact that you can't just see a potential application to that, is quite frankly, frightening
 
Brad - are you on skype too?
 
not very often
 
ah, ok.
 
5:35 PM
I have an account for when people need to call/video chat or whatever though
 
I'm the same way, but since I've added Johan, I've left my office workstation signed on.
 
Since I got rid of my iMac I don't even have a camera or microphone
 
I have a camera intermittently. It's here for DirectShow dev until a qa tester needs it.
 
6:34 PM
okay I'll look into that @BradleyDotNET this is what I tried for a start, but the grade types don't change under the given conditions:

http://hastebin.com/komulobuhe.avrasm
 
You'll need to debug it and try a more specific question
 
6:47 PM
okay I'll give that a go.
 
7:38 PM
so I've debugged the issue further, and my grade points that should be updating when I've selected, the Higher toggle button and the selected subject name is "Mathematics" aren't updating my grade set in the grades combo box.

I debugged this and it's showing that the conditions are true, meaning that the grades should be updated in the grade combo box according to the if statement.

Although this if statement is only meet after I click the add grade button, any idea what could be wrong here?
 
@JohanLarsson I can't mouse over my local variables when i hit breakpoints and view their properties... wutt
 
@NETscape Does the watch window work as expected?
 
I had the same issue the other day, monster wtf moment
I think I even restarted VS
then I sent the instance to a method and there it was visible in the debugger
@NETscape all happened in debug build
 
@JohanLarsson Did you see my skype message?
 
yeah, not certain of context
don't think I have had that issue
not noticed it at least
how are things going?
takes a little getting used to perhaps
 
7:52 PM
@JohanLarsson same
@LynnCrumbling no
 
VS2013? (I was running that)
 
@JohanLarsson nope 2015... i think i got it
somehow my project's "Optimize Code" setting was checked on a couple of my projects...
 
@JohanLarsson My app never exited on closing the main window. Finally found this on SO:
5
A: Shutting down a WPF application from App.xaml.cs

FodderZoneIf you remove the StartupUri from app.xaml for an application with a MainWindow you need to make sure you make the following call in your OnStartup method otherwise the application will not terminate when your MainWindow closes. this.ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose; ...

 
can anyone advise on an issue I'm having? I set up an if statement to check if certain conditions are meet, and if they are, update the grades in a combo box. But the grades aren't being updated.
although the conditions are being meet.
 
@LynnCrumbling is it because we do window.Show()?
 
7:56 PM
@JohanLarsson Eh, just lots of work to flush out certain pages at the moment. Lots of rinse and repeat until I can get things working.
 
moving things around will be extremely simple later
when the views bring what they need via ctor
 
okay think I got it.
 
just a matter of moving links most of the time
 
@JohanLarsson I think so. I think that if you set the startup page, WPF inherently uses that "When main window closes" setting. Else, I think it uses System.Windows.ShutdownMode.OnExplicitShutdown
Meaning... you have to call Shutdown()
 
we should update the readme
 
7:57 PM
Yes. Surprised that you never ran into it.
Or are you calling Shutdown() somewhere?
 
maybe
not me but someone else may
 
8:34 PM
ahh yes. mouse click focus in text editor in VS2015 dies sometimes
 
8:49 PM
Is it possible to bind the visibility of a combo box to, two different properties? I've just came across this situation in my project
 
Only with a MultiValueConverter
or a computed property
 
okay doesn't look like there is a MultiValueConverter in Windows RT?
I could set the visibility programatically, but that would be bad practice as I'll be accessing the control directly from my VM..
 
Right, so a computed property is probably your best bet
 
Googling that now
 
You've already done a few...
Thats basically what NETScape was having you do
 
9:04 PM
nope still can't figure out what that is..
 
turned off MS symbol servers and emptied cache... still loads symbols from msdl.microsoft.com when i debug... tf
 
@BrianJ Here's an example: public int Sum { get { return a + b; } }
 
from searching, it's showing me that a computed property holds the value of a computation on two or more properties.
 
yes...
So it should be obvious how to apply that to a situation where, you know, need to base a value off of two or more other properties
 
yeah, so in my case, the visibility of my combo box should be set to visible, if either IsHigher or IsHigherMath is toggled.
I can't see where this would apply to my issue.
 
9:15 PM
you practically already wrote it...
public bool IsWhateverVisible { get { return IsHigher or IsHigherMath } }
i left it in pseudo code form
 
wait, I worded that incorrectly. Combo Box "A" should be collapsed if either IsHigher or IsHigherMath is selected. Combo Box "B" should be visible if IsHigher is selected, Combo Box "C" should be visible if IsHigherMath is selected, essentially only one combo box should be visible at any one point in these selections
 
@BrianJ Don't forget that you'll need to add an OnPropertyChanged("NewComputedProperty") for any of the dependent properties (IsHigher and IsHigherMath )
 
In your logic, A and B or C would be visible simultaneously
reagardless, its still just the (almost) exact computed property NETscape wrote
 
Sounds like an enum flags YourHighness { None = 0, Higher = 1, Math = 2 }
Just my US $0.02
 
okay maybe an enum would be the best bet
the other approach is confusing me
 
9:27 PM
Hi all, XAML n00b question here. In iOS development, there's a thing called a UISegmentedController. it looks like this, in practice:
Is there anything like that in XAML for WinStore apps?
I saw ToggleButton and ToggleSwitch, but I don't think those are close enough to what I'm looking for...
 
@NETscape ok I think I can implement this now, and thanks @LynnCrumbling
 
@KyleHumfeld Not out of the box
ToggleSwitch is the closest I know of
 
Dang, I was afraid of that...
 
@KyleHumfeld Agree with brad. Just need to style slightly.
Functionality-wise, it's what you want.
 
Okay... tell me more.
In the example I saw, it looked around 0% similar
So maybe that was a poor example?
 
Okay, cool, thanks for the tip!
But you're right, from that article, it definitely looks like it's pretty close to what I'm looking for.
 
so I should bind both combo box's visibility to the IsWhateverVisible property? That still doesn't make sense to me.
 
Bind each one to the correct property
Presumably, A would be bound to IsWhateverVisible
the other 2 to their individual properties
 
okay yeah that makes more sense, I'll try to implement now
 
<ComboBox IsEnabled="{Binding Highness, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static local:HighnessEnum.Math}}"   />
 
9:37 PM
Or that :)
 
^ if using enum
 
EnumToBoolean is pinned as ValueEqualsConverter fyi
 
Thanks. Was just digging that link out.
@BrianJ Your local will be defined to whatever xmlns the enum lives in.
@BrianJ Same thing as this UI:
The radio button next to the DecimalUpDown enables it. IsEnabled is bound to the same value that the radiobutton items are.
 
okay may take that approach then.
 
Followup question to that, is there a way for me to link a ToggleSwitch state to a VM? If I do that, then I don't need to mess around with a Toggled event handler
If it's possible, what property would I Bind to the VM?
 
9:43 PM
IsChecked
Beware, though.
 
Aha, thanks! ... beware?
 
ToggleButton supports null.
 
I'll initialize it then. Thanks!
(I assume there's no way to set it to null if it starts out non-null, right?)
 
Right :)
 
I don't think so
 
9:45 PM
The bigger issue is this:
If binding to IsChecked, your binding must support null.
See this:
In otherwords, you either need to use a converter, of bind to a bool? instead of just a bool
 
Which is just binding to bool? or using a converter
beat me to it :)
 
hahahahahaha
o/ \o
 
Okay, I think 'bool?' will be easier for me, so I'll go that way. Thanks!
 
@LynnCrumbling did you embed winforms?
 
@LynnCrumbling trying to implement NETscape's suggestion for a start, so is this along the right lines?
 //Higher grades toggle button bool
        private bool _isEitherHigherVisible;
        public bool IsEitherHigherVisible
        {
            get
            {
                return _isHigherMath || _isHigher ;
            }
            set
            {
                _isEitherHigherVisible = value;
                RaisePropertyChanged("IsEitherHigherVisible");
            }
        }
and I just bind my ComboBox "A" to this property?
 
10:01 PM
You don't put setters on computed properties
 
okay, where should I be setting the RaisePropertyChanged in the property then? as Lynn advised
like this instead?
//Higher grades toggle button bool
        private bool _isEitherHigherVisible;
        public bool IsEitherHigherVisible
        {
            get
            {
                return _isHigherMath || _isHigher ;
                RaisePropertyChanged("IsEitherHigherVisible");

            }

        }
 
Thats an infinite loop
and not what Lynn suggested
 
nope that didn't work..
okay
 
you raise PropertyChanged in the dependent property setters
 
okay so in the IsHigher and IsHigherMath as is set up already
get rid of it from my computed property
so I've set everything else up as suggested. Combo B's visibility is set to IsHigher, Combo C's is set to IsHigherMath
and Combo A's visibility is set to IsEitherHigherVisible and to BoolToNonVisibilityConverter
 
10:14 PM
You still need to raise the derivied properties event in the dependent setters
 
yeah because I tested it just now and Combo A is still visible when I select IsHigherMath toggle button
so what your saying is I need to raise this in IsHigher and IsHigherMath
            RaisePropertyChanged("IsEitherHigherVisible");'
 
6th time lucky?

https://gist.github.com/BrianJVarley/24e37f7be0029e27cbf8
okay so the combo boxes are showing visibility accordingly now, but the list of grades bound to the higher math grades aren't showing in the combo box. Hmm checked the correct naming on ItemSource and SelectedValue, both correct names, any idea?
 
10:31 PM
empty collections?
binding errors?
 
yeah I'll debug it further, can't see anything obvious.
thanks for the help, signing out..
:)
 
11:32 PM
@JohanLarsson Ewww yuck :) No, no winforms here...
 
ok, the grey forms did not realy blend in :)
did you try the dark theme?
I prefer the light
 

« first day (1011 days earlier)      last day (3138 days later) »