Simple menu timeout value CVP 8.0

Hello,
I am just getting started with CVP development for simple ACD call flows (ICM). I am using the basic things, like the menu elements for prompting callers.
Most everything appears to be working OK, except the timeout and no match values associated with the menu options.
I can get around the nomatch path by using 10 element menus and catching all values, but the noinput (i.e. timeout) values don't seem to be used.
As I test, and don't input anything from the phone keypad it just continuously loops around on the audio and never returns control to ICM.
I have tried shortening the timoue value and maxnoinput, but still it just loops. I know I am just beginning, but is there something I am missing?
I've attached a screenshot of what I am looking at for values and call flow in CVP / Call Studio.
Thanks for any assistance.
Greg

Nevermind, all. Just a simple 'change' did the trick.
:)

Similar Messages

  • Possible to configure per connection timeout values?

    hi,
    please, does anybody know how (or whether or not it is even possible) to configure a "PER CONNECTION" timeout on the connections - created by jndi - to an ldap server?
    my understanding is that setting the "com.sun.jndi.ldap.connect.timeout" property on the javax.naming.directory.InitialDirContext sets a _global_ timeout value for _all_ connections created/managed by that InitialDirContext (that is, with a "PER CONTEXT" scope).
    however, what i would like to do instead, is somehow configure a different timeout value for each individual connection that a InitialDirContext might know about.
    the first solution that will probably pop in your head is "connection pool". however, the app sets "java.naming.ldap.factory.socket" property to a custom socket factory class. according to the following paragraph from the jndi tutorial, that disqualifies the app from using connection pools:
    "There are a couple of environment properties that automatically disqualify a Context instance from using a pooled connection. A Context instance cannot use a pooled connection if it has its "java.naming.ldap.factory.socket" property set to a custom socket factory class, or its "java.naming.security.sasl.callback" property set to a custom callback handler class, or its "com.sun.jndi.ldap.trace.ber" property set to enable protocol tracing."
    http://java.sun.com/products/jndi/tutorial/ldap/connect/config.html
    even if we could use connection pools, we still wouldn't be able to set "per connection" timeout values. would we?
    one proposed solution is to completely rip out jndi from the app and replace it with the netscape directory sdk for java. to me, that seems like too drastic a measure though - given the project's time-constraints (the way the app was originally designed does not lend itself to a straight-forward "pop-out/drop-in" type replacement). i was hoping there would be a simpler alternative (a jndi-based configuration type solution, for example).
    any suggestions would be gratefully appreciated. thanks in advance for your replies.

    Enable the Default Host option in the AirPort Admin Utility, use the IP address you have assigned to your server.

  • Unhandled Exception: System.TimeoutException: The request channel timed out while waiting for a reply after 00:01:59.9139778.Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding.

    Hi, 
    I created a simple plugin and since i wanted to use Early Binding i added Xrm.cs file to my solution.After i tried registering the plugin (using the Plugin Registration Tool) the plugin does not gets registered and i get the below mentioned Exception.
    Unhandled Exception: System.TimeoutException: The request channel timed out while waiting for a reply after 00:01:59.9139778. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this
    operation may have been a portion of a longer timeout.
    Server stack trace: 
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Xrm.Sdk.IOrganizationService.Update(Entity entity)
       at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.UpdateCore(Entity entity)
       at Microsoft.Crm.Tools.PluginRegistration.RegistrationHelper.UpdateAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly, PluginType[] type)
       at Microsoft.Crm.Tools.PluginRegistration.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e)
    Inner Exception: System.TimeoutException: The HTTP request to 'https://demoorg172.api.crm.dynamics.com/XRMServices/2011/Organization.svc' has exceeded the allotted timeout of 00:01:59.9430000. The time allotted to this operation may have been a portion of a
    longer timeout.
       at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
       at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
    Inner Exception: System.Net.WebException: The operation has timed out
       at System.Net.HttpWebRequest.GetResponse()
       at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
    And to my Surprise after i remove the Xrm.cs file from my solution the Plugin got registered!
    Not understanding what exactly is the issue.
    Any Suggestions are highly appreciated.
    Thanks,
    Shradha
      

    Hello Shardha,
                            I really appreciate that you have faced this issue.This is really very strange issue and basically it occurs because of big size of your early bound class and slow internet
    connection.
                            I would strictly recommend you to reduce the file size of your early bound class and then register.By default early bound class is created for all the entities which are
    present in CRM(System entities as well custom entities).Such kind of early bound classes takes lots of time to register on server and hence timeout exception comes.
                            There is some standard define to reduce the size of early bound class.Please follow the link to get rid from big size of early bound class.
    Create a new C# class library project in Visual Studio called SvcUtilFilter.
    In the project, add references to the following:
    CrmSvcUtil.exe(from sdk)   This exe has the interface we will implement.
    Microsoft.Xrm.Sdk.dll  (found in the CRM SDK).
    System.Runtime.Serialization.
      Add the following class to the project:
    using System;
    using System.Collections.Generic;
    using System.Xml.Linq;
    using Microsoft.Crm.Services.Utility;
    using Microsoft.Xrm.Sdk.Metadata;
    namespace SvcUtilFilter
        /// <summary>
        /// CodeWriterFilter for CrmSvcUtil that reads list of entities from an xml file to
        /// determine whether or not the entity class should be generated.
        /// </summary>
        public class CodeWriterFilter : ICodeWriterFilterService
            //list of entity names to generate classes for.
            private HashSet<string> _validEntities = new HashSet<string>();
            //reference to the default service.
            private ICodeWriterFilterService _defaultService = null;
            /// <summary>
            /// constructor
            /// </summary>
            /// <param name="defaultService">default
    implementation</param>
            public CodeWriterFilter( ICodeWriterFilterService defaultService )
                this._defaultService = defaultService;
                LoadFilterData();
            /// <summary>
            /// loads the entity filter data from the filter.xml file
            /// </summary>
            private void LoadFilterData()
                XElement xml = XElement.Load("filter.xml");
                XElement entitiesElement = xml.Element("entities");
                foreach (XElement entityElement in entitiesElement.Elements("entity"))
                    _validEntities.Add(entityElement.Value.ToLowerInvariant());
            /// <summary>
            /// /Use filter entity list to determine if the entity class should be generated.
            /// </summary>
            public bool GenerateEntity(EntityMetadata entityMetadata, IServiceProvider services)
                return (_validEntities.Contains(entityMetadata.LogicalName.ToLowerInvariant()));
            //All other methods just use default implementation:
            public bool GenerateAttribute(AttributeMetadata attributeMetadata, IServiceProvider services)
                return _defaultService.GenerateAttribute(attributeMetadata, services);
            public bool GenerateOption(OptionMetadata optionMetadata, IServiceProvider services)
                return _defaultService.GenerateOption(optionMetadata, services);
            public bool GenerateOptionSet(OptionSetMetadataBase optionSetMetadata, IServiceProvider services)
                return _defaultService.GenerateOptionSet(optionSetMetadata, services);
            public bool GenerateRelationship(RelationshipMetadataBase relationshipMetadata, EntityMetadata otherEntityMetadata, IServiceProviderservices)
                return _defaultService.GenerateRelationship(relationshipMetadata, otherEntityMetadata, services);
            public bool GenerateServiceContext(IServiceProvider services)
                return _defaultService.GenerateServiceContext(services);
    This class implements the ICodeWriterFilterService interface.  This interface is used by the class generation
    utility to determine which entities, attrributes, etc. should actually be generated.  The interface is very simple and just has seven methods that are passed metadata info and return a boolean indicating whether or not the metadata should be included
    in the generated code file.   
    For now I just want to be able to determine which entities are generated, so in the constructor I read from an XML
    file (filter.xml) that holds the list of entities to generate and put the list in a Hashset.  The format of the xml is this:
    <filter>
      <entities>
        <entity>systemuser</entity>
        <entity>team</entity>
        <entity>role</entity>
        <entity>businessunit</entity>
      </entities>
    </filter>
    Take a look at the methods in the class. In the GenerateEntity method, we can simply check the EntityMetadata parameter
    against our list of valid entities and return true if it's an entity that we want to generate.
    For all of the other methods we want to just do whatever the default implementation of the utility is.  Notice
    how the constructor of the class accepts a defaultService parameter.  We can just save a reference to this default service and use it whenever we want to stick with the default behavior.  All of the other methods in the class just call the default
    service.
    To use our extension when running the utility, we just have to make sure the compiled DLL and the filter.xml file
    are in the same folder as CrmSvcUtil.exe, and set the /codewriterfilter command-line argument when running the utility (as described in the SDK):
    crmsvcutil.exe /url:http://<server>/<org>/XrmServices/2011/Organization.svc /out:sdk.cs  /namespace:<namespace> /codewriterfilter:SvcUtilFilter.CodeWriterFilter,SvcUtilFilter
    /username:[email protected] /password:xxxx
    That's it! You now have a generated sdk.cs file that is only a few hundred kilobytes instead of 5MB. 
    One final note:  There is actually a lot more you can do with extensions to the code generation utility. 
    For example: if you return true in the GenerateOptionSet method, it will actually generated Enums for each CRM picklist (which it doesn't normally do by default).
    Also, the source code for this SvcUtilFilter example can be found here. 
    Use at your own risk, no warranties, etc. etc. 
    Please mark as a answer if this post is useful to you.

  • How do i set the timeout value?

    I'm doing an insert...in the insert i have a trigger that fires a http put. when i'm doing a couple inserts at a time, it works fine. However if i try to insert about 50 at one time (within msecs of each other) then i get the following error:
    ORA-29276 transfer timeout
    Cause: Timeout occurred while reading from or writing to a network connection.
    Action: Check the remote server or the network to ensure that it responds within the timeout limit. Or increase the timeout value.
    My question is, how do i set this timeout value?

    FYI,
    IFS.PROTOCOLSERVER.SESSION.DEFAULT.Timeout
    IFS.PROTOCOLSERVER.SessionStateTimeoutPeriod
    IFS.PROTOCOLSERVER.SessionStateTimeoutPeriod
    in cup server configuration

  • Setting TCP Read timeout value?

    How do I choose a timeout value for a TCP read function?
    I'm receiving data from a server at a rate which varies between 40 and 140 Hz (normally 120 Hz), there is no handshaking and at any set transmission rate it appears that the network load causes the rate to fluctuate slightly.
    All I have been able to do so far is plot a frame number that is received in my data and fiddle with the buffer mode and timeout until I get the least dropouts. At 120Hz 5ms works best with a standard buffer, surprisingly 8ms is poorer.
    I am using a producer consumer loop with a queue and some interpolation to make up for the loss of data. 
    This is very hit and miss so I'm sure there's a proper / better way to do this!

    If you are using standard mode, then the read function should return any partial data, but will report an error out.
    You may want to look at the functions that you call after the TCP read. I think that the enqueue function will NOT enqueue data if there is an error in.
    There is a function you can use to clear TCP timeout errors. You could use this to allow you to enqueue partial data to your consumer loop.
    vi.lib\addons\internet\utils\tcputil.llb\No Time Out Error.vi
    Note that it will be up to your consumer code to identify your 'frames' for proper decoding.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Can we set the query timeout value in a global control place?

    hi everyone,
    We use the FullTextSqlQuery class to do query stuff, but we have the query timeout issue, the query sometimes timeout, sometimes is normal.  I know there is a property from Query class called Timeout, and the default
    time is 15 seconds, but we have lots of code involving FullTextSqlQuery.
    I want to know is there a gloabal place like the web.config or regedit or somewhere to set the timeout value?
    Thanks

    Did you ever get an answer?  I'm in the same boat...the only way I can seem to not charge tax to my wholesale clients is to set "tax never applies".  But I got over 300 products...how can I do it "en mass"???
    Anybody??
    I tried creating a special tax code at 0% but that didn't do it either.
    thanks in advance,
    Scot.

  • EIC Web Client Timeout value

    Hello, I am trying to help our EIC users with a request. They say that the web client times out and closes on them after about 5 minutes of inactivity. They would like to increase the timeout value. Unfortunately the person who implemented this is no longer here and I am not finding a place to configure the timeout. Is this value configurable, and if so where? Thanks very much!

    Hi Jim
    There is no time out configuration values within EIC as it follows the overall SAP environment time out which is typically controlled by the basis team.  If you are finding that EIC is timing out at a different schedule than production SAP they may be something custom that was built for your company that you will want to review.
    Hope this helps.
    Jarret

  • How to design a simple menu midlet in j2me?

    I'm new to j2me and trying to make a simple menu midlet without using polish (css). Please help... Thank you

    You need to use
    Class javax.microedition.lcdui.List
    Interface javax.microedition.lcdui.CommandListener
    Lots of MIDP Technical Articles and Tips at
    http://developers.sun.com/mobility/midp/reference/techart/index.html
    For future needs, please post on the CLDC and MIDP forum
    http://forum.java.sun.com/forum.jspa?forumID=76
    db

  • Quick Question About Simple Menu

    Can someone direct me to a link that has a tutorial for a SIMPLE vertical navigation menu with a submenu. Like a drop down menu but vertical where the main links are on the left and the submenues come out the right side of the menu. I dont need any bells and wistles and I am just learning so it doesnt need anything but a button link when rolled over more link options appear to the right. Is there a tutorial that is not a place trying to sell me this capability and actually works (CS3), no errors, broken links etc...just a how to for a SIMPLE menu with submenus.
    Sorry, I am getting frustrated...thanks

    Okay, just so that it might help someone else who is struggling to find a way to do this, I found a pretty good tutorial on how to make good drop down menus that can easily be made into a vertical pop-out menu as well. I was a bit surprised that there was so little valuable information regarding something that I would think is a pretty common thing, SIMPLE rollovers with submenus. Not only did I have a very difficult time JUST finding a tutorial on basic drop down menus (without all kinds of bells and whistles or people wanting to sell me a package), but there was nobody who could actually point me to the one truly helpful tutorial about the subject out there. So for those who might search I am going to put this link here to the only real thorough tutorial I could find about a simple drop down menu that can work both vertical and horizontal.
    It takes awhile because he is also explaining many things most people with basic knowledge about the program probably already knows but its clear and (SHOCK!) actually works well.
    http://www.tutvid.com/tutorials/flash/tutorials/as3DropDownMenus.php

  • General query on CSM and CSS flow timeout values

    Hi all,
    i have a SLB Application Processor Complex module on my Cisco 6504 which basically does some load balancing work. I am pretty new to this device but the configurations and setup looks somewhat similar to the Cisco ACE but i only have some experience with the Cisco CSS.
    What i would like to know is what the equivalent command to the CSS "flow timeout" is on the CSM. Would that be the "idle timeout" command? I understand that the "pending timeout" is more to governing how long it takes to setup a 3 way handshake from client to server and the "idle timeout" is what i am looking for. Please correct me if i am wrong...
    On the CSS, a flow timeout is on 16secs for most standard ports and 8 secs for HTTP. I would like to know what the default setting is for the CSM idle timeout?? Thanks alot!!
    Daniel

    Hi Daniel,
    For Idle Timeout the the default is 1 hour/ 3600 sec.
    As you know for Cicso CSM thare are 2 timers per vserver.
    Idle timeout
    Pending timeout.
    If a connection is timed out it's because of one of these timers.
    Idle timeout per vserver - If there is no traffic neither from client nor server. Idle connection timer duration in seconds; the range is from 0 (connection remains open indefinitely) to 13500000. The default is 1 hour. If you do not specify a duration value, the default value is applied.
    Examples
    This example shows how to specify an idle timer duration of 4000:
    Cat6k-2(config-slb-vserver)# idle 4000
    Pending timeout per vserver - is the max time allowed to complete the 3-way handshake.The default is 30 sec.Range is from 1 to 65535. This is a SLB virtual server configuration submode command. The pending connection timeout sets the response time for terminating connections if a switch becomes flooded with traffic. If the 3-way handshake does not complete within this time, the connection is dropped.
    The CSM expect to see 2-way traffic within the pending timeout. If no traffic is received from the server, the session is removed.
    Examples
    This example shows how to set the number to wait for a connection to be made to the server:
    Cat6k-2(config-slb-vserver)# pending 300
    These are not counted as failures.
    A failure is when the server does not respond or respond with a reset.
    The CSM can hold 1 million connections in memory at the max.
    So, if you set the idle timeout to 10 hours, your max connection rate is 1 M / 10 * 3600 = ~250 conn/sec.
    Assuming they would all be open and then idle.
    When the number of pending connections exceeds a configurable threshold, the CSM begins using the SYN cookies feature, encrypting all of the connection state information in the sequence numbers that it generates. This action prevents the CSM from consuming any flow state for pending (not fully established) TCP connections. This behavior is fully implemented in hardware and provides a good protection against SYN attacks.
    Generic TCP termination
    Some connections may not require TCP termination for Layer 7 load balancing. You can configure any virtual server to terminate all incoming TCP connections before load balancing those connections to the real servers. This configuration allows you to take advantage of all the CSM DoS features located in Layer 4 load-balancing environments.
    To select the traffic type and appropriate timeout value, use the unidirectional command in the SLB virtual server submode.
    [no | default] unidirectional
    some protocol automatically set the 'unidirectional' function.
    For example : UDP.
    You can see if a vserver is unidirectional or bidirectional by doing a 'sho mod csm X vser name detail'
    When a virtual server is configured as unidirectional, it no longer uses the pending timer. Instead, the idle timer will determine when to close idle or errant flows. Because the idle timer has a much longer default duration than the pending timer, be sure to set the idle timer to an appropriate value.
    Use the command  "show module csm slot# stats" to get the details of connection.
    The statistics counters are 32-bit. Totals are accumulated since the last time the counters were cleared.
    Examples
    This example shows how to display SLB statistics:
    Cat6k-2# show module csm 4 stats
    Connections Created:       180
    Connections Destroyed:     180
    Connections Current:       0
    Connections Timed-Out:     0
    Connections Failed:        0
    Server initiated Connections:
          Created:0, Current:0, Failed:0
    L4 Load-Balanced Decisions:180
    L4 Rejected Connections:   0
    L7 Load-Balanced Decisions:0
    L7 Rejected Connections:
          Total:0, Parser:0,
          Reached max parse len:0, Cookie out of mem:0,
          Cfg version mismatch:0, Bad SSL2 format:0
    L4/L7 Rejected Connections:
          No policy:0, No policy match 0,
          No real:0, ACL denied 0,
          Server initiated:0
    Checksum Failures: IP:0, TCP:0
    Redirect Connections:0,  Redirect Dropped:0
    FTP Connections:           0
    MAC Frames:
          Tx:Unicast:1506, Multicast:0, Broadcast:50898,
              Underflow Errors:0
          Rx:Unicast:2385, Multicast:6148349, Broadcast:53916,
              Overflow Errors:0, CRC Errors:0
    Table mentioned below describes the fields in the display.
    Table for "show module csm stats" Command Field Information
    Field
    Description
    Connections Created
    Number of connections that have been created on the CSM.
    Connections Destroyed
    Number of connections that have been destroyed on the CSM.
    Connections Current
    Number of current connections at the time the command was issued.
    Connections Timed-Out
    Number of connections that have timed out, which can occur for the following reasons:
    •connection has been idle (in one or both directions) for longer than the configured idle timeout.
    •TCP connection setup not completed successfully.
    Connections Failed
    Number of connections failed because the server did not respond within the timeout period, or the server replied with a reset.
    Server initiated Connections
    Number of connections created by real servers, the number of current connections, and the number of connections that failed (because the destination is unreachable).
    L4 Load-Balanced Decisions
    Number of Layer 4 load-balancing decisions attempted.
    L4 Rejected Connections
    Number of Layer 4 connections rejected because no real server was available
    L7 Load-Balanced Decisions
    Number of Layer 7 load-balancing decisions attempted.
    L7 Rejected Connections: Total
    Number of Layer 7 connections rejected.
    L7 Rejected Connections: Parser
    Number of Layer 7 connections rejected because the Layer 7 processor in the CSM ran out of session buffers to save the parsing state for multi-packet HTTP headers. The show module csm tech-support proc 3 command will show detailed buffer usage.
    L7 Rejected Connections: Reached max parse len
    Number of Layer 7 connections rejected because the HTTP header in the packet is longer than max-parse-len. When a virtual server is configured with HTTP persistent rebalancing or cookie matching/sticky, the CSM must parse to the end of HTTP header. The default max-parse-len value is 2000 bytes.
    L7 Rejected Connections: Cookie out of mem:
    Number of Layer 7 connections rejected because of no memory to store cookies. When a virtual server is configured with cookie matching, the CSM must save the cookie contents in memory.
    L7 Rejected Connections: Cfg version mismatch
    Number of Layer 7 connections rejected because part of the request was processed with an older version of the configuration. This counter should only increase after configuration changes.
    L7 Rejected Connections: Bad SSL2 format:
    Number of Layer 7 connections rejected because the request is using an unsupported SSL format or the format is not valid SSL.
    L4/L7 Rejected Connections
    Number of Layer 4 and Layer 7 connections rejected for policy related reasons:
    No policy: connection rejected because the request matched a virtual server, but this virtual server did not have a policy configured.
    No policy match: connection rejected because the request matched a virtual server, but the request did not match any policy configured on the virtual server.
    No real: connection rejected because no real server was available to service the request
    ACL denied: connection rejected because a request matched a policy with a client-access-list entry and the entry is configured to deny the request.
    Server Initiated: connection initiated by a real server is rejected.
    Checksum Failures
    Number of checksum failures detected (there are separate counters for IP and TCP failures).
    Redirect Connections
    Number of connections redirected, and the number of redirect connections dropped.
    FTP Connections
    Number of FTP connections opened.
    MAC Frames
    Number of MAC frames received and transmitted on the CSM backplane connection.
    For getting details on all of these commands kindy refer Catalyst 6500 Series Switch Content Switching Module Command Reference, 4.2 URL mentioned below:
    http://cisco.biz/en/US/docs/interfaces_modules/services_modules/csm/4.2.x/command/reference/cmdrfIX.html
    Kindly Rate.
    HTH
    Sachin Garg

  • How can i impement some simple menu bar into this code ?

    Hello all.
    I have a problem with my program. I wanna add a simple menu bar, but i don't have any idea how to do it.
    Here is code of my program:
    import java.awt.Menu;
    import javax.swing.event.MenuListener;
    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter.DEFAULT;
    import org.eclipse.swt.SWT;
    import org.eclipse.swt.events.PaintEvent;
    import org.eclipse.swt.events.PaintListener;
    import org.eclipse.swt.graphics.GC;
    import org.eclipse.swt.graphics.Image;
    import org.eclipse.swt.layout.FillLayout;
    import org.eclipse.swt.widgets.Canvas;
    import org.eclipse.swt.widgets.Display;
    import org.eclipse.swt.widgets.Event;
    import org.eclipse.swt.widgets.Listener;
    import org.eclipse.swt.widgets.MenuItem;
    import org.eclipse.swt.widgets.Shell;
    public class SimpleGraphicEditor {
    public Display display;
    public Shell shell,shellmenu;
    public Canvas canvas;
    public Image imageBuffer;
    org.eclipse.swt.widgets.Menu menu;
    public Menu fileMenu, editMenu, viewMenu;
    int startx=0;
    int starty=0;
    int endx=0;
    int endy=0;
         public SimpleGraphicEditor() {
              display = new Display();
              shell = new Shell(display);
              createGUI();
              shell.open();
                   while(!shell.isDisposed()) {
                   if(!display.readAndDispatch()) {
                        display.sleep();
              } // end of simple grapphic editor
              private void createGUI() {
                   shell.setLayout(new FillLayout());
                   canvas = new Canvas(shell, SWT.BORDER);
                   menu = null;
                   shell.setText("Simple rec draw");
                   shell.setSize(500, 500);
                   shell.setMenuBar(menu);
                   canvas.addPaintListener(new PaintListener() {
                             public void paintControl(PaintEvent e) {
                             e.gc.drawImage(imageBuffer, 0, 0, 500, 500, 0, 0, 500, 500);      
                   imageBuffer = new Image(display, 500, 500);
                   Listener listener = new Listener() {
                        private boolean isDrawing;
                        private GC gc = new GC(imageBuffer);
                        private int oldX = 0;
                        private int oldY = 0;
                        private int newX = 0;
                        private int newY = 0;
                        private boolean isDeleting;
                        public void handleEvent(Event event) {
                             // System.err.println("type=" + event.type);
                             switch(event.type) {
                             case SWT.MouseDown:
                                  // System.err.println("button down");
                                  switch(event.button) {
                                  case 1:
                                       isDrawing = true;
                                       System.out.println("Start at:("+event.x+","+event.y);
                                       startx=event.x;
                                       starty=event.y;
                                       break;
                                  case 2:
                                       System.err.println("button2 down");
                                       break;
                                  case 3:
                                       isDeleting = true;
                                       gc.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
                                       break;
                                  break;
                             case SWT.MouseUp:
                                  // System.err.println("button up");
                                  switch(event.button) {
                                  case 1:
                                       isDrawing = false;
                                       // --- czyszczenie tablicy ---
                                       System.out.println("End at:("+event.x+","+event.y);
                                       int szerokosc=event.x-startx;
                                       int wysokosc=event.y-starty;
                                       //gc.drawRectangle(startx, starty, szerokosc,wysokosc);
                                       gc.setBackground(display.getSystemColor(SWT.COLOR_GREEN));
                                       gc.fillRectangle(startx, starty, szerokosc,wysokosc);
                                       canvas.redraw();
                                       break;
                                  case 2:
                                       System.err.println("button2 up");
                                       break;
                                  case 3:
                                       isDeleting = false;
                                       break;
                                  break;
                             case SWT.MouseMove:
                                  newX = event.x;
                                  newY = event.y;
                                  // System.err.println("mouse moved");
                                  if(isDrawing) {
                                                   // ----------- draw at hold  -----------------------------                    
                                       //gc.drawLine(oldX, oldY, newX, newY);
                                       int szerokosc=event.x-startx;
                                       int wysokosc=event.y-starty;
                                       gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
                                       gc.drawText("x:"+event.x+", y:"+event.y+"  ", 0, 0);
                                       canvas.redraw();
                                       // ----- Clear the whole area -------------
                                       gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE));
                                       gc.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
                                       gc.fillRectangle(startx, starty, szerokosc+500, wysokosc+500);
                                       gc.fillRectangle(startx, starty, szerokosc-500, wysokosc-500);
                                       gc.fillRectangle(startx, starty, szerokosc+500, wysokosc-500);
                                       gc.fillRectangle(startx, starty, szerokosc-500, wysokosc+500);
                                       canvas.redraw();
                                       gc.setForeground(display.getSystemColor(SWT.COLOR_DARK_BLUE));
                                       gc.drawRectangle(startx, starty, szerokosc, wysokosc);
                                       canvas.redraw();
                                       int x = (oldX < newX) ? oldX : newX;
                                       int y = (oldY < newY) ? oldY : newY;
                                       int width = (oldX < newX) ? (newX-oldX) : (oldX - newX);
                                       int height = (oldY < newY) ? (newY-oldY) : (oldY - newY);
                                       if(width < 20) width = 20;
                                       if(height < 20) height = 20;
                                       canvas.redraw(x, y, width, height, true);
                                  } else if(isDeleting) {
                                       // Color c = gc.getBackground();
                                       // gc.setBackground(gc.getForeground());
                                       gc.fillRectangle(newX - 15, newY - 15, 30, 30);
                                       canvas.redraw(newX - 15, newY - 15, 30, 30, true);
                                       // gc.setBackground(c);
                                       break;
                             } // end switch caly
                             oldX = event.x;
                             oldY = event.y;
                   canvas.redraw();
                   canvas.addListener(SWT.MouseDown, listener);
                   canvas.addListener(SWT.MouseUp, listener);
                   canvas.addListener(SWT.MouseMove, listener);
              public static void main(String[] args) {
                   new SimpleGraphicEditor();
    }

    nitroduxe wrote:
    ok i add the following code:
    menu = new org.eclipse.swt.widgets.Menu(shell, SWT.BAR);
                   MenuItem fileItem = new MenuItem(menu, SWT.CASCADE);
                  fileItem.setText("menu1");
                  MenuItem editItem = new MenuItem(menu, SWT.CASCADE);
                  editItem.setText("menu2");
                  MenuItem viewItem = new MenuItem(menu, SWT.CASCADE);
                  viewItem.setText("menu3");
                  shell.setMenuBar(menu); // DODANIE MENUhow now i can add some submenu into menu1 and menu2 and menu3 ?
    Edited by: nitroduxe on Mar 9, 2010 10:23 AMI would start by reading the [menu tutorial|http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html].

  • Timeout value in the Manual Actions...

    Hi Everyone,
    I am actually facing a weird problem with respect to the timeout
    value. My workflow has the following Manual Action in the Notify
    Activity which does wait for 1 min max and should continue to proceed
    forward.
    ===
    <ManualAction id='0' name='Processing in backround' timeout='1' hidden='true'>
    <Owner>
    <ref>WF_CASE_OWNER</ref>
    </Owner>
    </ManualAction>
    ========
    However, the workflow is getting into the suspended mode
    Workflow task report:
    Check completion 'Notify Activity' Waiting on work item owned by
    'sample user' ---------------------------------------- Walking case
    Walking case 'Sample Registration' Processing steps in 'Sample
    Registration' Step pass 1 Check completion 'Notify Activity' Waiting
    on work item owned by 'sample user' Case suspended with resume date
    10/14/09 05:28:00 EDT Finished executing workflow case Sample
    Registration
    Task Instance Report:
    <Step id='2' activityId='2' state='executing' title='Notify' Activity='3'>
    <Result actionId='1' owner='#ID#Configurator'
    workItem='#ID#5BF16F45GF17091:-3678932225576A432:-7CED'
    timeout='2009-10-15T00:38:16.326Z'/>
    </Step>
    The workflow should wait for max 1 min and should proceed forward.
    However, as you see in the above the timeout value set is
    2009-10-15T00:38:16.326Z which seems odd because the workflow has
    been suspended with resume date 10/14/09 05:28:00 EDT. But the timeout
    value seems higher rather than just timing out for 1 min
    Can anyone tell me who is setting the following below and where is
    thing being picked up? I don't think its even honoring the 1 min
    value?
    timeout='2009-10-15T00:38:16.326Z'
    Overall result is task waits for couple of hours and then gets
    executed. Seems to me like a bug? Please let me know your thoughts on
    this?
    Thanks.

    Hello javelkur, thanks for answer.
    The TCL is the Cisco TCL IVR Script (its-CISCO.2.0.2.0.tcl).
    If I call the ip phone directly is the same issue.
    Thanks in advance.

  • Automatically Lock the Computer After a Specified Timeout Value

    Is there any way to set a Win 7 box to automatically lock after a set timeout value with either GPO or the registry
    without having to enable a screensaver? All my searching has come up with using the screensaver to accomplish this. We do not use a screensaver but instead turn the monitors off, screensavers are so 90's. Thanks.

    Hi Brad5689,
    There is a group policy we can have a try .
    Computer Configuration | Administrative Templates | System | Power Management|Video and display
    Conserving Energy with Group Policy(It is also applied to Windows 7)
    https://technet.microsoft.com/en-us/magazine/cc462804.aspx
    Best regards
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How do I set the IFSshell timeout value?

    How do I set the IFSshell timeout value?
    I open an ifsshell and move to a directory.
    Do something. Come back in 10 minites and the shell has timed
    out. Have to logout and log back in and move to the directory
    again.
    Thanks
    -Mitch

    FYI,
    IFS.PROTOCOLSERVER.SESSION.DEFAULT.Timeout
    IFS.PROTOCOLSERVER.SessionStateTimeoutPeriod
    IFS.PROTOCOLSERVER.SessionStateTimeoutPeriod
    in cup server configuration

  • How can I make a DVD with a VERY simple menu

    I want to create a DVD that autostarts with an opening menu containing a title, a picture and a play button - nothing else. The DVD will contain only one video (created in i-Movie). I want to press "Play" from the opening menu and the video will play. I don't seem to be able to create anything less than a 2-level menu.

    Hi
    From iMovie - do not use Share to iDVD - but - Share to Media Browser and as Large (not HD or other res. as result will lose quality)
    In iDVD - I select a very simple Menu - Old themes -> Brushed Metal
    Then in iDVD click on Media button and on Movie and here select Your Movie and drop it into iDVD Menu window.
    Now You get a Play movie title/button - If You also get Play Scenes - then select this title and erase it if You don't want it.
    Yours Bengt W

Maybe you are looking for

  • I got the iphone iOS 7.1.1 update and now my music won't play and I can't download apps. Can I fix it?

    When i got the update at first the music would play while my headphones were in. I restored my iphone and now it won't play at all. I have tried to go in the settings for itunes and app store but it also won't load.

  • How do i transfer photos from an old library to my current one ??????

      how do i transfer photos from an Iphone that has been sync to an old Itunes library and transfer the data to my new itunes library ???????

  • Problem reading txt file

    Hi I have a shell cluster where I type different data for my file. Then I save this to txt file. The problem is when I want to open the file and use the data for the same shell cluster, which is now an indicator. Can someone help me with this?? Attac

  • Different ways to mount a directory?

    I'm a little confused on the different ways to mount a dirctory such as /usr in a non-global zone. I could either do one of the following: add inherit-package-dir set dir=/usr or I could add fs set dir=/usr set special=/usr set type=lofs I'm sure the

  • Transaction document for Idoc type

    Hi Experts, I am seeking little information about below Idoc type from POS to SAP IS Retail, I would like to know that, what are the transaction documents generated in SAP IS Retail after executing of below inbound idoc type. For example WPUUMS – It