Thanks for your help Alex.
First of all, I tried adding a DateFormatter to a class which is shared
by all my applications and it worked! So as you say this suggests a
linker dependency issue but I have no idea where the issue suddenly
came from.
I have not experimented with RSLs, modules or library projects (yet) so
all of the application SWFs in my project should include everything
they need and not depend on anything else.
My project is structured as follows (I've simplified the names to make
things easier to explain):
- Source Path Folder 1 (some common code I wrote)
- Source Path Folder 2 (some common code from 3rd parties)
- Main.mxml
- App1.mxml
.
.
- App4.mxml
The App1..App4 applications are loaded in SWFLoaders by the Main app
when they are needed. They all make use of many classes in the source
path folders. My DateRenderer, which uses the DateFormatter, lives
beneath Source Path Folder 1 and is used by App4.mxml. It is when
App4.mxml is loaded at runtime that I get the resource bundle error.
As suggested I created a link report for App4.mxml (when it wasn't
working). I've not looked at link reports before but it contains the
following section which suggests (to me) that DateFormatter and its
resource bundles *should* be linked in:
<script name="C:\Program Files\Adobe\Flex Builder 2\Flex SDK 2
\frameworks\libs\framework.swc(mx/formatters/DateFormatter)"
mod="1159976667000" size="4167">
<def id="mx.formatters:DateFormatter" />
<pre id="mx.formatters:Formatter" />
<dep id="mx.core:mx_internal" />
<dep id="mx.formatters:DateBase" />
<dep id="mx.resources:ResourceBundle" />
<dep id="Date" />
<dep id="flash.system:ApplicationDomain" />
<dep id="AS3" />
<dep id="Math" />
<dep id="mx.formatters:StringFormatter" />
<dep id="SharedResources_properties" />
</script>
Then a bit further down it shows my DateRenderer with DateFormatter as
a dependency:
<script name="C:\Dev\Flex\CommonCode1
\util\renderers\DateRenderer.mxml" mod="1174410196890" size="2000">
<def id="util.renderers:DateRenderer" />
<pre id="mx.controls:Label" />
<dep id="mx.formatters:DateFormatter" />
<dep id="Date" />
<dep id="mx.events:FlexEvent" />
<dep id="AS3" />
</script>
Is this wrong somehow? When a dummy DateFormatter is added to the
common class then the link report for App4.mxml contains a second
<script> section which lists DateFormatter as a dependency.
Any ideas? I've even tried reinstalling Flex Builder and recreating
the project but I still get the same error! This is so frustrating
because everything worked fine up until yesterday lunchtime...
Regards,
Nick.
--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Add a DateFormatter to the main app. If that solves the problem then
> you have a linker dependency issue. If you are using modules, rsls or
> otherwise using -extern options you might be excluding the locale data
> somehow. -link-report is helpful in these situations.
>
>