|
It's so rare that I'm "right" that I can make a meal out of even a crumb ... like this.
cheers, Bill
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
You can write unsafe code that will allow you to access individual characters.
BillWoodruff wrote: C# language forum is now not what it was many years ago in terms of real interchanges about language features, often, imho, full of questions that should have been posted on the QA forums.
So how do we fix that?
A couple of options
1. We allow members to move questions from the forums to QA.
2. We combine all forums into one, and call it "Programming Discussions". Not for questions, but for discussions. The Lounge for Programers.
3. ?
cheers
Chris Maunder
|
|
|
|
|
Hi Chris, I wish I had a really specific constructive suggestion to make ! As I perceive it, it is not the tao of CP to have moderated forums, and I wonder if you'd be willing to move in such a direction, if the membership would accept that.
I think every MVP and Mentor should be willing to do some "jury duty" for some period of time ... if you enable these folks to move questions from the C# language forum to QA.
Then there's the question: is there really an "appetite" for discussion of language issues and quirks, and work-arounds, and such ? Is it the case of "build it and they will come" ?
I've long felt that valuable programming content ... that would be useful to members in the future ... appears here on the Lounge, and then kind of gets submerged in the spate of the usual frivolities.
But, who's going to somehow curate/tag that content, or copy it to a place where it persists and is indexed in a valuable way ?
But, just because I see a few pimples on the angels, does not mean I do not see CP, as it is now, as paradise
cheers, Bill
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
Switch to VB.NET and she'll be right:
Dim s As String = "Cool"
Mid$(s, 1) = "F"
Console.WriteLine(s)
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Ok, this is a bit of rant.
I'm building a UWP (Universal Windows Platform) app -- XAML / C#.
I've developed software all the way back to Win3.1 using Visual Studio 1.x and the MFC.
Now, I've just been forced to create a new UserControl in XAML because the functionality hasn't been wrapped up for what I want (NumericUpDown control).
But for hours I could not figure out why the button wouldn't render itself properly -- the text (content) on the button will not display.
Find out there's way more you have to do to get it working, simply because this stuff doesn't quite work. Great.
Took About 1 Day to Convert Winform to Android App
But, there's more to this. I wrote this app as a Winform app and then converted it in a day or so to an Android app. I re-wrote the entire Winform app natively using Android Studio.
Think about that...
The Point
I've been developing on Windows Platform for 25 years but it is easier for me as a developer to convert it to an Android app than it is to convert it to a Universal Windows App.
Dear Microsoft:
You are failing on both of your (previous) strengths:
1. Desktop OS
2. Development tools
It is too bad because during XP through Windows 7, things weren't entirely terrible.
I suppose you will just be a fading memory soon anyways.
Sincerely,
Software Developers Everywhere
modified 18-Sep-16 18:27pm.
|
|
|
|
|
Reminds me of the Soviet era, when it was cheaper and faster to export products out of Leningrad (St Petersburg nowadays) then import them to Vladivostok rather than to have to ship them inside the Soviet Union.
Anyway, when all the exotic artifacts (re Windows development) pile up during the years, of course it will be difficult. You have to remember all the arcane details, for example that 32-bit system .dlls are stored in C:\Windows\syswow64 and 64-bit system .dlls are stored in C:\Windows\system32. If that makes sense to you then you will be an exemplary Windows developer.
|
|
|
|
|
|
Agreed. I had a lucky escape a couple of years ago, I switched to using Qt for all my Windows development. Qt was started about the same time as MFC but they have been working on it ever since (while MFC I think nowadays is abandonware). If you're keen on keeping your mental health you could give it a try!
|
|
|
|
|
If Microsoft wold throw in the towel, admit that their browser is garbage and re-do it based on webkit, things will pick up a little IMHO.
modified 20-Oct-19 21:02pm.
|
|
|
|
|
I never quite understood MS's obsession with XAML. There's some merit in the idea of a declarative HTML style UI definition, but they half assed it creating a totally overweight and underperforming framework. XML tends to end up quite verbose (as in not very readable/fun to work with) very quickly. I've stuck with Win Forms all these years, and I'm quite happy with that.
Wout
|
|
|
|
|
wout de zeeuw wrote: XML tends to end up quite verbose (as in not very readable/fun to work with) very quickly.
That is the perfect explanation of it. Did you know they finally gave in and now they do a "precompiled" binary version of the XAML for performance? XBF (XAML Binary Format) There are XBF files built in your project now.
I agree with you about winforms -- even though they haven't been updated much over the years. And this is the additionally crazy thing about this.
The difficulty I'm up against isn't the code.
It's just little things like trying to get the UI right. Displaying a character on a button or doing something slightly different. It's just such a waste of time.
Also the design mode of XAML is terrible. Mostly it is easier to type your UI as characters than it is to drag drop controls on the form. That's kind of crazy from a winform standpoint.
Thanks for chiming in the subject.
|
|
|
|
|
XAML feels like an overly complicated HTML. If they wanted multi platform and declarative, why not just stick with HTML and make that work nicely? That would have been a huge winner.
Wout
|
|
|
|
|
wout de zeeuw wrote: If they wanted multi platform and declarative, why not just stick with HTML and make that work nicely?
That's exactly what I've been asking myself.
Well, I guess it's because they can't own HTML.
|
|
|
|
|
It's a little bit of mystery the point of this whole UWP thing is...
UWP app are crippled by so many limitations...
My pet grips are file system access and markup extensions.
On the plus side it's easy to mix XAML and DirectX
|
|
|
|
|
Super Lloyd wrote: It's a little bit of mystery the point of this whole UWP thing is...
UWP app are crippled by so many limitations...
You are totally right there.
The crazy thing is that I've seen some big differences in dev via WinRT (which promised to bring everything together) which is underneath this UWP stuff where if you target win8.1 there is no built-in ContentDialog (pre-built dialog that makes it easier to get input from user). But ContentDialog is supported under win10.
Things like that make it feel like my UWP app is only going to run on Win10 devices and that's probably the point that MS is pushing but it feels limited since the idea of UWP is supposed to be UNIVERSAL. It's all just marketing.
|
|
|
|
|
They are pretty silent on UWP at the moment... I suspect they will have something new.. in a while...
Also, after giving it a lot of thought, unless I make really universal app (one that also run on phone and tablet) I should probably stay focused on WPF.
Many limitation are common denominator with phone app limitation, and I should go UWP only if I am happy with that.
With centenial they are coming with (an apparently clunky) model to have UWP and WPF code mixed up!
|
|
|
|
|
Super Lloyd wrote: (an apparently clunky) model to have UWP and WPF code mixed up!
Definitely!
100% mixed up. It's why most people are just ignoring it, I think.
|
|
|
|
|
They needed Win RT/UWP for their app store to rake in the 30% developer tax. For that 30% fee you'd expect something bloody fantastic. But after Silverlight you could just smell the half-assery coming, so decided to not bother will RT/UWP so far.
Wout
|
|
|
|
|
If it would help, I think I still have my 4 volume MFC reference book set you can borrow. Or I can email it, page by painful page, for a small fee.
Will Rogers never met me.
|
|
|
|
|
Absolutely. Send it ASAP!!
Do you happen to have the HUGE wall chart of the MFC class hierarchy?
Remember those?
|
|
|
|
|
I remember it well, but I don't think it survived intact. I had it on a wall at one time, but that was long ago. I tried for years to master C++ and MFC, and finally gave up. Neither made a lick of sense, just a giant step backward from the goal of readable, maintainable code.
Will Rogers never met me.
|
|
|
|
|
raddevus wrote:
But for hours I could not figure out why the button wouldn't render itself properly -- the text (content) on the button will not display. Why didn't you ask a question in the forums here? I could have offered some pointers. Are you using VS2015? Why didn't you use the Live Property and Live Visual Tree to help resolve?
This space for rent
|
|
|
|
|
Pete O'Hanlon wrote: Why didn't you ask a question in the forums here?
I got caught up in my rant.
Pete O'Hanlon wrote: Are you using VS2015?
Yes
Pete O'Hanlon wrote: Why didn't you use the Live Property and Live Visual Tree to help resolve?
I only knew about these from sideways references.
You are most kind to point this all out. Next time -- and there will be a next time -- I will ask here.
Also, I finally found the answer by breaking everything and putting it all back together.
The Content="asdfasdf" would not display on the button because it was way off the "edge" of the button.
As soone as I added padding="0" it snapped to the middle of the button.
|
|
|
|
|
I shall be glad to offer help, if I can. And yes, padding can be a bitch.
This space for rent
|
|
|
|
|
Pete O'Hanlon wrote: And yes, padding can be a bitch.
Truer words were never spoken.
It was a very small button and I had HorizontalContentAlignment="Left" and I ignorantly _assumed_ that the char would display. And then I just ran down a road based upon foolish ignorance and expectation.
I was stuck in a locus of attention and couldn't break out.
Finally, I remembered, "Hey, let's break this thing really bad!" Then I beat it.
|
|
|
|