IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1822.28 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-06-14
[22:36]<`d0>+what do I place inside it
[22:36]<`d0>+singleton only allows one instance to be instantiated throught the applicatio
[22:36]<kjr>+no
[22:36]<kjr>+well, sorta
[22:36]<`d0>+to be created*
[22:36]<kjr>+yes, exactly
[22:36]<kjr>+`m0: so the object is pre-constructed at load time, and you call Instance to get the instance
[22:36]<kjr>+so obviously it's a private ctor
[22:37]<`d0>+Where is load time?
[22:37]<kjr>+and you call it within the object
[22:37]<awjzdd>+pre-constructed at load time?
[22:37]<kjr>+create a property called Instance with only a get
[22:37]<kjr>+jwormy: well... constructed sorry
[22:37]<`d0>+how do we constuct something at load time?/
[22:37]<awjzdd>+not always constructed 'at load time' constructed when it is first needed.
[22:37]<kjr>+jwormy: if you're lazy
[22:37]<awjzdd>+pfft
[22:38]<kjr>+jwormy: better practice - have the object retain an instance of itself as a data member, and have that construct itself
[22:38]<`d0>+kog but how do we do it at load time
[22:38]<`d0>+private void Page_Load() { .. }
[22:38]<kjr>+oh, it's asp.net
[22:38]<`d0>+no
[22:38]<`d0>+i am doing it in
[22:38]<`d0>+C#
[22:38]<kjr>+ASP.NET can be written in C#
[22:39]<kjr>+it's just a class framework
[22:39]<`d0>+I am doing an application in C#.net
[22:39]<kjr>+then what the hell is Page_Load gotta do with it heh
[22:39]<`d0>+lol
[22:39]<kjr>+whatever
[22:39]<`d0>+I read a documentation
[22:39]<`d0>+where is the load time in a c# application?
[22:40]<kjr>+doesn't matter. just have the class contain a data member that looks like ClassName Instance = new ClassName(params);
[22:40]<kjr>+then privitize the ctor
[22:41]<kjr>+then write a property called Instance
[22:41]<`d0>+like this?
[22:41]<`d0>+ public static DatabaseConnectivity Instance
[22:41]<kjr>+that property should only get
[22:41]<awjzdd>+Kog: i do have the object retain an instance of itself as a datamember
[22:42]<awjzdd>+my member just chills, until night time ;)
[22:42]<kjr>+jwormy: so then it's basically immortal
[22:42]<kjr>+the scope on that gets a little strange
[22:42]<kjr>+when it loads, it constructs
[22:42]<kjr>+and it can't finalize because it's still valid
[22:42]<kjr>+s/finalize/c# term/
[22:43]<`d0>+so in my case I do this: DAOFactory Instance = DAOFactory.GetDatabase(DAOFactory.MSACCESS);
[22:43]<kjr>+jwormy: that's as opposed to having the method/property do the construction - so that the first call constructs
[22:43]<kjr>+jwormy: which, I think, is how GoF does it... lemme look
[22:44]<kjr>+yeah, that's how GoF does it
[22:46]<`d0>+would that be a proper way?
[22:46]<`d0>+http://pastebin.com/709225
[22:57]<pzw>-Ok, so i have a background worker, the worker is executed when i start my server. And i have a listView as a little "Logger". But here's the problem, i cant add items to it. Cross-thread operation not valid: Control 'loggView' accessed from a thread other than the thread it was created on. That's the error. I have tried to send the Form Object to the other class that want to use the logg, but it doesnt work either, any idea
[22:58]<kjr>+yay, freenode just realized I'm the GCF! cloaks I tell you! CLOAKS!
[23:02]<kjr>+s/GCF/GC
[23:03]<zj2-wzc>-frW: Look into IsInvokeRequired and BeginInvoke you need to jump to the UI thread
[23:03]<pzw>-rob-wrk: ah someone just told me a bout delegates, is it the same thing?
[23:03]<wprmn>-hi guys which event is called when you drag a control to the designer window in the ide?
[23:08]<zj2-wzc>-frW: yes you'll need to use delegates
[23:08]<pzw>-ah ok
[23:08]<pzw>-thank you
[23:08]<zj2-wzc>-no problem
[23:12]<vxyzmly2z>-whats the difference between 'build solution' and 'rebuild solution' ?
[23:13]<sdnffdxdlld>+build builds the changed assemblies, rebuild rebuilds them all iirc
[23:13]<sdnffdxdlld>+hehe thats some dodgy wording there :P
[23:13]<vxyzmly2z>-heh
[23:13]<vxyzmly2z>-thanks
[23:17]<mrfjrrg_>+You could also have said: rebuild will also recompile modules that have NOT changed since the last build. :)
[23:19]<zgzzcydjvgev>+ah so build is "faster"? heh
[23:19]<zgzzcydjvgev>+that doesnt make any sense
[23:19]<zgzzcydjvgev>+i'd have thought "rebuild" would be some sort of incremental build or somethign
[23:20]<dnscr>+:D
[23:23]<zgzzcydjvgev>+whos the author of AnkhSVN?
[23:23]<zgzzcydjvgev>+is that arlid?
[23:24]<zgzzcydjvgev>+Arild*
[23:25]<kjr>+ah... another gem: "if the ftp is wrong, you cant connect"
[23:25]<kjr>+AnarkiDotNET: yes
[23:25]<zgzzcydjvgev>+ok
[23:25]<zgzzcydjvgev>+just wanted to tell him about a little bug/glitch
[23:25]<zgzzcydjvgev>+although i should probably check for updates
[23:33]<`d0>+I did it :)
[23:33]<`d0>+public DAOFactory db = DatabaseConnectivity.getInstance;
[23:34]<`d0>+Now my main concern is what if the connection disconnected, I need to somehow reconnect
[23:39]<fyfuym-syfggag>+whats the best way to do validation on controls
[23:39]<fyfuym-syfggag>+ie if a textbox is empty
[23:40]<fyfuym-syfggag>+I know in webforms you can use the validation control
[23:40]<svzz[wjzc]>+CausesValidation = true;
[23:40]<svzz[wjzc]>+OnValidating check if valid
[23:40]<fyfuym-syfggag>+StaZ[work]
[23:40]<svzz[wjzc]>+if not bring an ErroProvider out
[23:40]<kjr>+oh that's cute... IE7b2 on 2k3 can't view the Office beta site
[23:41]<svzz[wjzc]>+hey guys, ADO.NET 2.0 i'm trying to set DataTable's PrimaryKey, which is a DataColumn[] property, (array), which makes me think if i have more than one field that represents a unique key then i tried to set an get an exception that one of the column have duplicates
[23:42]<fyfuym-syfggag>+StaZ[work]
[23:42]<fyfuym-syfggag>+dude
[23:42]<-- dvxn|syzzzyus xzs>http://www.bagdadsoftware.de")
[23:42]<fyfuym-syfggag>+thanks
[23:45]<svzz[wjzc]>+np
[23:52]<wrvve>+afternoon everyone
[23:56]<mygmfrn>-anyone a little suggestion how to realise a countdown timer (days,hours,minutes and seconds) to a specified date? I found much on google about this topic.. but mostly about counting from a predefined value to 0







