It looks like the method is expecting 3 variables.
  HTMLGetZulassung(%this,FtFace,FtSize)

but call it you are only sending 2.

do i.HTMLGetZulassung("Arial","2")

Still if you have default values and it works in the command line it should
work.

I would put the following on the first line and see what the results are in
ObjectScript
w FtFace,FtSize
and see what is wrong.

I'm not to sure what the %this variable is doing, I haven't used a method in
the manner you are using it here.  I usually use methods just to query an
index and return the object id.
I don't have any methods that do the actual writing out of the HTML, never
thought of it actually, maybe I'll start.

Stefan Menten <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sat, 22 Jan 2000 22:01:24 -0500, "Dan" <[EMAIL PROTECTED]> wrote:
>
> >Well it looks good to me.
> >
> >The only thing I do differently with the GetAt() in list is instead of
> >writing out like this
> >write ##this.Zulassungen.GetAt(x)
> >
> >I usually set a  variable equal to it like this
> >s var=oref.Zulassungen.GetAt(x)
> >But I do this because usually the item I'm trying to get at is another
list
> >and I have to break it down more.
> >
> >What I would do is check from the command line how big the count of an
item
> >is and then see if there is data in each instance in the list.  It seems
> >like maybe the count is off and its going after something that is not
really
> >there.
>
> Yes, but the list is not the problem. This runs fine. The problem are
> the attibuts FtFace and FtSize. If I have there more than one, the
> error occurs. Sorry, if I explained the problem wrong.
>
> >I have had methods appear to work fine from the command line and fail in
> >ObjectScript and the only way I could debug it is to type in each line of
> >the method on the command line one by one and check the variables after
each
> >line to see what they are.
> >
> >Sorry I couldn't be more helpful
> >
> >Stefan Menten <[EMAIL PROTECTED]> wrote in message
> >news:[EMAIL PROTECTED]
> >> 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%>&nbsp;</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
> >> >>
> >> >>
> >> >
> >> >
> >>
> >
> >
>



Reply via email to