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.39 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-08-07
[12:03]<axjwmgyggm>but i meant a language you could rewrite the language while you are using it
[12:03]<axjwmgyggm>i mean those do exist like in lisp but they arent that efficient
[12:03]<zyccus>chowmeined: well, with Ruby, you can kinda do that to a degree
[12:04]<axjwmgyggm>what was the reason to make the CLR?
[12:06]<zyccus>chowmeined: class String; alias old_plus +; def +(other); other.old_plus(self); end; end
[12:06]<zyccus>"hello" + "world"
[12:06]<zyccus>=> "worldhello"
[12:08]<zzd2fnz>Besides XPath what other technologies are in the .NET API for making it easier to work with XML?
[12:09]<zyccus>gambler: XSL
[12:10]<zzd2fnz>looking into that now...looks quite handy
[12:10]<zyccus>it is, if you don't mind XSL :)
[12:11]<zzd2fnz>but a bit too verbose now that ive had a 2nd look
[12:12]<zzd2fnz>I want to parse an xml output of a tv-guide rikkus....what is the easier way? just write my own parser on top of the xml methods? I was using Xpath but it seems to make it hard to visit sibling nodes...
[12:12]<sljjcn>hi all
[12:12]<sljjcn>in a form i have a datagridview and some textboxes. all the textboxex and the datagridview has the same bindig source
[12:13]<zyccus>gambler: I usually just iterate myself
[12:13]<sljjcn>now my questions is when a user selects a particular row how to update the text on the textboxes?
[12:13]<axjwmgyggm>i sometimes iterate myself when im bored
[12:13]<zyccus>gambler: if the XML's guaranteed to be small, I use DOM (XmlDocument), otherwise SAX (XmlReader)
[12:17]<sljjcn>rikkus... i know that you know the answer :)
[12:17]<zyccus>Spooke: sorry, I've never done bindings with Windows.Forms
[12:21]<zzd2fnz>Spooke: in the properties there should be a place u can nominate an event that listens for a RowSelectEvent or some such
[12:27]<sljjcn>gabler are u tolking about an event of the datagridviev?
[13:03]<vdvrfdd>hi
[13:04]<sljjcn>how to see if a form is visible or not?
[13:04]<sdnffdxdlld>Spooke: look at the forms properties
[13:05]<sljjcn>smell i know what is the property
[13:05]<sljjcn>but id you whant to see from the from 1 if form 2 is visible you have to declare an other istance of the form
[13:05]<sljjcn>so you will never be able to see if it is visible or not...
[13:05]<sdnffdxdlld>you mean you have to have a reference to the other form
[13:06]<sdnffdxdlld>just have a reference to the other form in the one form
[13:06]<sljjcn>.... i'll try
[13:06]<sljjcn>thanks
[13:12]<sljjcn>din't understand how to do the reference to the other form !
[13:13]<lcs>Form1Class form1 =
[13:13]<lcs><and you put here form1 object>
[13:14]<sljjcn>pks in this whay you create an other istance of the form...
[13:14]<lcs>no
[13:14]<sljjcn>my prb is to see if the form is visible or not...
[13:14]<lcs>new creates new instance
[13:14]<dzdyzzz-wjzc>Spooke your problem is you don't get the concept of "the form"
[13:14]<lcs>from1 will be just referencing the instance that alrady has been created
[13:14]<dzdyzzz-wjzc>Form2 or whatever you named it is a definition of a form.
[13:15]<dzdyzzz-wjzc>it's not an instance.
[13:15]<dzdyzzz-wjzc>you could do Form2 whatever = new Form2(); 20 times.
[13:15]<dzdyzzz-wjzc>and you'd have 20 copies.
[13:15]<dzdyzzz-wjzc>then which one would you be wanting to check for visibility?
[13:17]<afd>hmmmm
[13:18]<sljjcn>yes damineg.. this i din't understand...
[13:20]<sdnffdxdlld>Spooke: a form is just another class ... use it like you would any other object
[13:23]<dzdyzzz-wjzc>so...
[13:23]<axjwmgyggm>if you made it static
[13:23]<dzdyzzz-wjzc>put "Form2 myForm2" in your form1's instance variable declarations.
[13:23]<dzdyzzz-wjzc>and then when you actually create form2 with a new in form 1 do;
[13:24]<dzdyzzz-wjzc>myForm2 = new Form2();
[13:24]<dzdyzzz-wjzc>and then whenever you want to check that it's still visible;
[13:24]<dzdyzzz-wjzc>if (myForm2.Visible()) ...
[13:24]<axjwmgyggm>C# is awesome
[13:24]<axjwmgyggm>but i musn't forget c++
[13:26]<sljjcn>already tried this... the complier says me that i use an unassigned variable!
[13:27]<axjwmgyggm>watch
[13:27]<axjwmgyggm>put this somewhere in the class
[13:27]<axjwmgyggm>private: Form2 myForm2;
[13:28]<axjwmgyggm>and in the constructor or a method or wherever
[13:28]<axjwmgyggm>myForm2 = new Form2();
[13:28]<sljjcn>done...
[13:28]<axjwmgyggm>now you can use myForm2
[13:29]<sdnffdxdlld>yes but if the instance of Form2 is out side of Form1 then all you've done is made a new instance thats compleatly unrelated to the one you want to access
[13:29]<sljjcn>yes... now i can use i NEW istanche of the form!
[13:29]<sdnffdxdlld>Spooke: how would you pass an object to another object for it to use?
[13:30]<axjwmgyggm>i told him to replace it
[13:31]<axjwmgyggm>place it in your parent form
[13:32]<sljjcn> private void dgvCLIENTI_DoubleClick(object sender, EventArgs e) {frmClienti frmClienti; frmClienti = new frmClienti(); if (frmClienti.Visible==true) MessageBox.Show("OK"); }
[13:32]<sljjcn>doesen't work
[13:32]<sdnffdxdlld>no it doesnt
[13:33]<sdnffdxdlld>because your making a new instance
[13:33]<sljjcn>i know
[13:33]<sdnffdxdlld>right so why bother trying it?
[13:33]<sljjcn>but if i delete frmClienti = new frmClienti(); it doesn't compile
[13:33]<sdnffdxdlld>:P
[13:33]<sdnffdxdlld>where are you passing it the instance reference?
[13:34]<sdnffdxdlld>where are you setting "frmClienti frmClienti;" to the instance you want?
[13:34]<sljjcn>smell... is just this that i don't know how to do :)
[13:34]<sdnffdxdlld>right ok ignore forms ... if you had 2 classes and you wanted to give one class a reference to another how would you do it?
[13:35]<sljjcn>usinng class1
[13:35]<sdnffdxdlld>now that references a namespace
[13:35]<sdnffdxdlld>-w
[13:36]<sdnffdxdlld>Class1 c1 = new Class1(); Class2 c2 = new Class2(); c1.Class2 = c2;
[13:36]<sdnffdxdlld>?
[13:36]<sdnffdxdlld>if your using properties
[13:36]<sdnffdxdlld>Class1 c1 = new Class1(); Class2 c2 = new Class2(c1);
[13:36]<sljjcn>yes
[13:36]<sdnffdxdlld>if your using constructors
[13:36]<sdnffdxdlld>Class1 c1 = new Class1(); Class2 c2 = new Class2(); c1.SetClass2(c2);
[13:36]<sdnffdxdlld>if your using methods
[13:37]<sdnffdxdlld>right well Forms are objects ... they are classes ... all those methods will work
[13:37]<sdnffdxdlld>(although due to limitations of forms sometimes you'll get bastard problems with cirtain combinations)
[13:44]<vdvrfdd>can somebody tell me how can i get text from word file, i tried do invokemember to get selection object and then do getproperties("text") on it, but it returns nothing =\
[13:46]<sdnffdxdlld>Vitalyi: how are you accessing the word file?







