function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MyGodItsColdMyGodItsCold 

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?
mrammram

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>
 

MyGodItsColdMyGodItsCold
Sorry for being vague. I downloaded the standalone, "Flash Builder" - the next generation of Flex builders. I've reverted toFlex 3 as the doc on the website says to do.
mrammram
Thank you. The above code was generated using Flash builder 4. Can you point me to the document that suggests reverting  to 3.0. I plan on proceeding with 4.0 unless I hit a major bump. Will update this post if something major fails.