Jump to content
Sign in to follow this  
Guest

System.Actions.TContainedAction.DisableIfNoHandler

Recommended Posts

Guest

Does anyone know why this property is not published at the TAction level? If so would you please explain.

 

TIA /D

Share this post


Link to post
Guest

Because it would be very very neat to be able to set this property in the dfm. It kind of goes together with the published property Enabled.

 

/D

Share this post


Link to post

Yes, but you can't.

I don't know the history behind it but I can see arguments both for and against having actions disabled if there's no handler and maybe that's why they decided to make it optional. Maybe not making it published was to avoid having the noobs shoot themselves in the foot with it. I don't know (and I don't care which is why I tried to delete my question after I asked it 🙂).

It's a very minor annoyance that can easily be worked around with an empty OnExecute handler so I don't really care about it anymore.

Submit a change request if it's important to you.

Share this post


Link to post
Guest

I agree, it's no biggie. Thanks for the input!

Share this post


Link to post
On 12/18/2019 at 2:39 PM, Dany Marmur said:

Does anyone know why this property is not published at the TAction level? If so would you please explain.

 

TIA /D

My assumption here (which means I may be wrong)  is to discourage you from doing precisely what you're trying to do, i,e. change it at design time.

With that said, it's a decision that sits quite well with me for the simple reason that it allows me to enable things as I go along, so that at any given point I can, for example, showcase things while still giving off that "unfinished" feel that is so important if you're dealing with upper management/customers/etc. 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×