Using the "Scripting.dictionary" object
Hi!
Does the "Scripting.dictionary"-object work differently under Sun ASP than it does in a Microsoft environment?
The code below works fine with MS IIS6 but I can't get it to work in a "chiliasp" environment... is it something wrong with the code or does the "Scripting.dictionary"-object behave diffently?
Thanks in advance
Patrik Karlsson
<%
Class cBook
Dim sAuthor
Dim sTitle
Public Property Get Author
Author = sAuthor
End property
Public Property Let Author(value)
sAuthor = value
End Property
Public Property Get Title
Title = sTitle
End property
Public Property Let Title(value)
sTitle = value
End Property
End Class
Class cLibrary
Dim oBooks
Sub Class_initialize()
Dim tmp
set oBooks = Server.CreateObject("Scripting.dictionary")
set tmp = new cBook
tmp.Author = "Dan Brown"
tmp.Title = "The Da Vinci Code"
oBooks.add 1,tmp
set tmp = nothing
set tmp = new cBook
tmp.Author = "Stephen King"
tmp.Title = "Kingdom Hospital"
oBooks.add 2,tmp
End sub
Public Property Get Books
set Books = oBooks
End property
End Class
Dim item
Dim myLibrary
set myLibrary = new cLibrary
For each item in myLibrary.books.items
response.write "Author: " & item.Author & "<br/>"
response.write "Title: " & item.Title & "<br/><br/>"
next
%>

