Ticket T653060
Visible to All Users

NewObjectActionItemListMode.LastDescendantsOnly causes NullReferenceException with DC

created 7 years ago

[DevExpress Support Team: CLONED FROM T326296: How to remove or hide the base class from the New Action's items list]

C#
using DevExpress.ExpressApp; using DevExpress.ExpressApp.SystemModule; using DevExpress.Persistent.BaseImpl; // ... public class CustomizeNewActionItemsListController : ObjectViewController<ObjectView, Task> { protected override void OnActivated() { base.OnActivated(); NewObjectViewController controller = Frame.GetController<NewObjectViewController>(); if(controller != null) { controller.NewObjectActionItemListMode = NewObjectActionItemListMode.LastDescendantsOnly; } } }

I tried to implement this in DC. But I am getting  'System.NullReferenceException: 'Object reference not set to an instance of an object.' '.What am I doing wrong? Thanks

Comments (1)
Anatol (DevExpress) 7 years ago

    I cannot reproduce this issue. See the attached sample project with my test configuration. Let me know how I should modify this project to receive the exception. Also, provide the exception's Call Stack and clarify your DevExpress version.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.