Prepare() method gridItemRenderer Flex Hero

Hi,
last week I installed Flash Builder Burrito to try the new spark dataGrid. I was testing the gridItemRenderer. I wanted to check something form the data and according to the results the item renderer should show three different conditions. But unfortunately I was unable to make the prepare() function work. I did it as was shown in Adobe TV (Deep Dive into Spark DataGrid) but even a trace() was not triggered.
Is this method not working or am I making something wrong?
Thanks for your help.

The Link is:
http://tv.adobe.com/watch/max-2010-develop/deep-dive-into-the-spark-datagrid-component-and -item-renderers-/
I created a dataGrid and inserted the following column:
<s:GridColumn dataField="status" headerText="VP" itemRenderer="itemRenderer.FirstItemRenderer">
which uses FirstItemRenderer as ItemRenderer. Here the code for FirstItemRenderer:
<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
          xmlns:s="library://ns.adobe.com/flex/spark"
              xmlns:mx="library://ns.adobe.com/flex/mx"
>
<fx:Script>
     <![CDATA[
          import mx.events.FlexEvent;
// You SHOULD be able to use this method to programatically
// change the appearance of the data in this cell. However it doesn't
// seem to be called, yet. Probably a work in progress.
               override public function prepare( willBeRecycled:Boolean ):void {
                    labelSatus.text = "Result";
     /* protected function griditemrenderer1_creationCompleteHandler(event:FlexEvent):void
               labelSatus.text = "Result";
]]>
</fx:Script>
     <s:Label id="labelSatus"/>
</s:GridItemRenderer>
If I use the prepare method, the dataGrid is not populated with the label text "Result". But if I add a creationComplete Event to GridItemRenderer, the dataGrid column is populated with the "Result" text.
So, my question is am I using the prepare function wrong? Can you show me how to use it to make conditional checks on the data source?
Thanks in advance,

Similar Messages

  • Overriding Spark DataGrid item renderer's prepare method - renderer's child is initially null

    I am currently using the 4.12.0 SDK.  I have a Spark DataGrid setup that makes use of an externally-defined itemRenderer:
    <s:DataGrid id="dgEquipment"
                width="100%" height="100%"
                doubleClickEnabled="true"
                creationComplete="init()" doubleClick="popTab(event)">
      <s:columns>
        <s:ArrayList>
          <s:GridColumn itemRenderer="renderers.equipment.IconRenderer"
                        dataField="EXISTING"
                        width="22"/>
    The data provider is set programmatically after a remote call has returned a result.
    I have the renderer setup as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark"
                        xmlns:mx="library://ns.adobe.com/flex/mx"
                        dataChange="init()" remove="dispose()">
      <s:layout>
        <s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
      </s:layout>
      <fx:Script>
        <![CDATA[
          import mx.controls.Menu;
          import mx.events.MenuEvent;
          import spark.components.DataGrid;
          [Bindable]
          [Embed(source="../../../assets/images/Icon 1.png")]
          private var ico1:Class;
          [Bindable]
          [Embed(source="../../../assets/images/Icon 2.png")]
          private var ico2:Class;
          [Bindable]
          [Embed(source="../../../assets/images/Icon 3.png")]
          private var ico3:Class;
          private var isExisting:Boolean;
          private var popUp:Menu;
          private function init():void
            if (data)
              isExisting = data.EXISTING == 1;
          private function dispose():void
            if (popUp)
              popUp.removeEventListener(MenuEvent.ITEM_CLICK, popUp_click);
              popUp = null;
            if (imgActions)
              imgActions.removeEventListener(MouseEvent.CLICK, image_click);
              imgActions = null;
          override public function prepare(hasBeenRecycled:Boolean):void
            if (data)
              if ((data.TYPE == "A" || data.TYPE == "B") && !data.X && !data.Y)
                disableLink();
                imgActions.source = ico3;
                imgActions.toolTip = "Blah blah.";
              else if (data.TYPE == "C" || data.TYPE == "D")
                disableLink();
              else if (isExisting)
                imgActions.source = ico1;  //******************************            imgActions.toolTip = "More blah blah.";
                imgActions.addEventListener(MouseEvent.CLICK, image_click);
              else
                imgActions.source = ico2;
                imgActions.addEventListener(MouseEvent.CLICK, image_click);
                imgActions.toolTip = "Even more blah blah.";
                initPopUp();
          private function initPopUp():void
          private function popUp_click(event:MenuEvent):void
          private function image_click(event:MouseEvent):void
          private function disableLink():void
        ]]>
      </fx:Script>
      <s:Image id="imgActions"
               height="18" width="18"/>
    </s:GridItemRenderer>
    When the code reaches the line where I have added a comment full of asterisks, I get the following error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at renderers.equipment::IconRenderer/prepare()[C:\…\renderers\equipment\IconRenderer.mxml:81 ]
        at spark.components.gridClasses::GridViewLayout/initializeItemRenderer()[/Users/justinmclean /Documents/ApacheFlex4.12.0/frameworks/projects/spark/src/spark/components/gridClasses/Gri dViewLayout.as:1808]
        at spark.components.gridClasses::GridViewLayout/createTypicalItemRenderer()[/Users/justinmcl ean/Documents/ApacheFlex4.12.0/frameworks/projects/spark/src/spark/components/gridClasses/ GridViewLayout.as:1243]
        at spark.components.gridClasses::GridViewLayout/updateTypicalCellSizes()[/Users/justinmclean /Documents/ApacheFlex4.12.0/frameworks/projects/spark/src/spark/components/gridClasses/Gri dViewLayout.as:1374]
        at spark.components.gridClasses::GridViewLayout/measure()[/Users/justinmclean/Documents/Apac heFlex4.12.0/frameworks/projects/spark/src/spark/components/gridClasses/GridViewLayout.as: 875]
        at spark.components.supportClasses::GroupBase/measure()[/Users/justinmclean/Documents/Apache Flex4.12.0/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as:1156 ]
        at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::measureSizes()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/cor e/UIComponent.as:9038]
        at mx.core::UIComponent/validateSize()[/Users/justinmclean/Documents/ApacheFlex4.12.0/framew orks/projects/framework/src/mx/core/UIComponent.as:8962]
        at spark.components::Group/validateSize()[/Users/justinmclean/Documents/ApacheFlex4.12.0/fra meworks/projects/spark/src/spark/components/Group.as:1074]
        at mx.managers::LayoutManager/validateSize()[/Users/justinmclean/Documents/ApacheFlex4.12.0/ frameworks/projects/framework/src/mx/managers/LayoutManager.as:673]
        at mx.managers::LayoutManager/doPhasedInstantiation()[/Users/justinmclean/Documents/ApacheFl ex4.12.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:824]
        at mx.managers::LayoutManager/doPhasedInstantiationCallback()[/Users/justinmclean/Documents/ ApacheFlex4.12.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:1188]
    Running the debugger shows that this occurs with the first item in the data provider.  If I alter the prepare method to check for the existence of imgActions before doing anything, everything works fine after the first item.  So I'll have one row in the DataGrid with a missing icon, and all the rest will have icons.
    So the question is, is it normal for prepare to run before any children of the item renderer are created?  If so, how should I handle this?
    Many thanks in advance.

    A little more info.  I added some event handlers to the renderer and the image (for events that I thought would be relevant), and here is the order of events based on trace statements within the handlers:
    griditemrenderer1_addedHandler
    griditemrenderer1_addedToStageHandler
    griditemrenderer1_preinitializeHandler
    imgActions_addedHandler
    griditemrenderer1_addedHandler
    imgActions_addedToStageHandler
    imgActions_preinitializeHandler
    imgActions_addedHandler
    griditemrenderer1_addedHandler
    imgActions_initializeHandler
    griditemrenderer1_elementAddHandler
    imgActions_addHandler
    griditemrenderer1_initializeHandler
    griditemrenderer1_addHandler
    prepare called
    imgActions_resizeHandler
    griditemrenderer1_resizeHandler
    imgActions_creationCompleteHandler
    imgActions_updateCompleteHandler
    griditemrenderer1_creationCompleteHandler
    griditemrenderer1_updateCompleteHandler
    griditemrenderer1_removeHandler
    griditemrenderer1_addedHandler
    griditemrenderer1_addedToStageHandler
    imgActions_addedToStageHandler
    griditemrenderer1_addHandler
    griditemrenderer1_dataChangeHandlerTypeError: Error #1009: Cannot access a property or method of a null object reference.
    prepare called
        at renderers.equipment::IconRenderer/prepare()[C:\…\renderers\equipment\IconRenderer.mxml:91 ]
    imgActions_renderHandler
    griditemrenderer1_renderHandler

  • How to display html content in flex hero..

    i need to display html content using flex hero for balckberry playbook..i could not find a component for it..i have tried with spark text area by setting its html text property via MobileTextField. bt i need a webview to load html content to execute javascript and all....Is there any component for it???? Please help....

    Hello,
    The only current way is to use an iFrame, or if you only need some html tags you could use the Text Layout Framework.
    Here this is the iFrame approach:
    http://code.google.com/p/flex-iframe/
    If the swc do not work in Flex4 just use its ource code which works...
    ...it is basically based on this:
    http://www.deitte.com/archives/2008/07/dont_use_iframe.htm
    see also and vote, please:
    http://bugs.adobe.com/jira/browse/SDK-12291
    http://bugs.adobe.com/jira/browse/SDK-13740
    Regards
    Marc

  • External task - prepare method - decode-encode

    In the prepare method, I write code refer to thread:
    How to invoke a java application in the middle of the process
    Using Papi to operate with process
    How to invoke a java application in the middle of the process
    If the error is caused by decoding and encodeing the URL, please tell me how to fix this problem.
    Thanks a lot.
    The code snippet as follows
    -------------------code-----------------------------------------------
    package getinstance;
    import fuego.lang.DynamicObject;
    import fuego.papi.Arguments;
    import fuego.papi.CommunicationException;
    import fuego.papi.InstanceInfo;
    import fuego.papi.ProcessService;
    import fuego.papi.ProcessServiceSession;
    import fuego.papi.OperationException;
    import java.util.Iterator;
    import java.util.Map;
    import java.util.Properties;
    public class prepare {
    public prepare() {
    public static void main(String[] args) {
    prepare prepare = new prepare();
    Properties configuration = new Properties();
    configuration.setProperty(ProcessService.DIRECTORY_ID, "default");
    configuration.setProperty(ProcessService.DIRECTORY_PROPERTIES_FILE, "D:\\BPM_HOME_standalone\\webapps\\papiws\\WEB-INF\\directory.xml");
    configuration.setProperty(ProcessService.WORKING_FOLDER, "/tmp");
    System.out.println("1111111111111");
    Arguments argumentsResult = Arguments.create();
    String taskIn = "0";
    //String activity = "/InvokeJavaProcess#Default-1.0/InteractiveJava"; //both are fine
    String activity = "InteractiveJava"; //both are fine
    String instanceId = "/InvokeJavaProcess#Default-1.0/203/0";
    try {
    ProcessService processService = ProcessService.create(configuration);
    ProcessServiceSession session = processService.createSession("jcooper", "welcome1", "host");
    System.out.println("33333 instanceID="+instanceId);
    argumentsResult = session.activityPrepare(activity, instanceId, Arguments.create()); // error starts from here
    System.out.println("444444444");
    DynamicObject obj = argumentsResult.getDynamicObject();
    Map fieldMaps = obj.asFieldsMap();
    for (Iterator<String> iterator = fieldMaps.keySet().iterator(); iterator.hasNext();) {
    String key = iterator.next();
    System.out.println("key : "+ key + "value" +obj.getField(key));
    DynamicObject obj2 = argumentsResult.getDynamicObject();
    Map fieldMaps2 = obj2.asFieldsMap();
    for (Iterator<String> it = fieldMaps2.keySet().iterator(); it.hasNext();) {
    System.out.println("key : "+ key + " value : "+ obj2.getField(key));
    session.close();
    } catch (OperationException e) {
    e.printStackTrace();
    But I get errors like follow:
    -------------------error---------------------------------------
    E:\Jdeveloper10131_20090318\jdk\bin\javaw.exe -client -classpath E:\Jdeveloper10131_20090318\jdev\mywork\Java_be_invoked\getInstance\classes;D:\BPM_HOME_standalone\client\papi\lib\fuegopapi-client.jar getinstance.prepare
    1111111111111
    Creating connector [fuego:SQL]
    Creating ProcessService with id 'oracle/2009-03-31 18:08:47+08:00'.
    Local folder /tmp\system\Schema3387192-1796619082\catalogs found.
    Loading catalogs from local folder: /tmp\system\Schema3387192-1796619082\catalogs
    1 jars found locally.
    Local jar '126' succesfully loaded.
    [CatalogMgrCache] =======================
    Registering CatalogMgr [oracle/2009-03-31 18:08:47+08:00] ...CatalogManagerCache 14949315:
    Managers:
    Counters:
    [CatalogMgrCache] =======================
    CatalogMgr [oracle/2009-03-31 18:08:47+08:00] REGISTERED!CatalogManagerCache 14949315:
    Managers:
    {oracle/2009-03-31 18:08:47+08:00=fuego.util.LocalCatalogManager@1dacccc}
    Counters:
    ProcessService 'oracle/2009-03-31 18:08:47+08:00' created successfully.
    33333 instanceID=/InvokeJavaProcess#Default-1.0/203/0
    Unreachable Engine Tolerance (seconds):
    by default: 0
    to be used: 0
    This papi client will not cache exceptions which imply that an engine could not be reached.
    Adding local catalog for project: 124
    [CatalogLoaderMgrCache] =======================
    CatalogClassLoader[oracle/2009-03-31 18:08:47+08:00-124] added to cache
    Catalog ClassLoader MAP:
    {oracle/2009-03-31 18:08:47+08:00-124=CatalogClassLoader(FuegoObjectCatalog(catalogIn: 124, directoryId: oracle/2009-03-31 18:08:47+08:00))}
    Catalog Manager Cache:
    CatalogManagerCache 14949315:
    Managers:
    {oracle/2009-03-31 18:08:47+08:00=fuego.util.LocalCatalogManager@1dacccc}
    Counters:
    {oracle/2009-03-31 18:08:47+08:00=1}
    fuego.papi.exception.TaskFailedException: Task '0' in activity '/InvokeJavaProcess#Default-1.0/Interactive[InteractiveJava]' for instance '/InvokeJavaProcess#Default-1.0/203/0' could not be successfully executed. The task failed while executing method '%PREPARE%'.
         at fuego.papi.exception.TaskFailedException.create(TaskFailedException.java:57)
         at fuego.server.AbstractProcessBean.createTaskFailedException(AbstractProcessBean.java:3572)
         at fuego.fengine.FEngineProcessBean.createTaskFailedException(FEngineProcessBean.java:398)
         at fuego.server.AbstractProcessBean.runTask(AbstractProcessBean.java:3193)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
         at fuego.lang.JavaObject.invoke(JavaObject.java:227)
         at fuego.component.Message.process(Message.java:585)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:780)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:755)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
         at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:244)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:839)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
         at fuego.component.CustomExecution.next(CustomExecution.java:176)
         at fuego.papi.impl.rmi.RMIExecution.next(RMIExecution.java:109)
         at fuego.papi.impl.ProcessInstanceOperation.prepareExternalActivity(ProcessInstanceOperation.java:695)
         at fuego.papi.impl.ProcessServiceSessionImpl.activityPrepare(ProcessServiceSessionImpl.java:1420)
         at fuego.papi.impl.ProcessServiceSessionImpl.activityPrepare(ProcessServiceSessionImpl.java:1414)
         at getinstance.prepare.main(prepare.java:43)
    Caused by: fuego.lang.ComponentExecutionException: The method 'CIL_interactiveJavaPrepare' from class 'oracle.InvokeJavaProcess.Default_1_0.Instance' could not be successfully executed.
         at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:519)
         at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:273)
         at fuego.fengine.FEEngineExecutionContext.invokeMethodAsCil(FEEngineExecutionContext.java:219)
         at fuego.server.execution.EngineExecutionContext.runCil(EngineExecutionContext.java:1280)
         at fuego.server.execution.TaskExecution.invoke(TaskExecution.java:401)
         at fuego.server.execution.InteractiveNormalCilExecution.invoke(InteractiveNormalCilExecution.java:425)
         at fuego.server.execution.TaskExecution.executeCIL(TaskExecution.java:513)
         at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:697)
         at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:657)
         at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:154)
         at fuego.server.execution.microactivity.InteractiveMicroActivity.executeNormalCil(InteractiveMicroActivity.java:501)
         at fuego.server.execution.microactivity.InteractiveMicroActivity.executeItem(InteractiveMicroActivity.java:454)
         at fuego.server.execution.microactivity.InteractiveMicroActivity.execute(InteractiveMicroActivity.java:104)
         at fuego.server.AbstractProcessBean$48.execute(AbstractProcessBean.java:3184)
         at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
         at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
         at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
         at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
         at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66)
         at fuego.server.AbstractProcessBean.runTask(AbstractProcessBean.java:3188)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
         at fuego.lang.JavaObject.invoke(JavaObject.java:227)
         at fuego.component.Message.process(Message.java:585)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:780)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:755)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
         at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:244)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:839)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
    Caused by: java.lang.NullPointerException
         at oracle.InvokeJavaProcess.Default_1_0.Instance.CIL_interactiveJavaPrepare(Instance.xcdl:1)
         at oracle.InvokeJavaProcess.Default_1_0.Instance.CIL_interactiveJavaPrepare(Instance.xcdl)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:512)
         ... 34 more
    Process exited with exit code 0.
    ----------------------------------------------------------------

    Hi Satinder,
    This time I change something in the process.
    1, the process still has 3 interactive activities: jcooperkeyin, tojava, Interactivejstein.
    2, I create a BPMObject including amount (decimal, 2) , purpose
    3, the main task of jcooperkeyin is a screenflow: set values to purpose and amount
    4, tojava activity is external.
    Prepare method name: tojavaprepare
    method contents:
    arg1.amount=var1.amount
    arg1.purpose=var1.purpose
    Commit method: tojavacommit
    method contents:
    var1.purpose=arg2.purpose
    var1.amount=arg2.amount
    5, I create an instance variable name var1 and its type is BPMObjec
    6, the argument module is changed to out
    7, I change the java prepare method code as you commend:
    8, After I run the java prepare method, I get some new errors which as follow:
    --------------------------code----------------------------------------------------
    package getinstance;
    import fuego.lang.Decimal;
    import fuego.lang.DynamicObject;
    import fuego.papi.Arguments;
    import fuego.papi.CommunicationException;
    import fuego.papi.InstanceInfo;
    import fuego.papi.ProcessService;
    import fuego.papi.ProcessServiceSession;
    import fuego.papi.OperationException;
    import java.math.BigDecimal;
    import java.util.Iterator;
    import java.util.Map;
    import java.util.Properties;
    public class prepare {
    public prepare() {
    public static void main(String[] args) {
    prepare prepare = new prepare();
    Properties configuration = new Properties();
    configuration.setProperty(ProcessService.DIRECTORY_ID, "default");
    configuration.setProperty(ProcessService.DIRECTORY_PROPERTIES_FILE, "D:\\BPM_HOME_standalone\\webapps\\papiws\\WEB-INF\\directory.xml");
    configuration.setProperty(ProcessService.WORKING_FOLDER, "/tmp");
    System.out.println("1111111111111");
    Arguments argumentsResult = Arguments.create();
    String taskIn = "0";
    String activity = "tojava";
    //String activity = "jcooperkeyin";
    String processId = "/InvokeJava2#Default-1.0";
    //String instanceId = "/InvokeJava2#Default-1.0/281/0";
    Arguments arguments = Arguments.create();
    DynamicObject dyn = DynamicObject.create();
    dyn.setField("amount", new BigDecimal(100.0));
    dyn.setField("purpose", "---------");
    arguments.putArgument("var1", dyn);
    try {
    ProcessService processService = ProcessService.create(configuration);
    ProcessServiceSession session = processService.createSession("jcooper", "welcome1", "host");
    String ist="ist";
    for (InstanceInfo instance : session.processGetInstances(processId)) {
    System.out.println(" instance.getId()-> " + instance.getId());
    ist=instance.getId();
    System.out.println(" activity.getActivityId()-> " +instance.getActivityId());
    System.out.println(" activity.getActivityName()-> " +instance.getActivityName());
    System.out.println("----------111----------------------");
    argumentsResult = session.activityPrepare(activity, instance.getId(), arguments); //error starts from here
    System.out.println("-----2222-----------");
    DynamicObject obj = argumentsResult.getDynamicObject();
    Map fieldMaps = obj.asFieldsMap();
    for (Iterator<String> iterator = fieldMaps.keySet().iterator(); iterator.hasNext();) {
    String key = iterator.next();
    System.out.println("key : "+ key + "value" +obj.getField(key));
    DynamicObject obj2 = argumentsResult.getDynamicObject();
    Map fieldMaps2 = obj2.asFieldsMap();
    for (Iterator<String> it = fieldMaps2.keySet().iterator(); it.hasNext();) {
    System.out.println("key : "+ key + " value : "+ obj2.getField(key));
    System.out.println("444444444");
    session.close();
    } catch (OperationException e) {
    e.printStackTrace();
    ---------------------new error------------------------------------------------------
    E:\Jdeveloper10131_20090318\jdk\bin\javaw.exe -client -classpath E:\Jdeveloper10131_20090318\jdev\mywork\Java_be_invoked\getInstance\classes;D:\BPM_HOME_standalone\client\papi\lib\fuegopapi-client.jar;D:\BPM_HOME_standalone\client\papi\lib\b1base.jar;D:\BPM_HOME_standalone\client\papi\lib\b1oracle.jar;D:\BPM_HOME_standalone\client\papi\lib\b1util.jar getinstance.prepare
    1111111111111
    Creating connector [fuego:SQL]
    Creating ProcessService with id 'oracle/2009-03-31 18:08:47+08:00'.
    Local folder /tmp\system\Schema3387192-1796619082\catalogs found.
    Loading catalogs from local folder: /tmp\system\Schema3387192-1796619082\catalogs
    1 jars found locally.
    Local jar '181' succesfully loaded.
    [CatalogMgrCache] =======================
    Registering CatalogMgr [oracle/2009-03-31 18:08:47+08:00] ...CatalogManagerCache 14949315:
    Managers:
    Counters:
    [CatalogMgrCache] =======================
    CatalogMgr [oracle/2009-03-31 18:08:47+08:00] REGISTERED!CatalogManagerCache 14949315:
    Managers:
    {oracle/2009-03-31 18:08:47+08:00=fuego.util.LocalCatalogManager@1dacccc}
    Counters:
    ProcessService 'oracle/2009-03-31 18:08:47+08:00' created successfully.
    Unreachable Engine Tolerance (seconds):
    by default: 0
    to be used: 0
    This papi client will not cache exceptions which imply that an engine could not be reached.
    instance.getId()-> /InvokeJava2#Default-1.0/281/0
    Adding local catalog for project: 181
    activity.getActivityId()-> /InvokeJava2#Default-1.0/tojava
    activity.getActivityName()-> tojava
    ----------111----------------------
    [CatalogLoaderMgrCache] =======================
    CatalogClassLoader[oracle/2009-03-31 18:08:47+08:00-181] added to cache
    Catalog ClassLoader MAP:
    {oracle/2009-03-31 18:08:47+08:00-181=CatalogClassLoader(FuegoObjectCatalog(catalogIn: 181, directoryId: oracle/2009-03-31 18:08:47+08:00))}
    Catalog Manager Cache:
    CatalogManagerCache 14949315:
    Managers:
    {oracle/2009-03-31 18:08:47+08:00=fuego.util.LocalCatalogManager@1dacccc}
    Counters:
    {oracle/2009-03-31 18:08:47+08:00=1}
    Processing the synchronization information, instance '181:281:0' was updated.
    fuego.papi.OperationException: Operation exception.
         at fuego.papi.OperationException.wrap(OperationException.java:65)
         at fuego.papi.impl.ProcessInstanceOperation.prepareExternalActivity(ProcessInstanceOperation.java:706)
         at fuego.papi.impl.ProcessServiceSessionImpl.activityPrepare(ProcessServiceSessionImpl.java:1420)
         at fuego.papi.impl.ProcessServiceSessionImpl.activityPrepare(ProcessServiceSessionImpl.java:1414)
         at getinstance.prepare.main(prepare.java:58)
    Caused by: fuego.rmi.RMIRuntimeException: Fuego RMI: Failure during the invocation. Check the exception chain for details.
         at fuego.rmi.RemoteProxy.processBatch(RemoteProxy.java:192)
         at fuego.component.ExecutorClient.dispatch(ExecutorClient.java:190)
         at fuego.component.CustomExecution.next(CustomExecution.java:247)
         at fuego.papi.impl.rmi.RMIExecution.next(RMIExecution.java:109)
         at fuego.papi.impl.ProcessInstanceOperation.prepareExternalActivity(ProcessInstanceOperation.java:695)
         ... 3 more
    Caused by: fuego.rmi.spi.SerializationException: Unable to receive the message because of a serialization error.
         at fuego.rmi.spi.BaseConnection.send(BaseConnection.java:105)
         at fuego.rmi.ServerCluster.send(ServerCluster.java:210)
         at fuego.rmi.ServerCluster.sendResult(ServerCluster.java:461)
         at fuego.rmi.ServerCluster.access$300(ServerCluster.java:43)
         at fuego.rmi.ServerCluster$ClientRequest$1.put(ServerCluster.java:556)
         at fuego.component.ExecutionThread.sendResult(ExecutionThread.java:532)
         at fuego.component.ExecutionThreadContext.doClientInvoke(ExecutionThreadContext.java:695)
         at fuego.component.ClientRemoteComponent.doInvocation(ClientRemoteComponent.java:303)
         at fuego.component.ClientRemoteComponent.invokeRelayTo(ClientRemoteComponent.java:211)
         at fuego.component.ExecutionRelayedThrowable.execute(ExecutionRelayedThrowable.java:109)
         at fuego.server.execution.TaskExecution.handleExecutionRelayedThrowable(TaskExecution.java:816)
         at fuego.server.execution.TaskExecution.handleComponentExecutionException(TaskExecution.java:767)
         at fuego.server.execution.TaskExecution.executeCIL(TaskExecution.java:516)
         at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:697)
         at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:657)
         at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:154)
         at fuego.server.execution.microactivity.InteractiveMicroActivity.executeNormalCil(InteractiveMicroActivity.java:501)
         at fuego.server.execution.microactivity.InteractiveMicroActivity.executeItem(InteractiveMicroActivity.java:454)
         at fuego.server.execution.microactivity.InteractiveMicroActivity.execute(InteractiveMicroActivity.java:104)
         at fuego.server.AbstractProcessBean$48.execute(AbstractProcessBean.java:3184)
         at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
         at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
         at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
         at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
         at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66)
         at fuego.server.AbstractProcessBean.runTask(AbstractProcessBean.java:3188)
         at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
         at fuego.lang.JavaObject.invoke(JavaObject.java:227)
         at fuego.component.Message.process(Message.java:585)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:780)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:755)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
         at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:244)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:839)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
         ... 8 more
    Caused by: java.io.NotSerializableException: java.lang.Object
         at java.io.ObjectOutputStream.writeObject0(Unknown Source)
         at java.io.ObjectOutputStream.writeObject(Unknown Source)
         at java.util.HashMap.writeObject(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
         at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
         at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
         at java.io.ObjectOutputStream.writeObject0(Unknown Source)
         at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
         at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
         at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
         at java.io.ObjectOutputStream.writeObject0(Unknown Source)
         at java.io.ObjectOutputStream.writeArray(Unknown Source)
         at java.io.ObjectOutputStream.writeObject0(Unknown Source)
         at java.io.ObjectOutputStream.writeObject(Unknown Source)
         at fuego.component.Message.writeObject(Message.java:653)
         at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
         at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
         at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
         at java.io.ObjectOutputStream.writeObject0(Unknown Source)
         at java.io.ObjectOutputStream.writeObject(Unknown Source)
         at fuego.component.Batch.writeObject(Batch.java:151)
         at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
         at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
         at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
         at java.io.ObjectOutputStream.writeObject0(Unknown Source)
         at java.io.ObjectOutputStream.writeObject(Unknown Source)
         at fuego.rmi.Packet.write(Packet.java:240)
         at fuego.rmi.spi.BaseConnection.send(BaseConnection.java:102)
         at fuego.rmi.ServerCluster.send(ServerCluster.java:210)
         at fuego.rmi.ServerCluster.sendResult(ServerCluster.java:461)
         at fuego.rmi.ServerCluster.access$300(ServerCluster.java:43)
         at fuego.rmi.ServerCluster$ClientRequest$1.put(ServerCluster.java:556)
         at fuego.component.ExecutionThread.sendResult(ExecutionThread.java:532)
         at fuego.component.ExecutionThreadContext.doClientInvoke(ExecutionThreadContext.java:695)
         at fuego.component.ClientRemoteComponent.doInvocation(ClientRemoteComponent.java:303)
         at fuego.component.ClientRemoteComponent.invokeRelayTo(ClientRemoteComponent.java:211)
         at fuego.component.ExecutionRelayedThrowable.execute(ExecutionRelayedThrowable.java:109)
         at fuego.server.execution.TaskExecution.handleExecutionRelayedThrowable(TaskExecution.java:816)
         at fuego.server.execution.TaskExecution.handleComponentExecutionException(TaskExecution.java:767)
         at fuego.server.execution.TaskExecution.executeCIL(TaskExecution.java:516)
         at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:697)
         at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:657)
         at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:154)
         at fuego.server.execution.microactivity.InteractiveMicroActivity.executeNormalCil(InteractiveMicroActivity.java:501)
         at fuego.server.execution.microactivity.InteractiveMicroActivity.executeItem(InteractiveMicroActivity.java:454)
         at fuego.server.execution.microactivity.InteractiveMicroActivity.execute(InteractiveMicroActivity.java:104)
         at fuego.server.AbstractProcessBean$48.execute(AbstractProcessBean.java:3184)
         at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
         at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
         at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
         at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
         at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66)
         at fuego.server.AbstractProcessBean.runTask(AbstractProcessBean.java:3188)
         at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
         at fuego.lang.JavaObject.invoke(JavaObject.java:227)
         at fuego.component.Message.process(Message.java:585)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:780)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:755)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
         at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:244)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:839)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
    Process exited with exit code 0.

  • Download Flex hero SDK ASDOCS

    Hi,
    Where can I download the asdocs? The SDk contains a small directory asdocs with a build.xml. I tried to build it, but get: 4.5.0\asdoc\build.xml:47: FLEX_HOME must be set to use the Flex Ant Tasks
    (I have set FLEX_HOME)
    The online help is no longer available: http://help.adobe.com/en_US/Flex/4.5/UsingFlashBuilder/AH_HOME.html
    Thanks,
    ropoboy

    The actual answer is to go to the main Developer Documentation page (http://opensource.adobe.com/wiki/display/flexsdk/Developer+Documentation), ignore the Flex Hero content and that there is no reference to Flex 4.5, click the 'General Flex 4 Documentation' link under 'Flex 4', this will take you to Flex 4.5 documentation, where you will find a link to the 'Full Documentation Set (zip)'.
    However the ASDoc documentation that is included here is partially broken. The "Show packages and classes list" link at the top doesn't work in Google Chrome on Mac. It does work in Firefox and Safari on Mac.
    It would be nice if Adobe could:
    1. Update their main Developer Documentation page so that Flex 4.5 content can be found under a link to Flex 4.5 content rather then have it be buried under Flex 4. Similarily it would be nice if Flex 4 content could be found under the link to Flex 4 content.
    2. Consider fixing the ASDoc that is included in the full documentation set for Flex 4.5 so it works in Chrome.

  • Flex Hero - Links in HTML component does not works.

    WebView-app.xml
    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <application xmlns="http://ns.adobe.com/air/application/2.5">
    WebView.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx">
    <mx:HTML location="http://google.com/" />
    </s:WindowedApplication>
    I can see google homepage in my test desktop application.
    But all links are not work in html document.
    Flex 4.0 and 4.1 SDK works well. Only Flex Hero has this problem.
    How can I fix it?
    Thanks.

    Hi Kevin,
    I had the same problem. This 4.5 build from 11/30/2010 fixed the HTML component issue.
    http://opensource.adobe.com/wiki/display/flexsdk/download?build=4.5.0.18623&pkgtype=1

  • Flash to Android = Flex Hero?

    Flex Hero, is that Actionscript to native Android code???
    Or is it just apps on adobe air on top of Android OS example user would need to have adobe air on their android phones to use your apps, or can they use your apps without installing air???

    WOW, that'd be really nice...
    I tried developing for android using eclipse and the android sdk etc..
    1. it took forever to setup...them opensource type stuff isn't meant to be easy...wish they would make a setup.exe or something.  It's like copy this here, change this file and then spend hours figuring out they missed a step in their instructions.  And the instructions were from google themselves.
    2. Then there was the idea of having to learn java...*sigh*
    Eclipse and Android development setting up process and development is bunk compared to visual studio and windows 7 phone development.  Visual studio development for windows 7 phone is like WOW.  Easy setup, and really nice work flow.  The emulator is much faster as well, anyhow too bad no one uses windows 7 phones though.
    If that's the direction that ADOBE is going with Flex, that's great...flex builder enviroment and work flow using action script creating native android apps would be like WOW!

  • Push Notifications in Flex Hero

    Is Push Notifications feature available in Flex Hero?

    Current coming corona, appcelerator ... To support such a manner that already. In fact, if this thing would not you support flash cs5 came in last year when I do not think we have differences. Just bumping UI components in flex, except that the
    Team I would like a little hurry.

  • Xoom Development With Flex Hero / FB Burrito

    Hello:
    I have been developing an app for Xoom using the Java SDK. We would like to use Flash so the app is more protable. I just got the Burrito beta with Flex Hero and since Xoom doesn't support flash yet there isn't much I can do except back end coding.
    Will there be an emulator for Xoom?
    Does developing using Flash create an APK that you can publish to the market? Obviously they'd need to update their device to support flash ...
    I am at a cross road, continue with Java or switch to Flash. I need some advice!
    Thanks.

    Hi,
    There's a difference between an app running on Android with the AIR runtime,
    vs a Flash web app running in the browser. Currently Xoom supports the AIR
    runtime, so you can create apps with AIR for Android and deploy them to the
    device now, without needing the Flash Player in the browser. By March 18,
    the Flash Player for the browser will be available to the Xoom. Flash Player
    in the browser is separate from the AIR runtime.
    When creating apps with Flash or Flex using the AIR for Android deployment
    option (currently in FB Burrito or Flash CS5 latest update) you can create a
    .apk file that can be installed onto any Android device that supports AIR:
    http://www.adobe.com/flashplatform/certified_devices/
    iBrent

  • XaResource.prepare Method Error

    When we execute the xaresource.prepare(); throws an exception of:
    RuntimeException in method: public abstract void transaction.bean.TransactionManager.insert(common.valueObject.VOInsert,java.lang.String) throws java.lang.Exception,java.rmi.RemoteException:
    java.lang.NullPointerException
         at org.postgresql.util.Base64.encodeBytes(Base64.java:306)
         at org.postgresql.xa.RecoveredXid.xidToString(RecoveredXid.java:51)
         at org.postgresql.xa.PGXAConnection.rollback(PGXAConnection.java:287)
    this is the code:
    private boolean canBeCommited(Vector<XAResource> resources, Xid xid, int actualResource ) throws Exception
              try {
                   System.out.println("resources.get(actualResource) -> " + resources.get(actualResource));
                   System.out.println("xid -> " + xid);
                   int ret = resources.get(actualResource).prepare(xid);
                   if(ret == XAResource.XA_OK)
                        if (actualResource==0)
                             return true;
                        else
                             return canBeCommited(resources,xid,actualResource-1);
                   else
                        return false;
              catch (XAException e) {
                   // TODO Auto-generated catch block
                   //e.printStackTrace();
                   throw e;
         }

    You may need to recompile your class with jar(s) from 11g.
    If you have problems to make it running, take a sample component containing a serviceHandler from HowTo Components 11g and just adjust it to your needs. The link to components: http://bexhuff.com/2011/03/howto-component-samples-for-oracle-ucm-11g

  • Flex Hero (: release that dared to pretend that it was real :)

    I have installed the Hero sdk 4.5.0.19786 (from 03/Feb) and yet in Flash Builder 4 (not the Buritto but straight 4) there are no style options when working with the Form control and as such, all I get is side labels and I need the vertical ones.
    Please tell me that it is me who is stupid and doing something wrong and that Adobe is not being themselves their usual stupid and forcing a Flash Builder upgrade just to work with this so called "HERO" - the release that dared to pretend that it was real.

    Stupid, no. Lazy, maybe. Try taking a look at the at the StackedFormSkin, StackedFormHeadingSkin, and StackFormItemSkin. Here is an example that might help: http://blog.flexexamples.com/2010/08/30/creating-a-stacked-spark-form-container-in-flex-he ro/

  • Release Notes Flex Hero 4.5.0.19786

    Are there any release notes on what has been fixed/added in this build?

    It would definitely be useful to know the changes between releases. Surely logs are kept?
    On a side note, its been kind of quiet (great understatement) with regards to official Adobe commentary on Hero since the Oct. preview release was revealed.  It would be good to hear something from the Flex team.

  • Flex Hero and Mx Charts

    I have a requirement to use mx.charts in my mobile application, as suggested in the below article
    http://www.adobe.com/devnet/flex/articles/mobile_development_hero_burrito.html#articlecont entAdobe_numberedheader_3g
    I have added the datavisualization.swc and mx.swc into the library path , but am still not able to refrence any charts. Am not sure if i need to change the namespace or something.
    If anyone has created a mobile application using Hero and mx.charts please let me know what i need to do to solve this ..
    Thanks in advance.

    I have managed to get mx charts to compile and deploy in Burrito Mobile Applications by creating custom name spaces, for example:
                 xmlns:charts="mx.charts.*"
                 xmlns:series="mx.charts.series.*"
                 xmlns:chartClasses="mx.charts.chartClasses.*"
    Then referencing these in the charts:
                                    <chartClasses:CartesianChart....
    I have included datavisualization.swc, mx.swc and sparkskins.swc in my path.

  • Flash call the method of flex application

    In a flex application I use the SWFLoader to load a flash,the code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" fontSize="12">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    public function testResult():void{
            Alert.show("Hello World");
    ]]>
    </mx:Script>
    <mx:SWFLoader id="flash" source="flash/test3.swf"/>
    </mx:Application>
    There's a button in the embeded flash(flash/test3.swf),
    when I click this button,how to call the the testResult method of the flex application?Thank you!

    Hi,
    You can make use of complete event of SwfLoader and within that function get the instance of Flash Buttonm and register an evnet for the click within the Flex app as shown below:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" fontSize="12">
        <mx:Script>
        <![CDATA[
        import mx.controls.Alert;
        private var loadedSWFMainTimeline:*;
        public function testResult(event:MouseEvent):void{
             Alert.show("Hello World");
        public function onSWFLoadComplete():void {
             //loadedSWFMainTimeline gets you a reference to the Flash SWF MainTimeline
             loadedSWFMainTimeline = flash.content;
             if(loadedSWFMainTimeline)
                var _button:SimpleButton = loadedSWFMainTimeline.flash_button_instance as SimpleButton;
                _button.addEventListener(MouseEvent.CLICK,testResult);       
        ]]>
        </mx:Script>
    <mx:SWFLoader id="flash" source="flash/test3.swf" complete="onSWFLoadComplete();"/>
    </mx:Application>
    Note: In the above code "flash_button_instance" is the instance name of the Flash button.
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

  • Problem calling AS3 class's methods from Flex Project

    Sorry if this is a stupid question, but after 2 days of Web
    searching and 2 books give up; I am a Java and c# programmer and am
    having problems calling AS3 classes (in packages) from Flex Builder
    2 Flex Projects; the AS3 classes work great as Flex Builder "AS3
    Projects", but when I try to use the classes in a Flex Builder
    "Flex Project" I am able to see and set their properties, but
    cannot see (through "code completion") their methods (unless the
    class extends another AS3 class; and in that case I can see the
    base class's methods). Here is the code:
    AS3 Example Class:
    package asText {
    public class CheckWord {
    public var strData:String;
    public var strAProperty:String;
    public var intAProperty:int;
    // Constructor
    public function CheckWord() {
    public function TestMethod():void {
    trace("test...");
    public function WordLength():int {
    var intLength:int = 0;
    trace(strData);
    intLength = strData.length;
    return intLength;
    } // From Method WordLength
    } // From Class CheckWord
    } // From Package asText
    The MXML code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    width="442" height="488" horizontalAlign="center"
    verticalAlign="middle"
    backgroundGradientColors="[#c0c0c0, #c0c0c0]"
    xmlns:asTheText="asText.*"
    >
    <asTheText:CheckWord strData="Test words" />
    <mx:Panel title="Welcome to ........" width="337"
    height="393" horizontalAlign="center" verticalAlign="middle"
    layout="absolute" y="15" x="50">
    <mx:Text text="First Name" enabled="true" width="68"
    fontWeight="bold" x="27.25" y="36"/>
    <mx:TextInput id="txtFName" x="112.25" y="34"/>
    <mx:Text text="Last Name" enabled="true" width="68"
    fontWeight="bold" x="27.25" y="66"/>
    <mx:TextInput x="112.25" y="64" id="txtLName"/>
    <mx:Text text="email address" enabled="true" width="87"
    fontWeight="bold" x="17.25" y="96"/>
    <mx:TextInput width="189" id="txtEmail" left="112.25"
    top="94"/>
    <mx:Button id="butSubmit" label="Submit" x="95" y="194"
    click="asTheText:TestMethod();"/>
    ..............and so on ............
    All this does is give me an 1180 error:
    1180: Call to a possibly undefined method TestMethod.
    flexConveyMovie1.mxml

    Thanks, I have it working; I was not assigning an "ID" to the
    "MXML use of the class" (whatever the formal name for that is;
    like: <asTheText:CheckWord id="MyText" strData="The Data" />
    ) and then I was not referencing that ID in what I am refering to
    as calling methods for the Class; like:
    <mx:Button id="butTest" label="Test Function" x="39"
    y="208" click="MyText.TestMethod();"/>
    Also, I did some tests on this, and I am shocked that
    apparently neither of these two "uses"(?) of a custom AS3 class
    actually "call" the Class's constructor. Does that make sense or is
    that the result of how I am structuring this?
    Phil

Maybe you are looking for

  • How do I change the default "open with" application for certain files??  I've tried EVERYTHING!!

    Hi guys! PLEASE PLEASE PLEASE someone help me!!!  I have been trying for ages to change this!!  It is SO frustrating!!  I recently bought a new MacBook Pro 13" after my old one (2009) got stolen.  Went from Snow Leopard to 10.8.2, restored all my app

  • Blinking Cursor in Table Cell

    Can anybody tell me how I can blink the Cursor in the JTable. I am using JTable Cell as the user input field, I want to show a blinking cursor if user selects that cell. Thanks in adv

  • File Name Length

    Hi All, While down loading .csv file, i can get my file name length dynamicallly upto 157 bytes but not getting more than that. I have a requirement to download very long file name. Can any one please suggest me a good solution?. My code is response.

  • [SOLVED] ASUS F3JC - no sound in headphones

    Hi, I successfully solved problem with no sound at all (http://bbs.archlinux.org/viewtopic.php?id=31960), but still have no sound in my headphones. When I plug them in, laptop speakers get muted, but headphones play no sound. I'm using KMix to contro

  • How do I see my credit history?

    I see my overall balance, as well as my purchase history (ie, the debits to my account), but can't find a way to see my overall account history (which would include credits of gift cards to my account).  Thanks.  mm