|
Is there really no one who has discovered the same problem?
C.
Regards,
Carsten
|
|
|
|
|
Hello Friends,
An unhandled exception of type 'System.NullReferenceException' occurred in Unknown Module.
Additional information: [Resource lookup failed - infinite recursion detected. Resource name: Arg_NullReferenceException]
Has anyone come across this ?? I am working with a GDI+ user control where i do a bulk of drawing, say atleast 500 MB of data. This drawing is performed in a seperate thread from the main control thread with proper interruption techniques to stop drawing in between.
The problem am facing is, it works perfectly in Win XP environment, no issues. When it comes to Win 2000 the above mentioned exception pops in regularly when i try to interrupt the drawing thread.
can any help me out of this?? Even some clues will be a great help cos the error doesnt give any clue
Hariharan.T
|
|
|
|
|
Hey all,
I've been playing with this for two days now and I cannot get this to work. I have a form, two TabControls on the form. In one of the TabControls, I have a datagrid in there along with a textbox and a search button. I am trying to get the auto-resize anchor/dock functions working correctly, but nothing that I do seems to work. I've tried panels, splitters, using the Anchor/Dock methods every way I can think, but it never displays properly. Basically, it looks like this:
[SEARCH TEXT BOX] [SEARCH BUTTON]
* DATA GRID HERE TAKING UP REST OF THE SCREEN(TAB) *
I want it so that when the user resizes the form, it leaves the search text box and the search button on the top (not resize them and make them huge), but only resizes the datagrid to take up the remaining space. When I play with all the different features, the datagrid usually ends up overtaking the space where the search bar/button is, and it overlaps. I'm clueless as to how to make this work properly. Any help would be appreciated.
|
|
|
|
|
Hi shultas,
Give the following a try:
Search Text Box Settings
First, make sure the Dock property is set to "None".
Set the Anchor property to Left, Top, Right.
This should make the text box expand its width, but not its height when the form is expanded.
Search Button Settings
Again, make sure Dock is set to "None".
Set the Anchor property to Top, Right.
This should make the search button attach itself to the right side of the form when the form is expanded, but keep its width the same.
Data Grid Settings
Make sure Dock is set to "None".
Set the Anchor property to Left, Top, Right, Bottom.
This should make the data grid expand its width and height with the form when it is resized.
Tab Control Settings
I'm not sure where your two tab controls are positioned relative to the form, but you'll need to adjust the Anchor property of the tab control which contains the data grid, search text box, and search button. I think you'd probably want to set the Anchor property to Left, Top, Right, Bottom, so that it gets its share of the extra horizontal and vertical space when the form is expanded.
Give those settings a shot. If it doesn't work, please let me know and I'll try to help you as best I can.
Sincerely,
Alexander Wiseman
|
|
|
|
|
I do not seem to be getting any back when the host side of a socket connection closes softly....meaning..the app on the host side that is listening has closed, but the infrastructure is still present.
Even when I send a packet I'm not getting an exception. Any ideas?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
More information perhaps
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
At the line level there are two types of results from a socket close. A RST or a FIN (reset or fin). If you close a socket there is no data that should be seen at the application layer.
All network programming comes in two flavors Synchronous, and Asynchronous (from the application perspective). You say you don't get anything back? Change the close code to synchronous. You'll at least get an indicator back.
|
|
|
|
|
In a lot of classes I'm working on I find that having a params parameter would be really handy. For instance a polyline constructor taking points as arguments:
public Polyline4D(params Vector4D[] points) { }
Is there any argument against params parameters (like performance, or language support)?
Also it would have been pretty convenient for .NET's List<T>.Add or List<T>.AddRange also had a params overload. Did they have good reasons not to?
Wout
|
|
|
|
|
private void SomeMethod(Point[] points) probably works well in a type sensitive manner.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
|
Params must be the last parameter in the list and a one dimensional array as well. Personally I don't understand the point of a params keyword if the language supports array parameters and object arrays.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: Personally I don't understand the point of a params keyword if the language supports array parameters and object arrays.
The syntax candy comes in handy when calling the method. Which one looks cleaner?
<br />
Foobar(new Foo[] { foo1, foo2 });
or
Foobar(foo1, foo2);
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Goof around music jam with my brothers (with video)
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Use the minimum syntax necessary to achieve readbility. IMHO, an arbitray parameter list is less documenting. Of course by the same token, which one looks cleaner
Foobar(this.foo);
or
Foobar(this.foo[0], this.foo[1], this.foo[2]);
Really I wouldn't fault you for using Params I just don't prefer it.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: Foobar(this.foo);
That will work for the param keyword too. Test it, you can pass an array instead of the optional params.
|
|
|
|
|
I have to agree with leppie, I don't see the clarity argument either. The programmer can use both styles of calling.
Wout
|
|
|
|
|
There is a small speed penalty, but else its just a 'compiler macro' like foreach (not really, its a bit more internal).
wout de zeeuw wrote: public Polyline4D(params Vector4D points) { }
params Vector4D[] points <-- note the array.
|
|
|
|
|
Ah, sorry, forgot the array thing yes (I'll mod the post and erase my traces ).
Would there be a runtime penalty? I would have guessed that just the compiler would insert a new Vector4D[] { a, b, c } statement, which the programmer would otherwise have to do manually.
Thanks,
Wout
|
|
|
|
|
wout de zeeuw wrote: I would have guessed that just the compiler would insert a new Vector4D[] { a, b, c } statement, which the programmer would otherwise have to do manually.
Not even. I am not sure what exactly what causes the penalty, as seen thru a profiler, but I suspect it needs to do a type check on the 1st params parameter, exactly for the array case.
Regarding your other question: not all languages support the params keyword. And in the case of AddRange() will cause a method resolution conflict possibly.
|
|
|
|
|
leppie wrote: Not even.
Hmmm, when I look in Reflector to see the disassembled code I see code like the following:
<br />
pointdArray1 = new Point3D[] { pointd3, pointd1, pointd2, pointd4 };<br />
polylined2 = new Polyline3D(pointdArray1);<br />
So that makes me think that apart from the syntax it's the same as not using the params keyword.
Not all languages can define params parameters, but that set of languages is probably not the same as the set of languages that can use those methods probably? To me the latter is only important.
Wout
|
|
|
|
|
I recently started wrting C# and I was curious to know what was the difference between validators and exception statements. I was wondering when and why use a Try...Throw statement as in contrast to a field/control validator. Don't both these feature do the same thing? Ensure that the correct variables are being inputted into the application. This is why the question the begs to be answered is when do u use a validator and when do u use a try..throw exception?
Greg
The Belizean Dan Dada!!!
|
|
|
|
|
I personally use try/throw when making a call to the SQL server. I have a program that inserts into a database. If the insert fails, then I use the catch to dump an error message.
When using plain old vanilla fields validators work just fine.
I don't know if one has more overhead that the other; that may be a consideration as well.
|
|
|
|
|
Hello
Exceptions were neatly described by a known programmer as "Expecting the unexpected" -unfortunately I don't seem to remember his name at the moment-.
The more your code is advanced or complicated, or doing hardware related tasks for example, the more error brone your code gets. Sometimes you write a long method to calculate some value, and in the middle you find yourself dividing by zero- for example-. Or accessing an access denied resource, unexpectedly deleted file, wrong or unavailable adress, etc...
Examples of exceptions are by far more than what a simple post can count. There are literallt thousands of cases in which you can benefit from putting your code in a try block. Yet that will be at the cost of excuting time. The more try block, the slower your program gets. While a simple validation methods only handles the user input.
The throw statement is appropriate when you want to put the error handling on the shoulder of a lower method in the call stack. ie. You don't want to handle the code in the current method, instead throw it back to the calling code.
To summerize:
Validation is concerned mainly with user input, to save the time that would be consumed by exception catching. While in other situation when you don't know what might go wrong -yet sometimes you might expect, or have a kind of an idea-, then it would be wise to put your code in a try block to prevent your program from crashing.
Regards
|
|
|
|
|
This makes a whole lot of sense. In essence a try...throw would be best used for a derived value while validators are use to ensure that those braineless users can not input flakey data.
Greg
The Belizean Dan Dada!!!
|
|
|
|
|
Hello development community, I have a communication problem with two applications (client & server) I'm developing. The frase is "event notification". I have a client application that connects to a server application to subscribe to an event, for example, my server app. has a list of sales being made through out the day, so it's constantly recievine data from the sellers, and supose the client app. wants to be notified when a certain sale from a certain seller is made, so the client could be waiting for a few minutes until the data is available on the server and can be notified.
But wait there's more, there's a high probability the client is behind a firewall and in a private network, I don't know if the solution is affected by this.
Maybe this example is absurd, but my application needs to do something like this. Like MSN Messenger, you connect and wait for a friend to send you something. In my case they aren't string messages, they're objects from the buissnes model. I need to know how to do it, what do I need and a little orientation on using or mixing the tools.
I've been reading books on .NET Remoting, Web Services and Sockets, in search for an answer, but haven't been succesfull.
Maybe its simple and it just hasn't hit me or maybe it is a little elaborate to do.
Thank you.
|
|
|
|
|
Client registers to your webservice indicating that it would like to revieve event notification.
Your application will then call a webservice on the clients end when that event occurs.
It would be fairly trivial to implement.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|