View previous topic :: View next topic |
Author |
Message |
davidb
Joined: 03 Apr 2007 Posts: 15
|
Posted: Fri Apr 20, 2007 1:04 pm Post subject: close() symmetry |
|
|
@ChristianK: got it reproduced now
The problem I had was a compiler error:
arc.window.close conflicted with arc.log.close
(see the closed ticket)
The problem that got it working was:
I have a cleanup() function just beneath my init() function,
so I just copied all .open() and modified them to .close():
Code: |
void init()
{
arc.window.open("graphics & sound", 800, 600, false);
arc.input.open();
arc.sound.open();
}
void cleanup()
{
arc.sound.close();
arc.input.close(); // this is the BAD GUY
arc.window.close();
}
|
But I just checked the input.d:
Code: |
// there is no close() or shutdown() type function for input
|
So I suggest either an empty dummy input.close function, or throw an exception/assert there because I guess I'm not the only one that's got it for symmetries .
(now, if I do an arc.input.close(), for input.d imports as well window.d as log.d, window.close conflicts with log.close,
see http://pastebin.co.uk/13270 for the sweet compiler error msg)
david |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Fri Apr 20, 2007 2:56 pm Post subject: |
|
|
I put in an arc.input.close() function that does nothing in the svn.
Yes, for some reason the D compiler spits out random template errors when something completely different goes wrong as well. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|