WebPicture + xojo.io.folderitem?

Hi all,

I’m trying to shift a project from the old way to the “new” ways. So, I’m using a WebPicture, and I want to have it load a picture from the included resources.

The test code (no error checking on return values yet, testing with known values stored):

dim f As xojo.IO.FolderItem
f = xojo.IO.SpecialFolder.GetResource(dataToDisplay.value("image"))

dim picture as New WebPicture(f)

Compiling gives the error:
There is more than one item with this name and it’s not clear to which this refers.
dim picture as New WebPicture(f)

with the highlight going through to f.

Any thoughts?

Looking up the documentation for WebPicture I get redirected to the old docs, where the constructors for WebPicture do not include a new framework folder item.


Exactly, and I had hoped that it would have a direct conversion for backwards compatibility, so I’m wondering is there a direct conversion I’m not seeing in the docs to convert the new framework to the older FolderItem?

I could create a new folderitem based upon the Path property of the new framework, but I hate to add the extra overhead of shifting from new -> old like that if I can avoid it. Unless I just use the old framework entirely for now.

I would suggest not moving things over unnecessarily. Because WebPicture doesn’t have tie-ins to the new framework there’s no need for the extra headaches right now.

Well, the shift over was primarily because this was an incomplete project I’m picking up again, I figured it would be nice to start utilizing the new framework. I guess just not for web apps that need some of these other tools, eh?

The web framework has not been updated for the new framework yet.