1. Josh Turner
  2. PowerBuilder
  3. Thursday, 14 February 2019 14:09 PM UTC

In the latest patch for PowerBuilder 2017 R3 (Build 1880), Appeon addressed the numerous problems with the rich text control by reverting back to the previous TX Text Control. This was a huge relief to our organization which has dealt with these rich text issues since PB 2017 first came out. 

My only complaint about the solution is that the method they used to employ this solution was to put a drop down in the application settings allowing you to select which rich text control to use. The default is still the built-in PowerBuilder rich text control. This gives rise to problems with organizations that utilize automated builds on a dedicated build machine via source control. Since the application settings are local to each machine and are impossible to check in to source control, the build machine can't use the new rich text drop down feature and it defaults to the built-in PowerBuilder rich text control still. Our only solution is to run manual builds.

It would be great if this could be addressed somehow. Perhaps PowerBuilder should default to the old TX Text Control for rich text since I can't imagine many people are using the new one due to all the issues.  Even better if Appeon finds a way to allow you to save the application settings to source control, especially if this is going to be a place other settings are going to be stored in the future that are dependent on builds to be customized. I admit that I have no idea how the application settings are stored or if it's even possible to make something that can be checked into source control (no matter the ssc provider).

James Anderson Accepted Answer Pending Moderation
  1. Monday, 13 May 2019 18:32 PM UTC
  2. PowerBuilder
  3. # 1
We tried setting the richtextedittype = 2 programmatically , but it did not work. I was hoping it would given the comment about editing the exe string value from 0 to 2.

edit the application object and add this public function

/*===================================================================================

Function: application.of_SetrichtextedittypeTX

Purpose: set the rich text type to TX so PowerGen created exe will use that instead of the default TE control

Arguments: None

Returns: None

Scope: Public

Notes: None

Date Who What
--------- ---- --------------------------------------------
05/13/19 JKA Initial Version

===================================================================================*/
richtextedittype = 2
richtexteditversion = 1

then
add this to constructor of appmanager
// set the rich text edit type to TX of_setrichtextedittypetx
application lnv_application
lnv_application = getapplication()
lnv_application.dynamic function of_setrichtextedittypetx()
Comment
  1. Roland Smith
  2. Monday, 13 May 2019 18:49 PM UTC
All that does is tell you which one is selected. The problem is that the ORCA API function PBORCA_ExecutableCreate ignores the setting.
  1. Helpful
  1. James Anderson
  2. Tuesday, 14 May 2019 18:03 PM UTC
The solution for our CM team looks like they can use PowerGen to get the latest code, generate the exe and PBD. Then we run an orca script to recreate the exe with the correct settings for richtextedittype. The resulting application runs fine with the new syntax. The orca script can be automated along with their current build deployment process.
  1. Helpful
There are no comments made yet.
Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Thursday, 21 February 2019 09:42 AM UTC
  2. PowerBuilder
  3. # 2

Hi Josh & Roland,

We’ve recorded this as a bug and will analyze for a solution.

As a temporarily workaround, you can use an exe editor (such as Resource Hacker) to edit the exe generated by PowerGen/WizSource on the "String Table" and change the "1001" key’s value from "0;1" to "2;1;".

If you don’t see this "1001" key, please add this record.

See attached for your reference:

 

Regards,

Mark Lee

 

Attachments (1)
Comment
There are no comments made yet.
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Thursday, 21 February 2019 07:33 AM UTC
  2. PowerBuilder
  3. # 3

Hi All,

#1. About ORCA API PBORCA_ExecutableCreate issue
We reproduced the issue. The exe created using ORCA API ‘PBORCA_ExecutableCreate’ always uses the built-in Rich Edit Control.
We’ve submitted the issue to Appeon Development team to analyze.
Currently, when you get this issue, we suggest that you use PB IDE, ORCAScript or PBC to compile a PB application.

#2. About the Powerscript GetApplication call not recognizing the new control
We have transferred this enhancement to Appeon Product team for consideration. You may work it around with the following before it is enhanced:

Step 1: In the Application Object, add the function of_getrtetype() , with the below code:
Return this.richtextedittype

Step 2: Call this function in other objects like below:
Application la_app
la_app = GetApplication()
li_ret = la_app.dynamic function of_getrtetype()

Regards,
Ken

 

Comment
  1. Roland Smith
  2. Thursday, 21 February 2019 17:42 PM UTC
Doesn't the ORCAScript just call ORCA functions and therefore have the same limitation?

So PBC bypasses and goes directly into the same functions as the IDE Project painter?
  1. Helpful
  1. Ken Guo @Appeon
  2. Friday, 22 February 2019 07:45 AM UTC
Hi Roland,



Based on our current testing results, we did not see such limitation for ORCAScript and PBC. Anyway the developers are still working on further analysis.



Regards,

Ken

  1. Helpful
There are no comments made yet.
Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 19 February 2019 10:05 AM UTC
  2. PowerBuilder
  3. # 4
 

Hi Josh,

Here is my analysis of the issue:

The issue is related to the third party auto build tool (WizSource) for generating PB application, which defaults to TE instead of TX for the richtext control.

We are not sure if this is the third party tool’s issue as we don’t have this tool to verify.

 

There are some steps for you to identify the source of the issue:

  1. Verify if the richtext flag is correct on the source server: Check the application .sra file for the richtextedittype. It should be set to 2 as shown attachment picture when TX is selected in PB IDE.  

      2. Verify the richtext setting use other tools:
          Use OrcaScript or PowerGen to create the exe file and run it to verify if the result matches the setting. If the                issue is with WizSource, please contact the vendor to solve the issue.

  1. Check if you are using PB 2017 R3 MR 1880 runtime DLLs for your application.

