|
|
Jeffrey Walton wrote: Does Microsoft offer any built in support for CAB file extraction yet?
In the .NET BCL?? Nope, not that I've found.
|
|
|
|
|
Hi David,
I see .Net 3.5 was released last week. Have you had an chance to kick its tires? Perhaps a CRC class has been added.
I don't jump as these opportunities - it is one more software package I have to support. (I'm a System Administrator by trade ).
Jeff
|
|
|
|
|
I haven't been through everything, but I see no reason for MS to add support for an outdated packaging technology. Looking into the System.Io namespaces, I don't see anything that jumps out as CAB support.
|
|
|
|
|
Guys,
is it possible to use both ClientOnCLick and OnClick on a button?
ClientOnClick will call a javascript function to validate, and if it returns true, then the Onclick delegate should be fired!
thanks
Estarta
|
|
|
|
|
Yes, that's exactly how it works, I believe.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thanks for the reply,
just one thought, the server side delegate will never be fired if the validation part 'Client side validation' was false is that true?
Estarta
|
|
|
|
|
Correct, because postback will not occur.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello,
I have a class with a property that allows the getting and setting of a field. However, once that field has been set, I don't want it to be set again. Is it reasonable to have a get/set property that only allows the property to be set once? Am I trampling on some best practice here or am I completely OK?
(In my particular case, it won't work to have the field set by the constructor.)
Thanks!
|
|
|
|
|
If you are making this available for use elsewhere then it's not good practice to have a single set field. Part of the problem you are going to have is that your field can be got to and set via reflection, so any single-set updates can be bypassed.
|
|
|
|
|
Thanks for your thoughts.
|
|
|
|
|
Pete O'Hanlon wrote: your field can be got to and set via reflection
Ummm... what? My privates aren't private?
|
|
|
|
|
PIEBALDconsult wrote: Ummm... what? My privates aren't private?
Exactly. Using reflection there's not much that can't be done.
Accessing otherwise not accessible members via reflection is one of the easier tasks.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
PIEBALDconsult wrote: My privates aren't private
Ignoring the innuendo that arises here, the answer is no. Reflection allows you to get right at the heart of your code if you know what you are looking for.
|
|
|
|
|
I was going to suggest using a read-only variable, but then i read about not being able to use the constructor.
Instead, try setting up a private (or protected) variable for whatever it is you want (which you already have), then just use a regular method to set it, but check that it is null, or whatever its default value is first, like this:
private string name;
public void setName(string Name)
{
if(name != null)
name = Name;
else
}
You could just do the same thing using a set method (and then being able to just use Y = X; ) but it just doesn't seem to be the type of place to put it. Plus, you could have your regular method return a bool so that you know if you have set the variable or not.
My current favourite word is: Bauble!
-SK Genius
|
|
|
|
|
Thanks for your reply. I'll ponder this some more.
|
|
|
|
|
Unfortunately, this design (while being good) doesn't address the fact that the private member could still be set directly. The poster needs to think some more about his design before he tries this.
|
|
|
|
|
Can I have a abstract function to implement a interface?
For example
namespace Project1
{
public interface ITest
{
String ControlTitle { get; }
}
}
namespace Project1
{
public abstract class Test : ITest
{
public abstract String ControlTitle();
}
}
|
|
|
|
|
Not the above code, you changed the property defined in ITest to a method.
Otherwise yes.
One question though, why not just try it?
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
did you try it? what happened?
A little self help wouldn't go amiss!
|
|
|
|
|
I tried it before posting here. It was the error of having it as a method rather then a property that was holding me back.
|
|
|
|
|
how can i build a view of the object while i am editing it. Like in Ms power point. I am not sure where to start and look from any suggestion, please.
|
|
|
|
|
netJP12L wrote: I am not sure where to start
We're even, because I don't know what your asking for.
only two letters away from being an asset
|
|
|
|
|
Sorry if I didn't explain clearly. I have 2 panel on my Left side panel I couple of objects which which i move then around and on the right side I want to display the view of the left side panel. If I move any of the objects on the left side the changes should effects right away and should be shown on the right side panel.
|
|
|
|
|
The way to do this is to use a design pattern (or two). I'm thinking here specifically of the Model View Controller pattern. Read up on this as it's going to be your best friend here. As a taster though, I will tell you that the MVC pattern allows you to have one model with multiple views of the same model so you will update the model and the views will be updated to match. I'm sorry, but I can't give you the code for this because it is a fairly complex design architecture that you need to get to grips with and it's more code thank I could give you in such a short space.
|
|
|
|