You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Cristina Constantinescu <cr...@crispico.com> on 2014/07/16 11:52:45 UTC
where to add include file so that it can be seen by other files in
app?
Hi,
I want to use include directive to add files into my application.
Where should I put them in order to be seen in the entire app?
I've tried in a class like this:
package org {
public class Test {
public function Test() {
}
}
include "myFile.js";
}
but "A file found in a source-path can not have more than one externally
visible definition.".
Thanks,
Cristina
Re: where to add include file so that it can be seen by other files
in app?
Posted by Cristina Constantinescu <cr...@crispico.com>.
Thanks Julio.
It means that I cannot use include in file A and try to access code from
it in file B (probably in other package).
On 16.07.2014 17:45, Julio Carneiro wrote:
> Cristina,
>
> the include is in a good location. the error you're seeing is because it probably includes another class declaration inside.
> you cannot declare multiple public classes in the same package/file.
> your error is a result of the included contents, not the 'include' location.
>
> hth
> julio
>
> On Jul 16, 2014, at 2:52 AM, Cristina Constantinescu <cr...@crispico.com> wrote:
>
>> Hi,
>>
>> I want to use include directive to add files into my application.
>>
>> Where should I put them in order to be seen in the entire app?
>>
>> I've tried in a class like this:
>> package org {
>>
>> public class Test {
>> public function Test() {
>> }
>> }
>> include "myFile.js";
>> }
>>
>> but "A file found in a source-path can not have more than one externally visible definition.".
>>
>> Thanks,
>> Cristina
>>
> --
> Julio Carneiro
>
>
>
>
>
Re: where to add include file so that it can be seen by other files in app?
Posted by Julio Carneiro <ju...@4ctv.com>.
Cristina,
the include is in a good location. the error you're seeing is because it probably includes another class declaration inside.
you cannot declare multiple public classes in the same package/file.
your error is a result of the included contents, not the 'include' location.
hth
julio
On Jul 16, 2014, at 2:52 AM, Cristina Constantinescu <cr...@crispico.com> wrote:
> Hi,
>
> I want to use include directive to add files into my application.
>
> Where should I put them in order to be seen in the entire app?
>
> I've tried in a class like this:
> package org {
>
> public class Test {
> public function Test() {
> }
> }
> include "myFile.js";
> }
>
> but "A file found in a source-path can not have more than one externally visible definition.".
>
> Thanks,
> Cristina
>
--
Julio Carneiro