Control the output is not the correct value

Hello

I have a producer consumer with a queue architecture to pass values. I want to push a new value in the table by using "Insert table" when a button is pressed, but when I do the previous value is read the first time and the correct value on the second press.

I am self-taught and this is my first time using the queue so maybe something I'm not seeing/thinking about here?

Version 8 attached VI.

To see the problem, follow these steps:

1. run
2. click on "master reading.
3. change the 'value '.
4. click on "master reading.
5. click on "master reading.

Any help is appreciated especially block critical diagram.

Thank you!

It all depends on how you change the value of 'value. ' If you use the increment and decrement buttons it works as expected.

If however, you type a new value and click the button without clicking elsewhere first, it does not - and here's why:

When you type a modified value value does not appear in the code until the control loses "touch focus". The problem is that clicking the button causes the digital input to lose key focus, but only after the code responded to the mouse event.

To solve the problem put a property node in the supported mouse event to set the property KeyFocus the digital to false until the value is queued.

Mike...

Tags: NI Software

Similar Questions

  • Present do not get the correct values

    Apex 4.2

    THAT IS TO SAY 8

    Theme 21

    I just upgraded a request from 3.2 to 4.2

    A page has had a lot of text to read only the value always.

    A running a process I got this error

    So I put my items to display only and read to null

    When the page opens all values are set correctly in session state

    My process works well, but when the process terminates and then check out the session state, my articles do not receive the correct values

    I looked into debugging accept

    All ideas

    Gus

    I changed all my articles to text, but after sending, they continue to receive the false values

    Gus

  • update to column values (false) in a copy of the same table with the correct values

    Database is 10gr 2 - had a situation last night where someone changed inadvertently values of column on a couple of hundred thousand records with an incorrect value first thing in the morning and never let me know later in the day. My undo retention was not large enough to create a copy of the table as it was 7 hours comes back with a "insert in table_2 select * from table_1 to timestamp...» "query, so I restored the backup previous nights to another machine and it picked up at 07:00 (just before the hour, he made the change), created a dblink since the production database and created a copy of the table of the restored database.

    My first thought was to simply update the table of production with the correct values of the correct copy, using something like this:


    Update mnt.workorders
    Set approvalstat = (select b.approvalstat
    mnt.workorders a, mnt.workorders_copy b
    where a.workordersoi = b.workordersoi)
    where exists (select *)
    mnt.workorders a, mnt.workorders_copy b
    where a.workordersoi = b.workordersoi)

    It wasn't the exact syntax, but you get the idea, I wanted to put the incorrect values in x columns in the tables of production with the correct values of the copy of the table of the restored backup. Anyway, it was (or seem to) works, but I look at the process through OEM it was estimated 100 + hours with full table scans, so I killed him. I found myself just inserting (copy) the lines added to the production since the table copy by doing a select statement of the production table where < col_with_datestamp > is > = 07:00, truncate the table of production, then re insert the rows from now to correct the copy.

    Do a post-mortem today, I replay the scenario on the copy that I restored, trying to figure out a cleaner, a quicker way to do it, if the need arise again. I went and randomly changed some values in a column number (called "comappstat") in a copy of the table of production, and then thought that I would try the following resets the values of the correct table:

    Update (select a.comappstat, b.comappstat
    mnt.workorders a, mnt.workorders_copy b
    where a.workordersoi = b.workordersoi - this is a PK column
    and a.comappstat! = b.comappstat)
    Set b.comappstat = a.comappstat

    Although I thought that the syntax is correct, I get an "ORA-00904: 'A'. '. ' COMAPPSTAT': invalid identifier ' to run this, I was trying to guess where the syntax was wrong here, then thought that perhaps having the subquery returns a single line would be cleaner and faster anyway, so I gave up on that and instead tried this:

    Update mnt.workorders_copy
    Set comappstat = (select distinct)
    a.comappstat
    mnt.workorders a, mnt.workorders_copy b
    where a.workordersoi = b.workordersoi
    and a.comappstat! = b.comappstat)
    where a.comappstat! = b.comappstat
    and a.workordersoi = b.workordersoi

    The subquery executed on its own returns a single value 9, which is the correct value of the column in the table of the prod, and I want to replace the incorrect a '12' (I've updated the copy to change the value of the column comappstat to 12 everywhere where it was 9) However when I run the query again I get this error :

    ERROR on line 8:
    ORA-00904: "B". "" WORKORDERSOI ": invalid identifier

    First of all, I don't see why the update statement does not work (it's probably obvious, but I'm not)

    Secondly, it is the best approach for updating a column (or columns) that are incorrect, with the columns in the same table which are correct, or is there a better way?

    I would sooner update the table rather than delete or truncate then re insert, as it was a trigger for insert/update I had to disable it on the notice re and truncate the table unusable a demand so I was re insert.

    Thank you

    Hello

    First of all, after post 79, you need to know how to format your code.

    Your last request reads as follows:

    UPDATE
      mnt.workorders_copy
    SET
      comappstat =
      (
        SELECT DISTINCT
          a.comappstat
        FROM
          mnt.workorders a
        , mnt.workorders_copy b
        WHERE
          a.workordersoi    = b.workordersoi
          AND a.comappstat != b.comappstat
      )
    WHERE
      a.comappstat      != b.comappstat
      AND a.workordersoi = b.workordersoi
    

    This will not work for several reasons:
    The sub query allows you to define a and b and outside the breakets you can't refer to a or b.
    There is no link between the mnt.workorders_copy and the the update and the request of void.

    If you do this you should have something like this:

    UPDATE
      mnt.workorders     A      -- THIS IS THE TABLE YOU WANT TO UPDATE
    SET
      A.comappstat =
      (
        SELECT
          B.comappstat
        FROM
          mnt.workorders_copy B   -- THIS IS THE TABLE WITH THE CORRECT (OLD) VALUES
        WHERE
          a.workordersoi    = b.workordersoi      -- THIS MUST BE THE KEY
          AND a.comappstat != b.comappstat
      )
    WHERE
      EXISTS
      (
        SELECT
          B.comappstat
        FROM
          mnt.workorders_copy B
        WHERE
          a.workordersoi    = b.workordersoi      -- THIS MUST BE THE KEY
          AND a.comappstat != b.comappstat
      )
    

    Speed is not so good that you run the query to sub for each row in mnt.workorders
    Note it is condition in where. You need other wise, you will update the unchanged to null values.

    I wouold do it like this:

    UPDATE
      (
        SELECT
          A.workordersoi
          ,A.comappstat
          ,B.comappstat           comappstat_OLD
    
        FROM
          mnt.workorders        A      -- THIS IS THE TABLE YOU WANT TO UPDATE
          ,mnt.workorders_copy  B      -- THIS IS THE TABLE WITH THE CORRECT (OLD) VALUES
    
        WHERE
          a.workordersoi    = b.workordersoi      -- THIS MUST BE THE KEY
          AND a.comappstat != b.comappstat
      ) C
    
    SET
      C.comappstat = comappstat_OLD
    ;
    

    This way you can test the subquery first and know exectly what will be updated.
    This was not a sub query that is executed for each line preformance should be better.

    Kind regards

    Peter

  • Controlling the corrective Actions of Cloud Control 12 c

    Hi Experts

    We have corrective actions Setup on a process that is running on the host
    is there a way that we can control the corrective measure in case or maintenance...
    Example: If the host is out of service for maintenance prupose how can we stop corrective action script to start and stop sending notification of control of cloud 12 c.

    Thank you

    Published by: TechAdmin on November 12, 2012 09:32

    Power cuts can be used to disable the collections during maintenance cycles.

    http://docs.Oracle.com/CD/E24628_01/doc.121/e24473/emctl.htm#BABHFDII

  • Write-Host returns the correct value of the data store while Export-CSV does not work

    Hi team

    I use the attached script to get vcenter inventory. Everything works fine but the output to one gives CSV value like datasore ' VMware.Vim.VirtaulMachineConfigInfoDatastroreUrlPair [of] "instead of the actual data store name.

    But when I do a write-host in the end (instead of export to CSV) I can't find the name of data reflecting properly store.

    Can someone help me understand what Miss me?

    Thanks in advance.

    Olivier ONE

    The problem is that the virtual machine can have several data warehouses and the DatastoreUrl is an object, not a string.

    Try changing:

    $Report.DatastoreName = $VMview.Config.DatastoreUrl

    in:

    $Report.DatastoreName = [string]: join ('',($VMview.Config.DatastoreUrl |) Select-Object name - Expandproperty))

  • Function does not return the correct value

    Hi, I'm having a strange problem and hope someone knows how to solve this problem...

    I try to send a string to a function in another class and do return to a textfield, so I can add it to a movieclip and on the stage. I use it for several buttons. The problem is when I put that a string in it value returns a string for the previous call to the function that is not the string value that I want to use. Here's the function:

    public void replaceMCTxt (mcString:String, xPos:Number,

    yPos:Number, rolloverText:Boolean, newFontSize:uint, height: uint, width: uint = false): {TextField

    var newMCTxt:TextField = new TextField();

    newMCTxt.x = xPos;

    newMCTxt.y = yPos;

    newMCTxt.width = width;

    newMCTxt.height = Height;

    var textFormat:TextFormat = new TextFormat();

    textFormat.align = _gameModel.screenFontAlign;

    textFormat.size = newFontSize;

    textFormat.font = _gameModel.screenFont;

    textFormat.color = _gameModel.screenFontColor;

    newMCTxt.defaultTextFormat = textFormat;

    newMCTxt.text = _languageClass.getTranslation (mcString);

    newMCTxt.selectable = false;

    Return newMCTxt;

    }

    I try to call with this statement in another class:

    _moreGamesTxtField = _updateLanguageClass.

    ("MORE GAMES", _gameModel.moreGamesTxtXPos, replaceMCTxt

    _gameModel.moreGamesTxtYPos, _gameModel.moreGamesTxtWidth,

    (_gameModel.moreGamesTxtHeight, _gameModel.moreGamesTxtFontSize);

    Instead of giving me a movieclip "MORE GAMES", it gives me a 'PLAY' movieclip, which is what the previous call to the function used. I also had a similar problem in another function where he did the same thing with filtering of different buttons, so I think the problem is in the service, but I'm not programmer to know that it's good enough. If anyone has an idea please let me know. Thank you...

    Start the survey using the trace() function to see what value is passed to and returned by some _languageClass.getTranslation ().

  • Tabular form validation - save the correct values

    I use the example of the Dene of validation in the form of table. It detects errors and displays the error messages, but I lose all the values that have been entered correctly. Do I need to use a collection to save? I was looking through older posts and comment, it's that you need only one collection if you want to show the user the values that they entered incorrectly. With the logic of the Dene, she tells them what line the error and what is the initial value was.
    DECLARE
      l_error   VARCHAR2 (4000);
    BEGIN
       FOR i IN 1 .. apex_application.g_f02.COUNT
       LOOP
          IF NOT TO_DATE (apex_application.g_f05 (i), 'YYYY')
                BETWEEN   TRUNC (TO_DATE (apex_application.g_f04 (i),'YYYY'))
                     AND  TO_DATE ('2008','YYYY')     THEN
                      l_error :=   l_error
                        || '</br>'
                        || 'Row '
                        || i
                        || ': Photo Inspection Year has to be greater than Date On Map and less than 2008 for '
                        || ' Map: '
                        || apex_application.g_f02 (i)
                        || '<br> Requested date: '
                        || apex_application.g_f05 (i);
          END IF;
          IF NOT TO_DATE (apex_application.g_f04 (i), 'YYYY')
                BETWEEN   TO_DATE ('1890','YYYY')
                     AND  TO_DATE ('2008','YYYY')     THEN
                      l_error :=   l_error
                        || '</br>'
                        || 'Row '
                        || i
                        || ': Date on map has to be between 1890 and 2008 for '
                        || ' Map: '
                        || apex_application.g_f02 (i)
                        || ' <br>Requested date: '
                        || apex_application.g_f04 (i);
          END IF;
       END LOOP;
       RETURN LTRIM (l_error, '</br>');
    Thank you
    Susan

    This is a parameter in the validation - display message error location.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • date fill in the dimension with the correct values

    Hi all

    I have a 'simple' problem, but can't get it resolved! The calculations of the CDA in the cube not 'reset' at the right moment in time (they should 'reset' on the exercise, but it actually seems to happen on the normal calendar year).

    Our dimensions and cubes are MOLAP. There is a relational table that contains columns with values for both a calendar hierarchy as well as a hierarchy of exercise. This table tells the date dimension (only the tax hierarchy as MOLAP, we have just a fiscal hierarchy). The result seems correct in the data viewer.

    The cube is filled with both relational sources. A perspective provides the measurement values and CODE (distinctive signs of business) values for each dimension involved. In the case of the date dimension, it provides the code for the involved level value in which we cube (months).

    I made a very simple testcase with only 1 dimension (date) and 1 small cube. The cube uses only the dimesion of date (to load the cube on the fiscal hierarchy at the month level) and has 1 base measure that is loaded with a simple number and 1 calculated measure that calculates the value of the CDA for this basic measure. The calculated measure is added to the cube designer OWB by using the button 'generate calculated measures' and choosing the function 'Year to Date'.

    When complete the cube and using the data viewer to verify the results, CDA values don't 'reset' at the end of the year. They seem to reset at the end of the normal calendar year!
    After some tests, I have concluded that this has to do with the values I provide to fill the date dimension, but I can't figure out what should be the change, and I can't find examples anywhere.

    Someone out there a calculation for a YEAR of work in MOLAP?

    Any help much appreciated.
    Kind regards
    Ed

    Hi Ed

    It can be an inherent behavior of the time dimension in the AWs where the CDA on financial is not supported out of the box, see the OLAP thread below. Have you tried just build your simple case in AWM recreate? If you can get around using a custom expression, you should be able to define this custom OWB and still keep the design you have.

    Calculated against calendar CDA CDA tax measure

    See you soon
    David

  • Outer join is not retrieve the correct values

    Hi, I have a problem to recover some data from this query with outer join:

    SELECT count (incident_id), range_2 of
    (by selecting range_2 in apps.aaa_table),
    (Select inc.incident_id,
    XXN2B_RESOLUTION_RANGE (2, ROUND (((TO_DATE (inc. INCIDENT_ATTRIBUTE_7, «hh24:mi:ss jj/mm/yyyy»)-inc. INC_RESPONDED_BY_DATE) * 24), 2)) VARIES
    Inc. stuff
    Inc. INVENTORY_ITEM_ID,
    prom_dt. Iptv_Sumptom - S? µpt? µA
    OF cs_incidents_all_b inc.,.
    cs_incidents_all_tl tl,
    cs_sr_type_mapping m,
    fnd_responsibility RESP,
    ntt xxntt.xxntt_incidents_support,
    xxntt.xxntt_incidents ntt_inc,
    XXe.xxe_tt_promitheas_dt prom_dt,
    20th. Xxe_Cs_Int_Sla als
    WHERE inc.incident_id = tl.incident_id
    AND tl. LANGUAGE = 'EL '.
    AND inc.incident_type_id = m.incident_type_id
    AND resp.responsibility_key IN (select SV. S fnd_flex_value_sets FLEX_VALUE, FND_FLEX_VALUES SV
    where s.FLEX_VALUE_SET_NAME = 'XXNTT_RESPONSIBILITIES. '
    AND S.FLEX_VALUE_SET_ID = SV. FLEX_VALUE_SET_ID)
    AND m.responsibility_id = resp.responsibility_id
    AND resp.end_date is null
    AND inc.incident_number = ntt.incident_number (+)
    AND inc.incident_number = ntt_inc.incident_number (+)
    AND inc.incident_id = prom_dt.incident_id (+)
    AND inc.incident_number = sla. Incident_Number (+)
    - and don't like '%0:00% ' TOTAL_INACT_SLA_DURATION
    (Inc. INC_RESPONDED_BY_DATE is not null AND INCIDENT_ATTRIBUTE_7 is not null)
    ) b.
    (select * from xxntt_custom_hierarchy)
    Union
    Select eidos null null omada, null product_categiory, stuff, null, null, inv_item_descripiption, null, tautopoihsh, inv_item_id double null null symptom
    ) c
    where a.range_2 = b.ranges (+)
    and c.INV_ITEM_ID (+) = b.INVENTORY_ITEM_ID
    and c.CATEGORY_ID (+) = b.CATEGORY_ID
    and c.SYMPTOM (+) = b.IPTV_SUMPTOM
    and c.OMADA = 'A '.
    Range_2 group

    This request is composed by 3 dataset: a, b and c

    the data group is a fixed list of values (LOV): range_2 = "0-2h','2-4h','4-6h','6-8h','8-10h','10-12h','12-14h','14-16h','16-18h','18-20h".

    the dataset b retrieve a list of the incident_id and their related ranges (calculated with the XXN2B_RESOLUTION_RANGE function)

    the c dataset is just a filter on the b of dataset to retrieve only the incident_id who belong to the group "A".

    I want to reach is this: always see the full list of values 'range_2', even if I do not have incident_id with a particular range.
    That's why I put the condition: a.range_2 = b.ranges (+)

    .. .but it does not work... I don't see the incident_id which have the scope inside the LOV... instead I want to see also if there is incident_id without a range to the LOV.

    Range_2 grouping, I see:

    ! http://www.freeimagehosting.NET/uploads/d900035c11.jpg!


    Instead of

    ! http://www.freeimagehosting.NET/uploads/99a75dfca4.jpg!

    Can someone help me understand where is the error?

    Thanks in advance

    Alex

    Hi Alex,

    I think you need to externally join the final predicate, thus:

    ..
    and c.OMADA(+) = 'A'
    ..
    

    Concerning
    Peter

  • Availability of platforms on HQ Dashboard does not show the correct values

    Hello

    on my dashboard HQ, I have summarized the availability of all platforms, and in some moments, when the report is refreshing, he said that some platforms are not available (I got a red image). But a few minutes latter all platforms are still green, and in the platforms report that says that they are not available, there no red dot in the last 8 hours, which means that it is available all the time. Why this is happening and is there a solution for this problem? Hyperic version is 4.1.2. Sorry because of my English.

    Thank you.

    Hello

    Although I can't be sure without more information, it seems if you have a time issue between the agents and the server, the agent is overloaded or the server is overloaded and not metric treatment fast enough.

    Would you be able to share a copy of your report on the health of HQ? You can get it by going to Administration-> HQ health and then clicking on the "print" button in the center of a screen. To generate a report which will contain diagnostic information.

  • Flex Date time axis not showing the correct values

    <? XML version = "1.0" encoding = "utf-8"? >

    " < = xmlns:fx s:Application ' http://ns.Adobe.com/MXML/2009 "

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/halo" width = "700" height = "500" >

    < fx:Declarations >

    <! - Place non-visual elements (e.g., services, items of value) here - >

    < / fx:Declarations >

    < fx:Script >

    <! [CDATA]

    import mx.collections.ArrayCollection;

    [Bindable]

    public var stockDataAC:ArrayCollection = new ArrayCollection ([] collection

    {date: "2005, 7, 27 ', nearby: 41,71},.

    {date: "2005, 7: 28", narrow: 42.21},.

    {date: "2005, 3: 29", narrow: 42.11},.

    {date: "2005, 1, 1 ', nearby: 42.71},.

    {date: "2005, 10, 2", nearby: 42.99},.

    ([ {date: "2005, 9, 3 ', nearby: 44}]);

    public void myParseFunction(s:String):Date {}

    / / Get an array of strings to the last comma-separated string.

    var a: Array = s.split(",");

    / / Create the new Date object. Subtract one from the month property.

    / / The month property is zero-based in Date constructor.

    var newDate:Date = new Date(a[0],a[1]-1,a[2]);

    return Nouvelle_date;

    }

    ]]>

    < / fx:Script >

    < mx:Panel title = "Example DateTimeAxis" height = "100%" width = "100%" >

    < mx:LineChart id = "mychart" height = "100%" width = "100%".

    paddingRight = paddingLeft = "5" '5 '.

    showDataTips = "true" dataProvider = "{stockDataAC}" >

    < mx:horizontalAxis >

    < mx:DateTimeAxis dataUnits = 'days' parseFunction = "myParseFunction" / >

    < / mx:horizontalAxis >

    < mx:verticalAxis >

    < mx:LinearAxis baseAtZero = "false" / >

    < / mx:verticalAxis >

    < mx:series >

    < yField = mx:LineSeries 'close' xField = "date" displayName = "AAPL" / >

    < / mx:series >

    < / mx:LineChart >

    < / mx:Panel >

    < / s:Application >

    the code above shows opposite values from date to date axis it is to say it should show 01/05 2 / 05 / 3 / 05 4/05 but its display 10/05 09/05 08/05 07/05 on the date axis.

    Help, please.

    I saw this bug on Adobe's JIRA so nothing much you can do for now DateTimeAxis is quite bugged.

    In passing, is it me or mx:datavisu is on the low priority these days? Maybe the team working on a version of spark?

    https://bugs.Adobe.com/jira/browse/FLEXDMV-2231

  • SelectOneChoice show the correct value with switching problem

    Hello

    I use JDeveloper 11.1.1.5.0 and I have a non-trivial application of SelectOneChoice.

    Here's my usecase:

    I have to show LOV to set the State according to the connected person.

    So, I implemented attribute LOVs view that each filtered for in the light of the type of person (owner or non-owner).

    I created switcher LOV for attribute as java method in module impl invoked by EL expression adf.source.getApplicationModule () .getTaskStateLOVSwitcher (adf.object, CreatedByIdFk);

    to get connected user binded query parameter id.

    public static String getTaskStateLOVSwitcher (ViewRowImpl, String createdById, time stamp dateInsert vri) {}
    ViewObject vo = vri.getApplicationModule () .findViewObject ("TaskViewParTaskTypeIdEx1");
    String userId = getBindValue (vo, "BindProcessedByUserId") m:System.NET.SocketAddress.ToString ();
    Output string;
    If (createdById.trim () .equals (userId)) {}
    output = "LOV_TaskStateIdFkOwner";
    } else
    output = "LOV_TaskStateIdFkNotOwner";
    return output;
    }

    I've used this many fragments of jsff perspective.

    There are fragments where it works fine (but I still don't understand why the switch method is called 3 times)

    And there are fragments where it fails. When there are two lines with different LOV to show SelectOneChoice shows an incorrect value.

    I can see the newspaper that LOV switcher method is called 6 or more times and first 3 times it works with values previously selected line and next time, it runs with the current line.

    He result is SelectOneChoice sets the value of the line previously selected in the first round and goes the LOV index.

    I found in the < getViewPort > ADFc log < ControllerState > message: no port view found ID...

    Is the source of the problem and what is the solution?

    Thank you.

    After eliminating all the differences between 'good' and 'bad' fragments I found a problem in the fragments of masters who defined a real line of iterator.

    Define RangeSize = 10 (not 25) table completely setting to change this behavior in common sense.

  • What is the correct value for "simultaneous: GSM enabled.

    What is the value for the option of profile:

    ' Competitor: GSM enabled.

    Is this 'Y' or 'yes '?

    Can someone give me a link to the 11.5.10 docs that show this?

    Hi Chris,

    What is the value for the option of profile:

    ' Competitor: GSM enabled.

    Is this 'Y' or 'yes '?

    It's there for Yes and N for no..

    You can refer, please
    * [How to set the simultaneous Option profile: GSM enabled for N using AutoConfig | https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=391240.1] *.

    * [How to solve problems when the Workflow Services descend | https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=564394.1] *.

    * [Services start correctly with the active GSM | https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=391239.1] *.

    * [Troubleshooting problem Manager Start Up related to the Service Manager competitor | https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=735148.1] *.

    Thank you
    Anchorage :)

  • Unable to get the API to return the correct value

    Hello

    You can someone help me?

    I use the API below to check the amount of data received and sent by bb10 but it didn't do anything.

    QNetworkConfigurationManager: DataStatistics returns 0

    Best regards

    Jonathan

    Welcome on the support forums.

    We did some digging last week and finally found a solution.
    See
    http://supportforums.BlackBerry.com/T5/native-development/network-traffic/TD-p/2287487

  • Custom function return is not a correct value

    Hello

    I have a code to create my own function, but it gives me a warning:

    -Incompatible integer to pointer conversion assigning to ' SMUserKey *' (aka ' unsigned long *') 'int '.

    -Incompatible integer to convert pointer sending 'SMUserKey' (aka 'unsigned' long) to the type parameter ' SMUserKey *' (aka ' unsigned long *')

    When I change NSString * result = [SMUser getValueForKey:SMUsername]; to NSString * result = [SMUser getValueForKey:SMEmail];  and then run the application, it will always record "Username". Must be in place.

    This is my code .h:

    typedef NSUInteger SMUserKey;

    {NS_ENUM (SMUserKey)}

    SMUsername = 1,

    SMFirstName = 2,

    SMLastName = 3,

    SMFullName = 4,

    SMEmail = 5,

    };

    It's my ".m" code:

    -awakeFromNib (void) {}

    NSString * result = [SMUser getValueForKey:SMUsername];

    NSLog (@"THE RESULT: % @", result);

    }

    + (NSString *) getValueForKey:(SMUserKey*) myUserKey {}

    NSString * myUserKeyValue = nil;

    If ((myUserKey = 1)) {}

    myUserKeyValue = @ "Username";

    }

    If ((myUserKey = 2)) {}

    myUserKeyValue = @ "First Name";

    }

    If ((myUserKey = 3)) {}

    myUserKeyValue = @ "Last Name";

    }

    If ((myUserKey = 4)) {}

    myUserKeyValue = @ "full name";

    }

    If ((myUserKey = 5)) {}

    myUserKeyValue = @ "Email."

    }

    Return myUserKeyValue;

    }

    This is the picture showing the warnings:

    The reason why you got warnings in the case of statements is that you assign the myUserKey variable the values 1 to 5 instead to compare the variable to these values, which is what you expect to happen. The = operator assigns values. The statement myUserKey = 1 myUserKey gives the value 1. Him == operator compares two values for equality. Education myUserKey == 1 checks if myUserKey is equal to 1. Adding a supplement of equal sign on each condition in the condition statements do the warnings go away.

