RE: [flexcoders] ResourceBundle - Problem with ActionScript code

2007-09-06 Thread Matt Horn
So, rather than methods like getString() on ResourceBundle, you use
methods like getString() on ResourceManager, like this:

var s:String = resourceManager.getString(bundle_name, key);

-matt  

 -Original Message-
 From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Smith
 Sent: Wednesday, September 05, 2007 3:33 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] ResourceBundle - Problem with 
 ActionScript code
 
 Yes, that's the recommendation. Methods like getString() on 
 ResourceBundle are now deprecated (and will be removed in a 
 future release), but a compiler bug is currently preventing 
 you from getting the deprecation warnings.
  
 - Gordon
 
 
 
 From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of Brian Holmes
 Sent: Wednesday, September 05, 2007 11:39 AM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] ResourceBundle - Problem with 
 ActionScript code
 
 
 
 Gordon,
 
  Is that the recommendation? I'm dynamically creating and 
 loading resource bundles and have been pulling the values of 
 the content without problem. I am storing the bundles in the 
 Resource Manager however, but is there something I should beware of?
 
 brian..
 
 
 
 From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Smith
 Sent: Wednesday, September 05, 2007 11:48 AM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] ResourceBundle - Problem with 
 ActionScript code
 
 No. In Flex 3, all resources should be accessed via the 
 ResourceManager, not through vars of type ResourceBundle.
 
 - Gordon
 
 
 
 From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of Brian Holmes
 Sent: Wednesday, September 05, 2007 9:57 AM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] ResourceBundle - Problem with 
 ActionScript code
 
 reference the resource bundle by key instead of the getString()
 
 such as rb.content[txName];
 
 you can read more here:
 
 http://livedocs.adobe.com/labs/flex/3/html/wwhelp/wwhimpl/comm
 on/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=l10n_033_1
 .html 
 http://livedocs.adobe.com/labs/flex/3/html/wwhelp/wwhimpl/com
 mon/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=l10n_033_1.html 
 
 Hope that helps,
 
 brian..
 
 
 
 size=2 width=100% align=center tabIndex=-1 
 
 From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of mayurrami
 Sent: Tuesday, September 04, 2007 10:43 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] ResourceBundle - Problem with ActionScript code
 
 Hi everybody...
 
 I am having few problems for ResourceBundle.
 
 The code is as below
 
 /* code in Flex 3 (Moxie - Beta) */
 --
 mxml code : RB_3.mxml
 --
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml 
 http://www.adobe.com/2006/mxml 
 layout=absolute
 xmlns:local=*
 pageTitle= Resoruce Bundle 
 !--mx:Label text=@Resource(key='txName',bundle='German') / --
 !-- The above commented line works very well, but when I try 
 to achieve the same through Actionscript it gives an Error 
 -- local:RB_B_AS width=200 height=200 borderStyle=solid
 paddingLeft=10 paddingTop=10 /
 /mx:Application
 --
 Actionscript code : RB_ActionScript.as
 --
 package
 {
 import mx.resources.ResourceBundle;
 import mx.containers.VBox;
 import mx.controls.Label;
 import mx.controls.Alert;
 
 [ResourcBundle(German)]
 public class RB_B_AS extends VBox
 {
 private static var rb:ResourceBundle = new ResourceBundle();
 
 public var l:Label;
 
 function RB_B_AS()
 {
 this.width = 300;
 this.height = 300;
 this.setStyle(borderStyle,solid);
 this.setStyle(paddingLeft,10);
 this.setStyle(paddingTop,10);
 
 l = new Label();
 l.width = 100;
 l.height = 30;
 
 /* Error come on Line : 34
 [
 Error: Key txName was not found in
 resource bundle null
 at
 mx.resources::ResourceBundle/::_getObject()
 at
 mx.resources::ResourceBundle/getString()
 at RB_B_AS$iinit()
 ] */
 l.text = rb.getString(txName);
 
 this.addChild(l);
 
 var child2:Label = new Label();
 child2.name = Lable2;
 child2.text = Two;
 this.addChild(child2);
 }
 }
 }
 
 --
 Res.Bundle : German.properties
 --
 txName=What is your Name ?
 --
 
 If you can provide me any link for ResourceBundle example 
 purely in AS-3, that will be helpful to me.
 
 Thanking you in advance.
 
 - Mayur 
 
 
 


RE: [flexcoders] ResourceBundle - Problem with ActionScript code

2007-09-05 Thread Brian Holmes
reference the resource bundle by key instead of the getString()

 

 

such as rb.content[txName];

 

 

 

you can read more here:

 

http://livedocs.adobe.com/labs/flex/3/html/wwhelp/wwhimpl/common/html/ww
help.htm?context=LiveDocs_Book_Partsfile=l10n_033_1.html

 

 

 

Hope that helps,

 

brian..

 

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mayurrami
Sent: Tuesday, September 04, 2007 10:43 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ResourceBundle - Problem with ActionScript code

 

Hi everybody...

I am having few problems for ResourceBundle.

The code is as below

/* code in Flex 3 (Moxie - Beta) */
--
mxml code : RB_3.mxml
--
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
layout=absolute
xmlns:local=*
pageTitle= Resoruce Bundle 
!--mx:Label text=@Resource(key='txName',bundle='German') / --
!-- The above commented line works very well, but when I try to
achieve the same through Actionscript it gives an Error --
local:RB_B_AS width=200 height=200 borderStyle=solid
paddingLeft=10 paddingTop=10 /
/mx:Application
--
Actionscript code : RB_ActionScript.as
--
package
{
import mx.resources.ResourceBundle;
import mx.containers.VBox;
import mx.controls.Label;
import mx.controls.Alert;

[ResourcBundle(German)]
public class RB_B_AS extends VBox
{
private static var rb:ResourceBundle = new
ResourceBundle();

public var l:Label;

function RB_B_AS()
{
this.width = 300;
this.height = 300;
this.setStyle(borderStyle,solid);
this.setStyle(paddingLeft,10);
this.setStyle(paddingTop,10);

l = new Label();
l.width = 100;
l.height = 30;

/* Error come on Line : 34
[
Error: Key txName was not found in
resource bundle null
at
mx.resources::ResourceBundle/::_getObject()
at
mx.resources::ResourceBundle/getString()
at RB_B_AS$iinit()
] */
l.text = rb.getString(txName);

this.addChild(l);

var child2:Label = new Label();
child2.name = Lable2;
child2.text = Two;
this.addChild(child2);
}
}
}

--
Res.Bundle : German.properties
--
txName=What is your Name ?
--

If you can provide me any link for ResourceBundle example purely in
AS-3, that will be helpful to me.

Thanking you in advance.

- Mayur 

 



***
The information in this e-mail is confidential and intended solely for the 
individual or entity to whom it is addressed.  If you have received this e-mail 
in error please notify the sender by return e-mail delete this e-mail and 
refrain from any disclosure or action based on the information.
***


RE: [flexcoders] ResourceBundle - Problem with ActionScript code

2007-09-05 Thread Gordon Smith
No. In Flex 3, all resources should be accessed via the ResourceManager,
not through vars of type ResourceBundle.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brian Holmes
Sent: Wednesday, September 05, 2007 9:57 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] ResourceBundle - Problem with ActionScript
code



reference the resource bundle by key instead of the getString()

such as rb.content[txName];

you can read more here:

http://livedocs.adobe.com/labs/flex/3/html/wwhelp/wwhimpl/common/html/ww
help.htm?context=LiveDocs_Book_Partsfile=l10n_033_1.html
http://livedocs.adobe.com/labs/flex/3/html/wwhelp/wwhimpl/common/html/w
whelp.htm?context=LiveDocs_Book_Partsfile=l10n_033_1.html 

Hope that helps,

brian..



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mayurrami
Sent: Tuesday, September 04, 2007 10:43 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ResourceBundle - Problem with ActionScript code

Hi everybody...

I am having few problems for ResourceBundle.

The code is as below

/* code in Flex 3 (Moxie - Beta) */
--
mxml code : RB_3.mxml
--
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
layout=absolute
xmlns:local=*
pageTitle= Resoruce Bundle 
!--mx:Label text=@Resource(key='txName',bundle='German') / --
!-- The above commented line works very well, but when I try to
achieve the same through Actionscript it gives an Error --
local:RB_B_AS width=200 height=200 borderStyle=solid
paddingLeft=10 paddingTop=10 /
/mx:Application
--
Actionscript code : RB_ActionScript.as
--
package
{
import mx.resources.ResourceBundle;
import mx.containers.VBox;
import mx.controls.Label;
import mx.controls.Alert;

[ResourcBundle(German)]
public class RB_B_AS extends VBox
{
private static var rb:ResourceBundle = new
ResourceBundle();

public var l:Label;

function RB_B_AS()
{
this.width = 300;
this.height = 300;
this.setStyle(borderStyle,solid);
this.setStyle(paddingLeft,10);
this.setStyle(paddingTop,10);

l = new Label();
l.width = 100;
l.height = 30;

/* Error come on Line : 34
[
Error: Key txName was not found in
resource bundle null
at
mx.resources::ResourceBundle/::_getObject()
at
mx.resources::ResourceBundle/getString()
at RB_B_AS$iinit()
] */
l.text = rb.getString(txName);

this.addChild(l);

var child2:Label = new Label();
child2.name = Lable2;
child2.text = Two;
this.addChild(child2);
}
}
}

