Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 4.0 aka C# 2010 > BOOK: Beginning Visual C# 2010
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Visual C# 2010
This is the forum to discuss the Wrox book Beginning Visual C# 2010 by Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, ; ISBN: 9780470502266
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual C# 2010 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 15th, 2010, 12:30 PM
Authorized User
Points: 73, Level: 1
Points: 73, Level: 1 Points: 73, Level: 1 Points: 73, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2007
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Post Chapter 13: Defining Events

Pages 380 - 385, Defining Events. I can usually follow the code and figure out how things are connected. In the TRY IT OUT on page 381, I do not understand how MessageArrived in CheckForMessage method is null or not. Where in the program is MessageArrived set or not set? I've stepped through the program, used the immediate window to see where the value is but no luck. Again, where in the program is MessageArrived set to null or not, and how does the method determine this.
  #2 (permalink)  
Old September 15th, 2010, 08:16 PM
Authorized User
Points: 73, Level: 1
Points: 73, Level: 1 Points: 73, Level: 1 Points: 73, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2007
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Defining Events

After putting the book down again for several hours I figured it out. In the Main method MessageArrived is set to myDisplay.DisplayMessage. So, while the program is running the value of MessageArrived never changes. It is never null. The only condition that changes during program running is the random value. I remmed out this line in Main to test this. My bad!
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 13 rock1233 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 October 6th, 2009 12:18 PM
Chapter 4: Controls, ViewState and Events BazNZ BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 July 14th, 2008 03:57 AM
Chapter 13 bwoll BOOK: Beginning Access 2003 VBA 1 June 7th, 2007 03:57 PM
Chapter 13 ElMorenito BOOK: Beginning ASP 3.0 0 January 14th, 2005 02:56 PM



All times are GMT -4. The time now is 06:17 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.