Version 6.1.0
This release introduces Express.EventLogHandlerDelegate
Express is designed to be a standalone component that can be dropped into any Xojo project.
Each Xojo project might want to handle Logs differently.
Express provides a default logging facility in: Express.EventLog
TargetConsole: write to StdOut
TargetDesktop: write to System.DebugLog (see Xojo's Documentation)
If an application wants Express to redirect Logs to it's own Logging facility, then Express needed to be modified accordingly.
Express 6.1.0 decouples this hardcoded requirement by introducing the Express.EventLogHandlerDelegate
.
A Xojo project using it can now specify which method (that implements the delegate) an Express
instance
should use as it's Event Log handler.
Usage:
// Configure App to handle Express EventLog with LogLevel Warning
Express.EventLogLevel = Express.LogLevel.Warning
// Assign the Express.EventLogHandlerDelegate to tell Express which method is processing the EventLogs
// Comment out or Assign Nil if you want to use Express's default EventLog-Handling
Express.EventLogHandler = WeakAddressOf ExpressEventLog
This release also introduces the Express Demo GUI
This repository is now a MonoRepo containing two example projects:
Express-Demo-Console.xojo_project
Express-Demo-GUI.xojo_project
The new "Express Demo GUI" shows how to:
- Use Express in a Desktop application
- Switch between the provided Demos on the fly
- Adjust Log Level on the fly
- Use the recently added Delegates:
Express.RequestHandlerDelegate
Express.EventLogHandlerDelegate
Fixes
- Multipart Forms Demo (the issue had been in the
Express.Request
object). DataAvailable
usesLookahead.Bytes
to determine if theContent
has been fully received- Fix in
Method BodyGet
, so that Multipart Form Content is no longer stripped DataGet
andBodyGet
in now called in the methodProcess
Demo
A Copy File Post Build Step now copies the demo's ressources to the Resources Folder.
All demos have been updated to look for the resources in SpecialFolder.Resources.
Note: The Multipart Forms Upload will go into the following folder: SpecialFolder.(Desktop | UserHome).Child("express-demo-uploads")
Demos have been updated with Nil
checks for Request.Server
(which is a WeakRef
).
Server might be Nil
if stopped while Request
is still alive.
If you don't assign an own Event Log Handler (see above), then Express
will continue to use it's default logging mechanism.