[EMAIL PROTECTED] wrote:
> Bruno Desthuilliers wrote:
>
>
>>Separating operations on data (model/controler) from GUI code (view).
>>The controler(s) have a reference on the model. The views have a
>>reference on the controler(s), and call on the controller to get data to
>>display or act on data.
[EMAIL PROTECTED] wrote:
> So I instantiate a Model object that handles all IO to the database.
> Next I instantiate a Controller object, passing it a reference to the
> Data/IO model object. Next I instantiate the display panel objects for
> the GUI, passing them references to the Controller obje
Bruno Desthuilliers wrote:
> Separating operations on data (model/controler) from GUI code (view).
> The controler(s) have a reference on the model. The views have a
> reference on the controler(s), and call on the controller to get data to
> display or act on data.
So I instantiate a Model obje
[EMAIL PROTECTED] wrote:
> Bruno Desthuilliers wrote:
>
>
>>Do you mean the code effectively doing these operations is in the gui ?
>>If yes, it would be better to factor it out IMHO.
>
> The GUI has to be able to acces the data object, otherwise how does the
> user affect any changes to the ap
Bruno Desthuilliers wrote:
> Do you mean the code effectively doing these operations is in the gui ?
> If yes, it would be better to factor it out IMHO.
The GUI has to be able to acces the data object, otherwise how does the
user affect any changes to the application data? If I modify a value in
[EMAIL PROTECTED] wrote:
> Jeremy Jones wrote:
>
>
>>What does main.py do? Are you creating an instance of the gui thingy?
>>If so, you could just pass DataObject into your gui thingy either into
>>the constructor or to a setter once you create an instance of it.
>
>
> It's a wxPython app. I c
[EMAIL PROTECTED] wrote:
> Doh! How simple. Why didn't I think of that? I'm too used to procedural
> scripts where you'd just put everything in a global data structure. I
> know this is bad, but it's hard to get out of that mentality.
Sounds like you got it. Just pass it on down as needed.
-
Jeremy Jones wrote:
> What does main.py do? Are you creating an instance of the gui thingy?
> If so, you could just pass DataObject into your gui thingy either into
> the constructor or to a setter once you create an instance of it.
It's a wxPython app. I created the GUI initialy using wxGlade
[EMAIL PROTECTED] wrote:
> Lets say that I have an application consisting of 3 files. A main.py
> file, gui.py and a data.py which handles persistent data storage.
> Suppose data.py defines a class 'MyDB' which reads in data from a
> database, and main.py creates an instance of this object. How doe
[EMAIL PROTECTED] wrote:
> Lets say that I have an application consisting of 3 files. A main.py
> file, gui.py and a data.py which handles persistent data storage.
> Suppose data.py defines a class 'MyDB' which reads in data from a
> database, and main.py creates an instance of this object. How do
10 matches
Mail list logo