Page 1 of 1

DCADDBUTTON ACTION code block

Posted: Tue Dec 10, 2019 4:37 pm
by Victorio
Hi Roger,
I get some error on page,than create new post.

Here is part of source code in zip , I cannot create some working example because many other source files need to join with functions.

Tomorrow (or today because is 0:33 clock :o ) I want create some test program where test if realy problem is with many rows in ACTION or some my mistake. I think more likely this will be my mistake but I cannot found why compiler / workbench xbase++ freeze up.

Re: DCADDBUTTON ACTION code block

Posted: Tue Dec 10, 2019 6:06 pm
by rdonnay
It appears that your code block that ends on line 69 is too complex for the compiler.
When I try to compile, I get a syntax error.

When you have a code block that is so complex you should replace it with a function.
The code will be much simpler to read and maintain if it is in a static function which is called by the code block.

Re: DCADDBUTTON ACTION code block

Posted: Wed Dec 11, 2019 12:23 am
by Victorio
Ok, thank you very much, it is true that my code is hard readable and any modification is sonetimes problem.
I create function this will be better.

edit : I created a function by your suggestion, and everything works without problems. :dance:
Also list of buttons in source is better readable.

Viktor