STR #1741

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.1 ]

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:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files


Trouble Report Comments:


Name/Time/Date Text top right image
 
#1 rbp
04:34 Jul 18, 2007
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.
 
 
#2 rbp
06:40 Aug 20, 2007
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
 
 
#4 rbp
15:58 Dec 28, 2007
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.
___________
 
 
#5 rbp
16:26 Dec 28, 2007
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.  
bottom left image   bottom right image

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.