Interfaces and package scope

Hello all, my first post, hopefully not an embarrassingly stupid question, but can’t find an answer online, so far. Great site by the way!

It seems that Interfaces can only be seen by classes within their own package. At least, I have been unable to have any classes ‘find’ any interfaces outside its home package, invariably getting a ‘1046: Type was not found or was not a compile-time constant: [name of class].’ This is despite explicitly importing any possibly relevant files, and despite the classes ability to access the classes that use the interface.

This has created a few obstacles for me when I have wanted an interface to be available to classes in more than one package. Am I overlooking something? Are there any workarounds?

Some Examples:

#1. Package ‘rulers’ has a class called ‘Overlord’ Overlord can instantiate several classes from package ‘subjects’ (classes Thrall, Peon, Lackey). The instantiated classes share a common interface ‘Subject.’ However there seems to be no way for the Overlord class to see the interface so the Overlord cannot store them in a single typed variable.

#1. Packages ‘candy’ and '‘timepieces’ have a class ‘ChocolateBar’ and ‘PocketWatch’ respectively. Both of these can be placed into a container class called ‘ShirtPocket’ that is defined in a third package called ‘receptacles’. ‘receptacles’ contains an interface called ‘PocketSizedItems’ identifying otherwise unrelated items that can be put into a ShirtPocket --except ‘ChocolateBar’ and ‘PocketWatch’ can’t seem to see the interface.