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.68 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-07-20
Pages: < Prev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Next >
[00:15]<dbq>what does it mean ? should i remove new or something ?
[00:15]<azyfm>File is a static class, not meant to be created
[00:15]<2frgcd>I have a combobox, and it has the values and all it's working great, but when I start my form, at the beginning, my combobox is clear until I click the arrow then it lsits the values, I'd like there to be a default value, how can I set that?
[00:16]<dbq>Arild: so is this example wrong ? http://www.c-sharpcorner.com/Language/serializingObjectsinCS.asp
[00:16]<sdnffdxdlld>DB2 you need to look up statics
[00:16]<sdnffdxdlld>you dont need to instance a new static
[00:16]<rxrcr>wow
[00:16]<dbq>i know i dont, but this examples shows it does
[00:16]<sdnffdxdlld>oh Arild got there frist hehe
[00:16]<rxrcr>DB2, yes that example is wrong
[00:16]<gjrvcxnne>blanky: on your form load event, set the selected index
[00:17]<dbq>is there a better example for serialization with file i/o ?
[00:17]<2frgcd>GoatCheez, thanks, but how do I 'set the selected index'
[00:17]<2frgcd>GoatCheez, ah, combo.SelectedIndex(index) ?
[00:17]<gjrvcxnne>.SelectedIndex = 0
[00:17]<gjrvcxnne>lol
[00:17]<2frgcd>oh thanks GoatCheez
[00:17]<gjrvcxnne>m0`: how'd 0x302 go?
[00:18]<dbq>can anybody please link me to a good example on doing file serialization in c# ?
[00:19]<gjrvcxnne>DB2: the file object is not what you want
[00:19]<gjrvcxnne>DB2: http://www.devhood.com/Tutorials/tutorial_details.aspx?tutorial_id=400
[00:19]<rxrcr>DB2 I don't know of any off the top of my head, I'd have to google for some
[00:19]<rxrcr>DB2, stick to msdn if you can
[00:19]<d0`>oh sorry
[00:19]<d0`>was in the bathroom doing something important
[00:20]<rxrcr>heh
[00:20]<dbq>this is what google gave me :(
[00:20]<dbq>GoatCheez: i'll check that
[00:20]<d0`>COMMUNICATION ERROR: Check the device connection and configuration
[00:20]<dbq>GoatCheez: that doesnt talk about serialization
[00:20]<d0`>See
[00:20]<d0`>this shit is strange
[00:21]<d0`>Stupid Managled DLL
[00:21]<gjrvcxnne>m0`: the problem is in that one specific method...
[00:21]<gjrvcxnne>it's a bug in the method
[00:21]<d0`>hdGetErrorString(0x0302) works but hdGetErrorString(770) doesn't
[00:21]<d0`>okay
[00:21]<d0`>So I should just explain them what I am doing?
[00:21]<gjrvcxnne>m0`: wait, what?
[00:22]<gjrvcxnne>0x0302 works, but 770 doesn't?
[00:22]<gjrvcxnne>DB2: you want object serialization?
[00:22]<d0`>hmm
[00:22]<d0`>your right
[00:22]<dbq>GoatCheez: yeah..
[00:22]<d0`>770 works
[00:22]<d0`>What is happeneing now :(
[00:22]<dbq>didnt you read what i requested ? :)
[00:23]<gjrvcxnne>m0`: the same thing that's been happening
[00:23]<gjrvcxnne>yeah, you asked for file serialization, not object serialization
[00:23]<dbq>i meant to take an object, serialize it, and write / read it to / from a file
[00:23]<d0`>so there is an error in the 515 (0x203) in the method
[00:23]<gjrvcxnne>DB2: http://www.ondotnet.com/pub/a/dotnet/2002/08/26/serialization.html
[00:24]<gjrvcxnne>m0`: yes, tell them to check the error string method with 0x203 as a parameter... have them, use bounds checker or some other similar tool
[00:25]<gjrvcxnne>m0`: in the meantime, i recommend you use your own function which just spits out the define name (like HD_EXCEEDED_MAX_VELOCITY for 0x203)
[00:25]<dbq>welp, i'll try messing with it
[00:25]<d0`>okay
[00:25]<d0`>your correct
[00:25]<gjrvcxnne>*you're
[00:26]<d0`>yes you're
[00:26]<gjrvcxnne>lol
[00:27]<d0`>heh
[00:27]<d0`>God Live the Queen.
[00:27]<2frgcd>what's the best way to find out the account name? like, if the peron who's running the program's account name is bob, how can I find that out
[00:28]<gjrvcxnne>System.Environment.UserName
[00:28]<d0`>GoatCheez acn you explain me why in C# it works and in C++ it didn't amtter?
[00:28]<2frgcd>GoatCheez, love you
[00:29]<gjrvcxnne>m0`: ok, we have to get into it a bit deeper though.... let's start at why it happens.... that function is somehow changing memory it is not supposed to.
[00:29]<gjrvcxnne>m0`: .Net checks stuff like that.... very thoroughly, and if something isn't right, it throws an exception.... which is what you saw...
[00:30]<gjrvcxnne>C++ doesn't check anything at all, it just assums all goes fine and dandy. so, when that happened, it didn't give a rats ass
[00:30]<d0`>Ah smary Goat !
[00:30]<d0`>smart!
[00:30]<d0`>:(
[00:30]<gjrvcxnne>now, it's probably something insignificant, like accidentally writing one more byte somewhere, so no one really caught it because the program still worked
[00:30]<gjrvcxnne>but .NET checks that stuff.... very thoroughly
[00:31]<gjrvcxnne>hmmm
[00:31]<gjrvcxnne>ya know...
[00:31]<d0`>:)
[00:31]<gjrvcxnne>hmmm
[00:31]<d0`>Thanks for helping GoatCheeze
[00:31]<gjrvcxnne>it might also be because of that sign thing tho
[00:31]<d0`>what sign thing?
[00:31]<gjrvcxnne>damnit... don't go away
[00:31]<d0`>i am not :)
[00:32]<gjrvcxnne>signs in .net are REALLY screwy.... lemme do some research for 5 mins and i'll let you know if there's anything to try with it
[00:32]<d0`>I am just reliefed that I don't have to worry abou thtis shit anymore
[00:32]<gjrvcxnne>lol
[00:32]<d0`>ok
[00:32]<d0`>lol
[00:32]<d0`>What do you mean signs?
[00:33]<gjrvcxnne>+/-
[00:35]<pz2>signed short is -128 to 127, unsigned in 0 to 255
[00:35]<pz2>repeat for all number types
[00:36]<gjrvcxnne>except one of our senior engineer said something once about interop with unsigned using an extra bit or something
[00:36]<vxznrm_>-128 would be 1000 0000 right?
[00:36]<vxznrm_>hardly
[00:36]<vxznrm_>signed and unsigned types use same amount of memory
[00:36]<vxznrm_>only difference is the output
[00:37]<vxznrm_>where the signed int calculates with the left most bit as a bool indicating if the number is positive or negative
[00:37]<gjrvcxnne>i'm talking through the interop though.... like when we set 32bit values, we need the funciton to take a 64bit value if it's unsigned
[00:37]<gjrvcxnne>something like when it goes through the interop, it's always signed or something







