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.20 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-06-17
[08:52]<vufvuzn>xor: and expecting that to lock file access across processes?
[08:55]<wjz>No, just expecting to lock the resource.
[08:55]<wjz>The file access problem, i'll have to solve some other way.
[10:09]<zgzzcygnv>rofl
[10:09]<zgzzcygnv>"My camera comes with a wizard"
[10:33]<edjg>Hello
[10:33]<edjg>I have a question regarding IIS and ASP.NET...I know this isn't the proper channel but no one is around in #asp or #aspnet.
[10:34]<edjg>actually, I think I may have just fixed it...
[10:39]<edjg>hmm, no, I keep getting a NullReferenceException from the server
[11:08]<mracn>Does anyone have any tips for a really great SQL book?
[11:09]<mracn>preferrably one that isn't 2390193 pages
[11:24]<edjg>I'm getting a NullReferenceException from ASP.NET with the simplest test code...just <%Response.Write(now())%>, taken straight from the W3Schools tutorial.
[11:25]<edjg>When I change that code and refresh the page, there's no delay indicating that the code is being compiled. I'm running IIS 5.1 on XP Pro, all I did was install IIS after all .NET stuff was installed (same process I followed on my real win2k3 server with IIS 6 which worked perfectly)
[11:27]<mracn>now() isn't defined in .NET afaik
[11:27]<mracn>try: Response.Write(DateTime.Now);
[11:28]<mracn>btw, ASP != ASP.NET
[11:28]<edjg>:/
[11:28]<edjg>I thought it looked funny, but that's straight from the asp.net tutorial page
[11:29]<edjg>hmm same error
[11:29]<edjg>like I said, it doesn't appear to be recompiling at all. (btw I know that ASP isn't ASP.NET)
[11:31]<mracn>odd, maybe try another tutorial, see what gives?
[11:31]<edjg>asp.net flips out no matter what my code
[11:31]<edjg>It's a problem with IIS I think
[11:31]<edjg>I just don't know what, it's not exactly hard to install
[11:32]<edjg>I can't even print out a string
[11:33]<edjg>hmm classic ASP works :/
[11:36]<edjg>I tried a simple test case file and that failed too. IIS is whacked
[11:40]<mracn>sounds like it
[11:43]<edjg>hmm I'll reinstall IIS I guess
[11:45]<edjg>I don't suppose I can install IIS 6 off a Win2K3 disc onto XP?
[11:46]<cjfmfusyjg>In a windows form application, is it the way to go to make a factory that creats all gui objects so it all goes faster? now say that is 30-60 forms with 15 labels 15 textobexs/buttons/comboboxes.
[11:47]<edjg>what do you mean, goes faster?
[11:48]<cjfmfusyjg>after the loading of the program it should go faster to navigate etc. But the real q is, is it bad to hold so many objects alive?
[11:48]<edjg>what should go faster and why?
[11:48]<edjg>I'm not understanding what you're asking...
[11:49]<cjfmfusyjg>are you new to programming?
[11:49]<edjg>Are you?
[11:49]<cjfmfusyjg>A few years
[11:49]<edjg>I've been programming since I was 8
[11:49]<edjg>I'm 20
[11:49]<edjg>I'm just not understanding what you're saying
[11:50]<cjfmfusyjg>you creat a new windows form, so it takes time to creat that one and it's objects, now you can do that when you start the application or when you press a button that then displays that form and then needs to new it, follow me?
[11:50]<edjg>yes, ok
[11:51]<cjfmfusyjg>I've herd that if you hold over 300 objects such as texboxes etc vs complains and that that is a bad way to go about, I'd like to know more about that
[11:51]<edjg>complains?
[11:51]<edjg>300 objects in memory is nothing. I'd be wondering why you have 300 textboxes, though
[11:52]<cjfmfusyjg>I got some erros a month ago, read some threads, if you hold to many objects visual studio complain abou it, thou that was not my error at that particular time, but I'd like to read about that or know more about it
[11:52]<cjfmfusyjg>since this application is getting large
[11:52]<cjfmfusyjg>300 objects should be nothing yes
[11:52]<cjfmfusyjg>that's what it feels like
[11:52]<edjg>Do you mean allocating the objects in memory or putting a crapload of controls on a form? If it's the latter I can see VS flipping out, but memory wise it should be no problem.
[11:53]<cjfmfusyjg>no a few stuffs in a lot of forms
[11:53]<edjg>I could see Visual Studio having a problem handling that many controls. It should work, but there could be bugs. What kind of data are you displaying that requires so many controls on a form?
[11:54]<edjg>If I had controls in the hundreds, I'd probably be using a DataGridView or whatever
[11:54]<cjfmfusyjg>you miss me, I have several forms, each of the forms has mabye 30 objects
[11:54]<cjfmfusyjg>so it's not much on each form
[11:54]<edjg>right
[11:54]<cjfmfusyjg>but together it's a lot
[11:54]<edjg>I know
[11:56]<edjg>So what exactly is the problem?
[11:58]<edjg>Or are you just inquiring about a possible problem?
[11:58]<cjfmfusyjg>I wanted to know more about creating all the forms as the program starts up and work like that.
[11:59]<cjfmfusyjg>not doing new all the time as I go to that place in the program.
[11:59]<edjg>well all the controls are created in the IntializeComponent() method, which is called from the constructor of your form class (when using the designer that is). the controls will be instantiated as soon as the form is
[12:00]<mracn>I guess it could be useful if you're doing something that makes loading the form take a while
[12:00]<mracn>damn, the window was scrolled
[12:00]<mracn>my bad
[12:00]<edjg>the form and all it's controls will only be instantiated once, unless you dispose of the form and recreate it of course
[12:01]<cjfmfusyjg>yeap, so the q is, is it better to creat all forms when the program starts up with facotries or creat the forms as you run the progam and walk around in it
[12:01]<edjg>oh I see
[12:02]<wyfaj`>hm
[12:02]<edjg>for any form of a sane size, I don't think it would be a problem to create them on the fly. As Macke said, only if you're doing something that makes loading the form slow
[12:02]<mracn>I'd say that it's probabably horribly inefficient, memorywise, to create the controls at startup. But obviously that depends on what the app looks like.
[12:02]<wyfaj`>Emon: you fixed your ASP.NET tihng yet?
[12:02]<edjg>wilco`, maybe, I just reinstalled IIS and I'm about to test
[12:02]<wyfaj`>if you installed IIS after installing .NET, you need to manually run aspnet_regiis
[12:02]<wyfaj`>to set up ASP.NET
[12:02]<edjg>I did that
[12:02]<wyfaj`>if you didn't, then your <%...%> code will probably be in the source (view HTML)
[12:02]<wyfaj`>ok
[12:03]<edjg>because I had a metabase permission error prior to the null pointer
[12:03]<mracn>I'd still opt for creating the forms as needed though. Forms shouldn't have all that much logic when starting up, making the slow to initialize.
[12:04]<edjg>Here's some food for thought: I did a test in Java (which is tangibly slower than C#) where I populated an ArrayList with over one million Integer objects. The entire for loop measured 0 ms of execution time.
[12:04]<edjg>So I don't think initializing a few dozen controls on the fly will be a problem.
[12:05]<wyfaj`>0ms? i find that hard to believe :)
[12:05]<edjg>try it yourself
[12:05]<edjg>I was kind of shocked
[12:05]<cjfmfusyjg>how much memory does a windows form with say 15 textboxes and 15 lables take up?
[12:05]<edjg>and my PC isn't that impressive...just an Athlon XP 3000 with a gig of ram
[12:05]<vxznrm_>Emon, sure your loop wasnt optimized away?
[12:06]<edjg>I don't know, but it still had to instantiate over 1,000,000 objects
[12:06]<cjfmfusyjg>Emon, which datatype did yo use to count the time? and which version of vs?
[12:06]<mracn>ColdFusion: Measure it.
[12:07]<edjg>This is Java
[12:07]<cjfmfusyjg>some of the time objects has a ~+-15 sec
[12:07]<vxznrm_>yea it's probably that
[12:07]<vxznrm_>or it's a matter of optimizing unused code
[12:07]<wyfaj`>102 ms here
[12:08]<edjg>wilco, in Java?







