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

#class var list

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
LokiChaos



Joined: 27 Oct 2009
Posts: 61

PostPosted: Tue Dec 03, 2013 3:03 am    Post subject: #class var list Reply with quote

I dunno the exact syntax you would want, but it would be nice to be able to get a list of classes that exist via the #class command

eg: if #class outputs:
Code:

################################### CLASSES ####################################
core                  43 CLOSED
core_aff_room         34 CLOSED
core_aff_self        187 CLOSED
core_affects           5 CLOSED
...
utility               79 CLOSED
utility_mm             5 CLOSED


And "#class foo list" would store in $foo: {core;core_aff_room;core_aff_self;core_affects;...;utility_mm}

I currently use a list and a wrapper alias to store modules (each module has its own class) I load (so I can do dependency checking and don't try to unload a module that isn't loaded, etc.).
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Tue Dec 03, 2013 8:29 am    Post subject: Reply with quote

I'll give it some thought. Using wrapper aliases is probably the way to go though.
Back to top
View user's profile Send private message Send e-mail
atraeyu



Joined: 12 Dec 2007
Posts: 165

PostPosted: Wed Feb 12, 2014 12:29 am    Post subject: Reply with quote

You can use #class <classname> to show the associated #variables.

I've just started working on a framework and since everything is "global" I've taken to naming everything so that I know which module/class it belongs to,
for example, aliases in my "Session Manager" class are all named with the prefix:

aSM<aliasname>

and variables would be:

vSM<variablename>
Back to top
View user's profile Send private message AIM Address
atraeyu



Joined: 12 Dec 2007
Posts: 165

PostPosted: Wed Feb 19, 2014 6:16 pm    Post subject: Reply with quote

I now see why this would be valuable. Smile
I just made a separate post on it, then remembered this thread.

http://tintin.sourceforge.net/board/viewtopic.php?t=2079
Back to top
View user's profile Send private message AIM Address
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Wed Feb 19, 2014 8:32 pm    Post subject: Reply with quote

It doesn't hurt to kill a non existent class, or close a class that's already closed.

So the only issue is loading a class that is already loaded. Might as well set a variable in each file and use &variable_name to check if the class is loaded.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests 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