Results 1 to 2 of 2

Thread: how to handle application "Undo"

  1. #1
    Maximum Bitrate
    Join Date
    May 2004
    Location
    NJ
    Posts
    558

    how to handle application "Undo"

    As I mentioned before, I am working on a touch screen friendly contact management application for my wife's car.
    One of the issues I am facing is the "Undo" feature, she wants -understandably- the ability to undo an entry or undo a delete.
    I haven't done this "undo" before and like to get an idea on how to handle it, is there a specific methodology or algorithm to apply?

    Any ideas, hints or pointers will be highly appreciated.
    (I'll be using either C++ or VB under .NET - I am trying to iron out the issues before I start or settle on a language)

    Thanks guys.

  2. #2
    Variable Bitrate NoPistonPC's Avatar
    Join Date
    Apr 2004
    Location
    Boston
    Posts
    360
    I think undo is very application specific. The most brute force way to do undo is to keep multiple snapshots of your data (one for each undo level). For large databases, this isn't feasible so I would suggest keeping a log of changes made to the database after each action.

    For example, if your contact list initially contains A,B,C,D,E, then you decide to add F, delete B, and change C to G. Your undo log would look like this:

    1. insert F at position 5
    2. delete B from position 1
    3. change C to G at position 2

    To undo, you just use the information in the log to backtrack.
    1994 RX-7, EPIA P4-ITX w/ Celeron 2.4 Ghz, Arise PSU, Xenarc 700TSV (new model)

Similar Threads

  1. Cdplayer application
    By kreyzig in forum FrodoPlayer
    Replies: 2
    Last Post: 06-19-2004, 11:51 PM
  2. Location of application floating bar resets to 0
    By Izik in forum Media Engine
    Replies: 0
    Last Post: 03-14-2004, 12:25 PM
  3. can 90w opus handle...
    By Nico3k in forum Power Supplies
    Replies: 4
    Last Post: 03-08-2004, 07:14 AM
  4. Wanted: Small MB that can handle Cel 1200...
    By SuperMatty in forum Classified Archive
    Replies: 2
    Last Post: 03-24-2003, 01:33 AM
  5. More than one external application?
    By KlereBak in forum ME Archive
    Replies: 2
    Last Post: 02-12-2003, 08:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •