Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Sep 22, 2020 12:40 pm

All times are UTC - 5 hours

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Menu handler issue
PostPosted: Sat May 25, 2013 2:59 am 

Joined: Sun Oct 17, 2010 9:46 am
Posts: 83
Location: Berlin, Germany
I have an issue with a menu handler. One is called MenuWindowClose, the other MenuWindowMinimize. The code is:
Return True
Return True
Now "Close()" calls the event handler "Close" of the window instead of closing the window, "Minimize()" works as expected.

I need to put Self in front of Close(). This is of course a solution, though it slightly frightens me, that the behavior differs. Does it mean, if I want to be on the safe side, I should always put Self in front of each method call in any menu handler?

Reply with quote  
 Post subject: Re: Menu handler issue
PostPosted: Mon May 27, 2013 9:14 pm 
User avatar

Joined: Fri Nov 10, 2006 4:10 pm
Posts: 1855
Location: Michigan, USA
You're working with overloaded names here, and there can easily be confusion between inherited methods, private methods, and events. I recommend using the RaiseEvent keyword for events, as it will ensure the compiler knows what you're referring to.
RaiseEvent Close()
Return True

Hope this helps! :)

Windows 8 x64
Windows XP Pro SP3
Ubuntu 11.04 via Virtual Box
RS Enterprise 2012r1.1

Programming Tutorials & Free Projects:
"Christianity has not been tried and found wanting; it has been found difficult and not tried." - G.K. Chesterton

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group