Best way to start

  1. ‹ Older
  2. 2 weeks ago

    Can you make it available in text format so I can read through it. Or in a non zipped file format?

    Thanks.

  3. Emile S

    Nov 29 Europe (France, Strasbourg)

    Use this link instead:

    https://www.dropbox.com/s/ylctdkhkz9q1udp/CSVframework.zip?dl=1

    The download starts immediately and you will get a zip file called CSVframework.zip.

    The zip is opened and load the file “CSVframework.xojo_project” (from the generted folder) and run.

    Then, click i the main window’s first button, locate a csv file and select it / and click in the second button.

    After that, you can go to the code to know what it do.

  4. WinZip says it can't unzip because there is data missing and will unzip part, but will rename it Corrupt.

  5. Emile S

    Nov 29 Europe (France, Strasbourg)

    Use Windows 10 Zip built in utility. Or download a more recent version.

    The zip file is 26.987 Bytes… in case your download was bad.

  6. Emile S

    Nov 29 Europe (France, Strasbourg)

    Did you try to re download the archive file ?

  7. Mark S

    Nov 29 Pre-Release Testers, Xojo Pro, XDC Speakers

    OK .... here are two more links. One for the Xojo binary project and one for a sample INI file. Both are NOT ZIPPED. You should be able to load the CSVframework.xojo_binary_project directly into the Xojo IDE. You can open the MyConfigSettings.ini sample file with notepad.

    https://www.dropbox.com/s/wirsj47z4rjjfyh/CSVframework.xojo_binary_project?dl=0

    https://www.dropbox.com/s/47ft2agevk7vchr/MyConfigSettings.ini?dl=0

    Let me know if you have trouble with these links and I will do something else.

  8. Edited 2 weeks ago

    Thank you Mark. I managed to load it into Xojo and am looking through all the code. Going to take me a while to understand I'm sure. The csv files I access do not have column names in the first row. We have the data file map and code off of it.

    Sure I am going to have questions. I'll be back...LOL

    By the way. I did go ahead and buy the xDev magazine with the Xojo beginners article.

  9. Mark S

    Nov 29 Pre-Release Testers, Xojo Pro, XDC Speakers
    Edited 2 weeks ago

    Milford,

    Since you don't have column names you can comment out that chunk of code in the FindTheFile method BUT you will also need to modify the data load method (LoadArray) since it assumes the number of names in the first row to be the number of columns in the data portion of the file. You can just modify the code like this:

    'Current code

      'Loop through the input row based on the number of columns found when
      '  the first row was processed by the FindTheFile method.
      for i = 0 to ColumnNames.Ubound

    'To this code since the ColCount is already calculated a few lines above here

      'Loop through the input row based on the number of columns found in
      '  the data row just read.
      for i = 0 to ColCount 

    I hope this helps you get this modified to work with your data.

    Mark

  10. Thanks. Yea I can hard code the col count because it's 1435 columns.

  11. One thing I noticed. You have file type and extension listed as CSV. But the files I use are extension jcp, made the change with no problem. But end users will access drf, or jcp or mcp depending on what data file provider they use. I tried to add all three in place of the csv and it didn't work. How do I include all three extensions?

  12. Mark S

    Nov 30 Pre-Release Testers, Xojo Pro, XDC Speakers

    Put all of the possible file extensions in the Filetype Extension field separated with semi colons.

    Like:

    jcp;drf;mcp

    The HELP info for Xojo has improved recently. Remember to check here:
    http://docs.xojo.com

  13. Dale A

    Dec 2 San Diego, California, USA

    @milford w One thing I noticed. You have file type and extension listed as CSV. But the files I use are extension jcp, made the change with no problem. But end users will access drf, or jcp or mcp depending on what data file provider they use. I tried to add all three in place of the csv and it didn't work. How do I include all three extensions?

    Mark's response is correct but if you're on Windows it seems that the leading dot is necessary, as in:

    .jcp;.drf;.mcp
  14. last week

    Thanks guys. I have been sick and been away a couple of days. Trying to get better.

  15. 6 days ago

    Mark,

    I don't understand why a bug shows up here.

    'Open the input file
    try
    InPath = INIfile
    InFile = new FolderItem(InPath,FolderItem.PathTypeNative)
    *** BUG HERE*** InStream = TextInputStream.Open(InFile)
    catch err as IOException
    er = "Input File Error : " + str(err.ErrorNumber)
    return ""
    end try

  16. Dave S

    Dec 7 San Diego, California USA
    Edited 6 days ago

    no need to specifiy NEW with Folderitem
    plus you should verify that InFile is both "Not Nil" and does "Exist"

  17. Edited 6 days ago

    What does "INIfile" mean as I can not find it anywhere in the docs.

  18. Dave S

    Dec 7 San Diego, California USA

    depends on what you defined it as... you won't find it in the docs, because it isn't an Xojo construct....
    If you cut/pasted that code from somewhere else, you need to read and understand the context in which it exists.

  19. Edited 6 days ago

    It was from code Mark shared. That's what I am attempting to do. Is go through the code and understand how it works.
    Thanks.

    Just found it. It is a string in a function.

  20. 5 days ago

    Mark S

    Dec 7 Pre-Release Testers, Xojo Pro, XDC Speakers

    INIfile is the full path to a configuration file that contains info your program might need. I included this code in the sample because I figured you might need to handle a configuration file in your final code.

    The error is probably because the file is missing in the folder where the EXE file exists when you are running it in debug mode.

    The INI File that I included called MyConfigSettings.ini is assumed to be in the same folder with the EXE file. The CopyFile setting in the Build Settings should copy the sample file to the same place the EXE file. Based on how you set up your folder structure is probably the issue.

    For now just comment out the call to the INIfunctions.GetKey in the App.Open event.

  21. Thanks

or Sign Up to reply!