Monitoring change of a field

Hi,
I'm working on a Tic Tac Toe game. For the undo move feature I have a stack:
LinkedList<Tuple<Integer, Integer>> stack; //The integers are X and Y coordinatesNow, the undo algorithm doesn't work exactly as expected and I need to debug it. I would like to monitor every change to the stack field and on each change print out the contents of the stack and tuple variables. How can I achieve that? Do I have to implement some kind of observer pattern?
Thanks,
PR.

YoungWinston wrote:
Aardenon wrote:
Now, the undo algorithm doesn't work exactly as expected and I need to debug it. I would like to monitor every change to the stack field and on each change print out the contents of the stack and tuple variables. How can I achieve that? Do I have to implement some kind of observer pattern?What Kayaman said. One possibility might be to actually store the game state in a Stack after each move, viz:Stack<LinkedList<Tuple<Integer, Integer>>> gameState;that way, you can "undo" with a simple pop().That is what I am trying to do. I'm recording all moves in the stack and I want to reverse (pop) the moves on each undo, only it reverses the moves in a different order.
>
I think I might add a class that wraps the LinkedList first though.What for?
I have another related question: Why can't I see all the methods of the LinkedList class in all situations. The stack field is declared private, I can access it's push, peek, poll, pop methods from the enclosing class, but when I try to access these methods from another class through a getStack() method, these methods are unavailable. Why is that, what would I have to do to get access to these methods. Perhaps this is why the undo doesn't work quite right, because I use push() in one place and add() in another.
PR.

