![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

The first-cut answer is that, while compiling class definitions, you
must
prefix you api calls with a double-colon, i.e.
( in class BAR)
: FOO ( -- ) 0 Z" THIS" Z" THAT" MB_OK :: MessageBox DROP ;
On Dec 7, 2003, at 4:52 PM, Roger Levy wrote:
> ok, still struggling... this is a SWOOP problem.... in my program i'm
> trying
> to set up classes which use functions from the opengl.dll to display
> themselves, but it won't work. seems like functions from DLL's aren't
> visible to them. is this right? also, are global constants not visible
> to
> class methods either? am i going crazy?
> This crashes saying "glBegin?", even though i've imported the DLL
> right,
> using Charles Melice's code.
>
> Obj2d SUBCLASS Triangle2D
> variable r variable g variable b
> variable p1_x variable p1_y \ points of triangle relative to x,y
> variable p2_x variable p2_y
> variable p3_x variable p3_y
> : show ( -- ) 4 glBegin
> r g b glColor3i
> p1_x p1_y glVertex2i
> p2_x p2_y glVertex2i
> p3_x p3_y glVertex2i
> glEnd ;
> END-CLASS
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Sun Dec 07 2003 - 17:29:42 PST
This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:34 PST