How to reject a change via bindings - NSEditor?

I have an NSPopupButton on a view that communicates with my model class using an NSObjectController. This is used as part of a remote-control of a radio which means that not all of the options available in the popup button are valid under all circumstances. Unfortunately, it is not known until an attempt is made to set a new value whether or not the radio will accept it.
I have the code that communicates with the radio return a BOOL to say whether the value was valid and therefore accepted, or if it was rejected. If it was accepted, then that is fine. However, if it was rejected, I want to reset the previous value of the popup button.
I've seen references to the NSEditor protocol that has commitEditing and discardEditing messages.
What I want to know is, can this be used with a popup button?
If so, are there any examples showing this protocol being used? (I couldn't find any with a quick Google but I may not have been looking carefully enough).
If not, is there some way to inform the popup button that the change has not been accepted and that it is to return to the previous (or some specific) value?
Thanks
Susan

Answering my own question!
Bindings use KVC as one of their underlying technologies. I implemented a validation method for the variable which was called by KVC. IN my case I could send the message to the radio and see if it was accepted or rejected and pass this back as the validation response. If it succeeded, the KVC code then called the 'set' method which simply recorded the new setting. If the validation failed, then things were automatically reset.
Simple (and obvious) when you have the chance to stand back and think about it (rather than just reacting to a problem!!!!)
Susan

Similar Messages

  • How to reject chnages in XI

    Hi all,
    I have a problem. In the ID instead of deleting a communication channel, the Business service got deleted. But it is not activated becasue it is used in Receiver agreements.
    So, i created the service again with the same name and added the receivers in it. but still teh channels are not appearing.
    Can anyone tell me how to get back the service and the communication channels?
    How to reject the changes that i made

    Hi Lavanya,
    If you have deleted the business system and not yet activated. then for sure it will be in the change list.
    Now go to Change list ---> right click on the objects which you have deleted and click on Reject Change...
    Now your objects which you have deleted will again appear in your scenario.
    Cheers!!!
    Naveeb.

  • Since 2012 I have Photoshop Elements always worked without any problem, however now the language is suddenly German how can this be changed, removed the program and re-installed, not working. Program is downloaded and updated via the apple app store?

    Since 2012 I have Photoshop Elements always worked without any problem, however now the language is suddenly German how can this be changed, removed the program and re-installed, not working. Program is downloaded and updated via the apple app store?

    I've done some research on the SQLite database. Whenever Aperture hangs up (like during auto-stack or opening the filter hud) there are thousands of SQLite queries happening. These SQLite queries cause massive file I/O because the database is stored on the disk as 1kb pages. However, the OS is caching the database file; mine's only 12MB. I'm trying to track down some performance numbers for SQLite on osx but having trouble.
    It's starting to look like most of the speed problems are in the libraries that Aperture uses instead of the actual Aperture code. Of course, that doesn't completely let the developers off the hook since they choose to use them in the first place.
    Oh, and if anyone is curious, the database is completely open to queries using the command line sqlite3 tool. Here's the language reference http://www.sqlite.org/lang.html
    Hmm, just found this. Looks like someone else has been playing around in the db http://www.majid.info/mylos/stories/2005/12/01/apertureInternals.html
    Dual 1.8 G5   Mac OS X (10.4.3)   1GB RAM, Sony Artisan Monitor, Sony HC-1 HD Camera

  • How do I save changes to a PDF with AxAcroPDFLib.AxAcroPDF?

    I am using C# and have created a regular Windows form. I have used COM and registered AxAcroPDFLib.AxAcroPDF. Here is my code;
    axAcroPDF1.LoadFile("myfile.pdf")
    axAcroPDF1.Show();
    MessageBox.Show("Showing...");
    This works fine. But, just like the browser, I cannot save changes to the PDF. I have the full version of Adobe Acrobat installed, Standard 8.0. I also have the Pro. version 7.1.0 on another PC. When I click save I just get prompted to save it locally, just like I was in the browser.
    If I edit these normally, just via Adobe Acrobat Standard, I can save my changes. I cannot do it via the AxAcroPDFLib library.
    How do I save changes to my adobe acrobat pdf file in my program? Thank you for any help. please.

    I did this after I wrote this. I have looked at the documentation but I can't find what I am looking for. Is there another way to open a file for viewing that has the full capabilities or using the normal program...one that uses something besides AxAcroPDFLib.AxAcroPDF. The sample that did have a view used AxAcroPDFLib.AxAcroPDF so it wasn't helpful. All I need is normal program functionality of adobe standard or profession within the application. The users have a full version installed on their PC.
    Thanks again.

  • How can I see changes in table with insertrow();postchanges()without commit

    Hi friends;
    I use jdeveloper 10.1.3.1 with jheadstart 10.1.3.1.
    I create two view object.In the first page I create table with one view object.
    In the second page I create table (with tableselectmany) with other view.
    I select many rows in second page and in the managed bean,
    I insert selectted rows atributes to first pages tables attributes.
    I use this code.
    public String commandbuttonaction(){
    CoreTable table = this.getTable1();
    Set rowSet = table.getSelectionState().getKeySet();
    Iterator rowSetIter = rowSet.iterator();
    BindingContainer bindings = getBindings();
    DCIteratorBinding pr_dcib = (DCIteratorBinding)
    bindings.get("DeptIterator");
    int i=206;
    while (rowSetIter.hasNext()){
    Key key = (Key) rowSetIter.next();
    pr_dcib.setCurrentRowWithKey(key.toStringFormat(true));
    RowImpl prRow = (RowImpl) pr_dcib.getCurrentRow();
    String AM="model.AppModule";
    String CF="AppModuleLocal";
    ApplicationModule empSvc = Configuration.createRootApplicationModule(AM, CF);
    ViewObject emps = empSvc.findViewObject("EmpsView1");
    Row newEmp = emps.createRow();
    newEmp.setAttribute("Manager",new Number(1));
    newEmp.setAttribute("Department",new Number(1));
    newEmp.setAttribute("Depno",new Number(3));
    emps.insertRow(newEmp);
    try {
    newEmp.validate();
    catch (Exception ex) {
    System.out.println("validate catch");
    try {
    empSvc.getTransaction().postChanges();
    catch (Exception ex) {
    System.out.println("post catch");
    Configuration.releaseRootApplicationModule(empSvc,true);
    i=i+1;
    In this code I only postchanges() in first view and dont want to commit.
    But I cant see changes row in the page .If I press save I see transaction completed succesfully message.
    But in database not insertted any rows.
    If I write commit() after postchanges() code I see rows in the table .But I dont want to commit.Only post
    my changes and if necessary I press save button in page.
    How can I see changes in the page without commit???Thanks for all....

    You should NEVER use statements like this in managed beans:
    ApplicationModule empSvc = Configuration.createRootApplicationModule(AM, CF);
    This will create a separate application module instance, not shared by the the web pages. That's why you do not see the changes.
    Instead, you can use the following code:
    ApplicationModule am = (ApplicationModule)JsfUtils.getExpressionValue("#{data.MyAppModuleDataControl.dataProvider}");
    where MyAppModuleDataControl shoud be replaced with the name of your am data control.
    Steven Davelaar,
    JHeadstart Team.

  • How to send purchase order via e-mail.

    Please could someone let me know how to send purchase order via e-mail.
    I am an BC.
    e-mailing is functionning however I am not very familiar in settings for MM

    No, you do not need to touch ME_PRINT_PO. You need to put code before and after ME_PRINT_PO in the print program.
    Step 1 - Copy the standard print program SAPFM06P to make a Z version, lets call it ZSAPFM06P
    Step 2 - Copy include FM06PE02 to make a Z version, lets call that ZFM06PE02.
    Step 3 - ZSAPFM06P change the statement "Include FM06PE02" to read "Include ZFM06PE02".
    Step 4 - In include ZFM06PE02 you will find a subroutine called "ENTRY_NEU". In this subroutine you will see it first calls ME_READ_PO_FOR_PRINTING then calls ME_PRINT_PO. Before it calls ME_PRINT_PO just put:
    l_nast-nacha = 1.
    CLEAR l_nast-dimme.
    This means that ME_PRINT_PO will not e-mail, it will create a spool request.
    Step 5 - Still in ZFM06PE02, after ME_PRINT_PO has been called, add new code. First check that ent_retco EQ 0. If it does not then exit.
    Step 6 - Get the spool ID created by ME_PRINT_PO by either moving sy-msgv1 to a variable or select from NAST.
    Step 7 - Call function CONVERT_OTFSPOOLJOB_2_PDF using the spool ID from step 6, and put the result from table PDF into an internal table you can use later. ALso store the export variable pdf_bytecount, you will need it later.
    Step 8 - Call function SX_TABLE_LINE_WIDTH_CHANGE using the table from step 7 as content_in and put the results from content_out into a new internal table.
    Step 9 - Add some text into a internal table of type solisti1, this will be the body text of the e-mail.
    Step 10 - Add whatever receivers you want into an internal table of type somlreci1. If you just want it to go to the address that the PO would have gone to anyway, select the e-mail address from ADR6 where the address number = l_doc-xekko-adrnr, that is the data from the PO.
    Step 11 - Populate an internal table of type sopcklsti1 with data relevant to your PDF table from step 8 and the text table from step 9. You will have to put the size of the PDF from step 7 (pdf_bytecount) on the PDF line and the size of the text will be the number of lines of text * 255.
    Step 12 - Add info to a structure of type sodocchgi1. You can add the e-mail title in here, field obj_descr. Also add the size of the PDF and the size of the text from step 12 into doc_size, and give the doc a name in field obj_name. This can be anything, ZPDFPO for example.
    Step 13 - Call SO_DOCUMENT_SEND_API1 using the tables from steps 8, 9, 10 and 11 and the structure from step 12. You can amend the sending e-mail also. Set commit_work to space.
    Step 14 - That is all you need, but I actually call function RSPO_R_RDELETE_SPOOLREQ to delete the spool request created in step 4, then call NAST_PROTOCOL_UPDATE to add some more messages to the processing log of the PO.
    That is all.

  • How to set variables values via VBA.

    Anybody please help.
    How to set variables values via VBA in workbook. SAP Netweaver 2004s.

    Pass variable values with VBA and BI 7.0 funtions to Query
    At first a remark u2013 Iu2019ve read a lot of threads saying that passing values to a query can be done by using VBA code only. Iu2019ve tested it but Iu2019m not sufficient with the new BEX 7.0 API and therefore I use a mixture of BEX 7.0 funtionality and VBA. I create a BEX 7.0 design item button passing the values to a query u2013 I hide this button somewhere on the sheet or on a hidden sheet and I then raise the event to click the button from VBA code. Works fine and the maintenance is easier if something changes in the API in the future again.
    How to start:
    Switch to design mode in BEX Analyzer:
    Implement a BEX 7.0 design item u201Cbuttonu201D
    Click on the button to implement the properties
    Make the input for the commands
    data_provider = dataprovider_1
    cmd = process_variables
    subcmd = var_submit
    No comes the part with the variables u2013 Letu2019s assume a query has 4 variables but you only want to change 1 with the button u2013 an organizational unit for instance.
    Make a range somewhere in the excel with the following structure:
    Name    Index   Value
    VAR_NAME_1      1       Variablename
    VAR_VALUE_EXT_1 1       variablevalue
    Value should contain the name of your variable of course and u201Cvalueu201D the value of your variable
    Set a name for this range with EXCEL functionality but without the header:
    Back to the properties of the button: Insert the name of the range with the variables in the field Command Range:
    If you have more variables to process you can of course enhance your Filterrange!
    In the left upper Corner you have a name for your button:
    Now you can raise the button-click in vba like this:
    Application.Run "'" & ThisWorkbook.Name & "'!Sheet2.BUTTON_35_Click"
    regards, Lars

  • How to transport the changes of lsmw "Read display Program" changes to prod

    Hi,
    i have made some changes in the SAP generated program /1CADMC/SAP_LSMW_READ_<>.
    i.e., in step : Read display program
    the issue is that i made changes...but the changes are stored in $tmp.
    now how to move these changes to Production.
    when i assign to any package it is showing an error saying
    "/1CADMC/SAP_LSMW_READ_<>cannot be assign to package.move to package starting with "/1CADMC/".
    Thanks.
    Kumar.

    HI,
    LSMW cannot be transported from one client to another.
    You will have to do IMPORT EXPORT.
    Run transaction LSMW:-
    Give the Project, Subproject and Object.
    From Menu go to Extras->Export Project.
    Specify the project name
    By default everything in the project will be selected.
    If you want to transfer only a single subobject of the whole project then first deselect everything.
    Deselection can be done by clicking on the description besides then project name.
    After that just select the individual object.
    Then press the export button.
    It will prompt you to save the lsmw in your local machine.
    Save it.
    Similarly Import it to the production system.
    Please note that your changes in the read program will not be copied via import export.
    You will again have to make it in the production system.
    Changing the read program is not advisable as the changes will be lost if someone once again regenerates the progrsm.
    Regards,
    Ankur Parab

  • How do I make changes to Flash (or Win 7 OS) so that Flash always invokes at "HIGH" cpu priority?

    How do I make changes to Flash (or Win 7 OS) so that Flash always invokes at "HIGH" cpu priority?
    Streaming videos "burp" otherwise and I have to make the cpu change manually via Task Mgr

    http://www.askvg.com/how-to-permanently-set-process-priority-in-windows-task-manager/

  • How to reject a MM contract during approval ?

    Hi,
    I have setup approval strategy for MM contracts (outline agreements).
    Via trx ME35K I can approve the contract, but I don't find a way to reject the contract ?
    Is there a way to reject a contract like it is possible for PR and PO approval ?
    Please don't answer that the solution is not to approve the contract :o)
    Thanks for feedback.

    Hi,
    thanks for your answer, indeed you can cancel a contract approval but my question was about how to reject a contract without first approving it ?
    Like in the PR/PO approval, you have two buttons: one to approve and one to reject a PO.
    our users want to have the possibility to reject the contract in case the contract contains wrong information.

  • Best event when data changes via a user in a datagrid

    How do I capture when data changes via a user in a datagrid?
    change event?

    thanks mate but I'm not sure where to put it:
    <mx:AdvancedDataGridColumn headerText="sell" dataField="sell" textAlign="right" editable="true">
                    <mx:itemEditor>
                        <fx:Component>                   
                        <s:MXAdvancedDataGridItemRenderer>   
                            <s:TextInput width="100%" text="{data.sell}" fontWeight="bold" contentBackgroundColor="#eeeeff" color="#3333ff"  textAlign="right"  restrict=".0-9" maxChars="11">                                           
                            </s:TextInput>                                               
                        </s:MXAdvancedDataGridItemRenderer>                                       
                        </fx:Component>               
                    </mx:itemEditor>                               
                </mx:AdvancedDataGridColumn>

  • How do I properly change a Mac's name?

    My laptop (a MacBook with Tiger) was assigned a name when I first activated it. I am using it as an airport router (using a mobile broadband system, via a "modem" connected to the laptop to access the internet) with two iMacs. One of the iMacs has the same name as the laptop. I found I had problems with the airport network, because of the common name.
    I changed the name of the laptop, using Sharing in Preferences to "Eric's Laptop". However, the name seen by the airport connection on both iMac's remains as it originally was, and I continue to have problems with the airport network.
    How do I properly change the name of the laptop so its network name is, indeed, changed?

    Thank you Baby Boomer, Texas Mac Man, and Neville Hillyer. I have taken those actions, now several times. They have not changed the laptop's name, _as seen_ on the AirPort drop-down on the right of my iMac menu bar, and the problem continues.
    When I first bought and activated the laptop and used it for this purpose, I ran into this same problem. After hours of frustration, since the laptop was still under warranty, I called Apple Service, and a helpful and knowledgeable support technician walked me through a very different and simple process that did change the name as seen by the other computers on the AirPort network. At that time, I asked why that information was not available anywhere for Mac customers, and he did not know. I (obviously) do not remember what that process was.

  • How often can i change icloud account association/other ?s

    How often can i change icloud account association on a ios device.  If the ios device has a shared photo folder photo on it, will that setting still apply to the updated icloud account.by default.  How long will the shared photos from the original icloud account stay available to the other devices?  When a shared photo folder is disabled from the ios device, does it immediately remove acces via icloud?  if photo stream is activated on one ios device, does it activate on the other devices using that icoud account.  Thanks for your help
    matthew

    You change it the same way you change the information for any Apple ID: http://support.apple.com/kb/ht5621.  (An iCloud ID is also an Apple ID.)
    After changing the ID, read this to know what to do next: http://support.apple.com/kb/HT5796.

  • HT201303 how can i re-change my Security questions?

    how can i re-change my Security questions?

    Click here for information. If the option to have the answers emailed to you isn't available or doesn't work(the email may take a few hours to arrive), contact the iTunes Store staff via the link in that article.
    (88170)

  • How to transport Parameter changes in a crystal report

    Hi All,
    Very Good morning!!!
    I have designed a crystal report with static parameters. Earlier i used to have a dropdown kind of input selection for my parameters.
    Now i got a new requirement for a direct input in the field....tht means no dropdown ...single date field is to be entered directly.
    Accordingly i have removed the dropdown and changed to a single direct date field. I saved these changes to a request and transported to quality. Not sure whether the parameter changes are collected into a request.
    Whereas i couldn't found any changes of my parameters in quality. They are as same dropdown manner in the quality whereas i need them to be a direct field date entry which did not affected the quality server after transporting the changes.
    Could some one please let me know how to reflect these changes in quality server regarding parameter changes in a crystal report for BW.
    Thanks in Advance.
    Jitendra

    Please re-post if this is still an issue or purchase a case and have a dedicated support
    engineer work with your directly

Maybe you are looking for

  • Apple 12w charger for ipad

    It has been my experience that the 10W adapter is not always capable of charging the iPad3 under intense usage. these are situations I am referring to: 1) using maps and GPS while connected to 4G. My iPad will actually keep discharging even though mo

  • SetLocation on a JLabel only sets it for a few milliseconds

    My main class extends JFrame, and I have two panels gameArea and commandArea. I set the Layout of the content pane to BorderLayout and placed JPanel gameArea in the Center and JPanel commandArea in the South. I didn't specify a layout for gameArea, a

  • Problem with windows server 2012

    i have a problem with window server 2012 , i remove some feature in server manager and it restart .but  when i log in into my account it shows  a black screen with cmd window with this massage "C:\users\Administrator>." please help me. i dont know wh

  • Easy ways to find/search  different fields and tables relations?

    Dear Friend , I am useing SE11 and SE16 to different table and field name relation . Is it any easy was to find table different table and field name relation . Please reply urgently........ Max award for sol

  • Headphones and Speakers

    Hi, im thinking of buying the Inspire T6060 5.1 Speaker System and was wondering if i can connect headphones to the wired remote? Also, if not, what speaker system would you recommend for use with headphones. I use the Plantronics Audio 90.