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.38 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-09-02
[22:00]<dgndj>aha I found something like that:
[22:00]<dgndj>http://msdn2.microsoft.com/en-us/library/system.runtime.interopservices.outattribute.aspx
[22:00]<snfxnzynf>DB2: it's for COM and unmanaged code interop
[22:01]<snfxnzynf>there's also an InAttribute
[22:01]<dbq>are you talking to me ?!?!?!?
[22:01]<snfxnzynf>yes
[22:01]<dbq>i'm asking about how to drow a line in the visual c# desginer
[22:01]<dbq>draw
[22:01]<dbq>how does COM/interop/InAttribute help me ?
[22:01]<snfxnzynf>oh, sorry
[22:02]<snfxnzynf>I was confused... I guess that was to mnemo
[22:02]<dbq>i'm sure it's simple, but i'm missing it, and i dont see that option, anybody nkow ?
[22:02]<dgndj>yea
[22:02]<snfxnzynf>a line in the designer?
[22:02]<dbq>yea
[22:02]<snfxnzynf>you can do it programmatically using System.Windows.Forms and System.Drawing (GDI+)
[22:03]<dbq>but i have everything else in the designer.. so it seems abit awkward not being able to do this as ell
[22:03]<dbq>well
[22:03]<snfxnzynf>but afaik, there's no "line" UI control
[22:04]<dbq>strange..
[22:04]<snfxnzynf>you should check out WPF... RC1 should be available sometime next week
[22:05]<snfxnzynf>http://msdn.microsoft.com/winfx/downloads/presentation/
[22:05]<snfxnzynf>you can drawn a line using declarative syntax in xaml
[22:05]<wxrvs_yg_r_grdn>does anyone know why i say parentForm.IsMDIContainer = true; childForm.mdiParent = parentForm. childform.Showdialog(); leads to an exception
[22:06]<wxrvs_yg_r_grdn>InvalidOperationException
[22:06]<dbq>WPF ? for a simple line ? rofl :)
[22:06]<dbq>no thanks
[22:07]<snfxnzynf>dude, windows.forms does not compare to it
[22:07]<cudjf>hm
[22:07]<cudjf>but its very enterprisy!
[22:07]<zyjvnz>it uses xml!
[22:07]<cudjf>yes
[22:07]<snfxnzynf>once, WPF comes out, most people will forget about windows.forms, unless they're supporting older applications
[22:07]<cudjf>but no sql :(
[22:07]<dbq>i knwo, but still ...
[22:07]<wxrvs_yg_r_grdn>Form that is not a top-level form cannot be displayed as a modal dialog box.
[22:07]<wxrvs_yg_r_grdn>wtf
[22:07]<zyjvnz>Cumol unless you load the xml into a dataset then use offline sql then back to xml then write buffer to screen :P
[22:08]<snfxnzynf>whats_in_a_name... I'd like to know why you're trying to make an MDI child a modal dialog myself? you can't even do that in regular old Win32
[22:08]<wxrvs_yg_r_grdn>because if i do .Show(), it doesent stay, i need it to be modal
[22:08]<cudjf>rioter: but first print it out, put it on a wooden desk and take a picture of it ;)
[22:09]<wxrvs_yg_r_grdn>all i want is to have two forms that can both be manipulated
[22:09]<snfxnzynf>what do you mean, it doesn't stay?
[22:09]<wxrvs_yg_r_grdn>one form spawns another
[22:09]<wxrvs_yg_r_grdn>but i can still edit the first one
[22:09]<snfxnzynf>well, don't use a modal dialog for the child
[22:09]<snfxnzynf>just use a regular window
[22:10]<wxrvs_yg_r_grdn>it needs to be a form
[22:10]<zyjvnz>we need more dataset use in c#
[22:10]<zyjvnz>actually
[22:10]<snfxnzynf>of course it needs to be a form, but it doesn't need to be a modal dialog
[22:10]<snfxnzynf>read up on modal and modeless dialogs
[22:10]<wxrvs_yg_r_grdn>i know the diff
[22:10]<wxrvs_yg_r_grdn>ive used mfc a lot
[22:12]<snfxnzynf>rioter: well, things are moving away from datasets. datasets and strongly-typed datasets are going to stay the same, although you'll be able to use LINQ to perform queries on them
[22:12]<zyjvnz>see they have it all wrong
[22:13]<zyjvnz>datasets are the way of the future!
[22:13]<jusvygc>LINQ is awesome :)
[22:13]<jusvygc>The great thing about LINQ is that it works on everything -- just normal objects in memory, not only datasets.
[22:13]<txnjzd>linq makes me itch in the same way implicit typing makes me itch
[22:13]<jusvygc>int[] numbers = new int { stuff };
[22:14]<jusvygc>int[] filtered = from n in numbers where n < 10 select n;
[22:14]<jusvygc>^-- simple example
[22:14]<zyjvnz>yeah but linq isnt really a solution atm :(
[22:14]<snfxnzynf>rioter: it depends on your point of view and your tastes. if you prefer using a transaction-script or table module-based domain logic layer, then datasets are great. however, if you're building an OO domain-model, datasets are pretty useless
[22:14]<jusvygc>Theory: LINQ doesn't require implicit typing
[22:14]<txnjzd>I never said it did
[22:14]<jusvygc>and the rules for the typing are very well-defined in any case
[22:14]<zyjvnz>Sepheriel im just being my boss haha, he loves datasets thinks they are the greatest thing since sliced bread or something
[22:15]<snfxnzynf>oh, lol. I thought I detected bit of troll-like sarcasm in what you were saying
[22:15]<zyjvnz>he wonders why his app was taking so long to redraw the form
[22:16]<zyjvnz>he had a few hundred meg of data in a xml file, loaded into a dataset which of course is sitting in ram.
[22:16]<zyjvnz>His datagridview was reading the entire dataset over and over every redraw
[22:16]<jusvygc>lol
[22:17]<jusvygc>I see a lot of stuff like that when I do .NET contracting
[22:17]<wxrvs_yg_r_grdn>ook. let me review this. i have my main winForm which as i set as an mdiContainer. i now want to spawn off another WinForm BUT still be able to edit both forms, not have the main Form be disabled until the other one returns.. so I make my spawnForm, set its mdiParent = to main Form, then say .Show()
[22:17]<jusvygc>One client was building a HUGE XML file using System.String concatenation.
[22:17]<wxrvs_yg_r_grdn>and it doesent come up
[22:17]<jusvygc>I switched the code to use StringBuilder or whatever it's called and it sped up like 1000%
[22:17]<wxrvs_yg_r_grdn>it just returns instantly
[22:18]<txnjzd>it would be really nice if the compiler was smart enough to figure out when to use stringbuilder for you
[22:18]<jusvygc>try calling ShowModal() just for fun
[22:18]<jusvygc>Theory: I thought you don't like implicit stuff :p
[22:18]<jusvygc>gah, I don't wnat a language to do *everything* for me. People won't know how to be good programmers anymore if all that sort of stuff happens automatically
[22:18]<snfxnzynf>whats_in_a_name, are you calling Show on the parent or the child?
[22:18]<jusvygc>the 2 out of 10 cases where it doesn't happen they will write crap code..
[22:19]<wxrvs_yg_r_grdn>the parent..
[22:19]<wxrvs_yg_r_grdn>er
[22:19]<wxrvs_yg_r_grdn>no
[22:19]<wxrvs_yg_r_grdn>the child
[22:19]<txnjzd>when I add some strings I want those strings to be added. if it's faster to do that via a different class to string I really couldn't care less
[22:19]<jusvygc>bah. I advocate people knowing what their code is doing :)
[22:19]<snfxnzynf>and you're setting IsMdiContainer = true on the parent?
[22:19]<wxrvs_yg_r_grdn>yes i am
[22:19]<zyjvnz>Theory it adds up when you can have a few million strings :P
[22:20]<jusvygc>rioter: He' ssaying the compiler should detect that and use a builder instead.
[22:20]<snfxnzynf>then it should be working
[22:20]<zyjvnz>eh, the compiler shouldnt think for you
[22:20]<wxrvs_yg_r_grdn>Seph, should i make a test case
[22:20]<wxrvs_yg_r_grdn>will you look







