Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem passing int values to Flash Islands

<body><p>Hi,</p><p>im developing a WDA with Flash Island embedded and i'm having problems passing integer values to the flex component.</p><p>Im using Flex 3.2 with Flex 3.6 Data visualization (I also tried compiling with Flex 3.0, Flex 3.5 and Flex 4.0)</p><p></p><p>The following piece of code <strong>does not</strong> work for me (it shows an empty table)</p><p></p><pre __jive_macro_name="code"><![CDATA[<mx:Script> <![CDATA[ [Bindable] public var dataSource:ArrayCollection; [Bindable] public var ypos:uint; public function initApp():void{ FlashIsland.register(this); } ]]> </mx:Script> <mx:DataGrid dataProvider="{dataSource}" rowCount="3"> <mx:columns> <mx:DataGridColumn id="Y" dataField="{ypos}"/> </mx:columns> </mx:DataGrid>]]></pre><p></p><p>but if i <strong>only</strong> change ypos variable type from uint (or int, its the same) to String, then I have the data displayed correctly</p><p></p><pre __jive_macro_name="code"><![CDATA[ [Bindable] public var ypos:String;]]></pre><p></p><p>In the WDA component controller the ypos field is defined as (TYPE I)</p><p></p><p>I know i can pass values as String and convert them to uint, but I'm wondering if I'm doing something wrong</p><p></p><p>Any suggestions?</p><p>Thanks</p><p>Manuel</p></body>

ypos isn't the value of the column of hte dataSource itself. It is just an alias to hold the actual column name. It therefore must be type STRING. The columns in the dataSource will be created automatically with matching types from the WD Context - so they are int already if the context is type I. For instance send an alert or check the value of ypos in the debugger. You will see it contains the context attribute name of the matching column in the dataSource.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question