base:DebugPrint()

You can post your code snippets here for others to use and learn from

base:DebugPrint()

Postby djrikki » Wed Apr 15, 2015 11:23 pm

I should use this, but I never seem to. This is an enhanced DebugPrint function.

Code: Select all
Global base, application
base = {}
application = {}

application.t = "T:"
application.name = "MyApp"
application.debug = True
application.debugtofile = False

Function base:DebugPrint(message)
    If application.debug = True
        If application.debugtofile = False ; send to console window
           debugprint(message)
          
       Else ; send to log file
            OpenFile(9,application.t .. application.name .. "_debug",#MODE_READWRITE)
            Seek(9,#EOF)
            WriteLine(9,message)
            CloseFile(9)
       EndIf
    EndIf
EndFunction
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
djrikki
 
Posts: 645
Joined: Wed Apr 06, 2011 12:26 am

Return to Code snippets area

Who is online

Users browsing this forum: No registered users and 1 guest

cron