|
Event handling for a runtime created button |
Iniciado por Hans VINCKIER, 02,nov. 2024 13:32 - 4 respuestas |
| |
| | | |
|
| |
Miembro registrado 2 mensajes |
|
Publicado el 02,noviembre 2024 - 13:32 |
Hi, I've been working in Clarion since 1996 and now we want to start moving our app to windev. First we'll try to find out how we can move our working principles. The application controls access , payment, weigh registration for a containerpark. Each cabinet has a card reader, payment terminal, printer... For each type of cabinet or function there is a class object. Screen setup is done at runtime,i.e. all controls are created when the program starts by reading a configuration file. I found how to create buttons, etc at runtime. Now, several buttons are repeated on screen. In the called procedure (when the button is clicked) I want to know which button activated the call. I asked chatgpt and copilot and both suggested the "eventsource()" procedure. I didn't find any docs on that, even via the help it seemed to be an unknown function. How can I find out which control activated the call ??
Thanks
Hans Vinckier |
| |
| |
| | | |
|
| | |
| |
Publicado el 08,noviembre 2024 - 15:09 |
Hans VINCKIER wrote:
Hi, I've been working in Clarion since 1996 and now we want to start moving our app to windev. First we'll try to find out how we can move our working principles. The application controls access , payment, weigh registration for a containerpark. Each cabinet has a card reader, payment terminal, printer... For each type of cabinet or function there is a class object. Screen setup is done at runtime,i.e. all controls are created when the program starts by reading a configuration file. I found how to create buttons, etc at runtime. Now, several buttons are repeated on screen. In the called procedure (when the button is clicked) I want to know which button activated the call. I asked chatgpt and copilot and both suggested the "eventsource()" procedure. I didn't find any docs on that, even via the help it seemed to be an unknown function. How can I find out which control activated the call ??
Thanks
Hans Vinckier
i am not sure, if I realy understand your problem. I work and was working with Clarion since 198? and now I am on with WinDev too - aprox. 2 or 3 years. My colleague here is an experient WinDev developer ans portet a lot of Clarion code to WinDev. If you provide me some Clarion code snippets, maybe we can help you...
Regards |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 125 mensajes |
|
Publicado el 11,noviembre 2024 - 09:36 |
Usually points the MySelf-Variable to the Control, for which the event-Process is currently run ... |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 2 mensajes |
|
Publicado el 18,noviembre 2024 - 17:02 |
HI,
In clarion it works as follows : A driver procedures creates several objects? These objects create controls on the screen of the driver procedure. When a button is clicked, the event handler in the driver procedure intercepts this event and can handle it. Now, these objects also start ip communication with other systems. The objects are derived from a nettalk object. This means that the driver procedure calls at regular times the event handler in the object to check the condition of the nettalk communication object. So I'm wondering how this works in windev. I.e. : an object receives a message : how is the receipt handled , a method in the windev object ? How is this activated, does the driver procedure call:activate some funtions at regular time ?
Thanks
Hans Vinckier |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 82 mensajes |
|
Publicado el 18,noviembre 2024 - 20:47 |
Hi
Why not just add a parameter indicating which button did the calling?
Hans VINCKIER wrote:
Hi, I've been working in Clarion since 1996 and now we want to start moving our app to windev. First we'll try to find out how we can move our working principles. The application controls access , payment, weigh registration for a containerpark. Each cabinet has a card reader, payment terminal, printer... For each type of cabinet or function there is a class object. Screen setup is done at runtime,i.e. all controls are created when the program starts by reading a configuration file. I found how to create buttons, etc at runtime. Now, several buttons are repeated on screen. In the called procedure (when the button is clicked) I want to know which button activated the call. I asked chatgpt and copilot and both suggested the "eventsource()" procedure. I didn't find any docs on that, even via the help it seemed to be an unknown function. How can I find out which control activated the call ??
Thanks
Hans Vinckier
-- Ben Dell Riebens Computers Pty Ltd Southern Africa PcSoft Distributor www.windevsa.co.za PcSoft Sales, Support and Training |
| |
| |
| | | |
|
| | | | |
| | |
|