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

The Physics/Scene graph system...
Goto page Previous  1, 2, 3
 
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: Thu Apr 26, 2007 10:46 am    Post subject: Reply with quote

If I have understood you right (about static constructors), why not just use
static this()
{
staticThisInit();
}

staticThisInit()
{
thisfirst.open();
whatever.open();
thislast.open();
}
?
When the bug gets fixed, the correction needed is minimal.
That said, I too would use it only where you can't provide arguments to the .open() functions.

david
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Thu Apr 26, 2007 1:57 pm    Post subject: Reply with quote

The problem with that, is that, say, you have a window module

module window;

which has to import every single module that has an .open and .close facility.

import input, log, font;

static this()
{
input.open(); font.open(); log.open();
}

would be good for controlling the order of the operations, but bad because window shouldn't have to import things it doesn't really use.
Back to top
View user's profile Send private message AIM Address
ChristianK



Joined: 26 Sep 2006
Posts: 159
Location: Berlin, Germany

PostPosted: Sun Apr 29, 2007 7:04 am    Post subject: Reply with quote

I'm missing font.open. Calling font.initFont seems to do it - can you add the open and close functions?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> ArcLib All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
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