Home » Developing U++ » UppHub » WithEnterAction compile error
WithEnterAction compile error [message #51793] |
Fri, 31 May 2019 10:27 |
|
peterh
Messages: 108 Registered: November 2018 Location: Germany
|
Experienced Member |
|
|
Hi,
there is an error in WithEnterAction.h:
Callback cb = B::WhenAction;
gives this error:
C:\upp/bazaar/WithEnterAction/WithEnterAction.h (16): error: conversion from 'Upp::Event<>' {aka 'Upp::Function<void()>'} to non-scalar type 'Upp::Callback' {aka 'Upp::CallbackN<>'} requested
Writing
Upp::Function<void()> cb = B::WhenAction;
or
Cures the problem.
This said, I must admit, I am a casual programmer and write only small tools for my own use in Job or at home.
I use C++ only to learn and experimental.
Normally I use Lazarus/Freepascal and there is the Event "OnEditingDone" which does just this and the Eventhandler method is implemented at designtime by a doubleclick into the Event list.
Because this is the only Event I normally want to use for input fields, I would wish a more comfortable solution here.
All the Best,
Peter
[Updated on: Tue, 04 June 2019 12:22] Report message to a moderator
|
|
|
|
Re: WithEnterAction compile error [message #51852 is a reply to message #51803] |
Sun, 09 June 2019 19:00 |
|
peterh
Messages: 108 Registered: November 2018 Location: Germany
|
Experienced Member |
|
|
I made an updated version of Bazaar/WithEnterActionTest.
Features:
Compile error fixed.
Shows alternative use of THISBACK or lambda callbacks.
Has option box to demonstrate "multipleenter" feature.
Demonstrates usage of Layout Designer with templates.
(So it also generally shows how to subclass controls that are defined in the Layout editor.)
All controls are made in the designer, rather than programatically added.
Have fun!
[Updated on: Sun, 09 June 2019 19:42] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Fri Apr 26 00:36:24 CEST 2024
Total time taken to generate the page: 0.05140 seconds
|