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)
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 27 January 2021 04:03 AM UTC
  2. PowerBuilder
  3. # 1

Sorry for the re-edit's, I think I've finished now :)

Comment
  1. Miguel Leeuwe
  2. Wednesday, 27 January 2021 18:11 PM UTC
I hit the connect button and shows as "Pending", let's see if you can

Maybe the problem is in my privacy settings in linkedIn. I probably don't allow anyone to connect, let me revise my settings

regards..

  1. Helpful
  1. mike S
  2. Wednesday, 27 January 2021 18:23 PM UTC
yes, i think you can have a setting to allow links with those who know your email.



lol - you should just call it mikedin
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 27 January 2021 18:26 PM UTC
lol :)

  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 27 January 2021 06:11 AM UTC
  2. PowerBuilder
  3. # 2

Hi Miguel, what you think about adding this to PFC?  It is open source and Bruce is encouraging others to contribute: https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/316-quick-start-for-contributing-to-open-source-pfc

 

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 27 January 2021 07:25 AM UTC
Excellent!
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 28 January 2021 09:39 AM UTC
Okay, wow I finally got the Git thing working thanks to Bruce's video. Took me some time as I forgot to "fork" and tried to use the https:// to Bruce's repo instead of my forked own repo and it also took me some time to figure out that I have to create a PAS (personal access token in my GitHub account and use THAT token instead of my account's password. But hey, I did it.

Bruce already implemented the code.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 28 January 2021 14:47 PM UTC
Excellent!
  1. Helpful
There are no comments made yet.
Brad Mettee Accepted Answer Pending Moderation
  1. Wednesday, 27 January 2021 13:29 PM UTC
  2. PowerBuilder
  3. # 3

I know this is closed, but I can see a major issue with the PBVM name NOT having the version number in it (not related to the PFC changes, but the PBVM itself).

Has anyone at Appeon considered what happens when you have PB2019 AND PB2020 (or PB2021) on the same machine and BOTH versions have identically named PBVM files? This will make it extremely difficult to manage multiple versions of PB Executables (dev env and compiled versions).

 

Comment
  1. Miguel Leeuwe
  2. Tuesday, 9 February 2021 01:03 AM UTC
Daryl, I know what you mean. Initially the application has to find 2 or 3 DLL's before you even have had the chance to set the path in the code.

We solve this by using a shortcut. The "start in" has the folder of the runtime in our Shared folder.

regards.
  1. Helpful
  1. Daryl Foster
  2. Tuesday, 9 February 2021 03:59 AM UTC
Thanks Miguel
  1. Helpful
  1. Roland Smith
  2. Tuesday, 9 February 2021 14:31 PM UTC
When you build the exe, an XML file is created which contains the runtime path. If the XML file is in the same folder as the EXE, the EXE uses it to find the runtime.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 28 January 2021 09:45 AM UTC
  2. PowerBuilder
  3. # 4

Okay,

wow I finally got the Git thing working thanks to Bruce's video.

Took me some time as I forgot to "fork" and tried to use the https:// to Bruce's repo instead of my forked own repo and it also took me some time to figure out that I have to create a PAS (personal access token in my GitHub account and use THAT token instead of my account's password.

But hey, I did it.
Bruce already implemented the code, so please forget about everything I've said in this ticket and just get the latest pfcs for Powerbuilder 2019 from https://github.com/OpenSourcePFCLibraries/2019

I also updated the PBDOM objects to use PBDOM.pbx instead of PBDOM190.pbx, but really, I would recommend to NOT use these objects in the pfcappsrv.pbl (just delete them and import the current PBX into a separate library).

These objects might change with any MR and make it difficult for the pfcs to be compatible with 2019 R1, R2 and R3.
Right now (after my change) they assume R3, so something left to be done is to remove PBDOM190.pbx and add PBDOM.pbx to the pfc repository on Github.
I'd rather see these objects removed completely, but not sure if someone might have created a dependency within the pfcs at some point.

(on my pending to do list)

regards

Comment
  1. Andreas Mykonios
  2. Tuesday, 11 May 2021 18:23 PM UTC
Thanks Armeen.

Anyway, even if I set the PTA in both fields push doesn't succeeds. PB reports that it's been complete, but in github I don't see any change...

Very strange. Because the whole procedure is simple.

Andreas.
  1. Helpful
  1. Andreas Mykonios
  2. Tuesday, 11 May 2021 20:04 PM UTC
I finally figured why I could not push changes to github.There is a setting called "Block command line pushes that expose my email". This setting does what exactly it says, it blocks commands that will expose email. Powerbuilder exposes developers mail. It is a required field. When I disabled that setting in github, I did push my changes with no problem. The main problem I still don't understand is why PowerBuilder is not able to catch that error...



Andreas.
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 11 May 2021 20:09 PM UTC
Glad you solved it!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 9 February 2021 17:49 PM UTC
  2. PowerBuilder
  3. # 5

Hi Miguel;

   FWIW: Any time you need to introspect the PB IDE or any PB App EXE that is running to see all the object classes that are running and how they are related to one another, feel free to use my PowerBuilder Windows Explorer ...

http://chrispollach.blogspot.com/2020/08/explorer.html

   This free utility will also introspect any running application regardless of its origin. That also includes any MS-Windows App's & utilities as well as background Services, Taskbar and Notification Apps as well.   ;-)

HTH

Regards ... Chris

Comment
  1. Miguel Leeuwe
  2. Tuesday, 9 February 2021 17:54 PM UTC
Thank you Chris, that could be very useful, I'll have a look!
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 10 February 2021 09:43 AM UTC
I just now had a look at it. There's some really useful stuff in there,

nice one Thanks!
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 10 February 2021 21:18 PM UTC
Enjoy!

Remember, when someone says "you can't do that in PB" .. send them my way .. LOL! ;-)
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.