FLTK logo

STR #1611

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 | SVN ⇄ GIT ]

STR #1611

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:Core Library
Summary:Fl_File_Chooser needs an end()
Version:1.1-current
Created By:greg.ercolano
Assigned To:matt
Fix Version:1.1-current (SVN: v5704)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files


Trouble Report Comments:


Name/Time/Date Text  
 
#1 greg.ercolano
07:57 Feb 21, 2007
It seems if you create an Fl_File_Chooser, the 'window' is not end()ed, causing all subsequent widgets created afterwards to be inserted into the Fl_File_Chooser.

eg:

int main() {
    Fl_Window *win = new Fl_Window(140, 100);              // A
    Fl_File_Chooser *cho = new Fl_File_Chooser(..)         // B
    Fl_Button *but = new Fl_Button(10,10,120,25,"Browse"); // C
    but->callback(Browse_CB, (void*)cho);                  // D
..

The button created in line C gets added to the filechooser, not to the 'win'. Since cho has no end() method available, one cannot prevent this.

My feeling is the chooser should end() its own window in the ctor, and if folks want to add widgets to it, they can use explicit calls to begin() and end().

Either that, or leave the end() out of the ctor, but still make begin() and end() method calls available, so the chooser doesn't suck in all widget creations that follow.
 
 
#2 matt
12:23 Feb 21, 2007
Fixed in Subversion repository.

Please verify the fix.
 
     

Return to Bugs & Features ]

 
 

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