|
open
|
|
Full name
|
pfc_w_master.open
|
Access
|
public
|
Extend of
|
|
Return value
|
|
Prototype
|
event open()
|
Name
|
Datatype
|
li_rc
|
Integer
|
event open;//////////////////////////////////////////////////////////////////////////////
//
// Object Name: pfc_w_master
//
// Description:
// The ancestor to all PFC window classes
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
// 6.0 Added MRU and Logical Unit of Work service code
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
Integer li_rc
// Allow for pre and post open events to occur
This.Event pfc_preopen()
This.Post Event pfc_postopen()
// Default window title is application title
If Len (This.title) = 0 Then
If IsValid (gnv_app.iapp_object) Then
This.title = gnv_app.iapp_object.DisplayName
End If
End If
// Allow preference service to restore settings if necessary
If IsValid(inv_preference) Then
If gnv_app.of_IsRegistryAvailable() Then
If Len(gnv_app.of_GetUserKey())> 0 Then
li_rc = inv_preference.of_Restore( &
gnv_app.of_GetUserKey()+'\'+this.ClassName()+'\Preferences')
ElseIf IsValid(gnv_app.inv_debug) Then
of_MessageBox ("pfc_master_open_preferenceregistrydebug", &
"PowerBuilder Foundation Class Library", "The PFC User Preferences service" +&
" has been requested but The UserRegistrykey property has not" +&
" been Set on The application manager Object.~r~n~r~n" + &
"Call of_SetRegistryUserKey on The Application Manager" +&
" to Set The property.", &
Exclamation!, OK!, 1)
End If
Else
If Len(gnv_app.of_GetUserIniFile()) > 0 Then
li_rc = inv_preference.of_Restore (gnv_app.of_GetUserIniFile(), This.ClassName()+' Preferences')
ElseIf IsValid(gnv_app.inv_debug) Then
of_MessageBox ("pfc_master_open_preferenceinidebug", &
"PowerBuilder Class Library", "The PFC User Preferences service" +&
" has been requested but The UserINIFile property has not" +&
" been Set on The application manager Object.~r~n~r~n" + &
"Call of_SetUserIniFile on The Application Manager" +&
" to Set The property.", &
Exclamation!, OK!, 1)
End If
End If
End If
// Allow MRU service to restore settings if necessary
If IsValid(gnv_app.inv_mru) Then
this.event pfc_mrurestore()
End if
end event