473,788 Members | 2,856 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can't wrap my mind around events

My general problem with events seems to be that there are so many parts
to them, and I'm not sure where they all go or when you use which parts.
For example, there's the delegate, the event name, the event handler,
then the coding that wires it together. For the most part, I do
understand these things, but I get confused when it comes to putting it
all together.

More specifically, here's some code from a book:

this.txtMonthly Investment.Text Changed += new
System.EventHan dler(this.txtMo nthlyInvestment _TextChanged);

First off, do you need the 'this' keyword? Second, where does this code
go? In the Load event of the form that contains the text box?

Another example:

ProductList products = new ProductList(); //an array list object

products.Change d += new EventHandler(Ch angedHandler);

Why isn't 'this' used in the second example? Is the book being
inconsistent, or is it a different situation? (In the book, it says it's
calling it from a different class, but I don't know what that means
exactly: "To handle an event from another class, you create an instance
of the class that raises the event and assign it to a class variable.")

Where does that first line go? (The declaration of products). The above
two lines are the entire example (except for the event handler itself),
so I think some stuff has been left out. It doesn't show which class
it's included in.
Basically I'm just very lost when it comes to events, and I always have.
I don't understand where all the code goes for each 'part', and that's
probably what it all comes down to, I guess.

Any help would be appreciated, or any suggestions for sites that clearly
explain events.

Thanks,
John
Nov 17 '05 #1
11 1520
John Salerno wrote:
More specifically, here's some code from a book:

this.txtMonthly Investment.Text Changed += new
System.EventHan dler(this.txtMo nthlyInvestment _TextChanged);

First off, do you need the 'this' keyword? Second, where does this code
go? In the Load event of the form that contains the text box?

this always refers to the current class instance. In your case, since
it is accessing text boxes, 'this' probably refers to the current form.
It may not be necessary to use 'this'. The author of the code may
have used it to stress that the txtMonthlyInves tment is part of the
current form. As to where it goes, it is normally placed in the
constructor of the form or in the load event. All that really matters
is that the line of code is executed before you need to catch the
events.
Another example:

ProductList products = new ProductList(); //an array list object

products.Change d += new EventHandler(Ch angedHandler);
Why isn't 'this' used in the second example? Is the book being
inconsistent, or is it a different situation? (In the book, it says it's
It might be inconsistent, but 'this' may not be required here. It just
depends on where the code appears.
calling it from a different class, but I don't know what that means
exactly: "To handle an event from another class, you create an instance
of the class that raises the event and assign it to a class variable.")

Where does that first line go? (The declaration of products). The above
two lines are the entire example (except for the event handler itself),
so I think some stuff has been left out. It doesn't show which class
it's included in.


The declaration of Products could be anywhere. It could be at the top
of your form class. It could be a private variable inside a method or
as a property to a user defined class. Perhaps the author was
intending that it be placed in the top of the form class.
I hope this helped a little. I'm sure, once you look at events more
closely, that it will become easier for you.

Nov 17 '05 #2
John Salerno <jo******@NOSPA Mgmail.com> wrote:
My general problem with events seems to be that there are so many parts
to them, and I'm not sure where they all go or when you use which parts.
For example, there's the delegate, the event name, the event handler,
then the coding that wires it together. For the most part, I do
understand these things, but I get confused when it comes to putting it
all together.

More specifically, here's some code from a book:

this.txtMonthly Investment.Text Changed += new
System.EventHan dler(this.txtMo nthlyInvestment _TextChanged);

First off, do you need the 'this' keyword?
Nope.
Second, where does this code
go? In the Load event of the form that contains the text box?
Well, you can put it wherever you want - but obviously the event won't
fire your handler until you've hooked it up.
Another example:

ProductList products = new ProductList(); //an array list object

products.Change d += new EventHandler(Ch angedHandler);

Why isn't 'this' used in the second example? Is the book being
inconsistent, or is it a different situation? (In the book, it says it's
calling it from a different class, but I don't know what that means
exactly: "To handle an event from another class, you create an instance
of the class that raises the event and assign it to a class variable.")
That's just wrong. You don't need to have a member variable with a
reference to an instance in order to subscribe to an event - you just
need to have a reference for long enough to subscribe.
Where does that first line go? (The declaration of products). The above
two lines are the entire example (except for the event handler itself),
so I think some stuff has been left out. It doesn't show which class
it's included in.

Basically I'm just very lost when it comes to events, and I always have.
I don't understand where all the code goes for each 'part', and that's
probably what it all comes down to, I guess.

Any help would be appreciated, or any suggestions for sites that clearly
explain events.


There's nothing particularly magical about them - that's possibly
what's confusing you. Just think of the "+=" as calling an "add" method
and "-=" as calling a "remove" method, and think of a delegate as a
list of handlers. The only odd thing about delegates are C#'s handling
of += and -= (for the delegates themselves, not events), which are
actually calls to static methods which is how you can add to null...

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #3
InLine Comments:

"John Salerno" <jo******@NOSPA Mgmail.com> wrote in message
news:Ao******** ************@rc n.net...
My general problem with events seems to be that there are so many parts to
them, and I'm not sure where they all go or when you use which parts. For
example, there's the delegate, the event name, the event handler, then the
coding that wires it together. For the most part, I do understand these
things, but I get confused when it comes to putting it all together.

More specifically, here's some code from a book:

this.txtMonthly Investment.Text Changed += new
System.EventHan dler(this.txtMo nthlyInvestment _TextChanged);

First off, do you need the 'this' keyword? Second, where does this code
go? In the Load event of the form that contains the text box? You do not need the "this" keyword. This just means use this classes method
named txtMonthlyInves tment_TextChang ed. Without it, if there was a public
method with the same name 'txtMonthlyInve stment_TextChan ged' on the base
class, and none on the derived class, it would use the base class' method
(if it had the same signature).

The event gets fired after Page_Load but the events get "attached" prior to
Page_Load. So, to make sure the event fires, you would place it in
InitializeCompo nent (I believe that is the correct method, may be
Page_Init...can 't remember).

Another example:

ProductList products = new ProductList(); //an array list object

products.Change d += new EventHandler(Ch angedHandler);

Why isn't 'this' used in the second example? Is the book being
inconsistent, or is it a different situation? (In the book, it says it's
calling it from a different class, but I don't know what that means
exactly: "To handle an event from another class, you create an instance of
the class that raises the event and assign it to a class variable.")

Where does that first line go? (The declaration of products). The above
two lines are the entire example (except for the event handler itself), so
I think some stuff has been left out. It doesn't show which class it's
included in.

Once again, the 'this' keyword is not required. You have class A and class
B. Class A exposes an event, Event E. In class B, you want to catch Event
E for when class A raises it. So, you would create a class B instance and
assign it to a variable of type "B". Then you would add the event handler
for Event E on the variable of type "B". ? Understand :)\

HTH a little at least ;)

Mythran

Nov 17 '05 #4
Mythran wrote:
Once again, the 'this' keyword is not required. You have class A and class B. Class A exposes an event, Event E. In class B, you want to catch Event
E for when class A raises it. So, you would create a class B instance and
assign it to a variable of type "B". Then you would add the event handler
for Event E on the variable of type "B". ? Understand :)\


I think this part is what confuses me.

Let's say you have class A, which is a button. The event for this class
is Click. You want class B to respond to this click. Now, is class B
responding to a particular button's Click event, or just any button that
is instantiated from class A?

For example: I have an OK button that was created from class A, and it's
on my main form. In class B, when I'm writing the code to wire the event
to the event handler, do I need to refer to this button specifically, or
do I simply create a new instance of A that isn't even used in the
program or anywhere on the form?
Nov 17 '05 #5
> Let's say you have class A, which is a button. The event for this class
is Click. You want class B to respond to this click. Now, is class B
responding to a particular button's Click event, or just any button that
is instantiated from class A?


Think delegate as a function pointer. Think of A as an object that will
need to call a function when an action occur. An event is associated
with the instance of a class not the class itself and when the event
occur it needs to call a function that could be anywhere.

Instantiate A, wire the event you want to A, this could be in any other
class such as B. A is the object, when it's click it has a function
pointer to a function in B.

--
Victor Hadianto
Blog: http://www.hadianto.net/destination

Nov 17 '05 #6
I had some trouble wrapping my head around them originally, but now I
consider them an indespensable tool.

Think of it like a radio broadcast. The message is only ever sent once,
but anyone that is 'tuned in' to the right station can hear the signal.

So, the broadcaster needs to declare a delegate (basically stating your
intention to broadcast). The delegate is then registered as an event in
a specific class (um, think of it like a radio station. Many stations
can be associated with one broadcaster)

Then, you need to set up your specific radios to tune into the Station
that you want to listen too. This is done by creating a function that
has the same signature as the original delegate. If the delegate says
it needs one string and two integers, then the 'Radio class' needs to
implement a function that takes one string and two integers as
parameters. This is the function that will process the request in any
way it decides too.

After this is done, you need to wire it all up. That's where the
Object.EventNam e += ... comes in. You must attach the event to the
function by creating a new Delegate reference to the function that will
eventually process the request.

So... (Warning, this was written in a text editor and is only for demo
purposes. Not sure if it will compile)

Namespace Broadcaster
{
public delegate void SendAMessage(st ring strMessage);

class RadioStation
{

public event SendAMessage BroadcastEvent;

public RadioStation() {}

public Broadcast Something(strin g strMyMessage)
{
if(broadcastEve nt != null) //This is important. Always test
before firing
{
BroadcastEvent( strMyMessage);
}
}

} //End Class
class Radio
{
public string _strRadioName;
public radio(RadioStat ion rsNewStation, string strRadioName)
{
_strRadioName = strRadioName;
rsNewStation.Br oadcastEvent += new
SendAMessage(Di splayBroadcast) ;
}

public void DisplayBroadcas t(string strStuff)
{
System.Forms.Me ssageBox.Show(" Recieved from radio " +
_strRadioName + ": " + strStuff);
}
} //End class
} //End Namespace

/*************** *************/
Namespace Testing
{
using Broadcaster;
public class MyTest
{
public MyTest()
{
public RadioStation _rsHeavyMetalHe aven = new
RadioStation();

public Radio[3] _rRadio;

for(int i = 0; i < _rRadio.Length; i++)
{
_rRadio[i] = new Radio(rsHeavyMe talHeaven);
}

}

Main()
{
MyTest = new MyTest();

MyTest.rsHeavyM etalHeaven.Broa dcastSomething( "Growl, growl,
DIE DIE DIE!");
MyTest.rsHeavyM etalHeaven.Broa dcastSomething( "That was
VegetarianDogs with 'die'. And now a word from our sponsor...");

}
}
}
This would be an even more effective example if there was another class
called say... OnlineListner that also implemented the BroadcastEvent
but did something different with it when the message is recieved.

Hope this helps a little.

Nov 17 '05 #7
I had some trouble wrapping my head around them originally, but now I
consider them an indespensable tool.

Think of it like a radio broadcast. The message is only ever sent once,
but anyone that is 'tuned in' to the right station can hear the signal.

So, the broadcaster needs to declare a delegate (basically stating your
intention to broadcast). The delegate is then registered as an event in
a specific class (um, think of it like a radio station. Many stations
can be associated with one broadcaster)

Then, you need to set up your specific radios to tune into the Station
that you want to listen too. This is done by creating a function that
has the same signature as the original delegate. If the delegate says
it needs one string and two integers, then the 'Radio class' needs to
implement a function that takes one string and two integers as
parameters. This is the function that will process the request in any
way it decides too (i.e. if different Radio classes implement an
abstract radio class, one can displays colors based on sound, one can
modulate out all the Bass notes, one just resends it).

After this is done, you need to wire it all up. That's where the
Object.EventNam e += ... comes in. This gets declared in the class that
you want to recieve the event (our Radio in this case). You must attach
the event to the function by creating a new Delegate reference to
whatever the end point is.

So... (Warning, this was written in a text editor and is only for demo
purposes. Not sure if it will compile)

Namespace Broadcaster
{
public delegate void SendAMessage(st ring strMessage);

class RadioStation
{

public event SendAMessage BroadcastEvent;

public RadioStation() {}

public void BroadcastSometh ing(string strMyMessage)
{
if(broadcastEve nt != null) //This is important. Always test
before firing
{
BroadcastEvent( strMyMessage);
}
}

} //End Class
class Radio
{
public string _strRadioName;
public radio(RadioStat ion rsNewStation, string strRadioName)
{
_strRadioName = strRadioName;
rsNewStation.Br oadcastEvent += new
SendAMessage(Di splayBroadcast) ;
}

public void DisplayBroadcas t(string strStuff)
{
System.Forms.Me ssageBox.Show(" Recieved from radio " +
_strRadioName + ": " + strStuff);
}
} //End class
} //End Namespace

/*************** *************/
Namespace Testing
{
using Broadcaster;
public class MyTest
{
public MyTest()
{
public RadioStation _rsHeavyMetalHe aven = new
RadioStation();

public Radio[3] _rRadio;

for(int i = 0; i < _rRadio.Length; i++)
{
_rRadio[i] = new Radio(_rsHeavyM etalHeaven);
}

}

public Main()
{
MyTest = new MyTest();

MyTest._rsHeavy MetalHeaven.Bro adcastSomething ("Growl,
growl, DIE DIE DIE!");
MyTest._rsHeavy MetalHeaven.Bro adcastSomething ("That was
VegetarianDogs with 'die'. And now a word from our sponsor...");

}
}
}
This would be an even more effective example if there was another class
called say... OnlineListner that also implemented the BroadcastEvent
but did something different with it when the message is recieved.

Hope this helps a little.

Russ

Nov 17 '05 #8

"John Salerno" wrote:

Let's say you have class A, which is a button. The event for this
class is Click. You want class B to respond to this click. Now, is
class B responding to a particular button's Click event, or just any
button that is instantiated from class A?
Depends on whether or not the event was declared as static. But we won't
go there because I think that would just make things more confusing,

So assuming the event exists at the instance level, in other words that
every instance of A has its own Click event, an instance of class B will
be responding to events from an instance of class A.
For example: I have an OK button that was created from class A, and
it's on my main form. In class B, when I'm writing the code to wire
the event to the event handler, do I need to refer to this button
specifically, or do I simply create a new instance of A that isn't
even used in the program or anywhere on the form?


You need the instance of class A, the OK button, in order to wire it to
the instance of class B.

public class A
{
public event EventHandler Click;

// Normally, the method for raising an event is protected virtual,
// but this is just for demonstration purposes.
public void OnClick()
{
EventHandler handler = Click;

if(handler != null)
{
handler(this, EventArgs.Empty );
}
}
}

public class B
{
public B(A aInstance)
{
// Here we are connecting the event in an instance of
// class A to an instance of class B.
aInstance.Click += new EventHandler(Ha ndleClick);
}

private void HandleClick(obj ect sender, EventArgs e)
{
Console.WriteLi ne("Handled Click event.");
}
}

// Somewhere else in your application...

A a1 = new A();
B b1 = new B(a1);

A a2 = new A();
B b2 = new B(a2);

Now, an instance of class A called 'a1' is connected via the Click event
to an instance of class B called 'b1'. And an instance of class A called
a2 is connected via the Click event to an instance of class B called
'b2'.

When a1 raises its event through a call to the OnClick method, only b1
will respond to the event. Likewise, when a2 raises the Click event,
only b2 will respond.


Nov 17 '05 #9
Woah, thanks for all that. But the book I'm reading doesn't even talk
about declaring delegates separately! Now there's even more I have to learn!

rh****@axys.com wrote:
I had some trouble wrapping my head around them originally, but now I
consider them an indespensable tool.

Think of it like a radio broadcast. The message is only ever sent once,
but anyone that is 'tuned in' to the right station can hear the signal.

So, the broadcaster needs to declare a delegate (basically stating your
intention to broadcast). The delegate is then registered as an event in
a specific class (um, think of it like a radio station. Many stations
can be associated with one broadcaster)

Then, you need to set up your specific radios to tune into the Station
that you want to listen too. This is done by creating a function that
has the same signature as the original delegate. If the delegate says
it needs one string and two integers, then the 'Radio class' needs to
implement a function that takes one string and two integers as
parameters. This is the function that will process the request in any
way it decides too (i.e. if different Radio classes implement an
abstract radio class, one can displays colors based on sound, one can
modulate out all the Bass notes, one just resends it).

After this is done, you need to wire it all up. That's where the
Object.EventNam e += ... comes in. This gets declared in the class that
you want to recieve the event (our Radio in this case). You must attach
the event to the function by creating a new Delegate reference to
whatever the end point is.

So... (Warning, this was written in a text editor and is only for demo
purposes. Not sure if it will compile)

Namespace Broadcaster
{
public delegate void SendAMessage(st ring strMessage);

class RadioStation
{

public event SendAMessage BroadcastEvent;

public RadioStation() {}

public void BroadcastSometh ing(string strMyMessage)
{
if(broadcastEve nt != null) //This is important. Always test
before firing
{
BroadcastEvent( strMyMessage);
}
}

} //End Class
class Radio
{
public string _strRadioName;
public radio(RadioStat ion rsNewStation, string strRadioName)
{
_strRadioName = strRadioName;
rsNewStation.Br oadcastEvent += new
SendAMessage(Di splayBroadcast) ;
}

public void DisplayBroadcas t(string strStuff)
{
System.Forms.Me ssageBox.Show(" Recieved from radio " +
_strRadioName + ": " + strStuff);
}
} //End class
} //End Namespace

/*************** *************/
Namespace Testing
{
using Broadcaster;
public class MyTest
{
public MyTest()
{
public RadioStation _rsHeavyMetalHe aven = new
RadioStation();

public Radio[3] _rRadio;

for(int i = 0; i < _rRadio.Length; i++)
{
_rRadio[i] = new Radio(_rsHeavyM etalHeaven);
}

}

public Main()
{
MyTest = new MyTest();

MyTest._rsHeavy MetalHeaven.Bro adcastSomething ("Growl,
growl, DIE DIE DIE!");
MyTest._rsHeavy MetalHeaven.Bro adcastSomething ("That was
VegetarianDogs with 'die'. And now a word from our sponsor...");

}
}
}
This would be an even more effective example if there was another class
called say... OnlineListner that also implemented the BroadcastEvent
but did something different with it when the message is recieved.

Hope this helps a little.

Russ


Nov 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
1936
by: lostinspace | last post by:
After four+ years of using FrontPage in a limited capacity and having created over 600 pages on my sites, I've finally (at least for the most part) abandoned FP, to begin the process of converting those pages. There are some things (a result of this transition,) which I'm not too happy about :-( I'm using 1st Page 2000. Much of my content is created in Word and then cut and pasted from Word-to-NotePad-to-the page. Formerly with FP the...
42
2057
by: Mike P. | last post by:
Hello I come from the world of C++ programming, and I'm used to writing programs that are actually executed by the CPU, and that run with some semblance of performance. I have taken the time to explore this .NET thing, and found that not only do .NET applications run extremely s-l-o-w-l-y, but the various .NET languages amount to nothing more than interpreted script languages. It is the common language run-time that actually executes your...
13
2368
by: LRW | last post by:
Having a problem getting a onSubmit function to work, to where it popsup a confirmation depending on which radiobutton is selected. Here's what I have: function checkdel() { if (document.getElementById"].value=='1') { confirm('Are you sure you want to delete this file?'); } } ......
10
4104
by: Kobu | last post by:
My question is about EOF (which is (int)-1 on the implementation I use). Type char on my implementation is 'signed' too. How is it that the input library functions that return EOF can be used properly if something like ASCII 255 is read from the input file? 255 would be returned as -1, and would be compared against EOF and cause problems. What's the point of declaring a int to hold the return
15
4057
by: Adam J. Schaff | last post by:
I have noticed that if a user closes a form via pressing return (either while the OK button has focus or if AcceptButton is set to OK for the form) then the "ENTER" keypress event fires ON THE CALLING FORM! This is very bad for me, because in my application, Form1 responds to an ENTER keypress by calling Form2. If the user closes Form2 via an ENTER, then Form1 just reopens it again, kind of trapping the user in Form2 (they can still close...
6
4904
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
10
2428
by: Benton | last post by:
Hi there, I have a UserControl with a couple of textboxes and a couple of buttons ("Save" and "Cancel"). The Click event for this buttons is in the UserControl's codebehind of course, so here's my question. Once the UserControl is dropped onto the container page, how can I perform some action on the codebehind of the container page from the codebehind of the UserControl? For instance, suppose that the UserControl is dropped inside one...
1
14181
by: maya | last post by:
hi, I have to do a page where there's a paragraph with an img on top left and the text in paragr has to wrap around the image.. pls see screen-shot here... http://www.mayacove.com/css/ss_page.jpg the image itself will be inserted dynamically via a CMS.. but NOT the border around it.. there are no. of ways to do the border, of course (div, table, etc..) problem is how do you make the text wrap around a table or a div?
8
10682
by: Skeer | last post by:
This is what I'm having problems with: I have a image that is in an absolute positioned div at the bottom left of my content. I want the content to be full width until reaching the image then wrap around it. Refer to the image for details: http://img31.imageshack.us/img31/3039/wrap.png The red is the content div with padding, the black is the div + image, and the white is the content. I want the text to only be in the white spot and wrap...
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10373
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9969
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2897
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.