--
Res.Bundle : German.properties
--
txName=What is your Name ?
--

If you can provide me any link for ResourceBundle example purely in
AS-3, that will be helpful to me.

Thanking you in advance.

- Mayur 



***
The information in this e-mail is confidential and intended solely for
the individual or entity to whom it is addressed. If you have received
this e-mail in error please notify the sender by return e-mail delete
this e-mail and refrain from any disclosure or action based on the
information.
*** 

 


RE: [flexcoders] ResourceBundle - Problem with ActionScript code

2007-09-05 Thread Brian Holmes
Gordon,

 Is that the recommendation? I'm dynamically creating and loading
resource bundles and have been pulling the values of the content without
problem. I am storing the bundles in the Resource Manager however, but
is there something I should beware of?

 

 

brian..

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Gordon Smith
Sent: Wednesday, September 05, 2007 11:48 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] ResourceBundle - Problem with ActionScript
code

 

No. In Flex 3, all resources should be accessed via the ResourceManager,
not through vars of type ResourceBundle.

 

- Gordon

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brian Holmes
Sent: Wednesday, September 05, 2007 9:57 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] ResourceBundle - Problem with ActionScript
code

reference the resource bundle by key instead of the getString()

such as rb.content[txName];

you can read more here:

http://livedocs.adobe.com/labs/flex/3/html/wwhelp/wwhimpl/common/html/ww
help.htm?context=LiveDocs_Book_Partsfile=l10n_033_1.html
http://livedocs.adobe.com/labs/flex/3/html/wwhelp/wwhimpl/common/html/w
whelp.htm?context=LiveDocs_Book_Partsfile=l10n_033_1.html 

Hope that helps,

brian..



size=2 width=100% align=center tabIndex=-1 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mayurrami
Sent: Tuesday, September 04, 2007 10:43 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ResourceBundle - Problem with ActionScript code

Hi everybody...

I am having few problems for ResourceBundle.

The code is as below

/* code in Flex 3 (Moxie - Beta) */
--
mxml code : RB_3.mxml
--
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
layout=absolute
xmlns:local=*
pageTitle= Resoruce Bundle 
!--mx:Label text=@Resource(key='txName',bundle='German') / --
!-- The above commented line works very well, but when I try to
achieve the same through Actionscript it gives an Error --
local:RB_B_AS width=200 height=200 borderStyle=solid
paddingLeft=10 paddingTop=10 /
/mx:Application
--
Actionscript code : RB_ActionScript.as
--
package
{
import mx.resources.ResourceBundle;
import mx.containers.VBox;
import mx.controls.Label;
import mx.controls.Alert;

[ResourcBundle(German)]
public class RB_B_AS extends VBox
{
private static var rb:ResourceBundle = new
ResourceBundle();

public var l:Label;

function RB_B_AS()
{
this.width = 300;
this.height = 300;
this.setStyle(borderStyle,solid);
this.setStyle(paddingLeft,10);
this.setStyle(paddingTop,10);

l = new Label();
l.width = 100;
l.height = 30;

/* Error come on Line : 34
[
Error: Key txName was not found in
resource bundle null
at
mx.resources::ResourceBundle/::_getObject()
at
mx.resources::ResourceBundle/getString()
at RB_B_AS$iinit()
] */
l.text = rb.getString(txName);

this.addChild(l);

var child2:Label = new Label();
child2.name = Lable2;
child2.text = Two;
this.addChild(child2);
}
}
}

--
Res.Bundle : German.properties
--
txName=What is your Name ?
--

If you can provide me any link for ResourceBundle example purely in
AS-3, that will be helpful to me.

Thanking you in advance.

- Mayur 



