I haven't tried it with packages, but if you want to declare a class, which
is visible to the current public class only, you have to define it outside
of the package.
Maybe the same works for package functions?

package mypackage
{
        public function myFunction()
        {
               myHelper();
        }
} //package closed

function myHelper()
{
}

Cheers,
Ralf.
On 6/5/07, Jesse Hallam <[EMAIL PROTECTED]> wrote:

  Reading over: 
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=03_Language_and_Syntax_160_05.html


I got the distinct impression that each .as file could only export one
publicly visible definition (i.e. one public class, or one public method,
etc...), but it could define any number of internal definitions accessible
to the package.

I was hoping to do this:

package MyPackage {
   internal method1() : void {

   }
   internal method2() : void {

   }
}

To be able to create a single file with a number of related, package-level
functions, and not have to wrap them as static methods of a class. I didn't
need them publically accessible, just accessible to the package. However,
after running into "Error: A file found in a source-path must have an
externally visible definition." repeatedly, I'm under the impression I can't
do that -- I'd have to put each method in its own file.

Am I correct?

Thanks for any input!

--
Jesse Hallam
University of Waterloo Junior

"For scarcely for a righteous man will one die: yet peradventure for a
good man some would even dare to die. But God commendeth his love toward us,
in that, *while we were yet sinners*, Christ died for us. " (Romans 5:7, 8)



--
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany
Phone +49 (0) 221 530 15 35

Reply via email to