Can't find object
bob kruggel
Posts: 50
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 Kruggel
Comments
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
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
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
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?"
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
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