help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ncurses "objectification": first approximation -- was Re: [Help-smalltal


From: Brad Watson
Subject: ncurses "objectification": first approximation -- was Re: [Help-smalltalk] Re: newt library bindings
Date: Fri, 27 Oct 2006 06:55:09 -0700 (PDT)

I'm considering splitting the wrapped c function calls across two subclasses of 
CObject: NCWindow and NCScreen.  c functions that return a WINDOW pointer, or 
take a WINDOW  pointer argument will be wrapped
by an instance method in the NCWindow class.  c functions that return a SCREEN 
pointer, or take a SCREEN pointer argument will be wrapped by an instance 
method  in the NCSreen class.  The remaining c functions will by wrapped by 
class methods in the class that they have the closest affinity.   Does this 
scheme sound reasonable, and consisent with the goal of "objectification" 
NCurses ?

Thanks,

Brad Watson



----- Original Message ----
From: Paolo Bonzini <address@hidden>
To: Brad Watson <address@hidden>; GNU Smalltalk <address@hidden>
Sent: Thursday, October 26, 2006 9:16:29 PM
Subject: Re: [Help-smalltalk] Re: newt library bindings


> mvwaddch: aPoint ch: aChar
>     ^self mvaddchPrimitive: (aPoint y) x: (aPoint x) ch: aChar!
>   
No need for the "Primitive" part.  (And if aPoint is not the first 
parameter, BTW, I'd call its keyword "at: aPoint")
> mvwaddchPrimitive: anInt1 x: anInt2 ch: aChar
>     <cCall: 'mvaddch' returning: #int args: #(#self #int #int #char )>!
>   
Likewise, and you are actually calling mvwaddch of course.

Otherwise good.  Don't be afraid to post this kind of question publicly.

Paolo









reply via email to

[Prev in Thread] Current Thread [Next in Thread]