SnapSections Changes

Discussions related to SoftPro Select user interface development.

Moderator: Phil Barton

roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

SnapSections Changes

Post by roteague »

Can you tell me about the changes in SnapSection creation from version 2.1 to 2.2. None of the SnapSections I previously created works in 2.2. I get an error message "Failed to open screen Could not create SnapSection called 'Timeline'". I created a blank SnapSection with nothing on it but a button and got the same error message.
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 »

With Select v2.2, we changed the algorithm which searches for SnapSection assemblies. Previous releases would search the applicataion folder for any assemblies which contained snapsections. This was a performance and memory problem. With v2.2, you have to 'register' the snapsection assembly with the server registry service by adding your assembly name into a semi-colon delimted list of assembly names. Once this change is made, your snapsection should begin working. You still need to place your assembly into the application folder.

In order to modify the server registration data, perform the following steps:

1. On the server, open a command line (cmd.exe) and change directory to the Select Server Tools folder

Code: Select all

C:\> cd C:\Program Files\SoftPro\Select Server\Tools
2. Make a backup of the original registration file IntegrationServices.xml.

Code: Select all

copy IntegrationRegistration.xml IntegrationRegistration.bak
3. Edit the IntegrationServices.xml file using a standard text editor

Code: Select all

notepad IntegrationRegistration.xml
4. Change the following line so that it includes your assembly name (without the file extension):

Code: Select all

<Attribute name="SnapSectionAssemblies" value="SoftPro.OrderTracking.Controls; SoftPro.UI.Base" />
5. Update the server registration by running the SPS.EXE tool using the register command:

Code: Select all

sps.exe register /server:http://localmachine/SelectServer /user:admin,Passw0rd IntegrationRegistration.xml
John
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 »

I still get the same error, nothing has changed. Here is what the debugger reports:

"Select.exe Error: 0 : Failed to open screen Could not create SnapSection called "Timeline"
at SoftPro.UI.Base.SnapSectionContainerBase.AddSnapSections(ScreenNode[] children, 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)"

sps register doesn't report any errors.
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 snapsection assembly in the application folder?
John Morris
Sr. Software Architect
SoftPro
JDavis
Posts: 97
Joined: Mon Sep 22, 2008 5:10 pm

Re: SnapSections Changes

Post by JDavis »

John, I get the same error. Yes, the assembly is in the Select folder. This is all that I have in my class with one button on the form:

Code: Select all

Imports SoftPro.UI.Base

Public Class JakeSnapSection
    Inherits SnapSectionBase



End Class
Registered snap section as JakeSnapSection.JakeSnapSection
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 IntegrationRegistration.xml file look like? Did you enter the class name or the assembly name? It should only be the assembly name, without the file extension.
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 »

Thanks for the followup John.

I have the following in my xml:

SoftPro.OrderTracking.Controls; SoftPro.UI.Base; TG.SoftPro.Timeline

Which is the Assembly Name.
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 »

What is the fully qualified name of your snapsection class?
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 »

I made a mistake in the xml file, the name should have been "SoftProSnapSectionSample" (the other DLL was a business object dll). I re-registered with the correct name.

The SnapSection is still not working, however, there error is elsewhere now. I am able to set a breakpoint into my SnapSection's Form_Load method, but SoftPro is throwing an error after it steps out of the method:

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)

I'm going to create an empty SnapSection and see what happens.

Thanks for all your help,

Robert
Robert
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: SnapSections Changes

Post by roteague »

I tried starting from fresh. I created a new SnapSection. The new module name is: TG.SoftPro.OrderTimeline.dll.

Here is the code for the class:

Code: Select all

Imports SoftPro.UI.Base

Partial Public Class Timeline
    Inherits SnapSectionBase

    Public Sub Timeline()               'Substitutes for New()
        InitializeComponent()
    End Sub

End Class
My IntegrationRegistration.xml is as follows:

Code: Select all

SoftPro.OrderTracking.Controls; SoftPro.UI.Base; TG.SoftPro.OrderTimeline
Very simple, it does nothing, contains no child controls. The error message I get is "Failed to open screen - Could not create SnapSection called 'Timeline'". the debugger reports:

Code: Select all

Select.exe Error: 0 : Failed to open screen Could not create SnapSection called "Timeline"
   at SoftPro.UI.Base.SnapSectionContainerBase.AddSnapSections(ScreenNode[] children, 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)
I am at an impasse and can go no further on this. I created a functioning SnapSection for the previous version, but it doesn't work for this version.
Robert
Post Reply