Getting Started

Extract the Archive #

Your first step is to extract the archive. We generally advise people to extract this to a project-specific directory rather than a directory they’ll use for all projects, as changes in GraffitiSuite might break things in other projects where you’ve not actively intended to update to a new version.

Setup the Session #

Add a new Public property to your project’s Session object:

GraffitiSuiteInstances As Dictionary

Build Steps #

This is one of the most important steps to getting GraffitiSuite Web Edition up and running in your project. Without this step your project will encounter NilObjectExceptions when debugging or built while there are GraffitiSuite classes present.

  1. Right-click the target platform under Build Settings in the project navigator and select Build Step > Copy Files
  2. Drag the Copy Files object under “Build” step for the target platform.
  3. Select the Copy Files object, and drag the scripts folder from the download in to the center pane of Xojo.
  4. Repeat for each desired platform – you must have a build step for both debug and target platforms. If you are building on macOS and will deploy to Linux, you absolutely must add a Copy Files build step for both macOS and Linux.

If you run in to an issue where the scripts folder is not being copied to the build directory on Linux, you can use the below Build Script to perform the copy operation after the Build step.

CopyFiles("scripts", currentBuildLocation)
 
Sub CopyFiles(source as string, destination as string)
  dim cmd as string = "cp -rf ""$PROJECT_PATH/" + source + """ " + destination
 
  call DoShellCommand(cmd)
End Sub

Add the Classes #

Once you’ve opened the demo project – in the project subdirectory – copy the GraffitiSuite folder from the project navigator on the left. In your project, select Edit > Paste from the Menu Bar.

If you do not wish to copy the entire GraffitiSuite folder to your project, you will need, at a minimum, the Required folder and whatever product you wish to use. If a product has supporting classes, you must copy the entire folder for that products. Additionally, some products rely on other products for additional functionality, and you will need to read the compiler errors after an attempt to run to determine what classes you need.

It is recommended that new users simply copy the entire GraffitiSuite folder as unused classes will be stripped out of the built executable by the compiler.

Registration #

GraffitiSuite does not require any programmatic registration process to use in your projects. Simply add GraffitiSuite to your project, implement what you need, and click “Run”.

Video Walkthrough #