|
|
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   |
 |
Klugier
Messages: 1099 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
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 11:58:43 CEST 2025
Total time taken to generate the page: 0.00765 seconds
|
|
|