| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #1741
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | FLUID |
Summary: | fluid public class functions |
Version: | 1.1.7 |
Created By: | rbp |
Assigned To: | matt |
Fix Version: | 1.1-current (SVN: v6013) |
Update Notification: | |
Trouble Report Files:
No files
Trouble Report Comments:
|
| Fluid's Class creator (New->Code->Class) does not expose its methods even when they are selected as public. I brought this up on the forum (http://www.fltk.org/newsgroups.php?s13933+gfltk.general+v13933+T1) and another responder experienced a similar problem in 1.1.8 where the Class functions are always public (http://www.fltk.org/newsgroups.php?s13933+gfltk.general+v13935+T1).
Currently to make it compile I open up the generated .H file and add the 'public:' keyword to the class definition. | |
|
| the work around I'm using now is to create declaration boxes with 'public:' before the constructor. | |
|
#3 | matt 15:11 Dec 28, 2007 |
| I was not able to duplicate the behavior. Please send a .fl file that exposes the problem and describe the details. The links into the forum give me a discussion about undocumented function in Fl_Browser and are not helpful.
Thanks,
Matthias | |
|
| hmm, the forum link seems to be broken. I did a forum search and have copied here the post I was trying to link to:
______ > > hello, > > > > in fluid 1.1.7 how do I make class functions public? All my > > 'public' flags are set but the generated code is: > > > > class Annotate { > > Annotate(); > > ... > > }; > > > > > > To make it work I need to open up the generated .H file and change to: > > > > class Annotate { > > public: > > Annotate(); > > ... > > }; > > > > > > Am I missing something? > > Fluid always creates a function called _Annotate() (your class name > plus an underscore) as the first function of the class. That function > is always private. It serves as an interface to the real constructor > that follows below and is always public. > > For all other (non-constructor) functions, you simply click the > "public" button in the "Function/Method Properties" dialog. > > Matthias > > ---- > http://robowerk.com/ > >
I have checked and my functions are declared as public in fluid but they are not exposed in the generated class. Jim Wilson has noticed the opposite problem (always public), so perhaps this was the fix for the original problem. ___________ | |
|
| sorry I seem to have misdiagnosed the problem. To repeat it you have to create the class after a widget class, which generates this header file:
// generated by Fast Light User Interface Designer (fluid) version 1.0107
#ifndef Annotate_h #define Annotate_h #include <FL/Fl.H> #include <FL/Fl_Group.H>
class UserInterface : public Fl_Group { public: UserInterface(int X, int Y, int W, int H, const char *L = 0); };
class Annotate { Annotate(); }; #endif
without the widget class the header file is generated properly: // generated by Fast Light User Interface Designer (fluid) version 1.0107
#ifndef Annotate_h #define Annotate_h #include <FL/Fl.H>
class Annotate { public: Annotate(); }; #endif | |
|
#6 | matt 14:19 Jan 04, 2008 |
| Fixed in Subversion repository. | |
[ Return to Bugs & Features ]
|
| |