Here is an example.
I have a class that has an attribute 'Zulassungen' as list of strings.
A methode should return this list formated as HTML as shown in code
below (It is the complete code from the mac file).
HTMLGetZulassung(%this,FtFace,FtSize) ;
#class Arztliste %this
#class %String FtFace
#class %String FtSize
set CR=$c(13,10)
set FtDef="<FONT FACE="""_FtFace_""" SIZE="""_FtSize_""">"
if ##this.Zulassungen.Count()>0 do
. write "<table width=""400"">"_CR
. write "<tr><td>"_FtDef_CR
. write "<B>Besondere Erm�chtigungen und Zulassungen</B>"
. write "</FONT></td><td width=20%> </td></tr>"_CR
. write "<tr><td><HR width=100% size=1></td></tr>"_CR
. for x=1:1:##this.Zulassungen.Count() do
.. write "<tr><td>"_FtDef_CR
.. write ##this.Zulassungen.GetAt(x)
.. write "</FONT></TD></tr>"_CR
. write "</table>"_CR
quit
q
#endclass FtSize
#endclass FtFace
#endclass %this
In an object script routine this method is called with others to build
a HTML file:
...
write "<BR>"
do i.HTMLGetZulassung("Arial","2")
...
This runs fine if the method has only one attribut. If it has more
then one, or this one has a default value, an UNDEFINED error occurs.
If I call the method in the terminal, everything is OK!
Thank you for help!
Stefan
On Fri, 21 Jan 2000 19:34:53 -0500, "Dan" <[EMAIL PROTECTED]> wrote:
>Post a snippet of code from the method and the code that you are calling
>cache with on your WebPages, even the properties of the object will be very
>helpful.
>
>
>Stefan Menten <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]
>> Hi all
>>
>> I'm just working on my first cach� weblink application and have there
>> a problem using attributs in methods.
>>
>> I have defined a class with some attributs and some methods. One of
>> the methods is called with attributs.
>>
>> If I call the method from within a weblink routine, there occurs an
>> 'UNDEFINED' error if the method is called with more then one attribut,
>> or if there is one attribut and this attribut is defined with a
>> default value. If I call the same methode from within the terminal,
>> everything runs fine.
>>
>>
>> Any Idea?
>>
>>
>> Stefan Menten
>>
>>
>
>