Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacFrameworks/FSEvents/FSEvents
Function:
Required plugins for this example: MBS MacFrameworks Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacFrameworks/FSEvents/FSEvents
This example is the version from Fri, 12th Nov 2015.
Project "FSEvents.rbp"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control ListBox1 Inherits ListBox
ControlInstance ListBox1 Inherits ListBox
End Control
EventHandler Sub Close() f.stop End EventHandler
EventHandler Sub Open() dim eventid as UInt64 dim flags as integer dim latency as Double eventid=FSEventsMBS.GetCurrentEventId flags=FSEventsMBS.kFSEventStreamCreateFlagNone latency=1.0 f=new FSEvents(SpecialFolder.Desktop, eventid, latency, flags) // show description for debugging 'MsgBox f.Description // and on console (stderr) 'f.Show if not f.Start then MsgBox "Failed to start." end if End EventHandler
Property f As fsevents
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
Class FSEvents Inherits FSEventsMBS
EventHandler Sub Callback(index as integer, count as integer, path as string, flags as integer, eventID as UInt64) dim l as listbox l=window1.ListBox1 l.AddRow path l.Cell(l.LastIndex,1)=hex(flags) l.Cell(l.LastIndex,2)=hex(eventID) End EventHandler
End Class
End Project

See also:

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS MacFrameworks Plugin.





Links
MBS Xojo tutorial videos