Other Button events

udg

Expert
Licensed User
Longtime User
Hi all (well, this time it should be Hi Erel..),
I opened an old B4J program and noted the existence of a button_action sub. No surprise, this is also as it is documented.
Then I added a new button by the Designer and among the listed events (both right-clicking it and by tools/generate members option) there was no more Action but Click, so the generated code led to button1_click this time.
Both forms work. I wrote this message only to drive Erel's attention to a marginal point in order to update the documentation or to eventually modify the compiler so to it could automatically translate from previous form to the newer one or whatever he finds more appropriate.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Everything you described is exactly as designed.

The compiler will not go and change existing code. This is not really possible and is not needed.

The Action event was replaced with the Click event. The Action event still works so nothing breaks and it doesn't appear in the list of events so new code will be based on the Click event.
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Maybe an update for the doc page? Just adding the Click event and (eventually) specifying that Action is still there for backward compatibility.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…