Below is the code i'm looking at the moment.
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="data"
xmlns:model="model.*"
creationComplete="data=sqlSearch(data)"
>
In this View, it has just been pushView 'ed with data object. I need to use this data as part of a sql search. I've used creationComplete one other time in the initial view. My understanding is, on creationComplete, whatever the function, (I'll just name sqlSearch here as the example), is run, and its return value becomes the data to be used in a List.
The error for the creationComplete line is
Multiple markers at this line: -1137: Incorrect number of arguments. Expected no more than 0.
How should I go about this?
The creationComplete defined by you expects an event handler function.
To make some logic directly to the event use { } like in the following
creationComplete = "{data=sqlSearch(data)}"
I strongly suggest to use a handler function so you can add more logic on creationComplete. For this take the following sample
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="data"
xmlns:model="model.*"
creationComplete="handleCreationComplete()"
>
<mx:Script>
<![CDATA[
private function handleCreationComplete():void
{
//Here is my code
data=sqlSearch(data);
}
]]></mx:Script>