|
Pete O`Hanlon wrote: He needs to simplify it a lot.
How?
Kevin
|
|
|
|
|
Wouldn't this
Dictionary<Type, ProxyHolder<TInterface>> proxies;
need to be this
Dictionary<Type, ProxyHolder<IJobManager>> proxies ;
?
|
|
|
|
|
The problem is I don't know in advance what ProxyHolder is going to hold. I fear that I cannot solve my problem in the way I want. Probably needs a rethink. Basically I'm trying to reduce a whole bunch of if-else tests to a single lookup table.
Kevin
|
|
|
|
|
|
Yes, I'd more-or-less concluded that. Plus, I've now managed to simplify my problem down to a single if-else decision point. That's OK for now.
Kevin
|
|
|
|
|
VS2005
I've added some settings to a program I'm writing, and set the scope to "User", but I can't get it to write new values for those settings. I'm calling Properties.Settings.Default.Save() , but nothing appears to be happening. Since the scope is set to user, I expect to see a user.config file in documents and settings under my user name, but I don't see anything at all.
What could I be doing wrong?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: What could I be doing wrong?
User settings gets saved under the user folder (god knows where), and gets picked up from there if different from the app.config. Note app.config is never changed.
xacc.ideIronScheme a R5RS-compliant Scheme on the DLR
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
|
I'll look there tonite.
However, I don't think it's working because I can't appear to retrieve data I "save"d.
Why does everything in .net have to be so convoluted?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
After a quick look on my system I find the settings files in the following location
C:\Documents and Settings\username\Local Settings\Application Data\companyname\applicationame.exe_Url_4jxa32l1jl5ig3yszvzaymm2fpoq5w4k\1.0.0.0\user.config
where
companyname is that set in the company field of the assembly information
You may end up with several versions of the config file in which case they will have different _Url_4jxa32l1j.... tagged on the end of the exe name.
Alan.
|
|
|
|
|
Those pesky autochanging version numbers always cause me problems.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
John, settings do work exactly like you would expect, but there is apparently something throwing a wrench into it.
Few things to try:
Properties.Settings.Default.MySetting = newValue;
Properties.Settings.Default.Save();
Foo loadedValue = Properties.Settings.Default.MySetting; Does loadedValue == newValue in that case?
Another thing to try, if you save a setting as above, then restart your application (don't rebuild it, just restart it), does your saved setting stick?
If the above 2 things work, try saving a setting, rebuilding your application, then loading that setting. If the loaded setting isn't what you saved, then I'd check your AssemblyInfo.cs (under Properties project in your folder) and verify the version numbers aren't auto-incremented each build, e.g. 1.0.*
|
|
|
|
|
I'll bet it's the version number thing. I'll check it tonight. Thanks you magnificent human being (in case it works), and you worthless bastard (if it doesn't work).
BTW, I don't recall manually editing the assemblyinfo.cs file, but I'll check anyway.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I just tried a simple app here at work (running Vista), and it appears to work fine. I'm running vista here, and it put the file into
c:\users\me\appdata\local\companyname\appname.exe_Url_some-huge-ass-hash\1.0.0.0\user.config
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I have no idea if this helps, but a few weeks ago I was toying around with a WPF application on XP. I would save my settings, but the next time I launched the program, it didn't see my new setting. It was like it was never saved in the first place.
I thought it was a limitation of WPF, but I built a test WPF app and it worked fine there. I checked and made sure the auto-increment version number wasn't set, tried all kinds of things. In the end, I just created a new C# project and copied the files over to that one, the settings magically worked. It was as if that particular C# project's settings were cursed. In 6 years of .NET development, I had never seen an unexplainable case like this. Maybe this is what you're experiencing.
|
|
|
|
|
Every time i make a program and send it to a freind or relative, they tell me it doesn't work.
I upload it to my other computer and it doesn't work on there either, how do i fix this problem?
|
|
|
|
|
Just as a guess, I would suspect that they don't have the .NET framework installed. There is a redistributable available for each different version of the framework that allows you to install it for them.
|
|
|
|
|
You would think after 3.5 versions, the power that be will change the general exception message box to something like ".NET Framework can not be found............"
|
|
|
|
|
C# Beginner Nick wrote: it doesn't work
meaning...
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Typically a user says this to helpdesk.
Since you categorize yourself as a developer, please notify "helpdesk" (meaning us) what the error is, what you have done etc... instead of telling us "it doesn't work".
the more info we get, the better chance for you that anyone will know a solution...
good luck.
V.
If I don't see you in this world, I'll see you in the next one... And don't be late. (Jimi Hendrix)
|
|
|
|
|
If no one has mentioned this to you before, please give your message titles some meaning.
|
|
|
|
|
Instead of just building the executable; go to the Propject > Properties > Publish page.
Make sure that you have .net framework selected as a prerequisite and that you are deploying to the filesystem rather than a webserver, turn off updates and then click "Publish Now".
You should now have a bunch of files in your chosen directory that can install your app and its prereqs for you. If you zip this lot up and send it to people then the thing will probably work.
Of course given the explanation of the problem i may be way off the mark here but that's worth a try.
Russell
|
|
|
|
|
Then stop sending them programs.
|
|
|
|
|
I had selected a single row from a table using where condition.
when i populated the dataset's values to string variable it shows error.
I checked for rowcount, it shows as 1.
My code::.....
code
strGroupName = locDts.Tables[0].Rows[1].ItemArray[0].ToString();
strGroupId = locDts.Tables[0].Rows[1].ItemArray[1].ToString();
code
it prompts an error as"There is no row at position 1"
pls suggest me.
senthil
senthil
|
|
|
|
|
Remember that this is zero based, so a row count of 1 means that the row is actually 0. Hence, locDts.Tables[0].Rows[0].ItemArray[0].ToString();
|
|
|
|