Update picker data in mainViewController

Hi,
In my app, the mainViewControl uses a UIPickerView. The UIPicker view is populated by a NSMutableArray. The mainVV lets the user make a choice of selecting an Item in the picker. Based on the choice, the actions in the mainVC are Add/Delete/Update. The mainViewController calls the appropriate add/delete/update method in the Item class, that manipulates the SQLite database underneath (thru ManageDB class).
mainVC ------------------> Item --------------- --> ManageDB
|
+---> Picker (array) <---populated by [Item populate] method;
|
+---add/delete/update : [Item methods] change the database using [ManageDB methods]
|
+---need to update Picker
I am not sure of the timing of the events : I see that the control returns to mainVC from the methods in Item class before the methods in ManageDB (called from Item class) have finished - therefore, I cannot update the picker contents.
How can the mainVC know when the methods in ManageDB have finished? If I can know that, the repopulation (by re-reading the DB) will be easy.
Thx - Sam.

I added code to use NSNotification class. I added the observer in the mainVC and used postNotification in the Item class. But then I got the following:
[Session started at 2010-10-23 23:30:27 -0700.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1469) (Wed May 5 04:36:56 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 12571.
Pending breakpoint 8 - ""ManageDB.m":108" resolved
Pending breakpoint 9 - "objcexceptionthrow" resolved
Pending breakpoint 10 - "*0x0256a5be" resolved
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Not safe to call dlopen at this time.)
The code is as following:
mainVC.m:
- (void)viewDidLoad {
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(receiveNotification:)
name:@"addItemFinished"
object:nil];
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self
name:@"addItemFinished"
object:nil];
Item.m:
- (void)addItem {
[[NSNotificationCenter defaultCenter] postNotification:
[NSNotification notificationWithName:@"addItemFinished" object:self]];
PS: If I comment out the NSNotification related code, the error is not generated.

Similar Messages

  • Update Picking date, Loading date, Planned GI date etc on outbound delivery

    Hi All,
    I'm a bit stuck.  I'm trying to perform some updates against outbound delivery documents, at the header level, from within a user exit of a shipment document.
    Essentially, based on some logic and data on the shipment I need to apply some changes to the header dates on LIKP for the deliveries attached to the shipment.  I've looked at BAPI_OUTB_DELIVERY_CHANGE but this does not allow me to change the fields I need to.
    So, does anyone know how I can update the following fields on LIKP:-
    Picking date - LIKP-KODAT
    Picking time - LIKP-KOUHR
    Loading date - LIKP-LDDAT
    Loading time - LIKP-LDUHR
    Planned GI date - LIKP-WADAT
    Planned GI time - LIKP-WAUHR
    Delivery date - LIKP-LFDAT
    Delivery time - LIKP-LFUHR
    I'm not sure I can acutally do this or whether it is advisable to do so but have been asked to make it work!
    Thanks in advance,
    Gareth.

    >
    Kshamatha Eda wrote:
    > Why not pass the values in EXTENSION1 and implement BADI: SMOD_V50B0001 and pass the values in to the header in method EXIT_SAPLV50I_010 and see if it works. If i am not mistaken this should probably hit only when EXTENSION1 is populated in the BAPI.
    Hi,
    Thank you very much for the suggestion - I'll give this a try and see how I get on.  I was hoping there may be something like this but couldn't find a way of doing it and haven't really done much in this area before.
    Thanks
    Gareth.

  • How to update pick up date (VBAK-ABHOD) field in sales order

    I am creating sales orders using BAPI_SALESORDER_CREATEFROMDAT2 but it is not updating VBAK-ABHOD field i .e pick up date. Is there any FM which updates the pick up date VBAK-ABHOD also.
    I need to update pick up date for a special type of sales orders (Delivery orders) which are created in reference to schedule agreement.
    Is there any other way we can update pick up date. My last option is BDC but donot want to use it.
    Thanks in Advance.
    Rajesh.

    Hi Rajesh,
    You can not find any field in BAPI Change Or Create for sales order even header change BADI is for SAP Modification only. The best way to code in form USEREXIT_MOVE_FIELD_TO_VBAP  in MV45AFZZ, orelse you can use CALL TRANSACTION Method.
    Please let me know if you have any issues.
    Thanks and regards,

  • Sender JDBC.....pick data from table view?

    Hi Experts,
    working on JDBC for first time, so have few questions.
    data base guys want to create a table view and we need to pick the data from table view.
    my question is can we import the structure form data view?
    if i am not able to import, so i need to create the structure same as in data base table view and is it case sensitive?
    they dont want to update the data base table view, very time the SQL query will pick all the records form data base.
    the records will be less then 10,000.
    my question is as we are not updating the table view, what we need to write in update query as it is mandatory?
    Regards,
    Chinna

    Hello,
    i hope below option help in update query
    In place of the SQL statement, you can also enter <TEST>. Once the data determined from Query SQL Statement has been successfully sent, the data in the database remains unaltered.
    This is recommended if the data has not only been read, but also changed by a stored procedure entered under Query SQL Statement.

  • Change Picking data, then call Delivery Note and Invoice in the background

    I have designed a GUI where the picking data (from table LIPS) is changed.  Now my SD consultant wants the program, when a SAVE or CONTINUE button is clicked, to do the Delivery Note and Invoice in the background.
    To quote:
    Your progrm must change the values in the delivery in txn VL02n, when the delivery is saved it updates LIKP and LIPS amongst othr tables. When the invoice / billing doc is created it is done with ref to the delivery. Billing doc created using txn VF01, the main tables of the billing doc are VBRK (header) and VBRP (item).  And for completion sake, tables VBAK and VBAP are the sales order tables!
    In my PAI module, how do I do the calling of these two functions?
    The consultant suggested I use a BDC. Why can't I use Call Transaction.... ?   What is the best way to do this?
    At the moment, my SAVE button updates an internal table of LIPS, and for test purposes it exits to List Processing to test if the amounts changed correctly.
    Hope someone can help.

    Hi
    Ok.
    Do you mean "Accual GI Date" in Item overview ?
    I have performed a test. When I check "Goods Issue delivery" indeed it has posting date in the past.
    Now for the invoice:
    I set
    "Billing date"
    "Serv. rendered" date
    and "Prining date" in the past.
    Would it be enough to post everything in the last month ?
    regards
    Rafal

  • Picking data directly from ALV List

    HI experts !
    I have a scenario in which the client is executing some tcodes ( Some hourly, some daily , some weekly, ome monthly ) and all the data gets displayed in alv list . The requirement is that is it possible for XI to pick that data directly from alv and update the data base?
    OR
    If the above case is not possible then the client is thinking of putting the data in a spool and then by running some program they fetch the data ?
    Guide me on this ? how to execute such scenario?
    Regards
    saras jain

    Create and outbound interface with needed datatypes and message types. Create a client proxu for this.
    Create a report, which gets all these data in to internal tables and then call the client proxy from XI. You can have whatever adapter on the receiver side..
    VJ

  • Updating driver data fail? (EXIT CODE 7)

    I keep getting this error, and I'm not sure how to trouble shoot it. I keep getting locked up at 42% on each Install. I thought that adobe automatically updates each version but just understood that there was an update July 2014 and I should pick and choose what I'd like to install.
    Anyone know how to fix this issue?
    Installation Failed
    Errors encountered during installation. (7)
    -------------------------------------- Summary --------------------------------------
    09/21/14 16:11:06:363 | [INFO] |  | OOBE | DE |  |  |  | 11608 |  - 0 fatal error(s), 1 error(s)
    09/21/14 16:11:06:363 | [INFO] |  | OOBE | DE |  |  |  | 11608 | OSX version: 10.9.4 
    09/21/14 16:11:06:363 | [INFO] |  | OOBE | DE |  |  |  | 11608 |
    09/21/14 16:11:06:364 | [INFO] |  | OOBE | DE |  |  |  | 11608 |
    09/21/14 16:11:06:364 | [INFO] |  | OOBE | DE |  |  |  | 11608 | ERROR: Updating driver data failed. Driver entry was notadded. ARP estimated size 0KB
    09/21/14 16:11:06:364 | [INFO] |  | OOBE | DE |  |  |  | 11608 |
    09/21/14 16:11:06:364 | [INFO] |  | OOBE | DE |  |  |  | 11608 | Please search the above error string(s) to find when the error occurred.
    09/21/14 16:11:06:364 | [INFO] |  | OOBE | DE |  |  |  | 11608 | These errors resulted in installer Exit Code mentioned below.
    09/21/14 16:11:06:364 | [INFO] |  | OOBE | DE |  |  |  | 11608 | -------------------------------------------------------------------------------------
    09/21/14 16:11:06:364 | [INFO] |  | OOBE | DE |  |  |  | 11608 |
    09/21/14 16:11:06:364 | [INFO] |  | OOBE | DE |  |  |  | 11608 | Exit Code: 7 - Unable to complete Silent workflow.
    09/21/14 16:11:06:388 | [INFO] |  | OOBE | DE |  |  |  | 11608 | *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
    09/21/14 16:11:06:389 | [INFO] |  | OOBE | DE |  |  |  | 11608 | END - Installer Session
    09/21/14 16:11:06:389 | [INFO] |  | OOBE | DE |  |  |  | 11608 | *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*

    Are you trying to download the software onto OneDrive?  That's what your file extension shows.  That seems like a problem right there.  Try installing lightroom to the pro 3's hardrive.  I'm not a computer wiz, so I could be wrong.   

  • Pick list release date and picked date

    Hello, I need to prepare a query where I need to select the b1 pick list release date and pick list picked date.
    Does b1 store these pick list dates somewhere in the system?
    Thanks

    I don't think that the APKL or the ADOC store the the release date. And I also have seen that the pick date is not changed after the user picked the goods and update the pick list. I keep seen the pick date in the OPKL = to the create date in the OPKL. And the update date we can't really relly on it because after picking the goods some days after the user can update for example a UDF and then save the pick list and this field is updated again...
    Any ideas?

  • How to update the data  in database in webdynpro

    I have to update the data in databse table using adaptive rfc in WebDynPro

    Hi,
    You can refer to these links:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/faq%2b-%2bmodels%2b-%2badaptive%2brfc
    Update data into SAP Table
    http://help.sap.com/saphelp_nw70/helpdata/en/41/38bc8f813719488ddc9d9b21251ec3/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/d5/1558bfa6aa80499113983e738b1b21/frameset.htm
    Regards
    Inder

  • How to Update the data in R/3 From BW

    Hi All ,
         I Need some suggestion . i want to update the data of MARC table in R/3 from BW . Here data goes from BW to R/3 . so How to do this ? . There are no standard BAPI's in BW for this .
    Thanks
    Prithvi.

    Hi,
    The scenario you are explaining is little opposite to what happens generally. Are you sure, you want to update R/3 from BW?
    If you have to update MARC table that means you have to extend the material for different plants. Try using BAPI_MATERIAL_SAVE_DATA.
    Regards,
    Ravi
    Note : Please mark all the helpful answers

  • Unable to run bapis for project status update and date update together

    Hi Experts,
    I have a requirement to update the dates and status of a project WBS at level 4. I am trying to do update the CJ02 Transaction using standard BAPI available. I need to do both Date update and status update in the same LOOP PASS   i am using the below mention bapi. when i am doing so i am getting an error Project 'A._____' has been currently processed by ID i.e. my id.
    I have tried putting  a wait for 2 seconds in the code but its still not working. please find the order below in which i am calling the bapi.
    Loop at itab.
    if  date_changed = 'X'.
          CALL FUNCTION 'BAPI_PROJECT_MAINTAIN'
          READ TABLE it_error WITH KEY message_type = c_e.
          IF sy-subrc <> 0.
    Commit
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                 EXPORTING
                      wait   = c_x
                 IMPORTING
                      return = s_ret.
       endif.
    endif.
    if Status_change = 'X'.
          CALL FUNCTION 'BAPI_PS_INITIALIZATION' .
          CALL FUNCTION 'BAPI_BUS2054_SET_STATUS'
          READ TABLE t_result WITH KEY message_type = c_e.
          IF sy-subrc NE 0.
            CALL FUNCTION 'BAPI_PS_PRECOMMIT'
                 TABLES
                      et_return = t_ret.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                 EXPORTING
                      wait   = c_x
                 IMPORTING
                      return = s_ret.
         ENDIF.
    endif.
        WAIT UP TO 4 SECONDS.
    endloop.

    Try to use
    SET UPDATE TASK LOCAL.
    before each BAPI call.
    Did you try to debug through your code, leaving sufficient time between BAPI calls? If it does work like that, then the above statement might help.

  • Updating array data in sql database

    HI,
    Im facing problems in updating array data in SQL database.
    As of now, i am able to write an "insert" query and insert array data in an image datatype field. Im using image datatype because the array size is very big(around 80,000 x and y values).
    Althoug inserting data is easy im unable to write a query to update this data.
    Referring to the help of SQL server and Labview database connectivity toolkit, i came across a method of accessing image datatype....using textpointers, which are 16 bit binary values and using the WRITETEXT function instead of the UPDATE function.
    but the problem im facing is that ive to pass the array as a 2d string array in the query as a result the updated array is retrieved in the form of a string a
    nd not as an array. how do I get over this problem?

    Hi Pavitra,
    I'm not very clear on how you have inserted the data into your application, but I do know that when you call the UPDATETEXT or WRITETEXT function you use the TEXTPOINTERS to point to the first location of a 1d array. So, depending on how you've stored the data, you may have problems updating your data if you're looking at it as a 1d array instead of how you originally formatted it. If you are able to successfully access the data as a 1d array, you can use the database variant to data type vi and pass in a string array constant for the data type. This will convert the variant datatype into whatever you specify. You may have to index the row and column of the variant (you receive a 2d array of variant) first before you convert. If possible, can yo
    u provide some more detail and maybe some example code of how you perform the insert and plan to do the update? I can probably give you a better solution if I know how you are formatting the data. Thanks!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

  • How can I activate the transfer rules for the ODS updating a data target.

    We are on BW 3.5 and I'm loading data into the 0FIGL_O10 ODS  and then uploading the data into the cube 0FIGL_C10. The data loads just fine to the ODS but when I try to <u><b>'update the data target'</b></u> I get a date & time stamp' error on the info-package transfer rules.
    I then Replicate the datasource 80FIGL_O01.
    I must then <u><b>'activate' the transfer rules</b></u>.
    However I cannot get the transfer rules for 80FIGL_O10 in CHANGE MODE to activate them.
    How can I activate the transfer rules for the ODS updating a data target.
    The error text is as follows:
    DataSource 80FIGL_O10 has to be replicated (time stamp, see long text)
    Message no. R3016
    Diagnosis
    DataSource 80FIGL_O10 does not have the same status as the source system in the Business Information Warehouse.
    The time stamp in the source system is 02/15/2007 10:42:33.
    The time stamp in the BW system is 11/07/2006 13:11:54.
    System response
    The load process has been terminated.
    <b>Procedure
    Copy the DataSource again and then activate the transfer rules that belong to it. You have to activate the transfer rules in every case, even if they are still active after the DataSource has been copied.</b>
    Thanks for your assistance.
    Denny

    Hi Dennis,
           Try, using Business Content to activate your data source
           hope this will help you
    How activate business content?
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a66d5e07211d2acb80000e829fbfe/frameset.htm

  • How to update the data in sqlserver table using procedure in biztalkserver

    Hi,
    Please can any one answer this below question
    how to update the data in sqlserver table using procedure in biztalkserver
    while am using executescalar,typedprocedure getting some warning
    Warning:The adapter failed to transmit message going to send port "SendtoSql1" with URL "mssql://nal126//MU_Stage2?". It will be retransmitted after the retry interval specified for this Send Port. Details
    Please send me asap....
    Thanks...

    Hi Messip,
    A detailed error would have helped us to answer you more appropriately but
    You can follow the post which has step by step instructions, to understand how to use Stored Procedure:
    http://tech-findings.blogspot.in/2013/07/insert-records-in-sql-server-using-wcf.html
    Maheshkumar
    S Tiwari|User
    Page|Blog|BizTalk
    2013: Inserting RawXML (Whole Incoming XML Message) in SQL database

  • Can't update the data of my credit card

    My credit card information was changed. Now I can't update this data on my account since days. Any idea, why?  the error message is 'Card is invalid, please check card details'. thanks

    Hi up1975.
    Please contact our chat support: http://helpx.adobe.com/x-productkb/policy-pricing/membership-subscription-troubleshooting- creative-cloud.html#Contact_us as they can provide you personalised experience in getting your issue fixed.
    Regards,
    Romit Sinha

Maybe you are looking for