2
голосов
8ответов
14447 просмотров

How to obtain the HttpContext in Event Handler

I’m trying to obtain the HTTPContext within an Event Handler in a Document Library in MOSS, but all I have is a null value of the HTTPContext.Current, I do the same thing on a List and the HTTPContext is returned. There is a way to obtain the HTTPContext in Document Libraries to access the HTTPCo...

0
голосов
1ответов
84 просмотров

JQuery click function not being set

I want my links not to have the weird outline and the best way I found to solve this is have a "null link" to focus on after a click. This works great when defining the onclick method inline the HTML but that is not ideal. I wrote a quick jQuery snippet to do this instead, but I am having troub...

0
голосов
2ответов
1485 просмотров

Android: Is it possible to observe system calls?

I was wondering if there is a way to observe the system calls in Android using a service... Is something like this remotely possible using Java or do I have to get down into native code...? Thanks

2
голосов
5ответов
10460 просмотров

ASP.NET ImageButton Onclick Event not handled

I have an ImageButton in a GridView. <asp:GridView ID="ItemGridView" runat="server" DataKeyNames="Id" OnRowDataBound="ItemGridView_RowDataBound" AllowPaging="True" AllowSorting="True" EnableSortingAndPagingCallbacks="True" AutoGenerateEditButton="False" AutoGenerateDeleteBut...

2
голосов
7ответов
4097 просмотров

jquery click handler

I create a bunch of tags dynamically, appending them to a I then add a click handler... $(document).ready(function(){ // ... code to append <a> tags to nav div $("#nav a").click(function(event){ alert('Clicked '+event.target.id); return false; }); }); ...

1
голосов
2ответов
1534 просмотров

JQuery mouse events with stacked elements

I have a web page with a table. Using jQuery 1.3.2, I absolutely position a div element over the top of each row on the table. The overlaying div has a higher z-index. I attach 'mouseenter' and 'mouseleave' events to the overlaying div element. On mouseenter, I throw a red border around the over...

0
голосов
1ответов
1753 просмотров

addEventListener() attached to multiple buttons, but only fires once

I am writing a Facebook app in PHP/FBJS. I have some code where I attach an addEventListener() to two buttons. When I run the app, the first button I click on fires the addEventListener() and the event handler is invoked as expected. But if I click on the second button or click on the same button...

2
голосов
1ответов
5797 просмотров

How to get the mouse button state in Silverlight outside of button press events?

I have the following situation I handle when the left mouse button is pressed in my Silverlight app and do some things while the mouse is held down and the mouse moves. When the left button is released, I turn off the flag that's telling it to do the stuff and the mouse movement handler then no ...

0
голосов
1ответов
211 просмотров

Efficiently handling timed events in a server

In my case I've got a game server, with the CLR threadpool handling the sockets, and a managed threadpool for the other stuff. I'm trying to figure out what the best way to handle events like, an npc casting a spell, or despawning after a set period is. I could just write some sort of Timer wra...

0
голосов
2ответов
600 просмотров

How can I preserve the page scroll position when opening a dialog in response to a link trigger?

I would like to know how I can maintain the scroll position when I open a jQuery dialog. Here is the code I'm using to open my dialog: <a class="link" onclick="openmyDialog();" href="#">Open a dialog</a> And the function : function openmyDialog() { $("#dialog").dialog('destro...

4
голосов
7ответов
3872 просмотров

Javascript: attaching OOP methods to events and the 'this' keyword

I am new to OOP Javascript and am having trouble with the this keyword and events. What I'm trying to achieve is: I have multiple DOM objects and want to not only bind a common event to them, but keep some data about the aforementioned objects in a global container (to increase runtime performan...

1
голосов
2ответов
1462 просмотров

Handling a VB6 event in C# - why does it only work sometimes?

I have a VB6 application implemented as an ActiveX exe. I also have a C# application that interacts with the VB6 app via COM. This all works fine except in one scenario. If the VB6 app is kicked off from the C# app, everything is fine. If, however, the VB6 app is already running stand-alone, t...

0
голосов
2ответов
1755 просмотров

Javascript custom "event" listener, using prototype implementation OOP

I have been trying to wrap my head around this one, and a lot of tutorials and sites have been suggesting the creation of a separate event object, which seems to be a bit of overkill for just implementing one function to happen at some point in the object. Basically I want to have a custom "onCo...

0
голосов
3ответов
1285 просмотров

ASP.NET Event Handler problem on Postback

Hi I have a bit of a doozie. I have a control with a click event attached. As far as I can see the event should be raised during postback. Things I have checked: The __Eventtarget is correct. The __EventArgs is correct. The control can be found by using page.findControl([string in __Eventtarge...

2
голосов
2ответов
80 просмотров

How do I force a Visual Basic 2008 function to only be accessed via events?

I want some event handling functions to only be able to be accessed via raised events and not called from the program. Such as: Public Event Event1(Byval TheText as string) private sub Event1Handler(Byval TheText as string) handles me.Event1 msgbox("Hi") end sub I want this code to execute...

6
голосов
6ответов
4401 просмотров

Events/Delegates In Java or C#

I've been trying to learn about events/delegates, but am confused about the relationship between the two. I know that delegates allow you to invoke different functions without needing to know what particular function is being invoked. (eg: a graphing function needs to accept inputs that are diffe...

3
голосов
2ответов
237 просмотров

Do custom Event type identifiers in as3 need to be unique?

Say I have two classes which extend Event: public class CustomEventOne extends Event { public static const EVENT_TYPE_ONE:String = "click"; //... rest of custom event and public class CustomEventTwo extends Event { public static const EVENT_TYPE_TWO:String = "click"; //......

1
голосов
1ответов
460 просмотров

Convert VB.NET event with multiple event arguments to C#

I'm in the process of transplanting a unit test written in VB.NET to the larger project written in C#. However, this little ditty has me looking for help: Public Sub object_DataChange(ByVal TransactionID As Integer, _ ByVal NumItems As Integer, _ ...

2
голосов
3ответов
7845 просмотров

VB.NET overload default functionality when user clicks the X (Close Program)

How do I go about overriding the default functionality when a user clicks the X in a VB.NET form-based application? I am currently handling the MyBase.Closing event... but since it's a DirectX app, I need to do some cleanup before allowing the form the close.

4
голосов
3ответов
2716 просмотров

NotifyIcon Events not firing

I'm new here and have a really mysterious problem to start off. I'm a software developer in the UK and have over 15 years of experience but have only been developing in .Net for 18 months. My NotifyIcon mouse events are not firing! I am using C# to write an application that starts as a NotifyIco...

2
голосов
1ответов
1479 просмотров

Android: Event handlers for a custom view? (QUESTION REVISED)

OLD QUESTION (Already answered by Mark - The answer is to use getTag()): Let's say I have a ListView with a custom layout for each row having an ImageView and a TextView. Now, when a click is made, I am able to determine which image and which textview were clicked based on the view but if I hav...

0
голосов
4ответов
512 просмотров

ASP.NET Tree Control - Cannot re-expand tree on reload

I have the following code to delete a company displayed in my ASP.NET 2.0 Tree control: protected void Delete_Click(object sender, EventArgs e) { TreeNode parentNode = null; int expandDepth = 1; string companyID = ""; expandDepth = companyTree.SelectedNode.Depth; if(companyT...

6
голосов
8ответов
466 просмотров

Am I using the right approach to monitor the tasks I want to perform when a handle is created?

Is there a generally-accepted best practice for creating an event handler that unsubscribes itself? E.g., the first thing I came up with is something like: // Foo.cs // ... Bar bar = new Bar(/* add'l req'd state */); EventHandler handler = new EventHandler(bar.HandlerMethod); bar.HandlerToUns...

10
голосов
9ответов
10732 просмотров

How to declare and consume events in Java

I have a simple class - will call it Animal. I'd like to fire off an event in the Animal class and have it handled in the class where I instantiated the Animal class. In the event handler, I want to pass an Integer value How do I pull off something simple like that?

32
голосов
5ответов
10661 просмотров

Action<object eventargs> could not be cast to EventHandler?</object>

I was wiring up an event to use a lambda which needed to remove itself after triggering. I couldn't do it by inlining the lambda to the += event (no accessable variable to use to remove the event) so i set up an Action&lt;object, EventArgs&gt; variable and moved the lambda there. The main error w...

0
голосов
4ответов
84 просмотров

How can I apply an event to a simple link element in ASP.NET

I have an &lt;asp:Image&gt; element and a text caption, surrounded by an &lt;a&gt; element. I need the link to run a method when clicked, changing the ImageUrl property of another &lt;asp:Image&gt; element. I'm a total noob with ASP.NET (Clearly.) Can anyone explain this process to me?

1
голосов
3ответов
1062 просмотров

ASP.Net (Web-forms) Page Lifecycle Problem - distinguishing between form loading, datapaging and command events

I'm working on a sortable listview with data-paging. I've got the listview and paging working fine, but I'm struggling with with the sorting. The sorting in itself is fine; I can sort by a particular column (ASC or DESC), however I'm having problems when it comes to dynamic sorting where the user...

0
голосов
2ответов
202 просмотров

Wire _KeyDown event of textbox to a _click event of button control

I have a form with a textbox called 'tbWO.' This field is used to enter a Purchase Order Number. I also have a button control called 'btnFill.' When btnFill is clicked, it fills a dataset with a parameter from 'tbWO.' I would like to be able to press 'ENTER' in the 'tbWO' textbox (after a Pur...

13
голосов
2ответов
6946 просмотров

How events like CancelEventArgs can be used?

How can the event System.ComponentModel.CancelEventArgs be used? Suppose we have the following code: public event CancelEventHandler EventTest = delegate { }; public void MakeSomethingThatRaisesEvent() { CancelEventArgs cea = new CancelEventArgs(); EventTest(this, ce...

11
голосов
3ответов
15785 просмотров

Subscribe to events within a WCF service

I have a need to do some real-time reporting on the functionality of a WCF service. The service is self-hosted in a windows app, and my requirement is to report "live" to the host app when certain methods are called by the client. My initial thought on the task was to publish a "NotifyNow" even...