This item is not eligible for Amazon Prime, but millions of other items are. Join Amazon Prime today. Already a member? Sign in.

17 used & new from $14.18
See All Buying Options

Have one to sell? Sell yours here
 
   
Tell a Friend
Sams Teach Yourself C++ for Linux in 21 Days (Sams Teach Yourself)
 
See larger image
 
Are You an Author or Publisher?
Find out how to publish your own Kindle Books
 
  
Sams Teach Yourself C++ for Linux in 21 Days (Sams Teach Yourself) (Paperback)
by Jesse Liberty (Author), David Horvath (Author), Jonathan Parry-McCulloch (Author), Hal Moroff (Author), Paul Cevoli (Author)
  3.6 out of 5 stars 7 customer reviews (7 customer reviews)  


Available from these sellers.


17 used & new available from $14.18

Customers Who Bought This Item Also Bought

GNU/Linux Application Programming, Second Edition (Programming Series)

GNU/Linux Application Programming, Second Edition (Programming Series) by M. Tim Jones

4.4 out of 5 stars (9)  $34.64
Beginning Linux Programming (Linux Programming Series)

Beginning Linux Programming (Linux Programming Series) by Neil Matthew

4.4 out of 5 stars (74) 
Sams Teach Yourself C for Linux Programming in 21 Days

Sams Teach Yourself C for Linux Programming in 21 Days by Erik de Castro Lopo

4.6 out of 5 stars (15) 
Tom Swan's GNU C++ for Linux (Professional Dev. Guide)

Tom Swan's GNU C++ for Linux (Professional Dev. Guide) by Tom Swan

3.9 out of 5 stars (8) 
Sams Teach Yourself C++ in 21 Days (5th Edition) (Sams Teach Yourself)

Sams Teach Yourself C++ in 21 Days (5th Edition) (Sams Teach Yourself) by Jesse Liberty

3.8 out of 5 stars (13)  $29.69
Explore similar items : Books (8)

Editorial Reviews
Product Description
Sams Teach Yourself C++ Programming for Linux in 21 Days teaches you the C++ programming language using the Linux operating system. You will gain a thorough understanding of the basics of C++ programming from a Linux perspective. The Bonus Week includes topics such as XWindows, KDE with QT toolkit, APE Class Library, and Real -time Middleware.

Book Info
Provides the skills one needs to get up and running efficiently with C++ for Linux within 21 days. Designed to help you understand the fundamentals of programming C++ for Linux. Softcover.

See all Editorial Reviews

