Flynet Viewer .NET Programmer's Reference

getScreenID Method

getScreenID Method

Previous topic Next topic  

getScreenID Method

Previous topic Next topic  

Return the unique integer for this screen.  Will match the ScreenID enumeration for the assembly generated by the Mapper utility.

 

integer HostScreen.getScreenID()

 

Arguments

 

HostScreen

 Required. HostScreen object.

 

Returns

 

The integer value starting with 1 corresponding to the ScreenID enumeration in the active generated screen definition helper assembly created by the Flynet Studio or Mapper application.

 

Returns 0 if the screen is not recognized (default).

 

Remarks

 

With the IOHelper [projectname]Maps class generated by Flynet Studio or the Mapper application, a ScreenID enumeration is created that is based on the recursion through the active screen definition file's screens.  In this enumeration, each screen has a unique ID that is integer based.

 

By using the integer-based ScreenID instead of text-based screen names, recognition as well as lists of screens can be more efficiently handled.  In addition, for the developer, the ScreenID enumeration provides "spell-proof" coding since the screen names are all listed in the enumeration and are readily available to the Intellisense in Visual Studio.

 

 

Example

 

 

ScreenID activeScreen;

activeScreen=(ScreenID) oScreen.getScreenID();

if (activeScreen != ScreenID.ComplicatedNameThatIsEasyToFindWithIntellisense)

 Throw new System.Exception("Not the right screen!");

 

Requirements

 

Flynet Viewer

 

Applies To: HostScreen object

 


© 2016 Inventu Corporation, Flynet LTD