Columns incorrectly omitted when using states: AdvancedDataGridColumn, includeIn

When setting the includeIn property of any column in an AdvancedDataGridColumn array, the first column that is set to include is the only column shown, regardless of the includeIn or excludeFrom directives of the other columns.  The code below should show a datagrid with two columns, but only the first one appears.
Does anyone have any idea why?  The behavior is correct for regular DataGrid, only incorrect for AdvancedDataGrid.
<?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"xmlns:mx="
library://ns.adobe.com/flex/mx"currentState="
A">
<s:states>
<s:State name="A"/>
</s:states>
<mx:AdvancedDataGrid>
<mx:columns>
<mx:AdvancedDataGridColumn headerText="col 1" includeIn="A"/>
<mx:AdvancedDataGridColumn headerText="col 2" includeIn="A"/>
</mx:columns>
</mx:AdvancedDataGrid></s:Application>

This does not work for me, as I've added functionality to select which columns should be visible. Setting visible to false will hide the column initially, but this column will be listed in the select visible column options.
That's why I need to understand what is wrong when using includeIn/excludeFrom.

Similar Messages

  • Incorrect Results When Using an In-Line View and User Function in 10g

    My developers are complaining of incorrect Select statement results when using an in-line view along with a user defined function. Below is the statement:
    select test_f(wo1)
    from
    (SELECT a.WORK_ORDER_NBR, b.work_order_nbr wo1/*, facility_f(A.FACILITY),
    A.PLANNER, A.WO_STATUS, mil_date(A.WO_STATUS_DATE)*, A.WORK_ORDER_TYPE,
    A.WO_DESCRIPTION
    FROM TIDWOWRK A, TIDWOTSK B
    WHERE B.WORK_ORDER_NBR(+) = A.WORK_ORDER_NBR))
    where wo1 is null;
    Test_f() is a user defined function and the above query returns thousands of rows. It should return 308 rows. It is apparent that the target database is not evaluating the "where wo1 is null;" clause.
    select to_char(wo1)
    from
    (SELECT a.WORK_ORDER_NBR, b.work_order_nbr wo1/*, facility_f(A.FACILITY),
    A.PLANNER, A.WO_STATUS, mil_date(A.WO_STATUS_DATE)*, A.WORK_ORDER_TYPE,
    A.WO_DESCRIPTION
    FROM TIDWOWRK A, TIDWOTSK B
    WHERE B.WORK_ORDER_NBR(+) = A.WORK_ORDER_NBR))
    where wo1 is null;
    In the above query return 308 rows. The user function was replaced by an Oracle function. The Where clause is now evaluated correctly.
    The query is executed from an Oracle 10g R2 database and retrieves data from a 9.2.0.6 database.
    I've seen a little information on Metalink. It appears that there was some trouble in 9i, but were fixed in a 9.2.0.6 patch. I don't see any information about a 10.2.0.2 database.
    Anyone have any experiences or a successful solution. I suspect that I will need to report this to Oracle and wait for a patch.
    Thanks,
    John

    I can only think of two reasons for this behaviour:
    1) You are executing these two queries from two different users and there is some policy on the table.
    2) The function doesn't do an upper, but returns null a lot of times, even when the input is a not null value, like this:
    SQL> create table tidwowrk
      2  as
      3  select 1 id, 'A' work_order_nbr, 'DST' facility from dual union all
      4  select 2, null, 'TRN' from dual union all
      5  select 3, 'C', 'DST' from dual
      6  /
    Tabel is aangemaakt.
    SQL> create table tidwotsk
      2  as
      3  select 'A' work_order_nbr from dual union all
      4  select 'B' from dual
      5  /
    Tabel is aangemaakt.
    SQL> create or replace function test_f (a in varchar2) return varchar2
      2  is
      3  begin
      4    return case a when 'A' then null else a end;
      5  end;
      6  /
    Functie is aangemaakt.
    SQL> select count(*)
      2    from ( SELECT a.WORK_ORDER_NBR
      3                , test_f(b.work_order_nbr) wo1
      4             FROM TIDWOWRK A
      5                , TIDWOTSK B
      6            WHERE B.WORK_ORDER_NBR(+) = A.WORK_ORDER_NBR
      7              and a.facility in ('DST', 'TRN', 'SUB')
      8         )
      9   where wo1 is null
    10  /
                                  COUNT(*)
                                         3
    1 rij is geselecteerd.
    SQL> select count(*)
      2    from ( SELECT a.WORK_ORDER_NBR
      3                , to_char(b.work_order_nbr) wo1
      4             FROM TIDWOWRK A, TIDWOTSK B
      5            WHERE B.WORK_ORDER_NBR(+) = A.WORK_ORDER_NBR
      6              and a.facility in ('DST', 'TRN', 'SUB')
      7         )
      8   where wo1 is null
      9  /
                                  COUNT(*)
                                         2
    1 rij is geselecteerd.Regards,
    Rob.

  • 'duplicate column name'-Exception when using identical objects

    Hi all,
    we're currently experiencing problems when using one single object instance for two different members of a mapped class. Here is an excerpt from our ToplinkMapping.java which shows the relevant parts:
    public ClassDescriptor buildQuotationDefDescriptor() {
    RelationalDescriptor descriptor = new RelationalDescriptor();
    descriptor.descriptorIsAggregate();
    descriptor.setJavaClass(de.hvb.ha.data.QuotationDef.class);
    // Descriptor Properties.
    descriptor.setAlias("QuotationDef");
    AggregateObjectMapping commonQtyMapping = new AggregateObjectMapping();
    commonQtyMapping.setAttributeName("commonQty");
    commonQtyMapping.setReferenceClass(de.hvb.ha.data.type.VolumeDT.class);
    commonQtyMapping.setIsNullAllowed(false);
    commonQtyMapping.addFieldNameTranslation("commonQty_value->DIRECT", "value->DIRECT");
    descriptor.addMapping(commonQtyMapping);     
    AggregateObjectMapping wideningQtyMapping = new AggregateObjectMapping();
    wideningQtyMapping.setAttributeName("wideningQty");
    wideningQtyMapping.setReferenceClass(de.hvb.ha.data.type.VolumeDT.class);
    wideningQtyMapping.setIsNullAllowed(false);
    wideningQtyMapping.addFieldNameTranslation("wideningQty_value->DIRECT", "value->DIRECT");
    descriptor.addMapping(wideningQtyMapping);
    well, if we now assign one object-instance of VolumeDT to both members, i.e. like:
    VolumeDT vol = new VolumeDT();
    quotationDef.commonQty = vol;
    quotationDef.wideningQty = vol;
    we end up in the mentioned SQL-Exception, because toplink produces the following SQL-Statement:
    UPDATE T_QUOTATIONTARGET SET WIDENING_QUANTITY = 0.0, WIDENING_QUANTITY = 0.0 WHERE …
    but we've expected something like:
    UPDATE T_QUOTATIONTARGET SET COMMON_QUANTITY = 0.0, WIDENING_QUANTITY = 0.0 WHERE …
    Any idea we can prevent this behavior and still use one object-reference for both members??
    Appreciate any help!

    Thanks for the reply but unfortunately the mentioned change didn't fixed the problem. The sql-statement produced by toplink still looks like the one mentioned above. Moreover, the mentioned change couldn't be managed by the Workbench (which we use in the project to create the mappings), could it?
    We currently use TopLink Version 10.1.3.3.
    Since you've asked I post the relevant parts of the Parent-Mapping (and again its Parent), so sorry for the verbose post:
    public ClassDescriptor buildQuotationORMWrapperDescriptor() {
    RelationalDescriptor descriptor = new RelationalDescriptor();
    descriptor.setJavaClass(de.hvb.ha.server.businessobjects.techapi.instrument.toplink.quotation.QuotationORMWrapper.class);
    descriptor.addTableName("T_QUOTATION");
    descriptor.addPrimaryKeyFieldName("T_QUOTATION.SEQ_KEY");
    // Descriptor Properties.
    descriptor.useSoftCacheWeakIdentityMap();
    descriptor.setIdentityMapSize(300);
    descriptor.useRemoteSoftCacheWeakIdentityMap();
    descriptor.setRemoteIdentityMapSize(300);
    descriptor.setSequenceNumberFieldName("T_QUOTATION.SEQ_KEY");
    descriptor.setSequenceNumberName("Quotation");
    descriptor.setAlias("QuotationORMWrapper");     
    // Query Manager.
    descriptor.getQueryManager().checkCacheForDoesExist();
    OneToManyMapping quotationDefsMapping = new OneToManyMapping();
    quotationDefsMapping.setAttributeName("quotationDefs");
    quotationDefsMapping.setReferenceClass(de.hvb.ha.server.businessobjects.techapi.instrument.toplink.quotation.QuotationDefORMWrapper.class);
    quotationDefsMapping.dontUseIndirection();
    quotationDefsMapping.privateOwnedRelationship();
    quotationDefsMapping.useCollectionClass(java.util.ArrayList.class);
    quotationDefsMapping.addAscendingOrdering("orderBy");
    quotationDefsMapping.addTargetForeignKeyFieldName("T_QUOTATIONTARGET.SEQ_KEY", "T_QUOTATION.SEQ_KEY");
    descriptor.addMapping(quotationDefsMapping);
    and now the parent of QuotationORMWrapper:
    public ClassDescriptor buildPersistentInstrumentDescriptor() {
    RelationalDescriptor descriptor = new RelationalDescriptor();
    descriptor.setJavaClass(de.hvb.ha.server.businessobjects.techapi.instrument.toplink.PersistentInstrument.class);
    descriptor.addTableName("T_INSTRUMENT");
    descriptor.addPrimaryKeyFieldName("T_INSTRUMENT.INSTR_ID");
    descriptor.addPrimaryKeyFieldName("T_INSTRUMENT.INSTR_KEYTYPE");     
    // Descriptor Properties.
    descriptor.useSoftCacheWeakIdentityMap();
    descriptor.setIdentityMapSize(300);
    descriptor.useRemoteSoftCacheWeakIdentityMap();
    descriptor.setRemoteIdentityMapSize(300);
    descriptor.setAlias("PersistentInstrument");
    OneToOneMapping quotationMapping = new OneToOneMapping();
    quotationMapping.setAttributeName("quotation");
    quotationMapping.setReferenceClass(de.hvb.ha.server.businessobjects.techapi.instrument.toplink.quotation.QuotationORMWrapper.class);
    quotationMapping.useBasicIndirection();
    quotationMapping.privateOwnedRelationship();
    quotationMapping.addTargetForeignKeyFieldName("T_QUOTATION.INSTR_ID", "T_INSTRUMENT.INSTR_ID");
    quotationMapping.addTargetForeignKeyFieldName("T_QUOTATION.INSTR_KEYTYPE", "T_INSTRUMENT.INSTR_KEYTYPE");
    descriptor.addMapping(quotationMapping)
    I hope I don't missed any relevant parts. By the way, where could I log a bug for this issue and can it be considered a bug?
    Thanks in advance!
    Message was edited by:
    user630939

  • Incorrect indentation when using on-the-flying report generation and IF statement

    Reproduce steps:
    1. Use teststand version 4.2
    2. Turn ON on-the-fying report option.
    3. Report option -> INclude Step Results->Result Filtering Expression = Exclude Passed/Done/Skipped
    4. My simply code is
    For loop
       If something
          Do something
             If somethingmore
               Call Action and set Record Result = ON
            end if
      End IF
    End loop
    Issue:
        The test report generated for "Call Action" indents every new row. Because it is a long test, this make the test report very difficult to read. If there is a very long test, the test report is  become unreadable.
    Is there a solution for this issue?
    Thanks

    Hi Biet,
    Unfortunately this is a known issue with TestStand, which is documented in the TestStand 4.2.x Known Issues. This occurs in situations where you are using HTML reports with On-The-Fly Reporting and a Result Filtering Expression. To avoid this situation, you can do one of a few things:
    Use a different report format
    Turn off On-The-Fly Reporting
    Not filter the results
    If you must filter results, you can modify the process model slightly to improve the situation. Though this is not a complete workaround, it can help.
    First, configue your Report Options so that you are reporting All
    Results, rather than filtering. Leave On the Fly reporting ON. Next, we
    need to make a modification to your process model. In the process model,
    open the ProcessModelPostResultListEntry sequence. In this sequence,
    select the Process Step Result step, and select the Properties tab. On
    that tab, select the Preconditions category. The text for the
    precondition should be the following by default:
    !Runstate.Root.Locals.ReportOptions.DisableReportGeneration &&
    Runstate.Root.Locals.ReportOptions.UseOnTheFlyReporting
    Now, we want to modify this to be as follows:
    !Runstate.Root.Locals.ReportOptions.DisableReportGeneration &&
    Runstate.Root.Locals.ReportOptions.UseOnTheFlyReporting &&
    Parameters.Result.Status != "Passed" &&
    Parameters.Result.Status != "Done" &&
    Parameters.Result.Status != "Skipped"
    This
    new precondition essentially implements our own filtering. In the
    condition that I have supplied, we will not add entries to the report
    where the status is "Passed", "Done", or "Skipped". (You can add
    additional lines to add additional statuses to filter.) The limitation
    here is that the bug provides incorrect indentation, so the results may still be grouped slightly differently than they would be without the bug.
    I hope this helps!
    John M
    National Instruments
    Applications Engineer

  • Pivot table total on a computed column not showing when using a filter

    I have this strange issue. I will try to explain.
    I have three columns in my report - Delivered Qty, Opened Quantity, and the third one is computed that is (Delivered Qty - Opened Qty). The data is displayed in a table by quarter. So basically I have Quarter, Delivered Qty, Open Qty, Not Opened Qty. I also have the total row. A pie chart shows the opened vs. un-opened quantities. It all works fine.
    The issue is when I add a prompt and the corresponding filter, the total for the computed field is blank. This happens whether it is pivot table or a regular table. That causes the pie chart to show 100% for the Opened qty.
    When I remove the filter, it works again. I can see the total for the computed field and the pie chart looks great.
    Can anyone please help me? I have a number of hours trying to play around with this and also looked in the forum to see if any one might have already discussed similar issue in the past. I could not find any.
    Thanks.

    I found the issue with my table total not showing up. Basically the new materialized view had its own data table alias. However, in the filter I was using date columns from different date table alias (copy and paste problem). As soon as I changed to the right date columns from the associated alias table, the row total showed up.
    Thanks anyways for your support.

  • Audit columns not updated when update statement is invoked

    I am trying to perform DML operation using "Process Row" process.
    I have provided the default values for audit columns in the default section of the page item attributes.
    When I insert, the record is inserted with proper default values.
    The problem arises when I try to update the record. For e.g. the last_update_date is not update with the current timestamp. I tried using "After Submit -Computation". But the column is not updated with the current timestamp value.
    I do not want to use database triggers.

    I am trying to perform DML operation using "Process Row" process.I have provided the default values for audit columns in the default section of the page item attributes.
    When I insert, the record is inserted with proper default values.
    The problem arises when I try to update the record. For e.g. the last_update_date is not update with the current timestamp. I tried using "After Submit -Computation". But the column is not updated with the current timestamp value.>
    What is the datatype of Last_update_date, DATE or TIMESTAMP or some variant of TIMESTAMP ?
    Post your code and describe your computation point and conditions on it.
    >
    I do not want to use database triggers.>
    I really wonder why you do not want to use the better approach. Don't elaborate, I don't want to hear it.
    Cheers,

  • Finder Column View Broken when using NAME

    Hi fellow Apple nerds,
    I have found a rather frustrating problem in OSX 10.8 Finder.
    When I use column view in finder I want to have my columns orgainised so I can see the whole name of the files and folders in each column.
    Now this is the problem, when I "arrange" by "kind" the column contents is split into its various kinds of files.  THe problem is if I double click on the column to rezice it, it will only resize to the contents in the first type of files.
    Read it carefully, its a little hard to explain but you can try it for yourself.  You cannot get the column to show the whole file names of the other types of files until you return to the "name" arrange view.
    I find this very frustrating as I like to have my file sorted into the types and also display the full file names.

    I just discovered it only happens with files
    on Windows network shares, so I guess it must be
    something to do with that.
    Ah, that makes sense. Finder is reading the metadata entries, no problem on the Mac, but they might not even exist on the Windows server. And even they are part of the file, as may be the case with, for instance, EXIF data from the camera and/or Photoshop, the pieces of the Spotlight process that Finder uses isn't reading them on the network share. Spotlight doesn't work well over a network.
    Since I don't use networking, I suggest you try posting your request in the Network forum:
    http://discussions.apple.com/forum.jspa?forumID=733
    Someone there might have a work-around or other suggestion.
    Francine
    Francine
    Schwieder

  • Tabular form default column value bug when using named notation?

    Hi,
    I am using Application Express 4.0.2.00.07
    After exporting and importing an application, the default value of a tabular form column results in an "ORA-00907: missing right parenthesis" error.
    My original application uses named notation while calling my function (no problem here):
    Report Attributes > Column Attributes > Tabular Form Attributes > Default type = PL/SQL Expression or Function > Default = pkg_customers.some_funtion (*in_param =>* :P15_FK_CUSTOMER_ID).
    When I change this in my imported application to ... > Default = pkg_customers.some_funtion (:P15_FK_CUSTOMER_ID) everything works fine again.
    Is this a known bug or is there something I do not see?
    Regards,
    Frederik Van de Velde.

    yes it is
    p_column_default=> 'calpa_pkg_klanten.fun_sm_betreft_default (in_pk_klant_id => :P9_FK_KLANT_ID)',
    p_column_default_type=> 'FUNCTION',
    by default it is set exactly the same, but when running the page the tabular form does not render because of the usage of " =>".
    thx

  • VPRS incorrect cost when using Split Valuation

    Hello,
    We are using split valuation thus each valuation type has a separate moving average price. When creating a  billing doc, my pricing procedure is called which includes VPRS. The problem is the cost returned is not for the correct valuation type which is passed in the billing document (Field BWTAR). The cost returned in pricing is the moving average without any valuation type. Does anyone know of any configuration to calculate VPRS based on the batch/valuation type provided in the billing document?
    My pricing procedure includes condition VPRS which is set to SUTOT = B, Reqt = 4 and statistical. The condition type is set to defaults (Cond Class = B, Calculation Type = C, Condition Category = G).  The article master has field Price Control set to V and split valuation is enabled.
    The billing document type being used is FP (POS Interface)
    The item category is DLN
    Any help would be greatly appreciated.
    Thanks,
    Pierre

    Hello Pierre
    I am not totally knowledgeable on this subject but want to give my best shot.
    I think you need to ensure that the system takes (redetermines)  the cost from Valuation segment in the material master.
    1) So make the cond category a T (Moving price). Don't change VPRS but copy it and set up ZPRS and then use it in the pricing procedure as an alternative to VPRS.
    2) You may also  need to work on the copy control- Item cat level-  especially Pricing Rules- Probably you need to set up a custom one which says 'keep manual prices as they are, but redetermine cost". Then you need to set up USEREXIT_PRICING_RULE  from Program RV61AFZA to make this work.  . Use OSS note 24832 to set up your new pricing rule.
    3) Also check out 'Price Source' field- in copy control again-  to see if it helps you achieve your objective.
    Also about VPRS, OSS note 547570 says  "If the condition control (KSTEU) is set to 'H', the cost was taken from the goods issue. If it set to 'A', it was redetermined from the valuation segment of the material master, in case of 'D' or 'E' it was copied from the preceding document:.  But I don't know how you can  use this information.
    Go through these OSS notes and those mentioned within for a good idea of VPRS.
    372772 - How does the system determine the cost?
    547570 - FAQ: VPRS in pricing
    24832 - Pricing rules / TVCPF
    371844 - Correction of incorrect costs
    372760 - Several problems with VPRS
    Hope this helps, Let me know.

  • Extra column names selected when using the 'popup describe' for selecting columns

    Hi,
    In SQL Developer 3.2.20.09, if you use the popup describe function on a table and individually select some columns using Ctrl + click (not shift click which would select a range of columns), and then drag them to the SQL worksheet so the column names come across, it will include all columns between the individual columns that were  selected.
    For example if I choose column 1 and 5, it will include columns 1,2,3,4,5 when I drag them across.
    Simple to reproduce on any table, just open the SQL worksheet, type the name of a table, open the popup describe and select some columns.
    regards,
    Steve

    This isn't happening in v4 EA2 so it appears to be fixed.

  • Table Column Ordering Matters when using Forms6i

    Just an FYI on something strange that we encountered...
    We have a Forms application that calls a function within a Package stored in the database. The only parameter to the function is a PL/SQL record that is based on the columns of a table. Our users need to run the application against 2 different database instances. We receve an "ORA-04062: Signature of Package has changed" error message when running the Form against the database that we DID NOT compile the form against. The reason is because the column ordering of the table that the record is based upon is different between the 2 databases.
    Here are the details:
    Setup:
         2 different databases. ( devDB and prdDB )
         1 table:
              On devDB:
                   create table test_file (file_id NUMBER,
    description VARCHAR2(256)
              Same table on prdDB but with different column ordering:
                   create table test_file (description VARCHAR2(256),
    file_id NUMBER
         1 database package in both databases:
    CREATE OR REPLACE PACKAGE PS_TEST AS
         SUBTYPE tr_file IS TEST_FILE%ROWTYPE;
         FUNCTION Create_File( r_file     tr_file ) RETURN NUMBER;
    END PS_TEST;
         1 Oracle Form that fills the tr_file record with data and calls PS_TEST.Create_File passing in the tr_file record.
    Results:
         If the above Form is compiled on the database devDB, trying to run the Forms Executable against prdDB will generate an error message stating: ORA-04062: Signature of Package has changed. If the above Forms executable is run against devDB, everything works fine. The problem is that when the Oracle form is compiled it apparently captures the tr_file signature from the package, which would be something like ( file_id, description ) on devDB since it is specified as %ROWTYPE. When this compiled form is ran against the prdDB database, the package signature is different because the tr_file signature would be something like ( description, file_id ) on prdDB because of the column ordering. The error doesn't occur if you recreate the "devDB" table with the columns in the same order as "prdDB". This would only be a problem with using the %ROWTYPE with PL/SQL records.
    So it appears that column ordering does matter in some situations.
    Thanks.

    would create a cell renderer only once -- the same
    JTextPane is used to render any cell in the table that
    shares the same renderer.Thanks for the reply. It's something I'm going to look into, but I do create only one renderer, and use that one renderer to create new JTextPane subclasses when getCellRendererComponent() is called - hence, there is one renderer, but there are multiple instances of the actual rendered component.
    In the meantime, I'm just marking up the text with HTML to create the presentation I want, and it works okay. It'd be nice if I can get it working with Styles, though.
    Thanks again,
    - Chris

  • Initialisation of iinfo table when using states

    Hi, I'm running into someting weird today and I'm not sure I understand well what to do. Right now what I'm triing to do is to run my software autocoded with part of it autocoded as a UCB.
    1- When I'm running the whole software autocoded, everything is fine. Case close!!!!
    Then I try to breakup stuff!
    2- I toke part of the code and autocoded it using the UCB templates
    3- Create a small UCB in the whole code that call the autocoded done in number 2
    So in the big software, I have this call to the UCB :
        NAVFAST_DLL_7_sr.STATES = 1;
        NAVFAST_DLL_7_sr.OUTPUTS = 1;
        /* USRxx(INFO,T,U,NU,X,XDOT,NX,Y,NY,RP,IP) */
        NAVFAST_DLL(&NAVFAST_DLL_7_sr, TIME, NAVFAST_DLL_7_u, 83, &X->
                                  NAVfast_7_S1[0], &XD->NAVfast_7_S1[0], 325, NAVFAST_DLL_7_y, 62, &
                                  dummy_f[0], &dummy_i[0]);
    In the UCB (NAVFAST_DLL), I have the call of the INIT part :
        int iinfo[] = {0, INFO->INIT, INFO->STATES, INFO->OUTPUTS};
        double rinfo[] = {T, TSAMP};
        if(INFO->INIT)
            NAVfast2_ucbhook(iinfo, rinfo, U, &NU, X, XDOT ,&NX, Y, &NY, RP, IP);
            INFO->INIT = FALSE;
            return;
    After that we got the code that I have autocoded in part 2 :
        void NAVfast2_ucbhook(iinfo, rinfo, U, NU, X, XD ,NX, Y, NY, R_P, I_P)
                   int     iinfo[], I_P[], *NU, *NX, *NY;
                   double  rinfo[], R_P[], U[], X[], XD[], Y[];
           //... Struct declaration
        if( (*NU != 83) || (*NY != 62) || (*NX != 325) ) {
              iinfo[0] = UCB_ERROR; goto EXEC_ERROR;
        if( iinfo[1] == 1 ) {
          Init_Application_Data();
          if( iinfo[3] == 1 && *NX != 0 ) {
             return;
        //... Rest of the code
    So as you can see here, the first time I inter into the INIT part, the call to Init_Application_Data() and it will exit directly because the iinfo[3] (outputs flag) is equal to 1 and my number of states is different that 0. So it means that all my sub functions are not initialise! After that, I look in the documentation (SystemBuild User Guide 14-4) and found you that I need to call the INIT part twice ?!?!?
        "INIT Mode
        INIT mode is performed once at the start of a simulation. During the INIT
        mode call, the value of the IINFO(2) flag is set to 1. If the UCB reference
        has states, the UCB is called in INIT mode twice.
            • Once while executing OUTPUT mode
            • Again while executing STATE mode"
    So does it mean that I have to call the ubchook function with the iinfo[3] = 1 and iinfo[2] = 0 once and then recall this fucntion with iinfo[3] = 0 and iinfo[2] = 1 under the INIT part of the UCB ?
    Do like this :
        int iinfo[] = {0, INFO->INIT, 0, INFO->OUTPUTS};
        double rinfo[] = {T, TSAMP};
        if(INFO->INIT)
            NAVfast2_ucbhook(iinfo, rinfo, U, &NU, X, XDOT ,&NX, Y, &NY, RP, IP);
            iinfo[2] = INFO->STATES;
            iinfo[3] = 0;
            NAVfast2_ucbhook(iinfo, rinfo, U, &NU, X, XDOT ,&NX, Y, &NY, RP, IP);
            INFO->INIT = FALSE;
            return;
    Thanks
    Charles-Etienne
    NGC Aerospace

    This is an interesting observation about some of details required to implement the 'model of computation' of a SystemBuild model within the generated code.
    Before I continue, may I make a suggestion that if you intend to use procedure code outside of a complete autocode-generated system, you might want to consider using the SDK interfaces. Briefly, the SDK is a template-based solution to generate APIs (C, C++ or Ada) to properly call procedure SuperBlocks from 'other' code. It's very easy to use and implements all the necessary details. Consult your version's documentaion for more as the mechanism to activate the SDK have changed between versions but the structure of the APIs are the same.
    Now, on to the post...
    The most important detail regarding this question is the context of the generated code. In this case, you're using the UCBHOOK mechanism and trying to call that API from other code.
    The problem is that the UCBHOOK is designed to be used as "wrapper code" around an autocode procedure and the 'hook' code is intended to be linked back into the simulator as a UCB for simulation purposes. It was not intended to be a general-purpose API call, that's why we created the SDK!
    Because the UCBHOOK is designed for use with the Simulator, that code must conform to the requirements of a hand-written SystemBuild UCB. And it is in attempting to match the autocode-generated implementation with what the Simulator does results in some odd code.
    What's happening is the code is reflecting a difference in how states are initialized within the Simulator's UCB context and the generated code. Briefly, the simulator must be very generic in how it calls UCB code. The simulator makes many separate calls to a UCB to perform match distinct operations, thus the complexity of the iinfo structure.
    Now autocode generated code is not generic, it is optimized. So, in the case of a procedure, a procedure is a form of a discrete superblock with inherited timing attributes. Autocode optimize discrete superblock initialization by initializing it at the same time as the output computation at T=0.0. Therefore, for autocode discrete-based superblocks, there is only ONE init phase and it's coupled with the first OUTPUT phase.
    So, since the Simulator does not perform such optimization, the Simulator calls the UCBHOOK several times, as it is documented. This is incompatable with the autocode code, therefore there's code in the UCBHOOK (as you've hilighted) to prevent extra initialization as to match the autocode implementation.
    Like I said, the UCBHOOK is designed as a UCB that conforms to the Simulator's 'model of computation'.
    If you intend to have your 'outside' code use the ucbhook, you will have to match how the simulator calls UCBs. In the case you describe, calling the UCBHOOK multiple times for initialization is required.
    In general, I'd not recommend using the UCBHOOK called from 'outside' code, I'd prefer you use the SDK as the complexity of the simulator's calls to UCBs is not trivial.
    Regards,
    Bob Pizzi
    MATRIXx R&D - AutoCode

  • Incorrect DNS when using DHCP. DNS server is considered to be a Virus??

    Running 10.5.5. Noticed extreme slow down in resolving domains in safari, firefox. I currently use Verizon FIOS. When looking in network settings it shows a DNS server as 85.255.115.30. This is not verizon's DNS server. When I delete that server out and add the Open DNS server's address internet works great. This is not an issue on Verizon's end because any ethernet connection to any internet provider will default to using that address for DNS. Only does it over ethernet. Tried deleting the port and re adding and still comes back. No issues when booted off another drive. Mcafee says that a Trojan changes the DNS on PC's. No PC's are networked to this mac. I cannot delete this DNS server under the DNS tab in advanced settings...?

    That IP address does seem to fall within the range known to have been used by the DNS changer trojan (try searching the web for "DNS changer", puper, OSX.RSPlug.A, 1023.dmg, etc.). That very likely means that at some point, malware managed to run with "root" privileges on your system.
    Under such circumstances, it would be safest to back up all of your data and reinstall the OS and applications from known "good" media.

  • Incorrect name when using my icloud email

    I have an icloud email, when I email people it spells my name wrong.
    I have checked with my apple ID and my name is spelt correctly.

    To change your sender name on an iOS device, go to Settings>Mail,Contacts,Calendars...tap iCloud under Accounts, tap your iCloud account at the top of the next screen, tap Mail at the bottom of the next screen, then enter the name you want to use in the Name field at the top.

  • Smart Folder in Finder displays incorrect list when using "File label" option.

    Hello.
    I created a Smart Folder in Finder, to display all files that have any color (label).
    But have a problem just with one file, and although it has no Label, it keeps displaying that file.
    Just to let you know:
    1) File is not in Trash or hidden.
    2) Checked several times the "information" of the file. Assign any color, then removed it.
    3) File is synched with Dropbox v2.0.5
    4) File is a Microsoft Excel and been working with it for a while with Office for Mac.
    OS X 10.8.3

    I'm having this problem, too. It with even show files with other color tags when filtering by another color. I tried changing the file color then changing it back to blank and it disappears temporarily, but if you view another folder and then come back the file pops back.

Maybe you are looking for

  • Cannot get 5.1 Surround Sound with optic fiber cable (Mini Toslink)

    I have a Macbook Pro (Early 2011 Model) and after spending lot of time I figured out that the best way to get 5.1 surround sound output is to connect the MBP to the AV Receiver with the optic fiber cable (Via Mini Toslink Adapter). So after reading a

  • Printer all in one hp 7210xi desk jet

    How to print wireless.

  • Why is the cloud giving me edited versions of my songs?

    I have a great collection of music that contains explicit lyrics and had them all go to the cloud.  In just attempted to listen to 2Pac's All Eyez On Me, within the first few lines I noticed that I now had the edited for content version.  There is no

  • How much time does CATPATCH.sql take

    Hi, Iam upgrading my db from 9.2.0.1 to 9.2.0.4 . Its been 2 hrs since the catpatch.sql script is runnig. When i queried dba_registry it is showing status as loading for packege & body. Can any tell me how much does this script takes. Thanks in advan

  • Connecting itouch to new mac

    I've been searching for a document in support that describes what to do when changing itouch connection from PC to imac. I've moved my music over already to the imac but will I lose my contacts or can they be uploaded to the imac? What steps do I fol