| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #776
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 2 - Low, e.g. a documentation error or undocumented side-effect |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | FLUID |
Summary: | fluid always generates non-member function declaration for single word callback |
Version: | 1.1.6 |
Created By: | duncan.thermal.esa |
Assigned To: | matt |
Fix Version: | 1.1.7 (SVN: v4534) |
Update Notification: | |
Trouble Report Files:
|
#1 | duncan.thermal.esa 00:26 Mar 29, 2005 |
| example.fl 1k | |
Trouble Report Comments:
|
#1 | duncan.thermal.esa 00:26 Mar 29, 2005 |
| When using fluid 1.1.6 it is possible to enter the name of a callback function in the properties/C++/callback input area, and fluid will generate an appropriate extern or static forward declaration of the callback function. However, when specifying a callback from within a class rather than make_window(), fluid still generates the declaration as a non-member function, even if you already defined the static member function of the same name within the class.
When things go according to plan, this is not a problem because the non-member function is declared, but not defined and not used. But when you get it wrong, this declaration is a red herring which sends you on a wild goose chase trying to work out what option to set in fluid to give you what you thought you intended...
Problem noted last night on 1.1.6/Cygwin/WinXP Example.fl generated this morning on 1.1.6/Linux
Cheers Duncan
PS. I see that Example.fl gives a second "return Fl::run();" too
| |
|
#2 | mike 05:37 Mar 29, 2005 |
|
| |
|
#3 | mike 18:01 Aug 07, 2005 |
| Does the same problem occur with the current 1.1.x snapshot? | |
|
#4 | duncan.gibson 23:42 Aug 07, 2005 |
| I'm afraid that I haven't installed any of the snapshots yet because I'm in the process of setting up a broadband connection and Linux box at home in my copious spare time, and I hope this box will provide a better programming environment than our old laptop.
But I suppose you will want to know whether the snapshot works on WinXP/SP2 + Cygwin anyway so I will have a look at that tonight and let you know. | |
|
#5 | duncan 12:31 Aug 08, 2005 |
| Just downloaded and installed 1.1.x-r4459. Unfortunately the single word callback problem still exists.
I like the new coloured headers in the fluid/widget property dialog, and the new Live mode though. | |
|
#6 | matt 04:31 Aug 23, 2005 |
| Fixed in Subversion repository.
FLUID now checks if the Widget is part of a class, then runs the class looking for a function member with the signature 'static void callback_name(*)'. If it finds that function, it will not generate the 'extern void callback()' line in the header so Duncan will not get confused anymore ;-) | |
[ Return to Bugs & Features ]
|
| |