Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!ANDREW.CMU.EDU!wjh+ From: wjh+@ANDREW.CMU.EDU (Fred Hansen) Newsgroups: comp.soft-sys.andrew Subject: Re: calling textview_getdataobject in ness? Message-ID: Date: 9 Apr 90 20:45:56 GMT References: <8a64NT0B0KGWMBy0JY@holmes.parc.xerox.com> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 31 The following code caused a compilation error in the call to textview_getdataobject: Excerpts from internet.info-andrew: 2-Apr-90 calling textview_getdataobj.. Bill Janssen@parc.xerox. (853+0) > --$enable class access > void function addstyle (object textview, marker stylename) > object text, style, stylesheet > integer selectionpos, selectionlen > selectionpos := textview_GetDotPosition(textview) > selectionlen := textview_GetDotLength(textview) > text := textview_getdataobject(textview) > stylesheet := text_GetStyleSheet(text) The difficulty is that calls to methods and class variables are NOT case-insensitive. The proper call is text := view_Getdataobject(textview) with the uppercase G in "Get" and lower case d and o because that is how the field name is declared in view.ch. It is better to use view_ instead of textview_ because the declaration of dataobject is in view.ch. With the wrong case, the Ness parser interpreted the call as a call on an undefined function, so the type was assumed to be marker. That is why the type mismatch was flagged. Fred Hansen