NSApplicationPresentationDisableHideApplication is not disabling the "Hide" option from the dock menu

Hello,

I am trying to use the following code to disable the Hide option for my application :

        NSApplicationPresentationOptions options = [NSApp presentationOptions];
        options |= NSApplicationPresentationDisableHideApplication;
        [NSApp setPresentationOptions:options];

, but it doesn't have any effect : the Hide option is still clickable :

How could I remove this option?

Thanks for any help in advance!

NSApplicationPresentationDisableHideApplication is not disabling the "Hide" option from the dock menu
 
 
Q