PDA

View Full Version : Can't find object



bob kruggel
05-25-2010, 04:04 AM
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

hover1
05-25-2010, 04:53 AM
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 kruggel
05-25-2010, 05:21 AM
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

JonnyMac
05-25-2010, 05:26 AM
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

hover1
05-25-2010, 06:17 AM
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)
05-25-2010, 09:09 AM
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

BradC
05-25-2010, 01:08 PM
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 kruggel
05-28-2010, 05:07 AM
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. Swieter
05-29-2010, 10:24 AM
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 (http://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 (http://www.tdswieter.com)

reubanks
02-25-2012, 03:23 PM
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.