Maybe an mxml parsing issue?  You could declare and initialize an object
variable in AS, as you are doing with the other properties.  You might also
try using entity expressions for some of the special characters.

 

To be accurate, in your code, you are not trying to pass an associative
array, you are passing an array of Objects (with one element).  Is that what
you intend?  They are different things.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of icepero
Sent: Saturday, October 17, 2009 6:44 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] Passing associative array to custom component

 

  

I built a custom button component and it has a property that accepts an
array of values. In the main.mxml file, how can I pass an array when
defining the property?

main.mxml has this button code:

<comp:updateButton
id="update"
cubeName="{_cubeName}"
viewName="{_viewName}"
serverChartId="{_serverChartId}"
titleDims="xxx"
enabled="false"/>

for title dims, I tried:
titleDims="[{Month: comboBox1.text, Year:comboBox2.text, Sales
Order:comboBox3.text}]"

but I get a "1084: Syntax error: expecting rightparen before colon"

The keys will have spaces in them like 'Sales Order'

How can I declare the array in mxml?



Reply via email to