Same event - Multiple commands

Hi,
Here's what I'm trying to achieve.
I've an application where some events need to be added to an undo-redo queue. I'm trying to register two commands for the same event by initiating multiple controllers. So that one command does what the event is supposed to do and the other command registers the state of the model for enabling undo-redo.
I want it this way so that I can control which actions to enable undo-redo by simply modifying the controller and not having to change the actual commands.
Is there a way I can sequence, which of the two commands fires first? I somehow am getting the undo-redo command to fire second which is defeating the purpose.
Nishant

Hey Nishant,
Not sure what is happening for the second command to be fired first... or how you are calling the code. If you show the a snippet of the code it may shed some light on the matter.
Cheers,
Ross

Similar Messages

  • Published Calendar has same event multiple times

    Hi, I have created a calendar group with four sub groups on iCal. On iCal, each event shows up only one time. However, when I published the calendar and went to check on it...each event is on each date a min of 3x, up to 15x...
    what's up? how do I fix this????
    thanks
    julie

    I am Tiger 10.4.2 iCal 2.0.2 and having the same problems. I haven't found a way to prove this, but I think iCal publishing is only smart enough to deal with 1 Mac. My problem started when I turned on .Mac syncing for iCal. My .Mac account is syncing my three macs (1 home, 1 powerbook, 1 powermac at work) and guess what? My appointments show up THREE times.
    Does anyone know if Apple is looking into this unexpected side effect from .Mac syncing published calendars? If not, I will give them a call on the phone to escallate this. I am guessing that there are multiple scenerios that make .Mac get confused and essentially treat a duplicate as if it was unique.

  • Bash function/script to execute multiple commands on same output

    Occasionally, I come across the need to pass the output of a single command to multiple others (without piping each to the next), so today, I wrote a [very] simple Bash script to accomplish the task.  Piping the output of a command to `tree' is much like piping it to `tee', except `tree' allows you to execute multiple commands on the same output, rather than only writing to log files:
    #!/bin/bash
    # tree -- pipes the output of one command to >= 1 other
    # Usage: command | tree 'command 1' 'command 2'
    doc=$( cat - )
    for arg in "$@"; do
    bash -c "${arg}" <<EOF
    ${doc}
    EOF
    done
    An example of its usage:
    $ echo -e "1 2 3\n4 5 6" | tree 'grep 1' 'grep 4' "grep 1 | tee grep.log | awk '{print \$2}'"
    1 2 3
    4 5 6
    2
    $ cat grep.log
    1 2 3
    Though not elaborate, the script gets the job done.
    Last edited by deltaecho (2009-03-10 20:34:01)

    Xyne wrote:
    You could always call it "the Ukrainian Pipe"
    (if you can't laugh at this, you either need to loosen up or make a point to follow (annual) current events)
    That was a good one

  • Can I have multiple event structures with the same event cases?

    Hello, 
    I'm doing an application that reproduces the front panel of the HP6675A power supply. To achieve this, I have done a state machine with different states
    (initialize, measures, voltage, current, ocp, ov, store, recall, etc). In each state, should have an event structure that catches the events of the buttons, like for example: if the current state is the Voltage mode and the user press the current button the next state will be the Current mode. For this in each state of the state machine should be the same event structure with the same events.
    My problem is that the Vi doesn't work properly when I have multiple event structures with the same event cases. There are some possibily to do this, and how? Or is impossible to have multiple events? I have been reading some posts, but I don't find solutions. 
    Any help is appreciated.
    Thank you very much.
    Solved!
    Go to Solution.

    natasftw wrote:
    Or as others mentioned, make two parallel loops.  In one loop, have your state machine.  In the other, have just the Event Handler.  Pass the events from the handler to the state machine by way of queues.
    A proper state machine will not need the second loop.  The "Wait For Event" or "Idle" state (whatever you want to call it) is all you really need in order to catch the user button presses.  The setup is almost there.  Maybe add a shift register to keep track of which state to go to in the case of a timeout on the Event Structure.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Syncing ical creates multiple entries for same event

    I'm sure this is common. I cal sync creates multiple enties for the same event. Any way to work around this?
    Also, duplicate calendars are on the Iphone (2 for inbox)  can one be deleted? 

    I think I know what can help. I also support Mac users in a mixed environment, and find that being able to access a Windows machine to test settings for my iCal users is very very helpful. If you do not have one, I could also fix this one by adding the user's account to my one Mac that runs Entourage.
    On a PC: set up one of the problem accounts in Outlook, then go to Tools->Options & click on the Delegates tab. Click on a Delegate name (if they all have the same permission level, you can select all), then click the Permissions button. If the delegate have "Editor" permissions, there will be a little checked box that sends the delegate copies of all those meetings. De-select it.
    Lemme know if you want Entourage instructions or if that does it for you.
    The real question, of course, is why are there so many Exchange functions that iCal can't touch. Grrrr....

  • In FCPX, how do I use multiple clips of the same event?

    This is a beginner question, but having recently moved from Final Cut Express to FCPX, I am having trouble using 3 clips (church play, 3 cameras) of the same event (and reading through the manual has not helped me). I have lined them up in the timeline, one "on top" of the other, but the viewer only shows the top clip. I would like to see what the other clips look like and use the cutting tool and opacity (which I found) to choose the best view (and move between the clips lined up with the audio). It feels like I am trying to use an old work flow on a new product. How do I view the all the clips and move between them?

    Here is one of those free tutorials (in two parts), which , IMO, is particularly good.
    There is also, of course, more comprehensive paid training available that may better fit your needs.
    Good luck.
    Russ

  • Multiple users accessing same events

    Good Afternoon, i wondered if anyone could assist me. I have described what is going on and have a few questins which i have added in bold.
    We are a school in the UK running three Apple suites with a mixture of iMacs and macbooks.
    The scenario:  We have local users accessing some video footage to create a trailer and i would like to find the best method for this.
    The Problem:  We opted to use local users rather than network users as i believe imported video events are stored locally. Is this correct?
    Based on the previous problem i have created two users, User1 & User2.  If User1 imports the event then User2 cant see this and would like to work on the same event, then they have to import the event again.  Is there anyway that User1 & User 2 could access the same event without doubling it up?
    The problem does change slightly that if i use a networked user, and run iMovie then they can see the events on the local hdd. This only happens on certain machines.  Any ideas why this would happen?
    If anyone can help in anyway it would be much appreciated.
    Thanks

    The Problem:  We opted to use local users rather than network users as i believe imported video events are stored locally. Is this correct?
    Yes, the are stored locally, I don't know if Network users do anything more than authenticate over the network then use the local hard drive anyway. That depends on whether or not your users are setup with Network Home drives or are Mobile users that use the local hard drive instead. You might be able to find out from your SysAdmins whether or not Home folders are on a central server of some kind.
    Network users authenticate and have a network home drives.
    Is there anyway that User1 & User 2 could access the same event without doubling it up?
    It seems like there would be a benefit to using an external Mac HD in this case as the permissions on that folder could easily be ignored. Then any user on that Mac will be able to see the iMovie Projects and Events saved onto that external HD and use them without doubling up the Events folder material. Unfortunately I don't think you can force iMovie to use a different folder for the Movies folder on an internal Hard drive. So an external HD might provide an easy workaround if that's possible. And better yet, it makes it all portable BETWEEN Macs if you need to setup on a different machine for some reason.
    Thanks, thats was what i wanted to know.  Although I dont think the department will be too keep on buying a minimum of 30 external hdd.
    This only happens on certain machines.  Any ideas why this would happen?
    I don't want to blame this on how the machines are configured, but it may be the network users are seeing a Network Home folder in some cases when they are logged in, and in other cases they are seeing the local home folder on the internal Mac HD. I'm just guessing at this point. But it should be consistent across all the machines depending on if the network users is a Network Home user or a Mobile user.
    I have double checked and all users are seeing their network home and no local version.
    I just wondered if myabe an older version of iMovie(09) allowed the users to see all events even as local users or network. - bizarre really

  • FCPX 10.1.3 Project vanishes when a new project is created in the same event

    I've been working on avery complicated project all day with multiple layered clips with key frame animations, colour effects etc. All was fine until I opened a new project in the same event which I was going to use to create some effects sequences for the main project. When I went back to the original project it was empty. Tried the Undo function in case I had done anything stupid but it was greyed out. Went to the FCPX backups and the last file was almost 2 hours old but did not have any sign of this project. The only thing I have left is all the imported media.
    Any ideas? Using FCPX 10.1.3. This is really annoying as all I have left is an h264 file of the almost complete project and it will be almost impossible to start from scratch.
    Thanks for your attention

    The edited project was 60 seconds making up an intricate title sequence involving 24 video segments and 48 png/ PSD files.  Had a brain storm and was wondering if there is anyway the the project could move to another event so currently going through all the event folders on my FCPX edit drive. I just can't see how a project can just vanish.
    Thanks for your suggestion.

  • I have photos from several cameras of the same event, how do I combine them?

    I have photos from several cameras of the same events.  How can I sort them together, three pics of the same horse from three cameras side by side; I can't move pics from one camera source to another in a folder.

    Languare is critical since it is all we have to communicate with
    Folders in iPhoto do not hold photos - folders hold only other folders or albums
    If you are speaking of events then you simply merge the events (drag one onto another or select two or more and use the merge events command - for the photos to be "side by side" the three camera's time/date setting will have to be identical as photos will be sorted by time/date - if they are not you can correct by selecting the photos in an event (before merging) and using the adjust time and date command or you can make a smart album for the camera and select the photos and use the adjust time and date command
    LN

  • UI Design - Best Practice when Two UIs Trigger Same Event

    I have an application that allows users to take actions using several methods - right-click context menu selection, menu bar selected, key strokes, etc. I was wondering if anyone had any suggestions as to teh best practices for handling this in Cairngorm...
    Is it best to dispatch the same Cairngorm event in several places? I know this is one of the major reasons to use MVC, but, I hate to create duplicate code - maintenance is pain.
    Would is be considered good practice to have the container that serves as a parent for the context menu, menu bar, etc. to listen for events from these components, and then dispatch the Cairngorm Event?
    Thanks.

    Would it be considered good practice to have the container that serves as a parent for the context menu, menu bar, etc. to listen for events from these components, and then dispatch the Cairngorm Event?
    Yes, this is described by Steven Webster in his series of articles on Cairngorm.
    Dispatching the same Cairngorm event from different locations is a perfectly regular practice. This is even an advantage. The same code (the command, the delegate) can be triggered from different places.

  • How do I get videos and pictures taken in the same event to show in a slideshow in the order they were taken?

    How do I get videos and pictures taken in Photos and the same Event to show in the order they were taken? Pictures and videos are seperated with videos at the end of both Photos and the Event.

    You're welcome.
    What's likely happened is that when you transferred the video to the new machine they lost their dates.
    Photos use the Exif metadata to record the date and time of the shot. This is quite different from the date and time of the file, which can change as the file is copied from place to place. Video doesn't have Exif, and so iPhoto uses the file date, and that's changed.
    Simply, there's no absoultely reliable way to date video.
    Try assign dates with the Batch Change command under the Photos menu.

  • Should every SQL query have its own event and command?

    Hello,
    I am developing an application using Cairngorm. My app uses SQL databases.
    I'm creating a separate event and command for each SQL query my application requires. I end up with many events  and commands - twenty different event/command pairs and I'm not even done yet.
    I was wondering if this is the right way to go, or if somehow similar SQL queries should be grouped together in the same event/command, and if so, how would I implement that elegantly?
    I've never used Cairngorm before so I want to make sure I do it correctly.
    Thank you for your time and any assistance you can offer.

    From my point of view, writing any SQL query or making queries directly from the presentation layer (eg. flex) to the db server it's almost always incorrect, awfull and maybe even insecure. The client layer should be more independent from the implementation layer as for instance the db server you are using. Instead you should call services on the server side and then they should have a DAO layer o whatever where the queries are done. You could then invoke one of this services and pass parameters that indicates what you want to do. (except you are using remoting where you will be invoking methods directly)
    Consider the case where you have a Java implemented service layer, you could be using hibernate to access the database and not writing a single line of SQL (maybe some HQL) and then you could do all the queries you need and return the beans retrieved from the database to the client layer using AMF3 and it's serialization/deserialization mechanisms. In a future you could modify your app to use JPA and then this layer use hibernate, then you client layer will remain the same the only changes will be done under the DAO layer.
    So again, in my opinion, db server should never be accesed directly from the presentation layer (Flex, Air or whatever) but from the backend services and this sould be completly abstract to the client layer. I have seen some people trying to do SQL queries from Flash but that it's giving a task to the Flash player it has never been intended to do. A miss use of the thin client the Flash Player is and an bad architecture.
    It would be great to hear others opinions.

  • Same plugin multiple versions applied

    Hi,
    I have same plugin multiple version as applied. Its really strange, how this happened.
    Navigation path - Setup - Extensibility - Self Update - Plug-in Updates ... Here it shows different versions of the same plugin as applied.
    So, I went to Setup - Extensibility - Plugins , so that I can deploy them from servers - But that plugin is not listed.
    This is blocking my use of newer version of plugin (testing)
    Please let me know, how to clear this.
    Thanks,
    Muthu
    Edited by: muthuveerappan on Jun 4, 2012 5:34 AM

    Hi Loc Nhan,
    I got the below output after running the command.
    #> ./emcli list_plugins_on_server
    OMS name is EMGC_OMS1
    Plug-in Name Version [revision]
    Oracle Database 12.1.0.1.0
    Oracle Exadata 12.1.0.1.0
    Oracle Fusion Middleware 12.1.0.1.0
    Oracle MOS (My Oracle Support) 12.1.0.1.0
    Exalogic Elastic Cloud Infrastructure 12.1.0.1.0
    Oracle Enterprise Taxation and Policy Management 12.1.0.3.1
    I have plugins folder too with the following contents (ls-l) /orasw/Oracle/Middleware1035/plugins
    drwxr-xr-x 8 oracle oinstall 4096 Mar 22 05:27 oracle.em.soee.oms.plugin_12.1.0.1.0
    drwxr-xr-x 15 oracle oinstall 4096 Mar 22 05:48 oracle.sysman.db.oms.plugin_12.1.0.1.0
    drwxr-xr-x 17 oracle oinstall 4096 Mar 22 05:48 oracle.sysman.emas.oms.plugin_12.1.0.1.0
    drwxr-xr-x 11 oracle oinstall 4096 Mar 22 05:48 oracle.sysman.mos.oms.plugin_12.1.0.1.0
    drwxr-xr-x 11 oracle oinstall 4096 Mar 22 05:48 oracle.sysman.xa.oms.plugin_12.1.0.1.0
    drwxr----- 8 oracle oinstall 4096 Jun 4 04:06 oracle.tugbu.oet.oms.plugin_12.1.0.3.1
    Now, multiple versions of same plugins are installed (and thats fine), The concern is I don't see any plugin listed under - > Setup - Extensibility - Plugins
    If its listed, I can select and un-deploy ...
    I just want to un-deploy and remove/delete, but not able to do so.
    Please help.
    Regards,
    Muthu

  • Multiple commands in 3.5 WAD - RESET_ITEM, FILTER and DRILLDOWN

    Hello All,
    I'm using 3.5 WAD.
    My requirement is to fire following multiple commands:
    1. RESET_ITEM
    2. FILTER
    3. DRILL DOWN
    For first command I tried
    var cmdUrl = SAP_BW_URL_Get() + "&CMD=RESET_ITEM&ITEM=TABLE_1&ITEM_ID="+itemID;
               SAPBWOpenURL(SAP_BW_URL_Get() +cmdUrl );
    which works fine.
    Now I want to add filter command to filter multiple single values.
    I tried     
    filter_command = filter_command + "&FILTER_IOBJNM_" + (checkIndex +1) + "=0CRM_OBJ_ID__0CRM_CURRPH&FILTER_VALUE_" +(checkIndex +1) + "=" + phasesField[checkIndex].value ;
               SAPBWOpenURL(SAP_BW_URL_Get() +cmdUrl + filter_command);
    where checkIndex is loop counter.
    But its not working. If I individually fire filter_command, it works neither. If I initialize fitler_command as
    var filter_command = "&CMD_1=LDOC&TEMPLATE_ID=ZAJ_EDIT";
    it works; but if I refire the query in the same session, it fails.
    Could anyone suggest any good methodology to fire those multiple commands?
    Do I have to form a single URL or ...some other way to fire all commands like commandSequence in 7.0?
    I do no want to use form because my filters and drill downs are going to be dynamic.
    Thanks..
    Abhijeet

    http://help.sap.com/saphelp_nw04/helpdata/en/8d/07863be3047e19e10000000a114084/frameset.htm
    Function documentation Command Sequences Locate the document in its SAP Library structure
    Use
    Many questions require you to change several objects in different ways with commands. For example, you cannot use the current methods with a single request (command) for filtering a data provider for the fiscal year 1999 and another data provider for 2000.
    A command sequence allows you to add new commands to an original command. Data is requested from the OLAP processor and the HTML page is sent back to the Web Browser only after all of the commands have been processed.
    ·        The subsequent command sequences are added to the original command as parameter CMD_N. If the command is within an >SAP_BW_URL> tag, you need to make sure that the complete command sequence is set in quotation marks. No quotation marks can be set within the command sequence. If the command sequence is transported using a URL, you have to make sure that you replace the characters ‘=’ and ‘&’ with their hexadecimal display in the command sequence
    ¡        Replace ‘=’ with ‘%3D’
    ¡        Replace ‘&’ with ‘%26’

  • How can I use the same event case for different controls dynamically

    OS: Linux 2.6.24-1-686 #1 SMP Sat Apr 19 00:37:55 UTC 2008 i686 GNU/Linux
    LabVIEW: Version 8.2
    I have a lot of (about 50) controls (numeric, boolean) on my front panel. If a "Value Change" event will be fired by any of them the same event case shall be executed. As I do not want to add all 50 controls to the same event case manually I am looking for a way to do it at run time. Additionally the VI is still under contruction, i.e. controls will be added and removed.
    Thanks for any help here.
    Regards,
    Johannes
    Solved!
    Go to Solution.

    Hi Johannes,
    collect all your control references (you can use the FP property for it) and create a user event. Connect this user event to your event structure. Now you have one event case for all your controls. See the attached picture.
    Mike
    Attachments:
    Unbenannt1.PNG ‏11 KB

Maybe you are looking for