i used mouseEvents or clickEvents etc.. but i did not still understand what
an event is yet.
eg: when we press a button, the eventhandler registered with the the
button's click *event* is invoked. what is "button's click event" here?
or can we write this event from scratch?
eg: we have an integer , say i. incrementing the i , i++ . could this be an
event too?
i mean, can we invoke a function (or a eventhandler), when i is incremented? 4 1279
e-mid <yy@ss.com> wrote: i used mouseEvents or clickEvents etc.. but i did not still understand what an event is yet.
eg: when we press a button, the eventhandler registered with the the button's click *event* is invoked. what is "button's click event" here? or can we write this event from scratch?
An event is basically a delegate which is exposed to the outside world
in such a way that other classes can only add delegates to it and
remove them. At some point or other, the class which contains the event
can then fire/raise it by executing the delegates which have subscribed
to it.
eg: we have an integer , say i. incrementing the i , i++ . could this be an event too?
No.
i mean, can we invoke a function (or a eventhandler), when i is incremented?
No.
--
Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
> > i mean, can we invoke a function (or a eventhandler), when i is
incremented? No.
Well you could, if 'i' was a property, and on the set code you can invoke an
event to say it's been modified.
--
John Wood
EMail: first name, dot, second name at priorganize.com
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om... e-mid <yy@ss.com> wrote: i used mouseEvents or clickEvents etc.. but i did not still understand
what an event is yet.
eg: when we press a button, the eventhandler registered with the the button's click *event* is invoked. what is "button's click event"
here? or can we write this event from scratch? An event is basically a delegate which is exposed to the outside world in such a way that other classes can only add delegates to it and remove them. At some point or other, the class which contains the event can then fire/raise it by executing the delegates which have subscribed to it.
eg: we have an integer , say i. incrementing the i , i++ . could this
be an event too?
No.
i mean, can we invoke a function (or a eventhandler), when i is
incremented? No.
-- Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet If replying to the group, please do not mail me too
e-mid,
To put it in layman terms,
event is the place where you get control in your code, based on user's
action.
The common user actions are,
1. moving or clicking mouse
2. playing with keyboard
If you want to do something as soon as the user completed the above
operation, event is the best place to put ur code becoz you can get control
immediately and will know some basic parameters. For example, during
keyboard events, you will get some useful information like, which "key" has
been pressed.
Shak.
"e-mid" <yy@ss.com> wrote in message
news:#g**************@TK2MSFTNGP10.phx.gbl... i used mouseEvents or clickEvents etc.. but i did not still understand
what an event is yet.
eg: when we press a button, the eventhandler registered with the the button's click *event* is invoked. what is "button's click event"
here? or can we write this event from scratch?
eg: we have an integer , say i. incrementing the i , i++ . could this be
an event too? i mean, can we invoke a function (or a eventhandler), when i is
incremented?
thnkz all..
"e-mid" <yy@ss.com> wrote in message
news:#g**************@TK2MSFTNGP10.phx.gbl... i used mouseEvents or clickEvents etc.. but i did not still understand
what an event is yet.
eg: when we press a button, the eventhandler registered with the the button's click *event* is invoked. what is "button's click event"
here? or can we write this event from scratch?
eg: we have an integer , say i. incrementing the i , i++ . could this be
an event too? i mean, can we invoke a function (or a eventhandler), when i is
incremented? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: J Sharman |
last post by:
What is the easiest way to import an XML Datafeed from a URL into a MYSQL
Database? Possibly using PHP
Regards Joe
PS Please answer to group and joe@joesharman.co.uk
|
by: Brett |
last post by:
What is the following code doing? I see evt and event but what is the difference?
<input type="radio" id="us_countryFlag1" name="us_country"
onclick="togglePurDec(event)">Yes
<script>...
|
by: David Logan |
last post by:
I have an application using sockets, and it uses the asynchronous method
for receiving (and others, but receiving is the basic problem.)
In short, I want:
class someClass: Form
{...
|
by: Action |
last post by:
does it works like ordinary virtual method??
coz I find that child class can't invoke the event of the parent class.
class parent
{
public virtual event SomeDelegate SomeChanged;
}
class...
|
by: Nathan Sokalski |
last post by:
What is the difference between the Page_Init and Page_Load events? When I
was debugging my code, they both seemed to get triggered on every postback.
I am assuming that there is some difference,...
|
by: Jay |
last post by:
Everywhere I go (read/browse) I see these parameters....
ByVal sender As Object, ByVal e As System.EventArgs
Yet I never see them used within the function/method.
Could someone tell me what they...
|
by: kai |
last post by:
Hi,
In ASP.NET , what is the difference between OnClick and Click events for a
button? Because we have button click event, it can trigger events, why we
still need OnClick?
Please help.
...
|
by: amit |
last post by:
Hello everybody,
I need your advice on this. In my javascript I'm using two anchor <A>
which both are to download a pdf file. That works fine but my question
is why the "this" parameter in...
|
by: Gummy |
last post by:
Hello,
I created a user control that has a ListBox and a RadioButtonList (and other
stuff). The idea is that I put the user control on the ASPX page multiple
times and each user control will...
|
by: antonyliu2002 |
last post by:
I know that this has been asked and answered thousands of times. As a
matter of fact, I know that I need to say
If Not Page.IsPostBack Then
'Do something
End If
for things that needs to be...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |