Shop OBEX P1 Docs P2 Docs Learn Events
where do objects go? — Parallax Forums

where do objects go?

zorasterzoraster Posts: 10
edited 2013-07-31 15:41 in Propeller 1
This is a question that makes me want to bang my head on the wall!. If I am going to use objects for propeller programming, do they go in the folder with the files I am working on or do they go in the library folder for the spin tool or somewhere else?

Thanks for you patience:tongue:

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-07-31 13:00
    If you have an object that's only used in the current project, you put it in the same folder as the main object / program being compiled. If you have an object that's going to be used in multiple projects, you put it in the library folder for the Propeller Tool. The Propeller Tool first searches the folder containing the main object / program, then it searches the library folder.

    If you're not sure, you can always make copies of your object to put in each project's folder. That makes it harder to maintain the object since, if you make changes, you have to change all the copies. On the other hand, you may forget to include these extra library objects if you send the project to someone else.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-07-31 13:31
    The Prop Tool says it looks in the top object's folder, the library folder and open windows of the Prop Tool. I have found the Prop Tool does not find objects unless they in the two locations Mike mentioned. Objects not in these two folders but which are currently open the Prop Tool are not found (contrary to the Prop Tool's claim).

    I personally add a date extension on all my Spin file names. This way when I make changes to an object, I can still tell which version I had used in a particular project.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-07-31 14:22
    One important addendum: Although an object must exist in either the project folder or the library folder to get compiled, if it's open in the Prop Tool and you've made changes to it, the open version is used instead of the version on disk. This allows you to try out things beofre commiting a modified object to storage.

    -Phil
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-07-31 14:28
    One important addendum: Although an object must exist in either the project folder or the library folder to get compiled, if it's open in the Prop Tool and you've made changes to it, the open version is used instead of the version on disk. This allows you to try out things beofre commiting a modified object to storage.

    -Phil

    This surprises me since the Prop Tool can't seem to find an object in and open window if it's not also in one of the two folders. You are correct though, the unsaved version will be used in an open window rather than the saved version. (I just tested this.)

    Thanks Phil, I didn't know this.
  • localrogerlocalroger Posts: 3,451
    edited 2013-07-31 15:41
    I always copy objects to the project file because while that does, as Mike suggests, complicate the task of propagating bug fixes and upgrades, it also always seems to be the case that I need to tweak objects for particular projects.
Sign In or Register to comment.