SnapSections Changes

Discussions related to SoftPro Select user interface development.

Moderator: Phil Barton

John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: SnapSections Changes

Post by John Morris »

What does your snap section XML look like?
John Morris
Sr. Software Architect
SoftPro
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: SnapSections Changes

Post by roteague »

Code: Select all

<ScreenDefinition>
	<ScreenName>Timeline</ScreenName>
	<Priority>0</Priority>
	<Context>Order</Context>
	<SnapSection>
		<Name>Timeline</Name>
	</SnapSection>
Sorry for not responding earlier, I've got some support issues I'm working on here.
Robert
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: SnapSections Changes

Post by John Morris »

Is your assembly marked with the SnapSectionAssemblyAttribute?
John Morris
Sr. Software Architect
SoftPro
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: SnapSections Changes

Post by roteague »

John,

I missed that. I added a reference to <Assembly: SnapSectionAssembly()> in my applications assembly. Unfortunately, while the snap section load, I still get the "Failed to open Screen Object reference not set to an instance of the object".

I realize that SoftPro is still evolving and documentation is sparse, so I appreciate the help.

Robert
Robert
JDavis
Posts: 97
Joined: Mon Sep 22, 2008 5:10 pm

Re: SnapSections Changes

Post by JDavis »

John, any more help that you can give on this? I'm getting the same errors that Robert described. Select is trying to load the snap section, but seems to be failing when setting the context. What else do we need to set in our snap sections? In 2.1 we simply inherited from SnapSectionBase and it was good to go.

Code: Select all

Select.exe Error: 0 : Failed to open screen Object reference not set to an instance of an object.
   at SoftPro.UI.Base.SnapSectionContainerBase.CheckContext(String askedForContext, IBusinessObject currentContext, String currSnapName)
   at SoftPro.UI.Base.SnapSectionContainerBase.SetContext(IBusinessObject context)
   at SoftPro.UI.Base.ScreenContainer.OpenScreenEx(String screenName, IBusinessObject context, ScreenDefinition screenDef)
   at SoftPro.UI.Base.ScreenContainer.OpenScreen(ExplorerBarItem screenEBItem, IBusinessObject context)
   at SoftPro.OrderTracking.Controls.OrderEditor.OpenScreenEx(ExplorerBarItem screenEBItem, IBusinessObject iContext, Boolean openInNewTab, OpenScreenType type)
Can you post the code for a simple snap section that wil simply load a button on the screen.
Phil Barton
Posts: 54
Joined: Wed Sep 24, 2008 2:37 pm
Location: Raleigh, NC
Contact:

Re: SnapSections Changes

Post by Phil Barton »

What is the context of the Timeline snapsection?
Phil Barton
Software Architect
SoftPro
Mark McKenna

Re: SnapSections Changes

Post by Mark McKenna »

In your Timeline snapsection, do you override the GetContextType method? If so, what are you returning, and if not - try overriding it and returning "Order" (assuming from your screen definition XML that the fields in your snapsection are Order-based).
JDavis
Posts: 97
Joined: Mon Sep 22, 2008 5:10 pm

Re: SnapSections Changes

Post by JDavis »

Mark, I was able to load the snap section by overriding the GetContextType method as you suggested.

Code: Select all

Public Overrides Function GetContextType() As String
        Return "Order"
    End Function
Why isn't the base class returning a value? Are there any other "Gotchas" that we should be aware of when working with SnapSection in 2.2 since there is no info on them in the SDK?

Thanks
Mark McKenna

Re: SnapSections Changes

Post by Mark McKenna »

I can't disagree that the method feels like a strong candidate for being marked abstract. I've added a work item in our system to evaluate the effect of such a change for a future release. For the time being, know that you must override that method in all your snapsections and return the name of the appropriate business object to which your snapsection wishes to bind.
Post Reply