Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » <<= and <<
Re: <<= and << [message #7184 is a reply to message #7183] Sun, 17 December 2006 23:57 Go to previous messageGo to previous message
Balage is currently offline  Balage
Messages: 17
Registered: December 2006
Promising Member
I was just curious, as both worked fine, and produced the same result, I just didn't know what was the diff.

Actually, somebutton << THISBACK(Press) does work!

class Ctrl has these operators:
	Callback     operator<<=(Callback action)  { WhenAction = action; return action; }
	Callback&    operator<<(Callback action)   { return WhenAction << action; }


I tried this:
somebutton << THISBACK(Press) << THISBACK(Press2) << THISBACK(Press3) << THISBACK(Press);

The handlers were called in this order:
Press, Press2, Press3, Press

So with <<, I can add multiple callbacks. That's nice.

[Updated on: Mon, 18 December 2006 00:01]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bug in Core06.cpp or in U++ Core value types tutorial
Next Topic: operator< for container sorting (small confusion)
Goto Forum:
  


Current Time: Mon Apr 28 23:10:32 CEST 2025

Total time taken to generate the page: 0.02964 seconds