Similar Messages

  • Authorization For :Monitoring Changes done by User .

    I am not abe to monitor changes done by user in Delivery as well as billing so kindly suggest.
    For Billing:I went to environment-->Changes:Getting msg:Authorization Object s_scd0_all not assigned.
    For Delivery:Changes field apears Grey Even if changes are done.
    Edited by: Pritesh kumar on Apr 30, 2010 9:15 AM
    Edited by: Pritesh kumar on Apr 30, 2010 9:15 AM

    Hi pritesh,
    For this you need to co ordinate with ur Basis Team. First you need assign this Authorization Object with respective Field and Values to ur respective SD Role which is assigned to your User Id by using T.Code PFCG
    To Check Role Go To SU01- User ID Tab Role here u need to check the roles.
    Delivery Changes T.Code: VL22
    Invoice Changes  : Environment - Changes
    Object     Field      Value (interval)
    S_SCD0     ACTVT      08
    Regards
    Durga Sana

  • Monitoring changes in form

    Hey all,
    Got an easy one for you guys.
    I'm working with the composer to create a bunch of forms. I've got an options screen and I want to know what's the best way of monitoring changes so the OK and CANCEL buttons work accordingly.
    Cheers.

    I don't think there is a "best" way, as usual in such questions...
    The conditions to enable or disable buttons depending on GUI state can be pretty complex. I am a first believer that the GUI should provide hints (like disabling buttons that cannot be used in a given context) rather than "punish" the user by offering all options then telling her she cannot do a given action because some conditions are not fulfilled (like we still see too often in user interfaces, particularly the Web-based ones...).
    But there is no perfect recipe for this, because conditions are varied and can be complex. In general, you have to watch text field input (is it correct, non empty, following the given rules like excluding some chars in a file name, etc.), list selection (at least one selected, no more than n selected, etc.), check box states that can exclude themselves (sometime radio buttons are better in this case), and so on.
    It might be easier to disable all buttons doing an action (load, save, delete, rename, OK, etc.) then to enable them only when the conditions are meet (something in the tree is selected OR something have been typed AND user selected a folder where she has a right, etc.). Such GUI asks for lot of testing, too...

  • Master-detail: detail field not displayed after changed by master field

    I want to use the Depends on item with Clear/refresh value functionality in a master detail situation. Within the same group it is no problem to use the setter method of a field to change a second field and then displaying this new value. But in the detail group, I can not select items from the master group as a depends on item.
    In the setter of the master field, the value in a field for each row in the detail (table layout) is updated. The only problem is that this updated value is not displayed, the old value doesn't change. When saving the changes, the displayed value is committed to the database. When de updated field is not displayed at all, the correct value is saved, so I know the detail field is updated.
    How can I make sure the displayed value in the detail is displayed after changeing a master field? I already gave the detail field the correct partial trigger.

    Wouter,
    I guese you don;t see the changed value when you display the detail item because after the depends on item update changed the detail item, JSF procesing continues and the detail table changes are sent to the server which will override again the detail item attriibute, resetting it to the old, still displayed value.
    So, the trick is to get PPR working. Make sure the partialTYriggers property of the detail item is set to the value of the id property of the master item. If it still doesn't work, try setting the partial triggers property on the table, instead of the individual item.
    Steven Davelaar,
    JHeadstart team

  • Who has changed the Custom Field value?

    Dears,
    Need to know the information regarding how to fetch that who has changed the Custom field value from PWA/MPP.
    Example:
    There is a PDP (say ProjectInfo):
    There is a Custom Field added to that PDP (say Project Status = In Progress).
    Now for ProjectA, someone has checked out and changed the Custom Field "Project Status" from "In Progress" to "Closed".
    I need to fetch the information regarding who has changed that Custom field.
    In which direction should I move: Event Handlers, PSI???? Any other stuff?
    Thanks & Regards,
    Shravan

    Hi Shravan,
    I'm not a developer but I do know that you can use an event handler pushing the resource name and date in custom fields.
    Another way is to use a 3rd-party tool like
    FluentPro Audit Tool.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • To Display Output in Grid ALV with change of some field display total with

    Hi Masters,
    I m working on ALV in which  i have to display output with the following format.
    Header
    "Some String"                                                             date/time                                                                               
    User:XYZ01       page 1 
    Line
    1st field    2nd    3rd     4th       5th   6th    7th   8th   9th  10th field
    x               y       z        A        B     C       D     E      F       G
    BLANK..............................................................................                            
                          "total 3rd+4TH"           P        Q     R      S        T       
    same thing for every change of 4th field .
    So the problem is with inserting the line with string "Total of 3rd+4th" in the output .
    Can Anyone help me out?
    Thanks ,
    Varlani Amit

    Hi,
    Use control-break statement ON-CHANGE for the 4th field, and do the changes.
    regards,
    sri

  • In Mail can I change my "To" field to From or sender

    In Mail my inbox shows 3 fields "To, Subject, Date Recieved" Can I change the "to" field to from or sender. I know who the mail is to, it's always to me after all it's my mail I'm checking. I would like to know the sender so I can better decide which mail to open and read. Sometimes I'm looking for a response from a paticular person.

    Hi Ubettergetit: Actually it is quite easy to get rid of that little annoyance. With mail open, Right (Control) Click on one one of the headings in Mail. (To, From, Subject....). This will bring up a menu that allows you to select which headings you would like to see, change it as required.
    Enjoy
    Stedman

  • Background job on change of some field!!

    HI
    i have to trigger a background job on change of some field value (status field chages it's values from w to U).
    so how to go about the same..
    how to call a background job once some fields changes!!
    regards
    Gunjan

    1. You can use JOB FM's to invoke the job.
    2. You can call the FM ( Background execution program ) in background.
    CALL FUNTION .... IN BACKGROUND.
    Regds
    Manohar

  • How can we change the input field on a view stop showing zeros

    Hello,
           To make screen look consistent with other character input field. How can we change the input field on the view stop displaying zeros even though the data type is NUMC and data type should not be change?
    Edited by: sap_learner on Mar 25, 2010 5:44 PM
    Edited by: sap_learner on Mar 25, 2010 5:49 PM
    Edited by: sap_learner on Mar 25, 2010 5:55 PM

    hello Manas Dua,
                           Thanks for your help. I am able to resolve my problem.
    My code will help  the future comers to resolve this kind of issues.
    *The code is applied to method WDDOINIT of the default view.
      DATA lo_nd_terms_input    TYPE REF TO if_wd_context_node.
      DATA lo_nd_terms_input_i TYPE REF TO if_wd_context_node_info.
      DATA lv_zeros             TYPE wdy_attribute_format_prop.
      lv_zeros-null_as_blank = 'X'.
      lo_nd_terms_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
      lo_nd_terms_input_i = lo_nd_terms_input->get_node_info( ).
      lo_nd_terms_input_i->set_attribute_format_props(
        EXPORTING
          name              = `ENTER THE ATTRIBUTE NAME`
          format_properties = lv_zeros     ).
    Edited by: sap_learner on Mar 26, 2010 5:02 PM

  • Change in Z-field of LO Extractor no updating to delta que

    DS 2LIS_11_VAHDR is enhanced for field Customer purchase order(VBKD-BSTKD) as zzbstkd. While creating order this fiels is updating in to BW correctly but if some one changes the any order for this field in R/3 transaction VA02, its not creating any entry in extraction que or delta que. Hence the change is not updated in to BW..
    What do we need to do to update changes in enhanced field to BW.
    Thank you in advance

    I am not sure if you can really achieve that for an enhanced field...but atleast if you use the field from 2lis_11_vaitm it should work...
    and as far as the enhancement on the vahdr...unless there is a change on the other field that are already in the structure the change to the enhanced field wouldnt carry over..
    I remember from one of Roberto Negro's blog...he mentioned some exits that can be used to achieve your requirement....I personally never tried that...but it would be interesting if it works...
    You can try coding your enhancement there and see if it works...
    Will send you the link once I get a chance to search...In the meantime you can search for Roberto Negro and if my memory is right then it should be in one of his blogs...
    Hope it helps

  • What events change the Created field in, finder, get info

    On my laptop, in finder, in the get info screen there are 2 fields the Created Date and Modified Date fields.
    I was looking at these fields for an app that I use on my iPhone, it was listed in finder, so I clicked the get info option.
    The created date and modified date were 10/16 both the same.
    I have not used this app in a long time, my question is this.
    What event changes the created field?  If the app was downloaded on the Iphone will the created field get updated in finder?
    or if it was an update on itunes, would that change the created date in finder?
    Does the created date mean that the app was downloaded and installed on that date?

    Thank you so much.  That works just fine.  However, I also just discovered something.  Evidently, at least some of the fields in list view are editable.  By adding Grouping to the columns shown and clicking on the empty field, I was actually able to type whatever I needed into the field.
    I have not yet tried it with other fields, but will do so to see if it works for all fields in the list view.
    Laura

  • How to trigger replication from CRM to ECC when changing custom z-field?

    Hi all,
    I've created a z-field in CRM which matches the field KNVV-KLABC in ECC. I've created the needed user exits to replicate from ECC to CRM and vice versa. The functions are called and update successfully. So actually everything works fine except for one thing...
    When I change the z-field in CRM - and only that one field - the replication is not triggered hence KNVV-KLABC is not updated. When I however change my z-field together with another pricing field (e.g. Customer Group) then the replication runs and both fields are updated in ECC.
    How can I trigger the replication if only my z-field is changed?
    Best regards,
    Melanie

    Hi there,
    Thanks for your replies.
    I've solved this myself a couple of days ago. However I did it in a different way as suggested here. I will post my solution as soon as I find the time to do the documentation.
    Maybe as a hint if someone runs into this; adding a field to the pricing structure of the BP sales areas (SET0030 if you need to know) seems strangely enough "not possible" - I mean it's "not ready yet".
    AET f.i. doesn't allow you to add a field there and with EEWB you cannot choose to replicate it to R3. Thus for my solution I had to change SAP Standard unfortunatelly. Also the my customer wants to be able to search for this new field on the Account Search Page - so many steps were needed to achieve all this. As I mentioned I shall present my solution as soon as I get the time for it. If I should forget and you need to know how I did it you may reply to this thread as I'm watching it so I'll be reminded.
    Best regards,
    Melanie

  • Could not changed cost center field in document type RE - FSG

    Dear Experts,
    I would like to change 'cost center field' in act document type RE (invoice receipt) through transaction FB02
    I have changed the field of 'cost center' in field status group in OBC4 and OB41 (posting key 50 and 86)
    The field staus group both in OB41 and OBC4 are already set as 'optional entry' but field of cost center is still could not be changed/edit (grey area).
    Kindly advice
    Thank you.

    Hi Chandra,
    Can you please details the coding part if you can remember ..so that would be helping me lot...Since it's production issue , we have implement immd.
    Regards,
    Lalit
    Edited by: Lalit  Sharma on Dec 24, 2009 6:45 AM
    =======================
    This problem can be closed. I got the note.
    Edited by: Lalit  Sharma on Jan 12, 2010 12:50 AM

  • Apex 4.0: Change the Search Field to a Multi Value Check Box IR

    I am new here, but hoping to be active :)
    Well, now I am focusing on Apex 4 and I find really new things here. And even new order to develope needs time to get used.
    Still, I am trying to change the Search Field to a Multi Value Check Box in IR. I have found how to make it in Apex version 3, but not at 4 any more.
    Tutorials for apex v.3 write:
    1.Click Edit Page 1 on the Developer toolbar.
    The Page Definition for page 1 appears.
    2. Under Items, click P1_REPORT_SEARCH.
    3. From Display As, select Checkbox ans so on...
    But I do not find any word "Items" in IR and especially P1_REPORT_SEARCH (I assume this should be by default). Under "Report Atributes" I find "Search bar" region, just there is no option for that. Is here any way to make search with checkboxes in v4?

    Hi,
    Tutorial you have check for APEX 3.x probably works still in APEX 4.x if you use classic report.
    As I understand you have now create interactive report that provide out of box search features.
    There is no option to change IR search text field to multi select item.
    What you can do with IR, is hide/disable search field.
    Then you create multi select item and use it in report query where clause.
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • How to Change the Value Field Type of a Value Field

    Hi,
    How can I change the value field type from Currency to Quantity of a value field? I have tried to do it in KEA6. I can change the value field and its description, but not the value field type from currency to qty. If I change this config, is there any other changes that I need to make so there is no side issue of this change?

    Hi Prem,
    Once you created value field as quantity or currency, you can not change this nature of value field. Based on this, system creates lots of data and tables. For this reason system will not allow any changes in quantity or currency.
    Alternative way is to remove the old value field and  create a new value field assign to operating concern and put all your seetings.
    Please let me know if you require any clarifications.
    Thank you,
    Regards,
    Santosh
    Reward points if helpful.

Maybe you are looking for

  • I can't watch the Players Championship, why not?

    I've tried several different browsers but every time I pull up the Live @ feature for the players Chamionship on my Mac Mini all I get is the initial ad followed by a blank screen.  Is this an apple issue?  Or a PGA issue??

  • Put report .rdf file and .xml customization

    hi frnds, where can i keep .rdf file and .xml file (for customization)? shall i keep on application server? now, to generate report i've written one script ...where can i keep this? -bhavin

  • Macbook Pro 2011 keeps freezing and disconnecting from internet

    Ever since I upgraded to 10.8 Mountain Lion, my macbook has been acting up and its becoming a real big hassle. The first big issue is it keeps freezing. Everything freezes, the only thing I can do is move my mouse cursor around but I can't open anyth

  • Exist DataTable Type in Java?

    Hi, I'm new in Java Programming. In VB.Net I like to manipulate SQL Queries in a DataTable and later post it in a DataGridView. In VB exist a type called DataTable; Dim dt as DataTable I saw the JTable, but, that is like the DataGridView. I'm guessin

  • Update ipod 4th gen from ios 6 to 8

    i have a 4th gen. ipod touch refurbihed and I want to update the operating system from ios 6,how?