Shop OBEX P1 Docs P2 Docs Learn Events
Can't find object — Parallax Forums

Can't find object

bob kruggelbob kruggel Posts: 50
edited 2012-02-25 08:23 in Propeller 1
I have a main·object displayed in the PE Tool. I also have the listing of a called object in a seperate tab. If I compile the called object, no problem. If I compile the main object I get the message "cannot find the object 'xxxx.spin' in editor tabs, work folder, or library folder. If I click on the xxxx.spin editor, I see the file that PE Tool can't find. What am I doing wrong, or what don't I understand?

Bob Kruggel

Comments

  • hover1hover1 Posts: 1,929
    edited 2010-05-24 21:53
    Is the called object in the same directory as the main object? It normally needs to be.

    Jim
    bob kruggel said...
    I have a main·object displayed in the PE Tool. I also have the listing of a called object in a seperate tab. If I compile the called object, no problem. If I compile the main object I get the message "cannot find the object 'xxxx.spin' in editor tabs, work folder, or library folder. If I click on the xxxx.spin editor, I see the file that PE Tool can't find. What am I doing wrong, or what don't I understand?

    Bob Kruggel
  • bob kruggelbob kruggel Posts: 50
    edited 2010-05-24 22:21
    Jim,

    They are not in the same directory. I downloaded from OBEX and asumed that if all the objects were in tabs in prop tool, that was good enough. The error message states "cannot find the object 'xxxx.spin' in editor tabs,etc", But they are in editor tabs. I repeat "What am I doing wrong, or what don't I understand?"

    Bob Kruggel
  • JonnyMacJonnyMac Posts: 9,197
    edited 2010-05-24 22:26
    Bob,

    It's confusing, but your object needs to be in the same folder as your main project, or in one of the known paths (e.g., Library or Library Demos, etc.). I ran into this same issue when working on a project is a separate folder.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
  • hover1hover1 Posts: 1,929
    edited 2010-05-24 23:17
    Bob,

    As Jon said, the Propeller IDE will only look in a few folders for the object.

    C:\Program Files\Parallax Inc\Propeller Tool v1.2.7\Examples\Library
    C:\Program Files\Parallax Inc\Propeller Tool v1.2.7\Examples\Help\Spin Tutorial

    and possibly 1 or 2 more.

    It is on the wish list for the next IDE upgrade to support more folders, but we don't have a time frame for this upgrade.

    Jim
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-05-25 02:09
    This is a bit absurd, really. If you edit an object in the tabs, but don't save it, the compiler will use the version in the tabs, not the one in the folder. So I would call not recognizing an object in the tabs, just because it's not in the same folder, a bug, not a feature. At best, the tab behavior is inconsistent.

    -Phil
  • BradCBradC Posts: 2,601
    edited 2010-05-25 06:08
    Phil Pilgrim (PhiPi) said...
    This is a bit absurd, really. If you edit an object in the tabs, but don't save it, the compiler will use the version in the tabs, not the one in the folder. So I would call not recognizing an object in the tabs, just because it's not in the same folder, a bug, not a feature. At best, the tab behavior is inconsistent.

    -Phil

    I can understand why it does it though. Let's say for example you have 3 copies of the object fred.spin. One is in your library directory, one is in another arbitrary directory and one is in the dame directory as the top object. The copy of fred.spin that lives in the arbitrary directory is open in the editor and you have made some changes to it.

    You now press F10. Which fred does it choose?

    Remembering the Propeller Tool only knows about 2 directories (the library and the directory the top object resides in), when it spies "fred" in the tabs, its going to find out where it came from and if its not either of the directories it knows about it'll just ignore it. It would appear that if you have a tab open that has not ever been saved to disk, the tool will prefer that to a similarly named file on disk.

    I created Untitled3.spin and saved it to disk. I then restarted the tool and created Untitled1 & Untitled3, both unsaved. Had Untitled1 refer to Untitled3 (which had a different interface to the Untitled3 on disk) and it compiled.

    Confusing possibly, but there's gotta be a rule to follow somewhere. Maybe it should be documented.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Are you suggesting coconuts migrate?"
  • bob kruggelbob kruggel Posts: 50
    edited 2010-05-27 22:07
    Okay,

    Thanks for all the comments. I won't try to understand why I must put all sub-objects in the same directory as the main object and be sure to remember that the tool will not compile the object in a tab unless that object has been saved.

    I hope I have this right.

    Bob Kruggel
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2010-05-29 03:24
    I believe Phil posted a thread about this a week or two ago as well.

    I created the same error. One object in a different directory from my top object. Prop Tool wont compile. It is frustrating. See the image. Both objects are open in the tabs, but won't compile.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" 16:9 LCD Composite video display, eProto for SunSPOT, PropNET, PolkaDOT-51
    www.tdswieter.com
  • reubanksreubanks Posts: 1
    edited 2012-02-25 08:23
    I agree with Phil. If the tool is supposed to look for objects in the editor tab, then it should do exactly that. The propeller manual states the compiler looks in current folder, library, or editor tabs.
Sign In or Register to comment.