1. Saul Erhmy
  2. PowerBuilder
  3. Friday, 30 September 2022 21:24 PM UTC

Hi,

I was googling online to see if this is possible but I'm not sure it is. If I'm correct it was possible in PB2018, there was a CSharp Editor but I can't find how to do this in 2022. I know SnapDevelop is used to code in C# but then I have to either create a .Net Web API so I can use C# code in my PB app (which I want to avoid) or convert my whole app to C# and SnapDevelop. If anyone knows how to use the C# Editor in PB2022 I would greatly appreciate it!

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Friday, 30 September 2022 22:00 PM UTC
  2. PowerBuilder
  3. # 1

What you can do is develop non-visual C# assemblies in whatever C# IDE you like and integrate that into your PowerScript-based app using the .NET DLL Importer: https://docs.appeon.com/pb2022/application_techniques/Calling_C_Assembly_in_an_Application.html

Here is an Elevate tech session about this topic: https://www.appeon.com/conference/elevate-2020/live?id=251

Comment
  1. Saul Erhmy
  2. Monday, 3 October 2022 16:42 PM UTC
Thanks Armeen!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 30 September 2022 21:49 PM UTC
  2. PowerBuilder
  3. # 2

Hi Saul;

 No... PB never had a C# editor. However, newer cloud versions of PB does come with the SnapDevelop IDE - which is a C# development tool & supports the .Net DataWindow & DataStore.

In the older days of PB, we did have a C++ editor built into the PB IDE when PB was built with the Watcom C++ compiler. Newer versions of PB today though are built using the Microsoft C++ compiler.

  You can use the C# Migrator utility to migrate your PowerScript to C# and then use either the SnapDevelop or Visual Studio IDE from that point onwards. However, the C# Migrator only does the non-visual objects. So there would still be coding work to do GUI wise after the initial code migration.

HTH 

Regards ... Chris 

Comment
  1. Saul Erhmy
  2. Monday, 3 October 2022 16:43 PM UTC
Thanks Chris!
  1. Helpful
  1. Saul Erhmy
  2. Monday, 3 October 2022 16:46 PM UTC
I do have a questions about the C# Migrator utility. How powerful is this tool, as in how well does it convert PowerScript to C#?
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Monday, 3 October 2022 20:13 PM UTC
For NVOs generally it is fairly good. Other than that, it is not going to do good conversion because it is designed to only work on non-visual code and PB apps generally are not well partitioned so garbage in... garbage out!
  1. Helpful 1
There are no comments made yet.
PowerObject ! Accepted Answer Pending Moderation
  1. Monday, 3 October 2022 20:43 PM UTC
  2. PowerBuilder
  3. # 3

Here is a chart of what PowerScript Migrator in SnapDevelop can migrate -

 

Comment
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.