TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Verbose & Classes

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
atraeyu



Joined: 12 Dec 2007
Posts: 165

PostPosted: Thu Feb 20, 2014 9:33 pm    Post subject: Verbose & Classes Reply with quote

Based on my trouble shooting in this thread: http://tintin.sourceforge.net/board/viewtopic.php?t=2083

I've enabled verbose output with:

Code:
#config {VERBOSE} {ON};


After I've loaded a class once, I will never see verbose output from that class again - even it changes.

Here's some test code:

Code:

#nop ./reference/class_loaders/basic_reloader/reloader.tin;
/*
    This is a very basic class that loads an external file as a class.

    tt++ reference/class_loaders/basic_reloader/reloader.tin
*/

#nop Enable verbose.;
#config {VERBOSE} {ON};

#nop Module Configuration.;
#var {MOD_NAME} {test-module};
#var {MOD_PATH} {reference/class_loaders/basic_reloader/test-module.tin};

#nop Load the external file into the specified class.;
#alias {mod_load} {
    #showme {Loading $MOD_PATH into $MOD_NAME\.};
    #class {$MOD_NAME} {read} {$MOD_PATH};
};

#nop Reload the external file into the specified class.;
#alias {mod_reload} {
    #showme {Loading $MOD_PATH into $MOD_NAME\.};
    #class {$MOD_NAME} {kill};
    #class {$MOD_NAME} {read} {$MOD_PATH};
};

#nop Reload the external file into the specified class.;
#alias {mod_kill} {
    #showme {Killing $MOD_NAME\.};
    #class {$MOD_NAME} {kill};
};


Code:

#nop ./reference/class_loaders/basic_reloader/test-module.tin;

#showme {Hello from $MOD_PATH\.};
#var {var_test} {var_test_value};
#var {var_test2} {var_test_value};


Code:
tt++ reference/class_loaders/basic_reloader/reloader.tin
#CONFIG {VERBOSE} HAS BEEN SET TO {ON}.
#OK. VARIABLE {MOD_NAME} HAS BEEN SET TO {test-module}.
#OK. VARIABLE {MOD_PATH} HAS BEEN SET TO {reference/class_loaders/basic_reloader/test-module.tin}.
#OK. {mod_load} NOW ALIASES {#showme {Loading $MOD_PATH into $MOD_NAME\.};#class {$MOD_NAME} {read} {$MOD_PATH};} @ {5}.
#OK. {mod_reload} NOW ALIASES {#showme {Loading $MOD_PATH into $MOD_NAME\.};#class {$MOD_NAME} {kill};#class {$MOD_NAME} {read} {$MOD_PATH};} @ {5}.
#OK. {mod_kill} NOW ALIASES {#showme {Killing $MOD_NAME\.};#class {$MOD_NAME} {kill};} @ {5}.
mod_load
Loading reference/class_loaders/basic_reloader/test-module.tin into test-module.
Hello from reference/class_loaders/basic_reloader/test-module.tin.
#class
### CLASSES ###
test-module            2 CLOSED
mod_kill
Killing test-module.
mod_load
Loading reference/class_loaders/basic_reloader/test-module.tin into test-module.
Hello from reference/class_loaders/basic_reloader/test-module.tin.


While test-module.tin is loaded, if I go in and edit it to add another variable, then issue the mod_reload command a brand new variable is assigned, but there is still no verbose output.
Back to top
View user's profile Send private message AIM Address
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Fri Feb 21, 2014 8:57 pm    Post subject: Reply with quote

Messages are hidden when using aliases.
Back to top
View user's profile Send private message Send e-mail
atraeyu



Joined: 12 Dec 2007
Posts: 165

PostPosted: Fri Feb 21, 2014 9:10 pm    Post subject: Reply with quote

So because the class is loaded by an alias, all output messages are hidden - regardless of the #VERBOSE ON?

Is there anyway around this behavior?
Back to top
View user's profile Send private message AIM Address
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Fri Feb 21, 2014 11:26 pm    Post subject: Reply with quote

You could try: #line verbose #read <filename>
Back to top
View user's profile Send private message Send e-mail
atraeyu



Joined: 12 Dec 2007
Posts: 165

PostPosted: Sat Feb 22, 2014 12:53 pm    Post subject: Reply with quote

Scandum wrote:
You could try: #line verbose #read <filename>

That works! Thank you Smile
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group