***
The information in this e-mail is confidential and intended solely for
the individual or entity to whom it is addressed. If you have received
this e-mail in error please notify the sender by return e-mail delete
this e-mail and refrain from any disclosure or action based on the
information.
*** 

 



***
The information in this e-mail is confidential and intended solely for the 
individual or entity to whom it is addressed.  If you have received this e-mail 
in error please notify the sender by return e-mail delete this e-mail and 
refrain from any disclosure or action based on the information.
***


RE: [flexcoders] ResourceBundle - Problem with ActionScript code

2007-09-05 Thread Gordon Smith
Yes, that's the recommendation. Methods like getString() on
ResourceBundle are now deprecated (and will be removed in a future
release), but a compiler bug is currently preventing you from getting
the deprecation warnings.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brian Holmes
Sent: Wednesday, September 05, 2007 11:39 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] ResourceBundle - Problem with ActionScript
code



Gordon,

 Is that the recommendation? I'm dynamically creating and loading
resource bundles and have been pulling the values of the content without
problem. I am storing the bundles in the Resource Manager however, but
is there something I should beware of?

brian..



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Gordon Smith
Sent: Wednesday, September 05, 2007 11:48 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] ResourceBundle - Problem with ActionScript
code

No. In Flex 3, all resources should be accessed via the ResourceManager,
not through vars of type ResourceBundle.

- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brian Holmes
Sent: Wednesday, September 05, 2007 9:57 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] ResourceBundle - Problem with ActionScript
code

reference the resource bundle by key instead of the getString()

such as rb.content[txName];

you can read more here:

http://livedocs.adobe.com/labs/flex/3/html/wwhelp/wwhimpl/common/html/ww
help.htm?context=LiveDocs_Book_Partsfile=l10n_033_1.html
http://livedocs.adobe.com/labs/flex/3/html/wwhelp/wwhimpl/common/html/w
whelp.htm?context=LiveDocs_Book_Partsfile=l10n_033_1.html 

Hope that helps,

brian..



size=2 width=100% align=center tabIndex=-1 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mayurrami
Sent: Tuesday, September 04, 2007 10:43 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ResourceBundle - Problem with ActionScript code

Hi everybody...

I am having few problems for ResourceBundle.

The code is as below

/* code in Flex 3 (Moxie - Beta) */
--
mxml code : RB_3.mxml
--
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
layout=absolute
xmlns:local=*
pageTitle= Resoruce Bundle 
!--mx:Label text=@Resource(key='txName',bundle='German') / --
!-- The above commented line works very well, but when I try to
achieve the same through Actionscript it gives an Error --
local:RB_B_AS width=200 height=200 borderStyle=solid
paddingLeft=10 paddingTop=10 /
/mx:Application
--
Actionscript code : RB_ActionScript.as
--
package
{
import mx.resources.ResourceBundle;
import mx.containers.VBox;
import mx.controls.Label;
import mx.controls.Alert;

[ResourcBundle(German)]
public class RB_B_AS extends VBox
{
private static var rb:ResourceBundle = new
ResourceBundle();

public var l:Label;

function RB_B_AS()
{
this.width = 300;
this.height = 300;
this.setStyle(borderStyle,solid);
this.setStyle(paddingLeft,10);
this.setStyle(paddingTop,10);

l = new Label();
l.width = 100;
l.height = 30;

/* Error come on Line : 34
[
Error: Key txName was not found in
resource bundle null
at
mx.resources::ResourceBundle/::_getObject()
at
mx.resources::ResourceBundle/getString()
at RB_B_AS$iinit()
] */
l.text = rb.getString(txName);

this.addChild(l);

var child2:Label = new Label();
child2.name = Lable2;
child2.text = Two;
this.addChild(child2);
}
}
}

--
Res.Bundle : German.properties
--
txName=What is your Name ?
--

If you can provide me any link for ResourceBundle example purely in
AS-3, that will be helpful to me.

Thanking you in advance.

- Mayur 



***
The information in this e-mail is confidential and intended solely for
the individual or entity to whom it is addressed. If you have received
this e-mail in error please notify the sender by return e-mail delete
this e-mail and refrain from any disclosure or action based on the
information.
*** 



***
The information in this e-mail is confidential and intended solely for
the individual or entity to whom it is addressed. If you have received
this e-mail in error please notify the sender by return e-mail delete
this e-mail and refrain from any disclosure or action based on the
information.
***