Re: [dabo-users] Learning Dabo Issue

2011-10-11 Thread Ed Leafe
On Oct 11, 2011, at 1:55 PM, Rich Shepard wrote: > Following along with the section starting on page 60 on creating an > application from scratch, I get to the point where I should be able to > change the widget type and, when satisfied with the form, click a 'Next' > button. There is no 'Next'

[dabo-users] Learning Dabo Issue

2011-10-11 Thread Rich Shepard
I took Robin Dunn's excellent advice and installed dabo to develop my environmental application. While I'm new to dabo, I've used python and wxPython to develop other models. Reading the 2010 PyCon lecture to learn dabo. Following along with the section starting on page 60 on creating an app

Re: [dabo-users] dBitmap erased when unrelated dButton.Caption is changed

2011-10-11 Thread Paul McNett
On 10/11/11 10:59 AM, Ed Leafe wrote: > I don't use numpy, so let me ask this: how would the dImage Picture > setter be able to recognize that it is being passed such an array? >>> import numpy >>> numpy.array >>> a = numpy.array() Traceback (most recent call last): File "", line 1,

Re: [dabo-users] dBitmap erased when unrelated dButton.Caption is changed

2011-10-11 Thread Ed Leafe
On Oct 11, 2011, at 12:28 PM, Adam wrote: > Maybe I should be using dImage instead of dBitmap. I am creating the > bitmap as a numpy array and then converting to a wxBitmap object: > > def arrayToBitmap(self, array): > width = len(array[0]) > height = len(array) > ima

Re: [dabo-users] dBitmap erased when unrelated dButton.Caption is changed

2011-10-11 Thread Paul McNett
On 10/11/11 10:28 AM, Adam wrote: > Also, a little off topic, but the intended purpose of the Run/Pause > button is to start or stop an ongoing process (the blocks in the bitmap > should move around and interact according to some rules, etc.). I am > wondering now how to achieve this, since if I pu

Re: [dabo-users] dBitmap erased when unrelated dButton.Caption is changed

2011-10-11 Thread Adam
On 10/11/2011 8:35 AM, Ed Leafe wrote: > On Oct 11, 2011, at 1:24 AM, Adam wrote: > >> I'm a beginner to Dabo and programming in general, so I have no idea >> what's happening here. Basically, I have a window displaying a dBitmap >> control on the left to be manipulated, and some controls on the ri

Re: [dabo-users] dBitmap erased when unrelated dButton.Caption is changed

2011-10-11 Thread Paul McNett
On 10/11/11 9:43 AM, Ed Leafe wrote: > On Oct 11, 2011, at 11:41 AM, Paul McNett wrote: > >> I remember having trouble with dBitmap on Linux: something about the way Gtk >> caches >> the bytes resulted in one image overwriting another. However, I thought we >> worked >> around it. I'll try to sea

Re: [dabo-users] dBitmap erased when unrelated dButton.Caption is changed

2011-10-11 Thread Ed Leafe
On Oct 11, 2011, at 11:41 AM, Paul McNett wrote: > I remember having trouble with dBitmap on Linux: something about the way Gtk > caches > the bytes resulted in one image overwriting another. However, I thought we > worked > around it. I'll try to search for the relevant messages/commits.

Re: [dabo-users] dBitmap erased when unrelated dButton.Caption is changed

2011-10-11 Thread Paul McNett
On 10/11/11 5:35 AM, Ed Leafe wrote: > On Oct 11, 2011, at 1:24 AM, Adam wrote: > >> I'm a beginner to Dabo and programming in general, so I have no idea >> what's happening here. Basically, I have a window displaying a dBitmap >> control on the left to be manipulated, and some controls on the righ

[dabo-users] Annexure to my earlier post

2011-10-11 Thread Vineet Deodhar
Excuse me, I missed one more point to ask in earlier post.   In appendDataSet() method, updateInternals=False by default. For better understanding of dabo system, can I know why it is not not set to True by default. What is the basic purpose of this property?   Vineet --- StripMime Report --

[dabo-users] Done: [Add multiple new records in a single shot]

2011-10-11 Thread Vineet Deodhar
Użytkownik Vineet Deodhar napisał: > 'distid' is auto-generated by DB. > Would it make any sense to initialize 'distid' field to None value or any > valid FK? No if you have AutoPopulatePK property set to True, do you? -- Regards Jacek Kałucki --   Jacek, Your hints worked like a charm 

Re: [dabo-users] Add multiple new records in a single shot

2011-10-11 Thread Jacek Kałucki
Użytkownik Vineet Deodhar napisał: > 'distid' is auto-generated by DB. > Would it make any sense to initialize 'distid' field to None value or any > valid FK? And yet another thing. Try to call appendDataSet(..., updateInternals=True). Otherwise you must call setNewFlag() for every new row to set

Re: [dabo-users] Add multiple new records in a single shot

2011-10-11 Thread Vineet Deodhar
>Unfortunately, DefaultValues property set in biz layer doesn't affect db layer. >In db layer all new field values are initialized by its type, e.g. str is >initialized to '', etc. I think I haven't made myself clear. The tables are like this;   stat(statid, statnm) dist(distid,distnm,sta

Re: [dabo-users] Add multiple new records in a single shot

2011-10-11 Thread Jacek Kałucki
Użytkownik Vineet Deodhar napisał: > SQL& PARAMS : update `dist` set `dist`.`distnm` = %s, `dist`.`statid` = %s > where `dist`.`distid`=0 ('delmenow11', 17) > > I don't understand why it is this where clause --- where `dist`.`distid`=0 Unfortunately, DefaultValues property set in biz layer doe

Re: [dabo-users] Add multiple new records in a single shot

2011-10-11 Thread Vineet Deodhar
>On Oct 10, 2011, at 10:57 AM, Vineet Deodhar wrote: > I was just wondering whether it would make sense to have a 'save' method that > can accept a tuple of dictionaries (like what we get from the getDataSet). > For every dictionary in the tuple, a new record would be added to the DB.  > (Searched

Re: [dabo-users] dBitmap erased when unrelated dButton.Caption is changed

2011-10-11 Thread Ed Leafe
On Oct 11, 2011, at 1:24 AM, Adam wrote: > I'm a beginner to Dabo and programming in general, so I have no idea > what's happening here. Basically, I have a window displaying a dBitmap > control on the left to be manipulated, and some controls on the right. > This screenshot shows the state of

Re: [dabo-users] Multiple bizobjs for the same table

2011-10-11 Thread Jacek Kałucki
Użytkownik tdtran tran napisał: > class SecurityConfigBiz( ConfigBiz): > > def initProperties(self): > self.super() > self.DataSource = "configs.security" #< Can't do this! Currently, must be source table name. Let to inherit it from parent. > self.addWhere(

[dabo-users] Multiple bizobjs for the same table

2011-10-11 Thread tdtran tran
Hi, First off, Dabo is awesome! :) I have the following scenario: 1. A configuration table: - ConfigKey - ConfigValue - ConfigGroup 2. There is a bizobj for the config table: class ConfigBiz( dabo.biz.dBizobj ) def initProperties(self): self.DataSource = "configurations"