SF symbols example not working anymore

Good evening (o;

Tried the SF Symbols example from here:

When I download that project, it works fine…

Though when I copy over the Module used in my project, it throws me an error that the method SystemImage exists more than once…

Any ideas? Something to do API 1 and API 2 (Though still don’t know where I can see if a project is API 1 or 2 ;o).

The latest updated discussion on that blog posting can be found here: SF Symbols Module

There’s also a repo by @Ian_Kennedy that may have a newer working version to try https://github.com/TrekMaster/SFSymbols-for-Xojo

That Github example works perfectly when copied over…

muchas gracias (o;

2 Likes

There are three ways to tell if Xojo code is using API 1 or 2.

1.) - Many of the property, method and event names of an object or control differ between API-1 and API-2. There are too many differences to list here.

2.) - Look at the “Super” class of an object or control type and see if it has a prefix of “Desktop”, “Web” or “Mobile”. These are API 2 objects and controls (and therefore use API 2 names and syntax).

If the object type does not have one of these prefixes, then it’s API 1. There are exceptions of course, like the Timer object and Thread class, and others…

3.) - Under the Project > Analysis Warnings… menu, ensure the following (highlighted) options are turned on. These will help pinpoint where API 2 syntax or new property/method/event names should be used.

1 Like

Ah perfect :slight_smile:

kiitoksia (o;