Maybe you are looking for

  • Problem with Hootsuite

    Hello For some reason, after updated to 42 FF, images of pbs.twing.com (profile images, user transferred images, etc.) will not display. In FF 41.0.2, no problem. Videos and other data to display very well, but these are not pbs.twing.com. Thank you!

  • WRT110 still not access web utilities without reset

    http://homecommunity.Cisco.com/T5/wireless-routers/unable-to-access-router-admin-page/m-p/293835/HIG... Existing for a long time, that IE8 lightened temporarily problem (actually only for a day or two). Router needs to be reset to display the web onl

  • change the time between each photo in movie maker vista

    I am doing a slideshow using vista movie maker. I added music and it is great. BUT I can't change the length of time between each picture and the duration of transitions. I tried tools / options / and I can change out there, but it does not apply to

  • HP ENVY 4502: New out of box want 4502 says 'the following ink cartridges need to be replaced.

    I bought a new HP ENVY 4502. I have out of the box, follow the installation instructions precisel before 4.9 step. The printer says 'Cartridge Install' with a blue under circle. I can't go any further. I turn the machine off and on again and everythi

  • 8600 desktop icon does not

    After a Windows 8.1 update, the icon on the desktop to my Office Jet 8600 has stopped working.  I uninstalled the drivers and then installed the drivers.  I've used all the avaiable trobleshooting assistants and they all claim that everything is inst