Product Details
  • Paperback: 1152 pages
  • Publisher: Sams; Pap/Cdr edition (May 1, 2000)
  • Language: English
  • ISBN-10: 0672318954
  • ISBN-13: 978-0672318955
  • Product Dimensions: 9 x 7.4 x 2.5 inches
  • Shipping Weight: 4.2 pounds
  • Average Customer Review: 3.6 out of 5 stars 7 customer reviews (7 customer reviews)
  • Amazon.com Sales Rank: #427,736 in Books (See Bestsellers in Books)

    Popular in this category: (What's this?)

    #74 in  Books > Computers & Internet > Operating Systems > Linux > Programming

    (Publishers and authors: Improve Your Sales)
  •  Would you like to update product info or give feedback on images? (We'll ask you to sign in so we can get back to you)


Jesse Liberty "Silverlight Geek"'s latest blog posts
       
 
Jesse Liberty "Silverlight Geek" sent the following posts to customers who purchased Sams Teach Yourself C++ for Linux in 21 Days (Sams Teach Yourself)
 
8:07 AM PDT, May 10, 2008

Apparently Radio 1's Big Weekend is a big thing in England, and to launch the festivities they've made The Big Zoomy Photo Thing a central piece of the action (as you may guess, this is Silverlight/Zoom incognito).


(picture cropped to save room)

The implementation is beautiful. Click, roll, zoom. To give you a quick sense of it, here are two images. The first is the starter, I then zoomed in on the control panel (pointed to by the red arrows I added.

The progressive rendering is just mind-blowing. Every time I see it. And it is a blast to see it in a live usage, even if they don't have any really interesting pictures up yet (they will soon).

One of the folks who did a lot of the programming is a buddy (he refuses to be credited) and I will work on talking him into an interview about the programming experience. Stay tuned. I know that Tim Heuer is also taking a long look at Zoom so we'll have a good deal more on this very soon.

 
Comment    

2:43 PM PDT, May 7, 2008

Aha! Okay, I may not fully understand all the requirements, but the following demo will show how to dynamically create a user control and then have that user control close itself, remove itself from the containing page and fire an event to the page so that the page can clean up any associated other controls that might be left laying about.

This is based on the User Control sample that goes with the video that hasn't yet been posted (you don't mind that, do you?) but will be in a couple days. I'll strip it down so as not to get hung up in the parts we don't care about.

First, let's look at the effects. When the application begins there is just a single button marked "Create".

Clicking on that button creates two text blocks and two user controls,

In the UserControl video the User Controls are quite nicer looking but here we're interested in their ability to self-destruct; hence the close button.

When you click the close button, not only does the User Control remove itself from its parent panel's children collection, it raises an event to which the page can subscribe so that it can clean up anything else that might be lingering about; in this case the text block (which is not part of the control). Thus, if I close the upper control, I want also to remove the "Event Address" prompt.

Here's how it all works. I assume we have the custom control already and I add the button to it.  The key is to give that user control its own EventArgs type (to hold its unique ID ) and thus also give it a delegate and an event.

public partial class AddressUserControl : UserControl { public class AddressEventArgs : RoutedEventArgs { public object Tag { get; private set; } public AddressEventArgs(object theTag) { this.Tag = theTag; } }Notice both that AddressEventArgs is derived from RoutedEventArgs adn that it is nested within AddressUserControl (my User Control).  It has a constructor and a public property called Tag (to parallel the idea that the control itself has a Tag of type object).

We now give the control a delegate and an event

public delegate void AddressEventHandler(object o, AddressEventArgs e); public event AddressEventHandler Closed;The closed event is what the page will subscribe to, in order to be alerted when the control is closed. This event is fired as part of the control's handling of the button's click event,public AddressUserControl() { InitializeComponent(); Close.Click += new RoutedEventHandler(Close_Click); } void Close_Click(object sender, RoutedEventArgs e) { Panel parent = this.Parent as Panel; if (parent != null) { parent.Children.Remove(this); if (Closed != null && this.Tag != null) { Closed(this, new AddressEventArgs(this.Tag)); } } }

In the constructor we wire up the Close.Click; our internal handler for when the button is pressed. That handler does two things; it first makes sure we're in a panel, and if so, it removes us from the panel. It then checks to see if anyone has registered with our Closed event and that our Tag is not null; if so then it fires the Closed event to anyone who is interested.

Creating The Control Dynamically

 

All of the above falls into place when you see the control created dynamically. The XAML has nothing but the stack panel to hold the dynamically created controls,

Page.xaml

<UserControl x:Class="UserControlDemo.Page" xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:jl="clr-namespace:UserControlDemo;assembly=UserContro lDemo" Width="600" Height="800"> <StackPanel x:Name="MasterContainer" Background="White"> <Button x:Name="Create" Content="Create" Width="60" Height="40" HorizontalAlignment="Left"/> </StackPanel> </UserControl>Here's how the control is created in Page.xaml.cs:void Create_Click(object sender, RoutedEventArgs e) { TextBlock tb = new TextBlock(); tb.Text = "Event Address"; tb.FontFamily = new FontFamily("Verdana"); tb.FontSize = 24; tb.HorizontalAlignment = HorizontalAlignment.Left; tb.Margin = new Thickness(15, 0, 0, 0); tb.Tag = "1"; MasterContainer.Children.Add(tb); AddressUserControl auc = new AddressUserControl(); auc.Tag = "1"; auc.Closed += new AddressUserC