summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/rouge-4.5.2/lib/rouge/demos/xojo
blob: 698a92164572fa1cb8e5dc912a13c14e4dae9caa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Dim f As FolderItem
f = GetOpenFolderItem(FileTypes1.jpeg) // defined in the File Type Set editor
rem - we should check for nil!
If not f.Exists Then
  Beep 'Just for fun
  MsgBox("The file " + f.NativePath + "doesn't ""exist.""")
Else // document exists
  ImageWell1.image=Picture.Open(f)
End If
if f isa folderitem then
  msgbox(f.name)
end if
Exception err As NilObjectException
  MsgBox("Invalid pathname!")