Hello!
> What i want to do is to run every instance as separate chatrooms with no
> connection in between, and rename each app in order to get separate
> namespaces for each app, the "copies" of the main app shall be separate
> instances and running on the same web-site. Im running Visual Studio.
Depending upon your approach, this shouldn't be a problem. If you design a
single chatroom in an object-oriented way, you could simply create a pool of
objects (with type chatroom), where all active chatrooms are stored.
Whenever a user enters your website simply iterate through the pool and
display them on the page (or serialize the pool to XML to introduce the
design layer, my favourite).
The pool I'm referring to is simply a part of your namespace. Look at this
pretty crude example. It's definately not working code (I'm writing this
very early in the morning, god forbid - golfing means getting up early), but
it should give you some idea of how to accomplish your task (that is, if
this is what you want).
namespace chat {
/* THIS IS THE POOL WITH A LIST OF CHATROOMS */
class chatPool {
/* DECLARE AS CHATROOM TYPE */
property chatRoom roomList[];
/* INTEGER WITH CHATROOM-COUNT */
property int roomCount;
/* ADDS CHATROOM TO CHATROOM[] ARRAY */
static function addChatRoom(chatRoom newChatRoom) {
roomList[roomCount] = newChatRoom;
roomCount++;
}
}
/* CHATROOM OBJECT */
class chatRoom {
property id;
property name;
property desc;
function delete() {}
}
}
Do this:
chatRoom myChatRoom = new chatRoom();
/*
SET PROPERTIES
*/
/* ADD CHATROOM TO CACHE */
chatPool.addChatRoom(myChatRoom);
with regards
anders l. borum � [EMAIL PROTECTED]
the sphereworx / monoliner experience
--
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]