It would be similar to the warnings that appear when a resource fails to load:
Code: Select all
If LoadImage(0, "doesNotExist.bmp")
Debug "A warning should appear in the IDE."
EndIf
Code: Select all
CompilerError "Fatal Error!"
Code: Select all
If LoadImage(0, "doesNotExist.bmp")
Debug "A warning should appear in the IDE."
EndIf
Code: Select all
CompilerError "Fatal Error!"
Code: Select all
CompilerIf #PB_Compiler_Debugger
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Windows
Import ""
PB_DEBUGGER_SendWarning(Message.p-ascii)
EndImport
CompilerDefault
ImportC ""
PB_DEBUGGER_SendWarning(Message.p-ascii)
EndImport
CompilerEndSelect
CompilerEndIf
Macro CompilerWarning(error)
CompilerIf #PB_Compiler_Debugger
PB_DEBUGGER_SendWarning(error)
CompilerEndIf
EndMacro
CompilerWarning("A warning should appear in the IDE.")
Code: Select all
CompilerIf #PB_Compiler_Debugger
It's not entirely cross platform.ts-soft wrote:WorkAround (crossplattform)
Thx, changedwilbert wrote:It's not entirely cross platform.
For OS X you need to use ImportC .
It's working fine now on OS Xts-soft wrote:Thx, changed
Code: Select all
CompilerWarning "Hi there"
Also work on Linux (Ubuntu Gnome).Little John wrote:Done.
I just found out that this has been added in PB 5.40 LTS (tested with the Windows versions).