1. Miguel Leeuwe
  2. PowerBuilder
  3. Wednesday, 27 January 2021 03:03 AM UTC

--- EDITED ---

n_osversion.of_pbvmname(), used by the code waaay below, will return "pbvm190.dll" for ALL different versions of powerbuilder 2019. I've adapted it in the hope it will now also return the correct name for pb2019 R3, R2 and R1.
So my best advice for now, is that IF you are using the R3 release of PB2019, use these 2 lines of code in n_cst_platform constructor event and nothing else.

// pb2019 R3
is_ClassName[1] = "FNWND3" // mdi window
is_ClassName[2] = "FNWNS3" // response window

I've modified the code of my n_osversion object to also check the minorRevision for pb2019 r3 (which is 2). I'm not sure yet if a value of 0 would represent R1 and a value of 1 would mean R2, but the same thing happened with pb2017. (see: https://www.appeon.com/standardsupport/search/view?id=1984 ).
I've attached the exported code of n_osversion.

// This function the name of the PowerBuilder VM file.

Environment le_env
String ls_vmname
Integer li_major

GetEnvironment(le_env)

li_major = le_env.PBMajorRevision
choose case li_major
	case 10, 11, 12, 17
		choose case le_env.PBMinorRevision
			case 5
				ls_vmname = "pbvm" + String(li_major) + "5.dll"
			case 6
				ls_vmname = "pbvm" + String(li_major) + "6.dll"
			case else
				ls_vmname = "pbvm" + String(li_major) + "0.dll"
		end choose
	case 19
		if le_env.PBMinorRevision > 1 then
			ls_vmname = "pbvm.dll" // pb2019 R3 or higher, R3 has a minorRevision = 2
		else 
			ls_vmname = "pbvm190.dll" // pb2019 R1 or R2
		end if
	case else
		ls_vmname = "pbvm.dll"
end choose

Return ls_vmname

 

--- End of EDIT ----

Hi all,

Now with the recently released R3 version of pb 2019 here's some code:

If you use PFC classes make sure that your n_cst_platform object has the correct values for the is_ClassName[] variable.
I'm not completely sure what the is_ClassName is used for internally, but it helps to have to correct values assigned to it.

So this is what I do in the constructor event of n_cst_platform (for the different versions of powerbuilder that we use, 12.6, 2017 and 2019 R2 and R3):

// get the version of POWERBUILDER:
n_osversion ln_osver
string ls_PBVMName

ls_PBVMName = lower(ln_osver.of_PBVMName())
choose case ls_PBVMName
	case "pbvm.dll"  // pb2019 R3 (and maybe later versions too?)
		is_ClassName[1] = "FNWND3" // mdi window
		is_ClassName[2] = "FNWNS3" // response window
	case "pbvm170.dll" // pb2017
		is_ClassName[1] = "FNWND3170" // mdi window
		is_ClassName[2] = "FNWNS3170" // response window
		is_ClassName[3] = "AfxMDIFrame100su" // pb2017 for "dockable MDI" 
	case "pbvm190.dll"  // pb2019 R1 / R2
		is_ClassName[1] = "FNWND3190" // mdi window
		is_ClassName[2] = "FNWNS3190" // response window
		// v2, mjl, 06/04/20: dockable MDI is now obsolete in pb2019 R2, commented:
		//	is_ClassName[3] = "AfxMDIFrame100su" // pb2019 for "dockable MDI", same as PB2017
	case "pbvm126" // pb 12.6
		is_ClassName[1] = "FNWND3126" // mdi window
		is_ClassName[2] = "FNWNS3126" // response window
end choose

Regards

Attachments (1)

Responses (5)
  1. Likes
  2. Latest
  3. Oldest
Loading...

Find Questions by Tag

.EXE .NET 6.0 .NET Assembly .NET Core 3.1 .NET Core Framework .NET DataStore .NET Std Framework 32-bit 64-bit ADO.NET AEM AI Algorithm Amazon AWS Android Apache API APK App Store App Store (Apple) Appeon Workspace Appeon Xcelerator Plug-in Architecture Array ASE Asynchronous Methods Authentication AutoBuild AutoCompiler Automated Testing Automation AutoScript Azure Barcode Base64 Batch BigData BLOB Branch & Merge Browser Bug Build Button C# C# Class Importer C# Editor C# Model generator Calendar Camera Certificate Chrome Citrix Class Client Client/Server Cloud Cluster Collection COM Command Line Compiler Compression Computed Field Configuration Controls Cookies Cordova Crash Cross-Platform Crosstab CSharpAssembly CSharpObject CSS CSV Cursor Data Database Database Driver Database Painter Database Profile Database Provider DataObject DataSource DataStore DataStore (C#) DataStore (PS) DataType DataWindow DATE DATETIME DB2 Debug Debugger Debugging Deployment Design DLL DO-WHILE Dockable Docker Documentation DOUBLE Download DragDrop Edge Edit Style Editor Elevate Conference Email Embedded SQL Emulator Encoding Encryption Enhancement Request Entity Entity Framework ERP Error Event Event Handler Event Handling Excel Exception Export Expression External Functions F# Field File File Access Filter Firefox Firewall Font FOR-NEXT Foreground Format Function Garbage Collection GeoLocation Git Graph HANA Hash Header HTML/5 HTTP/S HTTPClient Icon IDE Identity IIS IMAPI Import InfoMaker Inheritance Installation Integer IntelliSense Interface Internet Internet Explorer iOS IPA iPad iPhone IWA J# Java JavaScript JBoss JDBC JOIN JSON JSONGenerator JSONParser Kestrel Label Lambda Large File LDAP Library License LINQ Linux OS Load Balancing Localization Localized PBVM Log In Log Out Logging LONG LONGLONG macOS MAPI Maps MDI Memory Memory Leak Menu Merge MessageBox Messagging Method Migration MIME TYPE Mobile Model ModelStore ModelStore (C#) MSOLEDBSQL Multi Threading MVC MySQL n-Tier Namespace NativePDF NVO OAuth ODATA ODBC Office Offline OLE OLEDB Online Open Source OpenAPI OpenSSL Oracle OrcaScript Other Outlook Output Package Parameter Patch PayPal PB Classic PB Native PB.NET PBC PBD PBDOM PBG PBJVM PBL PBNI PBORCA PBVM PBX PDF Performance Permission PFC Picture Pipeline Play Store (Google) Plugin Popup Port POST PostgreSQL PowerBuilder PowerBuilder (Appeon) PowerBuilder (SAP) PowerBuilder Compiler PowerBuilder Runtime PowerClient PowerScript (PS) PowerScript IDE PowerScript Migrator PowerServer PowerServer Mobile PowerServer Toolkit PowerServer Web PowerServerLabel Print Properties Proxy Publish PULL PUSH Query Regression Release Renew Resize Response REST Retrieve RibbonBar RibbonBar Builder Rich Text Roadmap RPC Runtime Packager SaaS Scaffolding Script SDI SDK Security Server Service Session Single Sign-on Size SMTP SMTPClient SnapDevelop SOAP Sort Source Code Speech Recognition SQL SQL Anywhere SQL Server SqlBuilder SqlExecutor SQLite SqlModelMapper Storage Stored Procedure Subscription SVN Swagger Syntax TabbedBar TabbedView Tablet TabPage Target TE Control Testing Text TFS Theme TIME Timer TLS/SSL Tomcat TortoiseGit TortoiseSVN Transaction Transparency Trial Trigger TRY-CATCH TX Control Type UI ULONG UltraLite Uninstall Unit Test Unit Testing UNIX OS Update Upgrade Upload URL User Center User Object UWP Validation VARCHAR Variable Versioning Visual Studio Visual Studio Code VM Voice Warning WCF Web API Web Extensions Web Service WebBrowser WebForms WebLogic WebSphere WildFly WinAPI Window Windows OS WinForms Wizard Workgroup Workspace WPF XCODE XHTML XML Zoom

Helpful?

If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.