Shop OBEX P1 Docs P2 Docs Learn Events
Propeller editor file search priority — Parallax Forums

Propeller editor file search priority

FORDFORD Posts: 221
edited 2013-01-03 01:33 in Propeller 1
Hi to All, and Happy New Year.

Can somebody point me to some information on the location (file path) order in which the prop editor searches for object files called within programs.

I remember hearing or reading somewhere that the editor looks in its own folder, the folder confining the top object file, and maybe also another location.

I have searched but cant find anything on this.

(I hope the question is clear enough).


Cheers to All,
Chris

Comments

  • RaymanRayman Posts: 14,666
    edited 2013-01-02 16:26
    This is actually a bit of an issue, or at least something you have to be aware of...

    I think it looks first for files you have open. Then, in the working folder of the main program, then in the install library folder....
  • FORDFORD Posts: 221
    edited 2013-01-02 16:36
    Thankyou Rayman,
    very much appreciated.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-01-02 18:36
    Rayman wrote: »
    I think it looks first for files you have open. Then, in the working folder of the main program, then in the install library folder....

    I think this is the order claimed by the Propeller Tool but in my experience the Prop Tool doesn't find files open, it only looks in the same folder (first) and then in the library folder(second).
  • varnonvarnon Posts: 184
    edited 2013-01-02 18:41
    I tested this with Propeller Tool this week at school (I use BST at home). I could only get it to find supporting objects if they were in the library folder.
    With BST you can tell it to look where you want, which is a very nice feature.
  • FORDFORD Posts: 221
    edited 2013-01-02 20:05
    Can anyone at Parallax advise here.

    This is slightly confusing, and makes it difficult to know which files are being used if you have copies of the same file in a working folder, and in the propeller tool folder.

    Any help would be appreciated.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-01-02 20:45
    I'm 98.2% sure it gives priority to the files in your working folder.

    This wouldn't be hard to test. Just use two different versions that make it easy to see which version is which when it runs.

    I personally don't name files with the same names as any library file name. I generally (almost always) add a version/date postfix to my file names. Example "DemoFourMotors130201a.spin" is a file I'm working on today. (I use the year, month, date order so the names sort correctly in the computer.)

    It's really useful to have a date in the name so you know which version of the object was being used as a child object. Here's the "OBJ" section of the above program.
    OBJ
      'Pst : "Parallax Serial Terminal"
      Pwm : "fourMotorsOneCog121216c"
      
    

    This saves an enormous amount of confusion when trying to figure out which parent version worked correctly with which child object.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-01-02 21:38
    In the Propeller Tool, first priority is to files that are open, then to files in the working folder, and then to files in the library folder. This allows you to work with files that are open and edited without having to save them before compiling.

    -Phil
  • kwinnkwinn Posts: 8,697
    edited 2013-01-03 00:02
    Duane Degn wrote: »
    I'm 98.2% sure it gives priority to the files in your working folder.

    This wouldn't be hard to test. Just use two different versions that make it easy to see which version is which when it runs.

    I personally don't name files with the same names as any library file name. I generally (almost always) add a version/date postfix to my file names. Example "DemoFourMotors130201a.spin" is a file I'm working on today. (I use the year, month, date order so the names sort correctly in the computer.)

    It's really useful to have a date in the name so you know which version of the object was being used as a child object. Here's the "OBJ" section of the above program.
    OBJ
      'Pst : "Parallax Serial Terminal"
      Pwm : "fourMotorsOneCog121216c"
      
    

    This saves an enormous amount of confusion when trying to figure out which parent version worked correctly with which child object.

    Hey Duane, nice to see I. am not the only one who thinks having the date in yy-mm-dd as part of a file name is a good idea. I use it for all my quotes, billing, accounting, and bill payments as well as software that is being worked on.

    BTW, in your example it was shown as yyddmm unless you have a Delorean and a flux capacitor ;- )
  • FORDFORD Posts: 221
    edited 2013-01-03 01:33
    Thanks for the input lads,

    I like the date idea, I will start doing that as from now.

    Cheers,
    Chris
Sign In or Register to comment.