This is trivial, but we're programmers and we always prefer accuracy... Right after submitting a new question, I looked at the list of my questions. The question I had submitted only two minutes prior was marked as having been submitted four hours ago. Is something picking up the wrong time zone?
John Whitmire
Posts
-
Inconsistent reporting of submission time -
How to get behavior similar to the obsoleted XmlValidatingReaderHey, Moderator, I now think this would be more appropriate for the XML forum. Do you agree?
-
How to get behavior similar to the obsoleted XmlValidatingReaderI don't see a way to use that suggestion with the parts that I have. The errors of interest are not going to be found by the default serializer; they are schema conformance errors, relating to a specific xsd, and not plain XML errors.
-
How to get behavior similar to the obsoleted XmlValidatingReaderFinally tired of the "System.Xml.XmlValidatingReader is obsolete" message, I undertook to replace it with the recommended XmlReader. The obsolescence documentation from MS wasn't much help, but I did manage to create code that compiled, as follows:
string nameSpace = GetSchemaNamespace(_XmlDocumentStream);
XmlTextReader schemaReader = new XmlTextReader(_SchemaStream);
XmlSchemaSet xsc = new XmlSchemaSet();
xsc.Add(nameSpace, schemaReader);
XmlNameTable nt = new NameTable();
XmlNamespaceManager nsmgr = new XmlNamespaceManager(nt);
XmlParserContext parserContext = new XmlParserContext(nt, nsmgr, null, XmlSpace.None);
XmlReaderSettings settings = new XmlReaderSettings();
settings.ValidationType = ValidationType.Schema;
settings.ValidationFlags |= XmlSchemaValidationFlags.ReportValidationWarnings;
settings.Schemas.Add(xsc);
settings.ValidationEventHandler += new ValidationEventHandler(ValidationEventHandler);
XmlReader reader = XmlReader.Create(_XmlDocumentStream, settings, parserContext);And then I found these two things I don't understand: 1. First, the Create failed because this attribute in the xsd wasn't defined.
There was no complaint over this from the obsolete class. From the error message, I assume that this line previously covered that definition:
What changed such that this is now a fatal error? 2. I removed the references to the above attribute so I could get a reader created and ran our set of unit tests for this process. The next surprise was that the reader doesn't handle validation errors the same as before. (a) Undefined attributes used to be Warnings. Now they are Errors. So what is now considered a warning? (b) It used to continue on from errors, allowing us to compile a list of errors and warnings for the XML being validated. Now, it bails out after the first error and I never get more than one invocation of the ValidationEventHandler. The test case that used to yield 43 errors and 21 warnings now produces a single error (and the test therefore fails). Is there a way to get the former behavior back?
-
Over-notification of an answerAn answer was posted to my question (Q&A board) and I received 15 notices of the answer in the following 11 minutes. Is that the forum's way of impatient nagging?
-
Site filters don't work?I have BizTalk and Phone in my selected topics to filter out of the weekly newsletter, but those articles still appear. Am I misinterpreting how to use the filters? C# is on my Include list. Is that why an article with both C# and BizTalk keywords gets included? I would surely want the Exclude list to override the Include one.
-
Trivial typo in CPOLAt the end of item 3, the text "Source Code or Executable Files this Work" seems to be missing the word "of" after "Files".
-
Fractional voting scores?That makes sense. Thanks.
-
Fractional voting scores?I was rather puzzled to see a rating score of 4.2 resulting from only 2 votes cast on this article[^]. I thought the average of 2 integers was always a multiple of 0.5. :confused: Is there a sort-of hidden weighting applied to the votes?
-
"Last Post" timestamps get incorrectly updatedWell, I thought I could, but I see that I got confused. The Q&A Answer times are correct. I was confusing prior Article message activity with the Q&A forum. :doh: I think I need a nap. However, the "posted by xxxx yesterday" error was real. The displayed times are correct now, but the info on this one[^] did say "yesterday" when it should have said "3 days ago" (Aug 13). At the same time, it also said "yesterday" for the Last Activity that actually occurred "2 days ago."
-
"Last Post" timestamps get incorrectly updatedTrivial, but briefly confusing: Looking at my Questions and Answers recently, I noticed that a couple of my answers were stated to have been posted just a couple weeks ago. But they were posted a LOT longer ago than that--over a year ago. If memory serves me, the date being shown is the date I looked at those answers earlier this month. Similarly, a few days after posting a recent question, the list said I posted the question "Yesterday" instead of the correct 2 or 3 days earlier.
-
Questions And AnswersActually, that's been my experience two or three times. In one instance, it took a couple months of working with MS to get an answer. I figured that that answer needed to be well noted, so I posted the answer to my own question.
-
On Q&A answers that aren'tMy unfamiliarity with the Q&A section has led me to this pondering which might be cleared up if I just wait long enough: When a response has been proposed to your question, the page shows you a big button you can click to "Accept This Answer". That's a nice way to acknowledge that your question was indeed answered. But what if the proposed answer is actually not the answer? Does this button eventually go away or does it hang around forever, leaving other readers wondering if the answer was right, wrong, or ignored? Is there a shortcut way to mark the response with an indication of "Thanks, but that doesn't solve the problem"? (I believe the Comment option could be appropriate for that, but I nearly missed seeing it altogether, and the Accept button remains even after adding such a comment.)
-
Unviewable message text due to lack of horizontal scrolling or proper wrappingApparently IE8 handles it better. I still have IE7, and there is no scroll bar. Upgrading to IE8 is not yet an allowed option. I failed to mention that the area for message display does resize with the browser window, but the text width still matches the width of the PRE section. If the code lines are really long, like your example, they and the text outside the PRE tag get irretrievably chopped off at the column margin for the message list. I have a scroll bar for viewing all of your message as I type this reply, but in the regular display, I don't.
-
Unviewable message text due to lack of horizontal scrolling or proper wrappingBack in July '06, you addressed an issue regarding unviewable text beyond the horizontal screen border. A similar issue still exists with the Messages.
It usually appears when someone posts code in their message. The code lines are wider than the message list and get chopped off with no means offered to view the hidden content. Making matters worse, the text of the message itself gets extended to that same width and the message becomes unintelligable because of the missing text. See the message from Kristian Sixhoej on this article[^] for an example.
Clicking Reply displays the message on a different form where the text wraps appropriately and is then readable. But having to start a reply is a lousy prerequisite for access to a readable message. -
Opening a fileMy guess is that it's simply a cheat to avoid having to type the requisite double backslash (special character):
string file_name = "C:\\test1.txt";
...Byte conservation; it's one byte shorter in the source file. ;P
-
Show a modeless form from an app with no main form?I found something that works, but I'd like to know if this was really the preferred solution since it seems a bit awkward to me. However, this solution does support the message pump hypothesis I mentioned in my question. In the constructor for the form that I want to display, I start up an auto-reset
Timer
that fires every 200 (for now) ms. In the timer event handler, I callApplication.DoEvents()
. That's all it took... a surrogate message pump! :cool: Additionally, the Show, Hide, Close, and content update actions all had to be wrapped withInvoke
boilerplate, but that makes sense. Wildly simple, but was there a better way? If I had two forms to show, would each require its own timer solution? -
Show a modeless form from an app with no main form?Copying an example I found, I have a Windows application with no main form that just manages a NotifyIcon in the tray with its small context menu functions. As such, its Main has
Application.Run()
instead ofApplication.Run(someform)
. That part works fine. Now I need it to conditionally show/hide a form. There are no user interaction controls on the form (it's display only) and the "default" condition is to have the form hidden. If I useForm.ShowDialog()
, the form appears, but blocks the user interaction that is associated with theNotifyIcon.ContextMenu
and I have no way to remove it. If I useForm.Show()
to keep the user interaction with NotifyIcon functional, the form appears but none of its contained controls render and it forever shows the Wait cursor. After much fruitless searching for a threading issue (even though InvokeRequired is always false), I came across a clue that it might instead be a message pump issue. This makes some sense (since I can fully show and hide the form if I do it within the ContextMenu event handlers), but I can't find enough info to compose a candidate solution. How do I get this form to complete its rendering without making it modal? -
Remoting Events fail if network not connected until after app startsThe scenario: Peer-to-peer network through a switch; no DNS, all fixed addresses. Main app establishes a remoting connection (Activator.GetObject) to a marshalled singleton object in a service on another machine. The app reads properties and invokes methods on the remote object. It also subscribes, through a wrapper, to events raised by the remote object. Remoting is configured in the config file on both ends. What works: All actions initiated by the app. Also, by monitoring the periodic events from the remote object, the app detects loss of connection (whether from physical disconnect or termination of the remote object) and will automatically recover when the object again becomes available. This has been extensively exercised. What fails: If the app's host machine is not physically connected to the switch until after the app starts, the event subscriptions fail to work. The app gets no notice of this. The remote object gets a "connection actively refused" exception when it invokes the event delegate. :wtf: Already tried: Delaying instantiation of the event wrapper until after the first time the remote host could be successfully pinged. No change. Please note: EVERYTHING works great as long as the network cable was connected at the time the app was started. All events are properly delivered and all subsequent disconnects are appropriately handled with successful recovery upon reconnect. The only known difference between the working and non-working scenarios is WHEN the network cable was connected to the switch: before or after the app starts. I'm at a loss for where to look next. :confused: What am I missing? (Also, should I cross-post this to the .NET Framework forum?)
-
Default VS-generated Service fails to install?I created a new, empty WindowsService in both VS 2005 and 2008 (specifying Framework 2.0) and a default deployment project for it. When I run either installer, it says everything installed OK, but it didn't! Even the Application Event Log says the installation was a success. The service executable is where it belongs, but the service is not installed. Running installutil.exe from the command line is successful. I got to this place when a service that used to install fine was modified and subsequently refused to install correctly. Service install packages built last year still install successfully. Unmodified services that are rebuilt (in VS 2005) today also still install successfully. We tried building on three PCs with the same results. What are we missing? (All PCs have XP Pro SP2, with Framework 2 SP2 and Framework 3.5 SP1.)