(You may get a similar issue if you are using PB 2017 R3 1858 runtime)

 

Regards,

Mark Lee

Attachments (1)
Comment
  1. Roland Smith
  2. Tuesday, 19 February 2019 11:35 AM UTC
The WizSource batch compiler program uses the same ORCA functions that the Appeon provided compiler does. The question should be: does the ORCA exe build function look for the rich text settings in the sra source code and properly set the flag in the exe that the pbvm uses when creating the rich text controls. Based on all the complaints coming forward, the answer is likely no.
  1. Helpful
There are no comments made yet.
Don Olliver Accepted Answer Pending Moderation
  1. Monday, 18 February 2019 16:42 PM UTC
  2. PowerBuilder
  3. # 5

Many of our clients have existing RTE documents they regularly view and distribute. We have spent the past year migrating our PB 12.5 app to PB 2017. Not having the ability to run automated (PowerGen) builds with the old RTE control selected prevents us from moving PB 2017 into production until the issue is fixed. If that won't be until a future release of PB 2019, management will de-escalate the priority of this project.

 

Comment
  1. Armeen Mazda @Appeon
  2. Monday, 18 February 2019 21:05 PM UTC
Hi Don, Please contact the vendor of PowerGen and request this feature enhancement. Our product management will cooperate with them to explore possibility of having PowerGen perform automated builds with PB 2017 R3 and select which RTE to use for compilation.
  1. Helpful
  1. Phil Wallingford
  2. Tuesday, 19 February 2019 14:07 PM UTC
I believe the problem is (and I've created a Case #2300 for this) that ORCA does not use the Rich Text Editor information in the application object (*.sra). So anything to raise the priority of this case is appreciated.



  1. Helpful
  1. Phil Wallingford
  2. Tuesday, 19 February 2019 14:11 PM UTC
That is the PBORCA_ExecutableCreate API.
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Friday, 15 February 2019 18:47 PM UTC
  2. PowerBuilder
  3. # 6

Hi Josh, Regarding the issue you pointed out about the TX Text Control being used for automated build process, we have put this on our list of enhancements for Revision #2 of PowerBuilder 2019.  I cannot promise it would be definitely done in R2, but there is good chance of it considering RTE and performing automated builds are popular features.

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 14 February 2019 18:47 PM UTC
  2. PowerBuilder
  3. # 7

Hi Roland;

  I now stand by my original answer ..

You cannot see or read these RTE relates Application object properties in your code as they are hidden in other locations (as I described). The App object's internal source only "fakes" it.

Regards ... Chris

Comment
  1. Roland Smith
  2. Thursday, 14 February 2019 19:09 PM UTC
The original post was regarding the setting being visible to source control which it is. When the setting was added to the Application painter, Appeon forgot to add it to the object returned by the GetApplication function.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 14 February 2019 19:21 PM UTC
If you just type the raw AppName. - all but the RTE properties show up. Even if you manually type the correct properties into script painter, the compiler errors them. So its basically a "stalemate" situation - aka "you can;t get there from here". :-(



FWIW: This was exactly my question to Engineering about this same aspect in the early Alpha internal testing. That was the answer I got from Engineering originally (way back when) - the one I 1st posted.



  1. Helpful
  1. Roland Smith
  2. Thursday, 14 February 2019 19:45 PM UTC
They are updated in the source code by the Additional Properties window. I added a Bug Report for this oversight. It would be useful for the program to be able to tell which control it is using and possibly change it on the fly based on user preference.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 14 February 2019 16:43 PM UTC
  2. PowerBuilder
  3. # 8

Thanks Roland .. I missed these values as they were not present in the early Alpha that I tested.

These properties though are still are not accessible at run-time in build 1880.

 

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 14 February 2019 16:31 PM UTC
  2. PowerBuilder
  3. # 9

No, the pra cannot be picked up by WizSource or any other source control system.

PowerGen allows you to set the icon name on the build settings window. It is stored in the .gen file.

You could use the WizSource IDE application to source control the PowerGen .gen and any other files related to the build process. Create a new Project in WizSource called PowerGen and use that in the WizSource IDE application.

 

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 14 February 2019 16:09 PM UTC
  2. PowerBuilder
  3. # 10

Hi Josh;

  Unfortunately, the registration of which 3rd party control to use is not stored in the Application object at all. Instead, its a hidden value in a PBL. That then translates to a bit flag setting in the App's EXE. So there is no real way at the moment to capture this setting in a SCM.

Regards ... Chris

Comment
  1. Roland Smith
  2. Thursday, 14 February 2019 16:10 PM UTC
Actually it is in the source code. See my answer.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 14 February 2019 16:06 PM UTC
  2. PowerBuilder
  3. # 11

The setting is not machine specific, it is in the application object source code.

Do an Edit Source of the application object and you will see these settings if the value has been changed at least once.

global type sizeof from application
string appname = "sizeof"
long richtextedittype = 2
long richtexteditversion = 1
string richtexteditkey = ""
end type
global sizeof sizeof

The other settings like icon and default fonts aren't machine specific either. They are stored in a binary only object in the pbl separately from the application object's compiled code. Within the pbl there are three application objects, the sra (source code), the apl (compiled code), and the pra (settings).

I put in an enhancement request to move the icon name into the source code but I don't know what the status of that is.

Comment
  1. Josh Turner
  2. Thursday, 14 February 2019 16:22 PM UTC
So if we are using WizSource, is it possible to add the pra file through the WizSource IDE so our build machine can pick it up? I'm not sure PowerGen would be able to get by it anyway, but I'm trying to figure out if there is a workaround.
  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.