Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Fri Mar 28, 2008 10:24 pm   

Expanded DB Variable data into Child window.
 
Couldn't really word it any way else.

Basically, db var can have usual key-val pairs but there can be multiple values for one key.

Writing something that'd show a formatted page of info on *main window* isn't hard, the problem is that
I'd like to see this formatted data on *child window* instead.

But it seems that #window command doesn't eat anything with # within its value.

I tried with the simplest of simple.

Code:

#alias loop {#loopdb @testdb {#show {%ansi(8)%val : %ansi(15)%key}}}



Code:

#window test {loop}


Doesn't work. It sends loop as just text. Doesn't expand its "script".

Code:

#window test {#exec loop}


Code:

#window test {#loopdb @testdb...}


The two latter doesn't work because window command doesn't eat #'s as I mentioned at the beginning of my message.

Any how-to how to work around all this or if its even possible?

Help greatly appreciated!


Prog
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Fri Mar 28, 2008 10:55 pm   
 
Code:
#ALIAS loop {#loopdb @testdb {#var val %val;#var key %key;:test:#show {%ansi(8)@val : %ansi(15)@key}}}

_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Fri Mar 28, 2008 11:08 pm   
 
Hrm, this doesn't seem to work.

Neat idea, though. Haven't messed heavily around with child windows much so I had forgotten the implicit window notation.

EDIT: Heh, I played around with myself now, too. Apparently implicit notation doesn't like #'s as well. I removed #show and now it sends data to Child window without any problem.

I blame me being tired about not thinking for adding 'send to window' stuff directly into loop alias in the first place, heh.

Thanks greatly for the help!


Prog
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Fri Mar 28, 2008 11:11 pm   
 
Meh, worked for me.
also
Code:
#ALIAS loopy {:test:#loopdb @testdb {#show {%ansi(8)%val : %ansi(15)%key}}}

Both aliases assumed that a window named test already existed
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Fri Mar 28, 2008 11:20 pm   
 
Well, as I mentioned, I'm tired and haven't had much to do with creating child windows in the past.

Didn't know that implicit works for window that is previously made Sad (Hence it didn't work because the was no Test window made yet.)

Sorry for the confusion. I have a tendency to write messages when I'm too tired and I'm too lazy to ask for help when I'm not.


Prog
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
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

© 2009 Zugg Software. Hosted by Wolfpaw.net