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: 1825.66 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-07-31
[03:12]<wyfaj`>ie. the real data
[03:17]<zndy_wjfnz>Someone know of a function like BRound (VBA)?
[03:18]<2grgvdv>I've never really saved anything, professor just suggested that we use XML
[03:23]<lxzjsvd>imho we should all be using xml image formats. <pixel><hue>1.0</hue><saturation>0.75</saturation><lightness>0.5</lightness></pixel>!
[03:24]<zndy_wjfnz>lol
[03:53]<cgyzls>how do I access my gui controls from outside of the class?
[03:53]<cgyzls>like.. labels and texboxes
[03:53]<zndy_wjfnz>classname.propertyname
[03:54]<cgyzls>I tried that.. it doesn't show up in intellisence
[03:54]<zndy_wjfnz>like: frmMainForm.txtTextField.Text = "foo";
[03:54]<zndy_wjfnz>is it defined public?
[03:55]<cgyzls>it looks to be defined private by default
[03:55]<cgyzls>but i'd have to do into the designer code to change that
[03:55]<zndy_wjfnz>hmm, for me it's allways defined public iirc
[03:56]<zndy_wjfnz>hmm, nm, it's private :)
[03:57]<zndy_wjfnz>was confusing it with regular properties and methods. I always use a method to manipulate form controls
[03:57]<cgyzls>you create public methods inside the class to make changes to the controls?
[03:59]<zndy_wjfnz>yeah
[04:00]<zndy_wjfnz>public void updateTxtBox1 (string text) { this.txtBox1.Text = text; }
[04:01]<zndy_wjfnz>but I almost allways add checks to that, so I know for sure that the user input is acceptable. Only code generated values are (almost) never checked. Unless I use the same method for user and code input of course ;)
[04:07]<cgyzls>even with that.. the public method doesn't show up in intellisence
[04:07]<cgyzls>wth
[04:08]<zndy_wjfnz>is the class defined as public?
[04:08]<cgyzls>yeah
[04:08]<cgyzls>then I have a public method inside that to modify the text of a label
[04:08]<zndy_wjfnz>build the solution (F6), maybe you have a typo somewhere that prevents IntelliSense from seeing the method
[04:08]<cgyzls>but when I go to call the public class.method outside of the class its not there
[04:09]<cgyzls>nope
[04:10]<zndy_wjfnz>are the classes in the same Namespace?
[04:10]<cgyzls>yeah
[04:10]<zndy_wjfnz>you do see the classname in the IntelliSense dropdown?
[04:10]<cgyzls>yup
[04:11]<zndy_wjfnz>can you pastebin the code for the method please?
[04:11]<cgyzls> public int Set_Lab1(string str) { label1.Text = str; return 0;}
[04:12]<zndy_wjfnz>:(
[04:12]<cgyzls>thats inside namespace IRCool_GUI_1 { public partial class Form1 : Form {
[04:13]<zndy_wjfnz>try making it a void
[04:13]<zndy_wjfnz>(and strip the return part)
[04:14]<cgyzls>nothing
[04:14]<cgyzls>when I type in Form1. in the other class.. intellisence only shows 4 things
[04:14]<cgyzls>controlacessibleobject
[04:14]<cgyzls>controlcollection
[04:15]<cgyzls>dockpaddingedges
[04:15]<cgyzls>and dockpaddingedgesconverter
[04:15]<cgyzls>if that helps any
[04:17]<zndy_wjfnz>ah well, kinda.
[04:17]<zndy_wjfnz>Did you create an instance of the class? Or do you use the exact class definition name?
[04:19]<cgyzls>I tried to create a instance of it, but the new instance I create doesn't show up in intellisence
[04:20]<cgyzls>and its a different class name
[04:20]<zndy_wjfnz>try this:
[04:21]<zndy_wjfnz>Form1 form1Instance = new Form1();
[04:21]<zndy_wjfnz>form1Instance.Set_Lab1("foo");
[04:23]<cgyzls>doesn't work.. form1Instance. doesn't show any methods
[04:23]<cgyzls>or properties
[04:23]<cgyzls>this is really odd.. cause from my understanding of C#.. this should work
[04:24]<zndy_wjfnz>it does here
[04:24]<zndy_wjfnz>I use it lot's of times in my code
[04:29]<fzymgpuf_syg>how can I get the barcode value of a string?
[04:34]<cgyzls>wow that was neat.. program crashed and put my pc in sleep mode
[04:35]<cgyzls>hey Remi_Woler. I got it
[04:35]<cgyzls>very silly mistake on my end
[04:35]<cgyzls>lol
[04:35]<cgyzls>I was trying to call it directly from my new class.. wasn't inside a method
[04:44]<cgyzls>they should give some kinda warnning message atleast.. when you do that
[04:49]<zndy_wjfnz>knirps: if you would've compiled the solution, it would give you an error. (Expecting })
[04:51]<zndy_wjfnz>*should
[04:51]<nzus`>anyone want me to forward this "free viagra" email to them?
[04:51]<zndy_wjfnz>erus`: which seller?
[04:52]<nzus`>some spammer mother fucker
[04:52]<zndy_wjfnz>I need to know which... If I allready have them, I don't want yours :p
[04:57]<zgzzcygnv>erus`, wait you must be using some crappy email service that doesnt have gmail's filtering capabilities!
[04:57]<zgzzcygnv>why would anyone want a free v14gr4 email?
[04:58]<zndy_wjfnz>because they are *free*? :P
[04:58]<nzus`>well there must be some demand else people wouldnt endlessly spam it?
[04:58]<zgzzcygnv>...
[04:58]<zgzzcygnv>its free after you sign up for $500 worth of other offers or services or w/e
[04:59]<zgzzcygnv>just like "free cellphone" means nothing
[04:59]<zgzzcygnv>its free after you agree with a 2 year contract or something, which is going to cost you more than it should
[05:00]<nzus`>it was a joke anyway ...
[05:02]<zndy_wjfnz>AnarkiNet: recieving those mails is actually free. You don't have to pay anything, sign a contract, or anything else. You just need to drop your mailaddress on the web :p
[05:02]<zgzzcygnv>hah hah...owait
[05:02]<zgzzcygnv>not funny!
[05:02]<zndy_wjfnz>:D
[05:03]<cgyzls>hey Remi_Woler.. so.. I got that worked out right.. but the text in the label doesn't change
[05:03]<zndy_wjfnz>and to be honest: I know people who signed up for such mailings, so they would actually get mail(!)
[05:04]<zndy_wjfnz>knirps: redraw the control after the update
[05:10]<cgyzls>label1.update()?
[05:10]<cgyzls>or .refresh()
[05:12]<zndy_wjfnz>I use the latter
[05:14]<cgyzls>the latter?
[05:15]<zndy_wjfnz>that last one
[05:26]<22vnax>How can I call a method in the parent once a child has been closed?
[05:27]<zndy_wjfnz>childInstanceName.Method(). But make sure it is not disposed yet
[05:27]<2grgvdv>onFocus
[05:27]<2grgvdv>;)
[05:27]<zndy_wjfnz>it is better to hide() the childform first, then call the method from the parent, then close the child from the parent
[05:28]<22vnax>Remi_Woler: I want to call a method in the parent...not in the child
[05:28]<22vnax>childFrm.show(); myMethod();
[05:29]<22vnax>but myMethod() is called at the same time childFrm.show();







