DCADDBUTTON ACTION code block

This forum is for eXpress++ general support.
Post Reply
Message
Author
Victorio
Posts: 621
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

DCADDBUTTON ACTION code block

#1 Post 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.
Attachments
ACTION_EXAMP.ZIP
(3.05 KiB) Downloaded 537 times

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCADDBUTTON ACTION code block

#2 Post 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.
The eXpress train is coming - and it has more cars.

Victorio
Posts: 621
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: DCADDBUTTON ACTION code block

#3 Post 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

Post Reply