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 » Community » Newbie corner » THISBACK(function(parameter)) Error C2102
THISBACK(function(parameter)) Error C2102 [message #37688] Fri, 02 November 2012 18:05 Go to next message
nejnadusho is currently offline  nejnadusho
Messages: 60
Registered: October 2012
Member
Hi,

I am trying to pass a THISBACK(function(parameter)) and it gives me an error.

                 int x = 10;
                 //On click event new user data submition
		tab1.userDataButton <<= THISBACK(ClickUserDataButton(x));


Quote:


C:\MyApps\SeniorProject\Admin.cpp(26) : error C2102: '&' requires l-value



If the function does not take parameters it works otherwise it doesn't.
Why?


Thank you very much.

nejnio
Re: THISBACK(function(parameter)) Error C2102 [message #37689 is a reply to message #37688] Fri, 02 November 2012 19:48 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi nejnio

Thisback take reference to the function, with parameter passed to the function as another parameters to the THISBACK# macro. So it should be called like this:
THISBACK(function1)
THISBACK1(function2,123)
THISBACK2(function3,123,"param")
...

I'm not even sure how it could even work for you with the one parameter function Smile Probably its return type was matching something that THISBACK accepts...

Have a look at the reference and example programs, perhaps also reading and trying out the tutorial and figure out how ts might help Wink I understand that some poeple (me included Smile ) prefer to just play with the toolkit and figure out how it works by themselfs, but U++ contains so many unusual concepts and has quite steep learning curve, so following the tutorial and reading the manuals can help (and save you some frustration Smile ).

Best regards,
Honza
Re: THISBACK(function(parameter)) Error C2102 [message #37690 is a reply to message #37688] Fri, 02 November 2012 20:33 Go to previous message
nejnadusho is currently offline  nejnadusho
Messages: 60
Registered: October 2012
Member
Thank you very much Nonza!

Quote:

Honza wrote on Fri, 02 November 2012 14:48

I'm not even sure how it could even work for you with the one parameter function Probably its return type was matching something that THISBACK accepts...



I just want to clarify that it does not work with one or more parameters, in the the way I was trying.

Best,
nejnio
Previous Topic: TabDlg Remove 'Close' Button
Next Topic: TabDlg Change Default Background Window
Goto Forum:
  


Current Time: Fri May 03 12:26:11 CEST 2024

Total time taken to generate the page: 0.02961 seconds