Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7721319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:53:38+00:00 2026-06-01T03:53:38+00:00

I have the following code: <fx:Script> <![CDATA[ import shared.GlobalsManager; import app.Globals; protected var globals:Globals=GlobalsManager.getGlobals();

  • 0

I have the following code:

<fx:Script>
<![CDATA[
    import shared.GlobalsManager;
    import app.Globals;
    protected var globals:Globals=GlobalsManager.getGlobals();
]]>
</fx:Script>
<s:FormItem label="Server or Client:">
<s:DropDownList id="serverOrClient" dataProvider="{globals.serverOrClientOptions}" />
</s:FormItem>

And the relevant Globals class code (Globals extends from GlobalsAdminGlobalS)

public class GlobalsAdminGlobalS extends GlobalsAdminS {
    public static const ServerOrClient_server:String="server";
    public static const ServerOrClient_client:String="client";
    public static const ServerOrClient_both:String="both";
    [Bindable]
    public var serverOrClientOptions:ArrayCollection=new ArrayCollection(
        [ServerOrClient_server,ServerOrClient_client,ServerOrClient_both]);
    [Bindable]
    public var appOrAdminOptions:ArrayCollection=new ArrayCollection(
        [AppOrAdmin_App,AppOrAdmin_Admin]);
}

I am getting the following warning with the Flex 4.5.1 compiler:

WARNING S:\_flash\shared\shared\src\shared\admin\global\ClassManager.mxml[28]:
Data binding will not be able to detect assignments to "globals".

<s:DropDownList id="serverOrClient" dataProvider="{globals.serverOrClientOptions}" />

I have not tested if it actually binds. I dont see what the problem is. According to this and what the expected functionality is, one does not need to mark an entire class bindable:

http://www.adobe.com/devnet/flex/articles/databinding_pitfalls.html

EDIT: The Script block is located in a parent of the of the FormItem. The global variable is marked as protected.

1) Can children of a component access properties defined in the component’s script blocks?

2) If the functionality of properties defined in an ancestor’s script blocks, is the same as properties of a class instance (ie they are not magically available in the curly braces of child components), does a descendant generally access the ancestor or any another component instance through its id property?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:53:40+00:00Added an answer on June 1, 2026 at 3:53 am

    To fix the warning, you need to make the protected globals variable bindable in your first code snippet:

    [Bindable]
    protected var globals:Globals=GlobalsManager.getGlobals();
    

    Yes, you do not need to make the entire GlobalsManager class bindable. But, in your first code snippet, you are using the globals variable inside of a curly brace expression (in the assignment for the dataProvider).

    Any variable used inside of a curly brace expression must be bindable…

    [Edit]
    Note, if a variable or property used in a curly brace expression is NOT bindable, the curly brace expression gets evaluated once and only once. When the vars/props in the curly brace epxression are bindable, they get evaluated each time the var/property changes.

    [Additional Answers]

    1) Can children of a component access properties defined in the
    component’s script blocks?

    If you declare variable as public in the script block, yes, it will be accessible.

    2) If the functionality of properties defined in an ancestor’s script
    blocks, is the same as properties of a class instance (ie they are not
    magically available in the curly braces of child components), does a
    descendant generally access the ancestor or any another component
    instance through its id property?

    Yes, the id property in mxml is a variable name that you can refer to the object in Actionscript statements.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code in javascript: <script type=text/javascript src=#{facesContext.externalContext.requestContextPath}/js/sample-points.js></script> <script type=text/javascript>//<![CDATA[ var cloudmade
I have follwing JSON: {mykey:[{name:Jak,interests:movies}]} and following opensocial app code: <script type=text/os-template require=mykey> <ul>
I have the following code in action script 3: async.addResponder(new Responder(result, defaultFaultHandler)); result is
I have the following code in a shell script. This only seems to work
I have the following code: <script type=text/javascript> function SubmitForm() { form1.submit(); } function ShowResponse()
I have the following code: <script type=text/javascript> $(document).ready(function() { $(#Save).click(function() { $.post(url, { data:
I have the following code: <script> $(document).ready(function() { $('.toggle_section').click(function(e){ parent = $(e.target).closest(div) objChild =
I have the following code in the front end <asp:Content ID=Content1 ContentPlaceHolderID=cphMain runat=server> <script
I have the following code that works fine in IE: <HTML> <BODY> <script language=JavaScript>
So I have the following JavaScript code: <script type=text/javascript> function clearRadioButtons() { document.getElementById(radiobutton1).checked=; //etc

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.