Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reflection unable to read existing sessions

Status
Not open for further replies.

leblankenship

Programmer
Mar 27, 2012
10
US
I'm getting started with Reflection 2014 and the new object model and I'm running into an issue when trying to open a new terminal session. Right now I'm just playing around to get comfortable with the new model so I can start doing some actual work.

[pre]
'I open the current Application object and frame
Set m_oApp = GetObject(, "Attachmate_Reflection_Objects_Framework.ApplicationObject")
Set m_oFrame = m_oApp.GetObject("Frame")
'I create a terminal from my default session file
Set m_oTerminal = m_oApp.CreateControl(SESSIONS & CPI)
'It fails here because it can't read the file even though this is the same file I created the current session from.
Set m_oView = m_oFrame.CreateView(m_oTerminal)
m_oFrame.Visible = True[/pre]

anybody else run into this so far?
 
Unfortunately, what you gave me is using Reflection from several versions ago(2006). We upgraded to Reflections 2014, and I'm trying to document how to work with the very latest object model. I did finally get it to work, though.

[pre]

'Declarations
Private m_oApp As Attachmate_Reflection_Objects_Framework.ApplicationObject
Private m_oFrame As Attachmate_Reflection_Objects.Frame
Private m_oIbmTerminal As Attachmate_Reflection_Objects_Emulation_IbmHosts.IbmTerminal
Private m_oView As Attachmate_Reflection_Objects.View
Private m_oIBMScreen As Attachmate_Reflection_Objects_Emulation_IbmHosts.IbmScreen
Private m_oScreenNav As clsScreenNav

Private m_iClient As Integer
Private m_oUser As clsUser


Public Sub Login(envEnvironment As Environment)
Set m_oApp = GetObject("Reflection Workspace")
Set m_oFrame = m_oApp.GetObject("Frame")
Set m_oIbmTerminal = m_oApp.CreateControl(ThisIbmTerminal.SessionFilePath)
Set m_oView = m_oFrame.CreateView(m_oIbmTerminal)
m_oView.titleText = Me.Client
Set m_oIBMScreen = m_oIbmTerminal.screen

'Now Log in the user to the session in question
End Sub
[/pre]

As background our users log into the same host but for different clients. Each client has their own view with its own log in and so forth. This along with a client collection class lets me open multiple client sessions from a single session file. It works slick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top