Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Bones3

    Expose C# Properties as COM Properties

    How do you do it? You obviously can't place a property in an interface exposed for COM interop, and the following doesn't work either: public interface IWhatever { int nElements { get; } } -Bones
  2. Bones3

    Expose C# Properties as COM Properties

    How do you expose C# properties as COM properties for a COM .dll project? You obviously can't place a property in an interface exposed for COM interop, and the following doesn't work either: public interface IWhatever { int nElements { get; } } -Bones
  3. Bones3

    Binary string of floats over socket

    I honestly don't know what -encoding binary does, but without it a simple little to big endian conversion doesn't reformat the numbers properly. Without it the number doesn't appear to be formatted properly on the Java side. -Bones
  4. Bones3

    Binary string of floats over socket

    Yes, that was the problem. -translation binary worked. I could have sworn that I tried that before, but apparently not! Thank you so much. -Bones
  5. Bones3

    Binary string of floats over socket

    It would make sense that Tcl has an underlying algorithm for converting every newline character into \r\n, thus going from a 4 byte segment of number to a 5 byte one. And I believe it does: fconfigure -translation option But I thought I had tinkered with this command before. I think more...
  6. Bones3

    Binary string of floats over socket

    So, I assume what you're sending is 4 (1 byte each) characters." It is my assumption as well. I've read this several times in some Tcl documentation regarding the f option for the binary commmand: However, I went ahead with it because when I tested the value I received in Java; it was exactly...
  7. Bones3

    Binary string of floats over socket

    Hmm, true... From tcl to Java. I'm converting the number to a binary string first because, otherwise, tcl sends text. To send text it would be a byte for each character (in the case above that would be 11 bytes) whereas a float would be 4 bytes. When I send several numbers this might make a big...
  8. Bones3

    Binary string of floats over socket

    Here is some of my Java code on the other end. I'm convinced that I did something stupid because 4 bytes is 4 bytes is 4... ByteBuffer inputBffer = ByteBuffer.allocate(BUFFER_SIZE); try { isConnectionClosed = fromWavescopeChannel.read(inputBffer); // SocketChannel.read() byte[] inputArray...
  9. Bones3

    Binary string of floats over socket

    No, didn't do anything special. I tried changing the buffer size on both ends of the connection. On the receiving end when I changed it to 4 bytes my test message said: :::4 :::1 instead of :::5! Interesting idea though. I've been suspicious of those buffers adding stuff in to make themselves...
  10. Bones3

    Binary string of floats over socket

    ...$clientSocket -buffering none fconfigure $clientSocket -buffersize 10 fconfigure $clientSocket -encoding binary .... set testStr {-0.0879111} set binstr [binary format f* $testStr] puts -nonewline $clientSocket $binstr and three other numbers that don't work: 0.134918, -0.134903, 0.0879...
  11. Bones3

    Identity login propmt

    Use regular expressions. -Bones
  12. Bones3

    floating point format conversion

    One thing that is particularly bothersome to me is that negative numbers don't work right at all. The negative changes the value by one, but I thought only one bit should change independantly of the others? The binary on the Intel machine looks like this: 3 = 00000000 00000000 01000000...
  13. Bones3

    floating point format conversion

    I'm getting a message from a server which has an intel dual core processor and Windows. The message is supposed to be a bunch of binary single-precision floating point numbers. The size of the numbers appear to be the same as the Java float, but the format does not seem to be the same. I used...
  14. Bones3

    JavaScript and Directory Paths

    What I'm writing isn't going to be on the web at all: it is an application running on top of the Mozilla platform (like firefox). So anything (including C code) is fair game as long as I can put the string data from C/vb/whatever program into a javascript string without having to store it in a...
  15. Bones3

    JavaScript and Directory Paths

    I am having issues with the Mozilla development platform and am getting tired of XPCOM. To simplify this mess I want to place the path to the program installation directory in a JavaScript string. I know that JavaScript is not supposed to be able call the OS to get file information for security...
  16. Bones3

    Using -fill with a frame

    Through much thinkering and (unfortunately) little thinking, I found that the -fill option was doing its job -- it just didn't seem like it. The frame (.buffer) was invisible so stretching it to fill the area made no noticable difference. To cause the contents of the frame to fill up all the...
  17. Bones3

    disable button after initial selection

    Add a d to the end of disable, and separate your commands (with a semicolon or newline). I am sort of new to Tcl too, but I think you have to have "write_file" declaired before defining the button. write_file won't need quotes when you call it. # Define button button .but -text "OK" -bg cyan...
  18. Bones3

    disable button after initial selection

    button .btn -text "Button" -command { # do stuff .btn configure -state disabled } -Bones
  19. Bones3

    Using -fill with a frame

    So... I have this cute little listbox packed at the bottom of my gui. listbox .transferBuffer -height 6 pack .transferBuffer -side bottom -fill x This worked great, until I had this crazy idea that adding a scrollbar would make the users happy. frame .buffer listbox .buffer.transferBuffer...
  20. Bones3

    The Close Window Button (x)

    Yes, this does what I want. Quick reference for future investigators: wm protocol . WM_DELETE_WINDOW { # Do cleanup exit } Thanks! -Bones

Part and Inventory Search

Back
Top