[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Adonthell-devel] Redesign?
From: |
Kai Sterker |
Subject: |
Re: [Adonthell-devel] Redesign? |
Date: |
Tue, 19 Aug 2003 12:19:20 +0200 |
Am Dienstag, 19.08.03 um 09:04 Uhr schrieb Kenneth Gangstoe:
Haven't followed this thread closely, so I have no idea if this is
even remotely interesting :) But in ClanLib we solved the
initialization
problems without using any hacks. Read more here:
http://www.clanlib.org/ClanLib-0.7.cgi/Overview/getting_started.html
Hm. This looks interesting! So basically, the main method is part of
the library, and the application is encapsulated in a class that gets
'executed' by the library.
This looks like a step in the right direction. However, there are a few
points we'll have to watch out for:
* we'll be using different backends that may need different
initialization on
different platforms.
* we'll have python scripts for various tasks, which should be able to
use
the same kind of initialization.
So, if we had a fixed main method within the adonthell library, it
would need to know the backend the user wants, and of course it would
need to know the platform it runs on. Latter is simple, since that can
happen at compile time. The backend to use could be provided by the
userdefined MyAdonthellApp class.
Remains the question how this would work from within a python script. I
mean, the great advantage of the current design is that you can run our
adonthell related scripts with an ordinary python interpreter. That
means, we can't have that kind of initialization. There are two
solutions I can think of:
* either we have to create a custom application to run the python
scripts, much
like the old pydonthell, which does exactly the above, but calls
PyMain
instead of a user provided main method.
* or, we rely on the python interpreter to do all the neccessary
initialization
for the platform it runs on. I recall that MacPython (which now is
part of
official Python 2.3) prepares everything for python apps to connect
to the
Quartz window server.
Latter would be the best solution, but I have not tried, whether that
actually works. And I really would like to avoid the first.
Well, seems to get interesting again :)
Comments?
Kai
Re: [Adonthell-devel] Redesign?, Micah J. Cowan, 2003/08/18
Re: [Adonthell-devel] Redesign?, Kenneth Gangstoe, 2003/08/19
- Re: [Adonthell-devel] Redesign?,
Kai Sterker <=