You need to sign in to do that
Don't have an account?

please confirm flash builder (flex builder 4) doesn't work yet?
I tried to do "simple" with the new builder ... no luck. Am I doing something wrong?
You need to sign in to do that
Don't have an account?
The question is very vague. Hopefully the question was "does Flex toolkit works with Flex 4?". Although haven't tested extensively, simple app still works with Flex 4.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" creationComplete="sfLogin()"
xmlns:mx="library://ns.adobe.com/flex/halo" xmlns:salesforce="http://www.salesforce.com/" minWidth="1024" minHeight="768">
<fx:Declarations>
<salesforce:Connection id="apex" serverUrl="https://test.salesforce.com/services/Soap/u/15.0"/>
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import com.salesforce.results.QueryResult;
import mx.controls.Alert;
import mx.utils.ObjectUtil;
import com.salesforce.AsyncResponder;
import com.salesforce.objects.LoginRequest;
[Bindable]
private var arrAcct:ArrayCollection = new ArrayCollection();
private function sfLogin():void
{
var lr:LoginRequest = new LoginRequest();
lr.username = "***";
lr.password = "***";
lr.callback = new AsyncResponder(qryProcessSet, handleFault);
apex.login(lr);
}
private function handleFault(fault:Object):void
{
Alert.show(ObjectUtil.toString(fault));
}
private function qryProcessSet(lr:Object):void
{
apex.query( "Select Name from Account where Name = 'XYZ'" ,
new AsyncResponder(
function(qr:QueryResult):void
{
Alert.show(ObjectUtil.toString(qr.size));
if (qr.size > 0 )
{
for (var j:int=0; j<qr.size; j++)
{
arrAcct.addItem ( { AcctName:qr.records[j].Name });
}
}
} ,handleFault));
}
]]>
</fx:Script>
<mx:AdvancedDataGrid x="116" y="84" id="adg1" dataProvider="{arrAcct}" designViewDataType="flat" width="565" height="290">
<mx:columns>
<mx:AdvancedDataGridColumn headerText="Account Name" editable="false" dataField="AcctName"/>
</mx:columns>
</mx:AdvancedDataGrid>
</s:Application>