RE: Handling multiple selections in a Gtk::TreeView



For the record, I think that Gareth is talking about C#'s "anonymous
functions", which look like inline functions defined locally in another
function.

> I think they let you do stuff like this (I'm pretty sure I used them in
> Java
> last year)
>
> class someClass
> {
> private:
> 	int data;
> public:
> 	someClass()
> 	{
> 		// takes a function as an argument
> 		doSomeStuff (
> 					// actually define a function here,
> without naming it, I forget the syntax
> 					{
> 						++ data;
> 					}
> 				);
> 	}
> };
>
> That's about the gist of it I think.
>
> Cheers!
>
> Gaz
>
>
> -----Original Message-----
> From: gtkmm-list-bounces gnome org [mailto:gtkmm-list-bounces gnome org]
> On
> Behalf Of Murray Cumming
> Sent: 26 November 2004 09:35
> To: Matthew Walton
> Cc: gtkmm-list gnome org
> Subject: Re: Handling multiple selections in a Gtk::TreeView
>
>
>> When working with multiple selections, I find
>> myself using get_selected_rows() much more frequently, to get a vector
>> or list of selected rows, then iterating over that with a for loop. I
>> might use selected_foreach more if C++ had anonymous functions.
>
> Yes, I think that get_selected_rows() was added sometime after
> selected_foreach(), because it was more convenient.
>
> I don't understand the comment about C++ not having anonymous functions.
> Maybe that's C# terminology.
[snip]

Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]