Search Results

Search found 10381 results on 416 pages for 'delegate and events'.

Page 80/416 | < Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >

  • Is it possible to trigger Mouseevents by a divcontainer?

    - by Lara Röpnack
    I have an div Element with the ID mypointer, wich has an absolute position. I animate this div on a page with jquery. The goal is a presentation where the elements show the same reaktion on the div element like the mousepointer. So I want to simulate mouseover, click and rightclick events. Is that possible? Can someone give me an example which show me how to do that? Thank you for your answers Lara

    Read the article

  • How to detect if object was updated using Nhibernate?

    - by Karel Frajtak
    I need to find out how to perform some action (flush cache) when an object of type X is updated. So when I save object of type Y, nothing is done, when I save unchanged object of type X nothing should happed, but when this object is changed and UPDATE is made, I want to know it. I tried various NHibernate events (IPostUpdateEventListener, IFlushEntityEventListener, etc.) but did not succeed. Can anybody help please? Thanks

    Read the article

  • Assigning a view controller to be the delegate of a subview which is not directly descendent?

    - by ambertch
    I am writing an iphone app where in numerous cases a subview needs to talk to its superview. For example: View A has a table view that contains photos A has a subview B which allows users to add photos, upon which I want to auto append them to A's table view So far I have been creating a @protocol in B, and registering A as the delegate. The problem in my case is that B has a subview C that allows users to add content, and I want actions in C to invoke changes in its grandparent, A. Currently I am working around this by passing around a self pointer to my base view controller (C.delegate = B.delegate), but it doesn't seem very proper to me. Any thoughts? (and/or general advice on code organization when all sort of subviews needs to talk to superviews would be greatly appreciated) Thanks!

    Read the article

  • innerHTML and event delegation

    - by Mark Gerrard
    Hello, I have a containing div that has multiple divs within which is updated every 25ms using innerHTML (for performance reasons). I have tried using event delegation to capture events but nothing I seem to do captures the click event. I think this may be due to the speed that the contents are getting updated. Any ideas would be very welcome. Thanks Mark

    Read the article

  • datagridview rowsremoved event gets called every time data loads

    - by Nilotpal Das
    The datagridview rowsremoved event gets called every time the data gets loaded. It also makes sense to a certain extent that every time the data loads, the existing rows are removed. so technically the event should get called. But how do i differenciate that from the actual delete button getting pressed. I don't think the key events should be used, that wouldn't be a clean approach. Any help will be most appreciated.

    Read the article

  • Why am I getting this warning about my app delegate and CLLocationManageDelegate?

    - by Dan Ray
    Observe this perfectly simple UIViewController subclass method: -(IBAction)launchSearch { OffersSearchController *search = [[OffersSearchController alloc] initWithNibName:@"OffersSearchView" bundle:nil]; EverWondrAppDelegate *del = [UIApplication sharedApplication].delegate; [del.navigationController pushViewController:search animated:YES]; [search release]; } On the line where I get *del, I am getting a compiler warning that reads, Type 'id <UIApplicationDelegate>' does not conform to the 'CLLocationManagerDelegate' protocol. In fact, my app delegate DOES conform to that protocol, AND what I'm doing here has nothing at all to do with that. So what's up with that message? Secondary question: sometimes I can get to my navigationController via self.navigationController, and sometimes I can't, and have to go to my app delegate's property to get it like I'm doing here. Any hint about why that is would be very useful.

    Read the article

  • Basic GUI Event Handling Questions C#

    - by JHarley1
    Good Afternoon, I have some very basic questions on GUI Event Handling. Firstly with C# how can we link events to objects - I am guessing event handlers? If so can each handler use separate code? - How can the event handler locate the objects it must manipulate? I have a rough idea of how it works in JAVA. Pointing me towards a reference would be fine - I have already trawled Google for answers to no avail. Many Thanks, J

    Read the article

  • GWT: What is the way to handle Click on GWT FlowPanel

    - by shaman.sir
    May be a dumb question, but GWT FlowPanel (raw div element) does not provides something to handle a mouseclick/mousemovement on it. Overriding onBrowserEvent do not works either. If setting onclick event using native JavaScript (need to specify positive height before, 'div' have a height of 0 if not specified), then catching these events is working properly. Is there a way to do it without using JSNI?

    Read the article

  • keypress event not being triggered only at start and end of text field in Firefox (JQuery)

    - by rlivsey
    I'm listening for keypress events on an input field with delegation. For some reason, Firefox doesn't trigger the delegated event for cursor UP when at the start of the field, or cursor DOWN when at the end. LEFT and RIGHT work as expected all the time. Directly binding an event listener to the field works fine, so it has to be something to do with delegation. Does anyone know if this is a know issue, I couldn't find anything on Google/forums etc..? $("div").delegate(":input", "keypress", function(e){ // doesn't get triggered }); $("div :input").bind("keypress", function(e){ // gets triggered fine }); Here's a demo which shows the issue - http://livsey.org/jquery.delegation.html

    Read the article

  • Ideas on implementing threads and cross process communication. - C

    - by Jamie Keeling
    Hello all! I have an application consisting of two windows, one communicates to the other and sends it a struct constaining two integers (In this case two rolls of a dice). I will be using events for the following circumstances: Process a sends data to process b, process b displays data Process a closes, in turn closing process b Process b closes a, in turn closing process a I have noticed that if the second process is constantly waiting for the first process to send data then the program will be just sat waiting, which is where the idea of implementing threads on each process occured. I have already implemented a thread on the first process which currently creates the data to send to the second process and makes it available to the second process. The problem i'm having is that I don't exactly have a lot of experience with threads and events so I'm not sure of the best way to actually implement what I want to do. Following is a small snippet of what I have so far in the producer application; Rolling the dice and sending the data: case IDM_FILE_ROLLDICE: { hDiceRoll = CreateThread( NULL, // lpThreadAttributes (default) 0, // dwStackSize (default) ThreadFunc(hMainWindow), // lpStartAddress NULL, // lpParameter 0, // dwCreationFlags &hDiceID // lpThreadId (returned by function) ); } break; The data being sent to the other process: DWORD WINAPI ThreadFunc(LPVOID passedHandle) { HANDLE hMainHandle = *((HANDLE*)passedHandle); WCHAR buffer[256]; LPCTSTR pBuf; LPVOID lpMsgBuf; LPVOID lpDisplayBuf; struct diceData storage; HANDLE hMapFile; DWORD dw; //Roll dice and store results in variable storage = RollDice(); hMapFile = CreateFileMapping( (HANDLE)0xFFFFFFFF, // use paging file NULL, // default security PAGE_READWRITE, // read/write access 0, // maximum object size (high-order DWORD) BUF_SIZE, // maximum object size (low-order DWORD) szName); // name of mapping object if (hMapFile == NULL) { dw = GetLastError(); MessageBox(hMainHandle,L"Could not create file mapping object",L"Error",MB_OK); return 1; } pBuf = (LPTSTR) MapViewOfFile(hMapFile, // handle to map object FILE_MAP_ALL_ACCESS, // read/write permission 0, 0, BUF_SIZE); if (pBuf == NULL) { MessageBox(hMainHandle,L"Could not map view of file",L"Error",MB_OK); CloseHandle(hMapFile); return 1; } CopyMemory((PVOID)pBuf, &storage, (_tcslen(szMsg) * sizeof(TCHAR))); //_getch(); MessageBox(hMainHandle,L"Completed!",L"Success",MB_OK); UnmapViewOfFile(pBuf); return 0; } I'd like to think I am at least on the right lines, although for some reason when the application finishes creating the thread it hits the return DefWindowProc(hMainWindow, message, wParam, lParam); it crashes saying there's no more source code for the current location. I know there are certain ways to implement things but as I've mentioned I'm not sure if i'm doing this the right way, has anybody else tried to do the same thing? Thanks!

    Read the article

  • unable to trigger event in IE during clonning

    - by Abhimanyu
    Following is the code which will clone a set of div with their events(onclick) which is working fine for FF but in case of IE it is not firing events associated with each div. <html> <head> <style type='text/css'> .firstdiv{ border:1px solid red; } </style> <script language="JavaScript"> function show_tooltip(idx,condition,ev) { alert(idx +"=="+condition+"=="+ev); } function createCloneNode () { var cloneObj = document.getElementById("firstdiv").cloneNode(true); document.getElementById("maindiv").appendChild(cloneObj); } function init(){ var mainDiv = document.createElement("div"); mainDiv.id = 'maindiv'; var firstDiv = document.createElement("div"); firstDiv.id ='firstdiv'; firstDiv.className ='firstdiv'; for(var j=0;j<4;j++) { var summaryDiv = document.createElement("div"); summaryDiv.id = "sDiv"+j summaryDiv.className ='summaryDiv'; summaryDiv.onmouseover = function() {this.setAttribute("style","text-decoration:underline;cursor:pointer;");} summaryDiv.onmouseout = function() {this.setAttribute("style","text-decoration:none;");} summaryDiv.setAttribute("onclick", "show_tooltip("+j+",'view_month',event)"); summaryDiv.innerHTML = 'Div'+j; firstDiv.appendChild(summaryDiv); } mainDiv.appendChild(firstDiv); var secondDiv = document.createElement("div"); var linkDiv = document.createElement("div"); linkDiv.innerHTML ='create clone of above element'; linkDiv.onclick = function() { createCloneNode(); } secondDiv.appendChild(linkDiv); mainDiv.appendChild(secondDiv); document.body.appendChild(mainDiv); } </script> </head> <body> <script language="JavaScript"> init() </script> </body> </html> can anybody tell me whats the problem in above code please correct me..

    Read the article

  • How to make jquery bind event work

    - by Dammark
    For some reason my bind events won't work. You can see my code here: http://dl.dropbox.com/u/145581/MyPage/default.html Clicking on 'Add gadget' or the 'Remove gadget' button should be firing alerts but nothing happens. Any ideas ?

    Read the article

  • Can a Page.PrePrender event be fired before Page.Load event handler called return?

    - by flashnik
    A Page.PreRender event is guaranteed to be fired after Page.Load event is fired. But is it guaranteed to be fired after Load event handler returned? A more general question is if event lifecycle of ASP.Net page guarantees that each event is fired only after previous has returned or events can be fired while previous is still executing? How does answer change if previous event fires some custom event such as DataBound? Can such event be executed in parallel with another event in page lifecycle?

    Read the article

  • Is there a comprehensive list of the NHibernate event listeners and when they actually fire?

    - by snicker
    So I am looking for a nice list of NHibernate events that actually describes when they are fired, in a typical scenario. IE something like PreUpdateEventListener - Fires when an object that is already persistent is changing I currently just rifle through the source and try to figure it out, but it's kinda painful, and I figure that someone must have done this already at some point.

    Read the article

  • Issue with blocking the UI during a onchange request - prevents other event from firing.

    - by jfrobishow
    I am having issues with jQuery blockUI plugins and firing two events that are (I think, unless I am loosing it) unrelated. Basically I have textboxes with onchange events bound to them. The event is responsible for blocking the UI, doing the ajax call and on success unblocking the UI. The ajax is saving the text in memory. The other control is a button with on onclick event which also block the UI, fire an ajax request saving what's in memory to the database and on success unblock the UI. Both of these work fine separately. The issue arise when I trigger the onchange by clicking on the button. Then only the onchange is fired and the onclick is ignored. I can change the text in the checkbox, click on the link and IF jQuery.blockUI() is present the onchange alone is fired and the save is never called. If I remove the blockUI both function are called. Here's a fully working example where you can see the issue. Please note the setTimeout are there when I was trying to simulate the ajax delay but the issue is happening without it. <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script src="http://github.com/malsup/blockui/raw/master/jquery.blockUI.js?v2.31"></script> <script> function doSomething(){ $.blockUI(); alert("doing something"); //setTimeout(function(){ $.unblockUI(); //},500); } function save(){ $.blockUI(); //setTimeout(function(){ alert("saving"); $.unblockUI(); //}, 1000); } </script> </head> <body> <input type="text" onchange="doSomething();"> <a href="#" onclick="save()">save</a> </body> </html>

    Read the article

  • Detecting Handlers of a jQuery "Live" Event

    - by Anderson De Andrade
    Using: $('#foo').data('events').click We are able to access an iterative object of click handlers added to the element '#foo' but only when they were added with .bind() Is there a way to get the handlers for an event added with .live()? Is there any other way to know if an element has a click handler assigned?

    Read the article

  • What the purpose/difference in using an event-type constructor

    - by phq
    In all examples I can find as well as the automatically generated code i Visual Studio, events are set using the following code: button1.Click += new System.EventHandler(this.button1_Click); But I can also write it visually cleaner by omitting the constructor wrapper: button1.Click += this.button1_Click; Which also compile fine. What is the difference between these two? And why is the first one mostly used/preferred?

    Read the article

  • Registering an event from different thread

    - by ET
    Hi, I have a question regarding events in c#. Lets say I have an object obj1 of a class that exposes an event, and this object is running on thread t1. Now on different thread t2, there is another object called obj2 that is registered for the event of obj1. Is it promised that obj2 will get the event when it will be raised? thanks.

    Read the article

  • Can I Call a Child Page From a Master Page?

    - by MemphisDeveloper
    My problem is this I have a base page that creates content dynamically. There are buttons on my Master Page that fire events that my base page needs to know about. But the OnLoad function on my base page fires before my Button_Command function on my master page. So I either need to figure out a way to load my base page after the Button_Command function has had the chance to set a variable or I must call a function in my base page from the Button_Command function.

    Read the article

  • [iOS] How to catch cancallation of UIScrollView or others?

    - by kyu
    Sometimes, interruptions such as phone call occur and disturb a regular behavior of an app in iPhone or iPad. For example, I created one UIScrollView instance and implemented UIScrollView delegate methods: scrollViewWillBeginDragging and scrollViewDidEndDragging(and scrollViewDidEndDecelerating). A scrollViewWillBeginDragging method deactivated all custom buttons in my app. Then scrollViewDidEndDragging and scrollViewDidEndDecelerating methods activated these custom buttons. That is, while the user scrolled, all custom buttons became deactivated for a while. The problem was that while the user started to drag and just held an UIScrollView instance, if I took a screenshot by pressing a home button and a power button, then any of scrollViewDidEndDragging and scrollViewDidEndDecelerating didn't get called. So the app became messed up. I implemented a UIApplicationWillResignActiveNotification method in my UIViewController, but it didn't get called after taking a screenshot. How can I catch any kind of interruption that disturbs a regular flow of events? Sometimes, touchesEnd and touchesCanceled didn't get called too due to an interruption. Thank you.

    Read the article

  • 2 Controls, 1 event

    - by DTown
    I have 2 input textboxes that take a host or IP. When the user leaves an input box an event is fired that checks the input to see if it is actually a live computer. The results are then put into the appropriate label. My question is, should I be using separate events for each input box, since they update different labels? Or, can I use 1 event and check who the caller was, then update the appropriate label?

    Read the article

< Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >