SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Oct 2000
    Location
    UK
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Some GUI specifiers don\'t seem to work in Silk 5.0.3.2

    I'm trying to add some debug printing to some script files I have and wanted to only print out the debug message when debug was enabled. I first thought about using a compiler constant but this meant I'd have to do an if statement before calling the debug log function. I figured it would be neat to be able to use an old GUI specifier such as 'galaxy' to turn debug on or off. The problem I've got is that the following code does not work as I expect it. Does anyone know which GUI specifiers actually work?

    produces the following output when run with pm, galaxy, msw, mac in the Gui Targets of the Runtime Options dialog:

    Windows test
    Default

    Any ideas as to what I'm doing wrong?

    Regards,

    Andrew


    ------------------

  2. #2
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Some GUI specifiers don\'t seem to work in Silk 5.0.3.2

    No idea what's going wrong I'm afraid, but I thought that I might contribute something to your idea of using a compiler constant to determine debug behaviour. That's what we use here; we simply have a compiler constant called DEBUG, which can be true or false. Then we have a function called DPrint() which works as follows:
    We also have similar functions called DLogWarning and DLogError, but they are less useful for the most part. So you can call DPrint in the same way that you would call Print, and just change the compiler constant to enable the debug printing or disable.


    ------------------

  3. #3
    Junior Member
    Join Date
    Oct 2000
    Location
    UK
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Some GUI specifiers don\'t seem to work in Silk 5.0.3.2

    I'd already implemented the solution you suggested. Thanks for the reply though! I was after trying to avoid all those function calls and failed if comparisons when running in the default non debug mode. I can't see a way to do this with compiler constants so GUI specifiers seemed the obvious route. I started by picking the ones I'd never use such as galaxy but they don't seem to work.

    Oh well, just another area where SilkTest sucks.

    Regards,

    Andrew

    ------------------

  4. #4
    Member
    Join Date
    Dec 2000
    Location
    San Francisco, CA
    Posts
    51
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Some GUI specifiers don\'t seem to work in Silk 5.0.3.2

    Hi Andrew,

    I assume that if you run this on a Mac the output would be:

    Mac test
    Default

    Maybe this will do the trick.

    Good luck.

    ------------------
    kalabog73@hotmail.com

  5. #5
    Junior Member
    Join Date
    Oct 2000
    Location
    UK
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Some GUI specifiers don\'t seem to work in Silk 5.0.3.2

    Oops,

    I was having one of those slow days where my brain wasn't quite working right. It's obvious that even though you only specify a number of GUI specifiers at compile time the specifiers are still evaluated at run time to see which code should run. This means I can't use GUI specifiers as a means of saying ifdef DEBUG then compile this code in.

    Does anyone know of a way of conditionally compiling in code so that you don't need to do lots of if (debug) then print statements?

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:55 PM.

Copyright BetaSoft Inc.