|
Passing callback functions
|
Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Cburke
(11 posts) bio
|
| Date |
Wed 21 Jul 2010 09:17 PM (UTC) [ quote
] |
| Message |
Is there a way I can pass a callback function directly to WindowAddHotspot() and similar functions that use callbacks?
By this I mean I'd like to pass the actual function or specify a function within a table rather that a function which is directly defined in the global scope.
I ran across this while I was trying to repackage some things into more of an object oriented layout. I'm wanting to specify functions such as "TextWindow:MouseOver" as the callback, but since it's really looking for a string and not a function it doesn't know how to interpret this.
Just looking for some thoughts on this.
Thanks,
-C | top |
|
| Posted by |
Nick Gammon
Australia (15,726 posts) bio
|
| Date |
Wed 21 Jul 2010 09:21 PM (UTC) [ quote
] |
| Message |
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
| Posted by |
Cburke
(11 posts) bio
|
| Date |
Wed 21 Jul 2010 10:41 PM (UTC) [ quote
] |
| Message |
Thanks Nick - makes sense. I figured it was a language compatibility thing. This also sheds some light on the "function generating functions" you have in the movewindow.lua code.
-C | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
311 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )