FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

close() symmetry

 
Post new topic   Reply to topic     Forum Index -> ArcLib
View previous topic :: View next topic  
Author Message
davidb



Joined: 03 Apr 2007
Posts: 15

PostPosted: Fri Apr 20, 2007 1:04 pm    Post subject: close() symmetry Reply with quote

@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 Mr. Green.
(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
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Fri Apr 20, 2007 2:56 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> ArcLib All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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