SDL and optional keywords
Pupeno
pupeno at pupeno.com
Thu Oct 14 16:01:24 PDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I managed to get it working, this is the pidgin message to draw a line:
SDL drawLineFromX: 0 y: 0 toX: 100 y: 100 red: 255 gren: 255 blue: 255. SDL
updateScreen.
It works. :D
I'm now trying to create a slate founction that would be more friendly, so,
I've done this:
s@(SDL traits) drawLineFrom: from@(Point traits) to: to@(Point traits)
&withColor: color
[
color ifNil: [ color: (Color r: 255 g: 255 b: 255). ].
SDL traits drawLineFromX: from x y: from y toX: to x y: to y red: color red
gren: color green blue: color blue.
].
It worked untill I tried to make withColor an optional keyword. Now it says:
Slate 11> SDL drawLineFrom: 0 , 10 to: 200, 200.
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
Any ideas ?
Thanks
- --
Pupeno: pupeno at pupeno.com - http://www.pupeno.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFBbwVHfW48a9PWGkURArE6AJ4mImjZYEUkrJ8CKxl6dL8RDGXT/gCeJgJq
TplFque1E/ekZdOZM4D307E=
=Jmtb
-----END PGP SIGNATURE-----
More information about the Slate
mailing list