Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » FileSel&FileList, Path » FileSelector lambda troubles
Re: FileSelector lambda troubles [message #47818 is a reply to message #47813] Sun, 02 April 2017 23:25 Go to previous messageGo to previous message
Klugier is currently offline  Klugier
Messages: 1106
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

For me the overall design of this dialogue is strange and wearied. What you want to do is to have dialog class that returns some specific value:
class NewFLdlg final : public WithMyAweasomeLayout<TopWindow>
{
public:
    NewFLdlg() {
        // This callback logic should be implemented here... (Not outside the class - I am not surre why we have public inheritance here)
        button.WhenAction = [=] {
            // this->fsp should be available here.
        }
    }    

    String GetFsp() const { return fsp; }

private:
    String fsp;
};

// Then in the main code
NewFLdlg dlg;
if (dlg.Execute() == IDOK) // Check if user close dialog with success - you need "OK" button for such operations...
{
    String fsp = dlg.GetFsp(); // Here you should have valid fsp with nice object related design.
}



Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Sun, 02 April 2017 23:25]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Common Dialog
Next Topic: Different GetHomeDirectory() in PLATFORM_POSIX and PLATFORM_WIN32
Goto Forum:
  


Current Time: Mon Aug 25 04:48:33 CEST 2025

Total time taken to generate the page: 0.06941 seconds