Search Results

Search found 12948 results on 518 pages for 'mouse events'.

Page 104/518 | < Previous Page | 100 101 102 103 104 105 106 107 108 109 110 111  | Next Page >

  • Problem with StandardOutput stream in async mode.

    - by JF
    Hi everyone. I have a program that launches command line processes in async mode, using BeginOutputReadLine. My problem is that the .Exited event is triggered when there is still some .OutputDataReceived events being triggered. What I do in my .Exited event must happen only once all my .OutputDataReceived events are done, or I'll be missing some output. I looked in the Process class to see if anything could be useful to me, as to wait for the stream to be empty, but all I find is for sync mode only. Can any of you help? Thanx.

    Read the article

  • onclick event from XML Nodes

    - by user256007
    My Documents are a mixture of XML and HTML Tags. where HTML tags are pulled from xhtml namespace and mine are from various namspaces. I wanna take user interaction events from XML Nodes of my Document. I First tried <do:landingTime xhtml:onclick="fnc">20:48:29.45</do:landingTime> with no Luck. But <xhtml:span onclick="fnc"> works. So is there any solution/tricks/hacks/backdoor to take events from my xml Nodes.

    Read the article

  • accessing associations within GORM Events

    - by Don
    Hi, My Grails app has a User class and a Role class. The User class has an authorities property which holds the roles assigned to that user, e.g. class User { static hasMany = [authorities: Role] // This method is called automatically after a user is inserted def afterInsert() { this.authorities.size() } } If I create a user and assign them a role, a NullPointerException is thrown from the GORM event method afterInsert(), because authorities is null. If I comment out afterInsert() the user is saved correctly along with the assigned role. Is there some reason why I can't access associations from GORM event methods. Is is possible that this event is fired after the User row is inserted, but before the row is added to the User-Role join table? Thanks, Don

    Read the article

  • How does rolling back an application level transaction interact with SqlDataAdapter events in ADO.NE

    - by ilasno
    When utilizing the RowUpdated event in the SqlAdapter class, i'm assuming that it is raised directly following the return of the database interaction that executes the update. If that update is part of an application level transaction (utilizing the SqlTransaction class) which is then rolled back, does this affect or interact at all with the RowUpdated event? Or is the RowUpdated event not raised until after the transaction is committed (this seems unlikely, but i couldn't find documentation)? If RowUpdated has already been raised, and then the transaction is rolled back, any good ideas on how to adjust something that may have been done in RowUpdated that should then, also be rolled back?

    Read the article

  • Accessing and binding events to an ASP.NET Grid view using Jquery

    - by Sayem Ahmed
    I have an ASP page which displays a text box when it loads. It takes an input number, send it to the server through post back, and then displays some record in a grid view. After a number is input into the box, the server fetches some data from a database and add records to the grid view. It also contains a link column, whose URL is set to "#", so that the page isn't redirected when it is clicked. Now I want to bind a jquery "click" event to that link. How can I do that ? I have tried that to do myself but failed, because it is not available when the DOM is loaded (since it only contains rows when a number is input through the box), and is being modified through ASP.NET Ajax post back.

    Read the article

  • CommandManager Executed Events don't fire for custom ICommands

    - by Andre Luus
    The WPF CommandManager allows you to do the following (pseudo-ish-code): <Button Name="SomeButton" Command="{Binding Path=ViewModelCommand}"/> And in the code-behind: private void InitCommandEvents() { CommandManager.AddExecutedEventHandler(this.SomeButton, SomeEventHandler); } The SomeEventHandler never gets called. To me this didn't seem like something very wrong to try and do, but if you consider what happens inside CommandManager.AddExecutedEventHandler, it makes sense why it doesn't. Add to that the fact that the documentation clearly states that the CommandManager only works with RoutedCommands. Nonetheless, this had me very frustrated for a while and led me to this question: What would you suggest is the best workaround for the fact that the CommandManager does not support custom ICommands? Especially if you want to add behavior around the execution of a command? For now, I fire the command manually in code behind from the button click event.

    Read the article

  • CustomValidatation control that fire on multiple control events

    - by George
    I am trying to create a UserControl that is a composite control for entering Dates. It involves 2 drop down controls (one for month and one for day) and a text box for year. It also has a CustomValidation control that I would like the user of the UserControl to be able to set the ClientValidationFunction property and have it triggered whenever the value in any of the 3 date part controls changes. To hook up each of the 3 controls to the validation control, I use teh AJAX ValidatorHookupControlID method. If I hard code the following code directly in my aspx page that houses the usercontrol, my Client Validation Function is successfulluy called when any of the 3 date part control values are changed: <script type="text/javascript"> //<![CDATA[ debugger; alert('hooking up'); ValidatorHookupControlID("ctl00_phPageContent_dtmPassportExpirationDate_txtYear", document.all("ctl00_phPageContent_dtmPassportExpirationDate_CustomValidator1")); ValidatorHookupControlID("ctl00_phPageContent_dtmPassportExpirationDate_ddlDate", document.all("ctl00_phPageContent_dtmPassportExpirationDate_CustomValidator1")); ValidatorHookupControlID("ctl00_phPageContent_dtmPassportExpirationDate_ddlMonth", document.all("ctl00_phPageContent_dtmPassportExpirationDate_CustomValidator1")); //]]> However, I would like my usercontrol to emit this Javascript, so I added the following Code. Public Property ClientValidationFunction() As String Get Return CustomValidator1.ClientValidationFunction End Get Set(ByVal value As String) CustomValidator1.ClientValidationFunction = value End Set End Property Public Property EnableClientScript() As Boolean Get Return CustomValidator1.EnableClientScript End Get Set(ByVal value As Boolean) CustomValidator1.EnableClientScript = value End Set End Property Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender If Me.ClientValidationFunction.Trim <> "" AndAlso Me.EnableClientScript Then RegisterValidationScript() End If End Sub Private Sub RegisterValidationScript() Dim Key As String = Me.ClientID & "_ClientValidate" If Not Page.ClientScript.IsClientScriptBlockRegistered(Key) Then Page.ClientScript.RegisterClientScriptBlock(GetType(String), Key, GetJavascript, True) End If End Sub Private Function GetJavascript() As String Dim Out As String = "" Const Quote As String = Chr(34) Out &= "debugger;" & vbCrLf Out &= "ValidatorHookupControlID(" & Quote & txtYear.ClientID & Quote & ", document.all(" & Quote & CustomValidator1.ClientID & Quote & "));" & vbCrLf Out &= "ValidatorHookupControlID(" & Quote & ddlDate.ClientID & Quote & ", document.all(" & Quote & CustomValidator1.ClientID & Quote & "));" & vbCrLf Out &= "ValidatorHookupControlID(" & Quote & ddlMonth.ClientID & Quote & ", document.all(" & Quote & CustomValidator1.ClientID & Quote & "));" & vbCrLf Return Out End Function Unfortunately, when the ValidatorHookupControlID method is called, the second parameter (the one that locates the validation control) always evaluates to null and the method fails. ValidatorHookupControlID("ctl00_phPageContent_DateSelector21_txtYear", document.all("ctl00_phPageContent_DateSelector21_CustomValidator1")); Can you tell me how to correct this error?

    Read the article

  • Cleaning all inline events from HTML tags

    - by Itay Moav
    For HTML input, I want to neutralize all HTML elements that have inline js (onclick="..", onmouseout=".." etc). I am thinking, isn't it enough to encode the following chars? =,(,) So onclick="location.href='ggg.com'" will become onclick%3D"location.href%3D'ggg.com'" What am I missing here? Edit: I do need to accept active HTML (I can't escape it all or entities is it).

    Read the article

  • Correct way of using/testing event service in Eclipse E4 RCP

    - by Thorsten Beck
    Allow me to pose two coupled questions that might boil down to one about good application design ;-) What is the best practice for using event based communication in an e4 RCP application? How can I write simple unit tests (using JUnit) for classes that send/receive events using dependency injection and IEventBroker ? Let’s be more concrete: say I am developing an Eclipse e4 RCP application consisting of several plugins that need to communicate. For communication I want to use the event service provided by org.eclipse.e4.core.services.events.IEventBroker so my plugins stay loosely coupled. I use dependency injection to inject the event broker to a class that dispatches events: @Inject static IEventBroker broker; private void sendEvent() { broker.post(MyEventConstants.SOME_EVENT, payload) } On the receiver side, I have a method like: @Inject @Optional private void receiveEvent(@UIEventTopic(MyEventConstants.SOME_EVENT) Object payload) Now the questions: In order for IEventBroker to be successfully injected, my class needs access to the current IEclipseContext. Most of my classes using the event service are not referenced by the e4 application model, so I have to manually inject the context on instantiation using e.g. ContextInjectionFactory.inject(myEventSendingObject, context); This approach works but I find myself passing around a lot of context to wherever I use the event service. Is this really the correct approach to event based communication across an E4 application? how can I easily write JUnit tests for a class that uses the event service (either as a sender or receiver)? Obviously, none of the above annotations work in isolation since there is no context available. I understand everyone’s convinced that dependency injection simplifies testability. But does this also apply to injecting services like the IEventBroker? This article describes creation of your own IEclipseContext to include the process of DI in tests. Not sure if this could resolve my 2nd issue but I also hesitate running all my tests as JUnit Plug-in tests as it appears impractible to fire up the PDE for each unit test. Maybe I just misunderstand the approach. This article speaks about “simply mocking IEventBroker”. Yes, that would be great! Unfortunately, I couldn’t find any information on how this can be achieved. All this makes me wonder whether I am still on a "good path" or if this is already a case of bad design? And if so, how would you go about redesigning? Move all event related actions to dedicated event sender/receiver classes or a dedicated plugin?

    Read the article

  • Event Tracking

    - by DRapp
    I want to understand event cycles. I have a form with a grid and textboxes. It has a grid, bound to DataTable, and textboxes bound to same table too. I'm trying to debug something and need to know how to identify ALL events fired in the form to see what may solve an issue for me. Anyhow, unless I explicitly subclass every class on my form, and override / attach to every event to my own event handlers, how can I get / listen to all events being fired during a certain action... Such as changing a "Selected" road in a DataGridView. It obviously updates its own "CurrentRow"... I need to know what / how to maybe FORCE a re-loading of SAME CurrentRow. Reason: during a form level "Edit Mode", and I change the content in another "Textbox" control, and reject changes, I need it to simulate the current "Record" is reloaded to go back to its original values.

    Read the article

  • events is not displayed on my fullcalendar

    - by ChangJiu
    Hi BalusC! I have used your method at above in my servelt. **[CalendarMap]** public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Map<String, Object> map = new HashMap<String, Object>(); map.put("id", 115); map.put("title", "changjiu"); map.put("start", new SimpleDateFormat("yyyy-MM-15").format(new Date())); map.put("url", "http://yahoo.com/"); // Convert to JSON string. String json = new Gson().toJson(map); // Write JSON string. response.setContentType("application/json"); response.setCharacterEncoding("UTF-8"); response.getWriter().write(json); } I want to display it my fullcalendar as follow. $(document).ready(function() { $('#calendar').fullCalendar({ eventSources: [ "CalendarMap" ] }); }); but it's not worked! Can you help me? thank you!

    Read the article

  • getting keyboard events with pyqt

    - by Moayyad Yaghi
    hello i converted recently from wxpython to pyqt and im still facing alot of problems since im still noob in pyqt so is it possible to detected if user pressed (CTRL+key ) in pyqt ? and how ? i've been trying to find an answer for this for 3 days . if you know website or a good place to learn pyqt, it will be highly appreciated thanx in advance

    Read the article

  • touchesBegan and other touch events not getting detected in UINavigationController

    - by SaltyNuts
    In short, I want to detect a touch on the navigation controller titlebar, but having trouble actually catching any touches at all! Everything is done without IB, if that makes a difference. My app delegate's .m file contains: MyViewController *viewController = [[MyViewController alloc] init]; navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; [window addSubview:navigationController.view]; There are a few other subviews added to this window in a way that overlays navigationController leaving only the navigation bar visible. MyViewController is a subclass of UIViewController and its .m file contains: - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { for (UITouch *touch in touches) { NSLog(@"ended\n"); } } -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { for (UITouch *touch in touches) { NSLog(@"began\n"); } } I also tried putting these functions directly into app delegate's .m file, but the console remains blank. What am I doing wrong?

    Read the article

  • jQuery / jqgrid / Editing form events

    - by MiBol
    I'm working with the jqGrid and I want to know if exists an event to read a double click in the Editing Form? Has example: I have a grid with ColumnA and ColumnB. I want read the event when the user perform a double click under ColumnB (In the Editing Form). Thanks! I found the solution of my problem ^^ Here is the code, to this example I use the alert "TEST!!!"... [Thanks to Oleg to wake up my mind :P] In the colModel { name: 'Total_uploads', index: 'Total_uploads', width: '100', editable: true, edittype: 'text', editoptions: { size: 10, maxlength: '20', dataInit: function (el) { $(el).click(function () { alert("TEST!!!"); }); } }, editrules: { required: true }, formoptions: { label: 'Total uploads: ', elmsuffix: '&nbsp;&nbsp; <span style="color : #0C66BE; font-family: Calibri">(*)</span>' } }

    Read the article

  • QUnit Unit Testing: Test Mouse Click

    - by Ngu Soon Hui
    I have the following HTML code: <div id="main"> <form Id="search-form" action="/ViewRecord/AllRecord" method="post"> <div> <fieldset> <legend>Search</legend> <p> <label for="username">Staff name</label> <input id="username" name="username" type="text" value="" /> <label for="softype"> software type</label> <input type="submit" value="Search" /> </p> </fieldset> </div> </form> </div> And the following Javascript code ( with JQuery as the library): $(function() { $("#username").click(function() { $.getJSON("ViewRecord/GetSoftwareChoice", {}, function(data) { // use data to manipulate other controls }); }); }); Now, how to test $("#username").click so that for a given input, it calls the correct url ( in this case, its ViewRecord/GetSoftwareChoice) And, the output is expected (in this case, function(data)) behaves correctly? Any idea how to do this with QUnit? Edit: I read the QUnit examples, but they seem to be dealing with a simple scenario with no AJAX interaction. And although there are ASP.NET MVC examples, but I think they are really testing the output of the server to an AJAX call, i.e., it's still testing the server response, not the AJAX response. What I want is how to test the client side response.

    Read the article

  • Mouse move panning

    - by Rudy
    Hi all, I'm trying to scroll a series of thumbnails horizontally based on the mouseX position. I can get it to scroll but it's very choppy and for some reason it's not reading my start and end numbers so it will stop scrolling. Can anyone point me in the right direction? Thanks. var thumbBounds:Object = new Object(); thumbBounds = thumbContainer.getBounds(this); thumbContainer.addEventListener(MouseEvent.MOUSE_OVER, setScrolling); private function setScrolling(me:MouseEvent):void { thumbContainer.removeEventListener(MouseEvent.MOUSE_OVER, setScrolling); stage.addEventListener(Event.ENTER_FRAME, scrollThumbs); } private function scrollThumbs(e:Event):void { if(mouseX <= thumbBounds.x || mouseX thumbBounds.width || mouseX < thumbBounds.y || mouseX thumbBounds.height) { thumbContainer.addEventListener(MouseEvent.MOUSE_OVER, setScrolling); stage.removeEventListener(Event.ENTER_FRAME, scrollThumbs); } if(thumbContainer.x = 0) { thumbContainer.x = 0; } if(thumbContainer.x <= -842) { thumbContainer.x = -842; } var xdist:Number = new Number(); xdist = mouseX - 382; thumbContainer.x += Math.round(-xdist / 10); }

    Read the article

  • Avoid flickering on mouse over

    - by GigaPr
    Hi I have a simple link in a menu <a id="Home" href="Amico-Bio-Home-Page"></a> to which i apply the following style #Home{ background-image:url(../Images/Menu/home.png); background-repeat:no-repeat; border:none; display:block; height:70px; text-decoration:none; width:78px; float:left; padding:0 7px; } #Home:hover { background-image: url(../Images/Menu/homeOn.png); } when i go over the link the images are swapped. while swapping the images the link disappear for an instant. Do you know any way to avoid it? thanks

    Read the article

  • jquery change image on mouse rollover

    - by Craig Rinde
    I have been having problems with this. I think this should be pretty simple but I cannot seem to get it to work. I want a new image to appear when rolling over my facebook button. Thanks for your help! <p align="right"> <a href="http://www.facebook.com/AerialistPress" ><img height="30px" id="facebook" class="changePad" alt="Aerialist Press Facebook Page" src="/sites/aerialist.localhost/files/images/facebook300.jpg" /></a> <a href="http://twitter.com/#!/AerialistPress" > <img height="30px" class="changePad" alt="Aerialist Press Twitter Page" src="/sites/aerialist.localhost/files/images/twitter300.jpg" /></a> <a href="http://www.pinterest.com/aerialistpress" ><img height="30px" class="changePad" alt="Aerialist Press Pinterest Page" src="/sites/aerialist.localhost/files/images/pinterest300.jpg" /></a> </p> <script> jQuery(document).ready(function(){ jQuery('#facebook').mouseover(function() { jQuery('#facebook').attr('src').replace('/sites/aerialist.localhost/files/images/facebook-roll.jpg'); }) }); </script>

    Read the article

  • Intercepting touch events on activity and button on Android

    - by hgpc
    I have an Android activity with an ImageButton. I would like to execute some logic when the button is clicked and show a different image for the pressed state, but also receive the touch event on the activity. By default only the button receives the touch event. If I set the clickable attribute of the button to false then only the activity receives the touch event. What's the best way to receive the touch event in both the activity and the button?

    Read the article

  • Exceptions and Access Violations in Paint events in Windows

    - by Patrick
    After executing some new code, my C++ application started to behave strange (incorrect or incomplete screen updates, sometimes no screen updates at all). After a while we found out that the new code is causing an Access Violation. Strange enough, the application simply keeps on running (but with the incorrect screen updates). At first we thought the problem was caused by a "try-catch(...)" construction (put there by an overactive ex-colleague), but several hours later (carefully inspecting the call stacks, adding many breakpoints, ...) we found out that if there's an Access Violation in a paint event, Windows catches it, and simply continues running the application. Is this normal behavior? Is it normal that Windows catches exceptions/errors during a paint event? Is there a way to disable this? (if not, it would mean that we have to always run in the debugger with all exceptions enabled while testing our code). Patrick

    Read the article

  • Unable to set mouse cursor JLayeredPane

    - by Ones3k2
    I'm running into a problem that I can't seem to figure out nor find the answer anywhere on the web. I've got a JLayeredPane and when it only has one child Panel I am able to correctly set the cursor using setCursor(). The cursor shows up and everything is fine. But when I add an additional JPanel into the JLayeredPane the cursor no longer shows up for example this works: m_layeredPane = new JLayeredPane(); m_layeredPane.setLayout(new WBLayoutManager()); m_layeredPane.add(m_mediaPanel, new Integer(0)); // m_layeredPane.add(m_whiteboardPanel, new Integer(1)); m_layeredPane.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); // WORKS but this doesn't: m_layeredPane = new JLayeredPane(); m_layeredPane.setLayout(new WBLayoutManager()); m_layeredPane.add(m_mediaPanel, new Integer(0)); m_layeredPane.add(m_whiteboardPanel, new Integer(1)); m_layeredPane.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); // FAILS Anyone know how i can get custom cursors working within a JLayeredPane

    Read the article

  • Add client-side events to ASP.Net custom control at runtime

    - by nw
    I'm building an ASP.net custom control that implements IScriptControl. I would like other users of my control to be able to assign client-side event handlers to the control. Unfortunately the JS generated by IScriptControl is always injected at the very bottom of the rendered page (see below), so any attempt to assign an event handler in the ASPX page fails because the code executes too early. ... <script type="text/javascript"> //<![CDATA[ Sys.Application.initialize(); Sys.Application.add_init(function() { $create(MyNamespace.MyControl, {}, null, null, $get("my_control_id")); }); //]]> </script> </form> What's the right way to assign an event handler to the instantiated control upon page load?

    Read the article

< Previous Page | 100 101 102 103 104 105 106 107 108 109 110 111  | Next Page >