Results 1 to 10 of 10
  1. #1
    rav
    rav is offline Member
    Join Date
    Jul 2010
    Posts
    16
    Rep Power
    0

    Question Saving a file in a gui

    Hello I have created a GUI and need to send dll files to run a command to a machine, when the machine has run the program I would like to save the info as a text file from the info sent by the dll.

    Now the problems is here

    Dll files can only be send by c++ or jni which i am not good at both and also I will be using datagrams so how can this info be saved

    Thanks alot in advance
    :)

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,403
    Rep Power
    25

    Default

    how can this info be saved
    Choose the file class that matches the data type: byte or character.
    Open the file and write the data to the file, close the file.

    Or perhaps if you could explain how you app is to work. I don't understand how datagrams fit in.
    Or what gui has to do with saving a file.
    Last edited by Norm; 07-07-2010 at 01:13 PM.

  3. #3
    rav
    rav is offline Member
    Join Date
    Jul 2010
    Posts
    16
    Rep Power
    0

    Question

    Thanks Norm for the reply, what I want to do is communicate with a machine through an ethernet cable by sending dll files. I then want to receive data from the machine and save it as a text file. The gui is an interface to communicate with the machine.

    I have created the interface and i also think that I have created a datagram connection but when I run the code for the datagram connection, there is no reply, its just searches for something I think!!! Is it possible to use the same computer to try and run datagrams or should I use 2 computers

    Thanks

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,403
    Rep Power
    25

    Default

    when I run the code for the datagram connection, there is no reply
    It takes a program to receive what is sent and to send the response.

    Break the project up into parts and get each part working before integrating them.
    Part 1 is a program to collect the data from the dlls.
    Part 2 is two programs that communicate using some protocol, say datagrams
    Third, merge the two

  5. #5
    rav
    rav is offline Member
    Join Date
    Jul 2010
    Posts
    16
    Rep Power
    0

    Default

    I already have the program, and I think it works, but not sure yet, i know what you mean by breaking it into bits, but how can i test the program if it works

    Thanks once again Norm

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,403
    Rep Power
    25

    Default

    but how can i test the program if it works
    Are there any programmers in your office you could ask to look at your program and help you to test it?
    I can't help you from here.

  7. #7
    rav
    rav is offline Member
    Join Date
    Jul 2010
    Posts
    16
    Rep Power
    0

    Default

    Unfortunately I am the only one working in this but no worries, thanks anyway

    by the way just one last question, is there anyway to save data coming received from a data gram as a txt file

    Thanks

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,403
    Rep Power
    25

    Default

    is there anyway to save data coming received from a data gram as a txt
    file
    Yes. How you do it depends on what the data is and how you want to see it in the txt file.

  9. #9
    rav
    rav is offline Member
    Join Date
    Jul 2010
    Posts
    16
    Rep Power
    0

    Default

    thanks for the reply, i want to save the speed on the machine at different positions, just a numbers nothing special.

    Thanks

  10. #10
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,403
    Rep Power
    25

    Default

    Is there anyone there that understands bytes and characters and Strings?
    Everything in a computer is a number. There are many ways to display those numbers.
    For an int you take 4 bytes and convert them to a base 10 display using the characters 0-9.

    What is the layout of the bytes in the data gram buffer?
    What do you want written to the txt file?

Similar Threads

  1. Replies: 8
    Last Post: 02-18-2010, 12:54 PM
  2. problem in saving file
    By jogendar in forum Advanced Java
    Replies: 2
    Last Post: 01-23-2010, 04:28 PM
  3. Problem Saving a file
    By GraemeH in forum New To Java
    Replies: 1
    Last Post: 04-09-2009, 12:14 AM
  4. Saving to a Text File
    By jadaleus in forum Advanced Java
    Replies: 2
    Last Post: 10-17-2008, 06:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •