project resources are not loading: "the picture can not be found"

I recently replaced my MacBook’s internal HD with an SSD. The contents of the HD were duplicated to the SSD. Works great.

Except that after doing this, some Xojo projects will not load picture resources which were previously part of the project.

As you probably know, when Xojo cannot find a picture resource for a project at startup, it opens with a dialog so that you can navigate to the item and fix the broken path before anything starts. That dialog is not opening. It doesn’t open wither in Xojo2015 or in the current version which I just installed. Instead the images just aren’t there. In the navigator, in 2015 they appear as black boxes. In 2016 they appear as blank spaces. Clicking on them shows a giant X with the ominous message “the picture can not be found” in the IDE.

There are hundreds of picture resources in my apps. Reimporting all of them manually would mean I have to deal with Xojo breaking all the layout properties for objects with assigned backdrop images. I do not want to have to deal with that.

Please help!

Thank you,
Aaron

Xojo stores the path of resources as absolute path, not relative path. So if the name of the SSD is not “Macintosh HD”, Xojo cannot find its stuff.

Try renaming your SSD to the exact name of your previous internal HD. Most probably “Macintosh HD”.

Thanks, but I already tried that and it didn’t work. Changed nothing.

Not all projects broke, only some. And not all picture paths are broken, it’s about 98% of them. The real question is: if Xojo knows that the paths are broken, then why is Xojo not opening with the dialog to fix the paths?

This is a bug I reported for 2016R2 with image sets and has been marked as fixed last October :
44670 - 2016R2 Image sets when a picture is missing Xojo does not complain
feedback://showreport?report_id=44670

I have not tested since, though.

I vaguely remember Norman giving instructions to correct image paths in projects saved in text mode as Xojo_Project, but of course, could not locate that. Hopefully he will chime in.

Feedback Case #44670 looks like the same problem.

I just tested another way. I kept the old HD as an external, did not change any of the contents. The project opens correctly there. I then did the following:

  1. saved it in 2016r4
  2. quit Xojo
  3. copied the newly saved project over to the SSD
  4. disconnected the HD
  5. opened the copied project file in 2016r4

Xojo doesn’t open the dialog to fix the paths. The paths are just broken.

Maybe wise to report it. Open a new case, since 44670 has been closed.

I found the solution.

  1. Open the project from the working copy on the HD
  2. Select the menu item File > Collect Project Items… (Xojo saves as part of this process)
  3. Close the project
  4. Copy the project to the SSD
  5. Disconnect the HD
  6. Open the newly copied project

Now the dialog opens and the paths can be fixed.

Hm, I never saw this menu item “Collect Project Items…” before. It works now.

BTW, is saving as an XML project no longer an option? That’s what I was looking for when I found “Collect Project Items…”