1. Stephan Schröpel
  2. PowerBuilder
  3. Thursday, 23 March 2023 14:19 PM UTC

Hi all

scary behaviour...

I added some new .png files in my \resource directory and added resource\picture.png to my pbr file.

The .pbr is defined in my project painter resource file name.

 

In IDE the new picture is shown, but not by executing the app.

As I copied the png file in the directory of the previous development-version which has also a path \resource, the new .png was also shown in the new version. 

Trying to rename the directory of the old development version, first didn't work while PB IDE in new development version was open, until I closed IDE. There must be an old path definition in the new project. 

After renaming the old path, starting IDE again and running the new project, all resources were shown properly. I tried to set Root by RClick in System Tree, but no change, after renaming the old devlopment path back to his former name. The new .pngs then dissappear again and the old path cannot be renamed again when IDE is opened.

I made a text content search from the new Version directory, but didn't find any old path definition.

Where is the old PBR-Path or Resource Directory stored? Why does it find the right path and PBR, when the old path is renamed and can't be found?

 best regards

Stephan

 

Stephan Schröpel Accepted Answer Pending Moderation
  1. Friday, 24 March 2023 10:19 AM UTC
  2. PowerBuilder
  3. # 1

Hi Chris

 

I think I found the solution.

png Files in the old directory were locked after first running the app 

So I tried to move all resource .png files of the old direkctory to a new temporary one. 4 Files could not be moved because they were opened. But all paths and declarations of the files were fine. but my app didn't find any resource files afterwards. There must be an old path declaration anywhere I can't search in.

After performing a full rebuild with my newly build project, the connection to the old directory was lost. Maybe ther former path of the old version was stored in any old pbd or exe file...

 

Thanks for your help!

Comment
  1. Chris Pollach @Appeon
  2. Friday, 24 March 2023 14:21 PM UTC
Hi Stephan .. that is "awesome" news! I am super glad that you worked around this anomaly. I probably never encountered this before because I have a certain way (process) that I use in these type of refactoring exercises that negates the predicament that you encountered. Maybe, it's just bee just luck on may part - LOL!

Don't forget to hug a DataWindow today. ;-)
  1. Helpful 1
  1. Stephan Schröpel
  2. Friday, 24 March 2023 16:05 PM UTC
I will hug them all, I promise :-) Maybe there are to many DataWindows and other objects will get jealous. But they know, I love them all.
  1. Helpful 1
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 23 March 2023 19:12 PM UTC
  2. PowerBuilder
  3. # 2

The image file reference in the PB source code and in the .pbr file should have no path, just filename. Then to allow the compiler to find the image files, put all the image files in one folder and either add it to the system path or to the PB IDE App Path setting in the registry.

Comment
There are no comments made yet.
Stephan Schröpel Accepted Answer Pending Moderation
  1. Thursday, 23 March 2023 15:35 PM UTC
  2. PowerBuilder
  3. # 3

Hi Chris

no effect.... I made a new project object and removed the old one.

An opened IDE inhibits to rename the old working directory. the new .png is not found, if its only in the current new directory. Closing IDE, renaming the old working directory and restarting IDE: the .png in the new working directory is found. there must be a existing link in the workspace to the old directory, which is used when found.

there is no entry in the path environment for this

 

Regards

Stephan

 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 23 March 2023 15:54 PM UTC
That is very weird!

BTW: What PB version & build are you using?
  1. Helpful
  1. Stephan Schröpel
  2. Thursday, 23 March 2023 16:24 PM UTC
PB2022 1892, the newest one
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 23 March 2023 17:47 PM UTC
Hi Stephane;

I do this all the time when working on my STD framework and have not had any issues like you are encountering - even way back to PB 2.0.

Q1: Are you using SCC?

Q2: What type of project are you trying to rebuild?

Regards ... Chris
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 23 March 2023 14:53 PM UTC
  2. PowerBuilder
  3. # 4

Hi Stephan;

  Typically, that is stored within the "Project" object classes' source code. Have you tried creating a completely new Project for this change?

Regards ... Chris

Comment
  1. Stephan Schröpel
  2. Thursday, 23 March 2023 15:18 PM UTC
no... I copied the old project and changed all paths... but I try it
  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.