Re: [dabo-users] Y2K issue with date fields and multi line text fields

2012-06-22 Thread Uwe Grauer
On 06/21/2012 02:14 PM, Dave Kelly wrote:
 After futher investigation, it seems to be related to Linux.  I installed
 the windows version and used the same database on an Ubuntu 12.04 server and
 Postgres database.   The date field is four digits using Windows.  I then
 installed it on Ubuntu 12.04 and it used two digits.

 I tried to install on CentOS 6 and did not succeed because I couldn't
 install wxPython.

 It did not matter whether I started with a database that was already
 populated or not.

 Does anyone have any ideas about where this is configured as I prefer to
 develop in Linux.

 Dave Kelly

Try setting your own dateformat in your main() function:

dabo.settings.dateFormat = %d.%m.%Y

The format strings are documented in pythons strftime function:
http://docs.python.org/library/time.html

Hope this helps,
Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4fe422c3.5030...@googlemail.com


Re: [dabo-users] PostgreSQL char fields are rpadded

2011-11-18 Thread Uwe Grauer
On 11/18/2011 12:26 AM, Paul McNett wrote:
 I'm using PostgreSQL for the first time, after long-time use of MySQL and 
 SQLite. So
 far so good, although I noticed a pretty key difference in character fields. 
 For a
 column definition of 'last_name char(30)', the following code:

 biz.Record.last_name

 Will result in the following on PostgreSQL:

 McNett

 Which surprised me greatly, because it results in the following output on 
 MySQL and
 SQLite:

 McNett

 I must be overlooking something exceedingly obvious, or I'd have seen this 
 issue
 discussed before. Right?

 Paul

Most databases use trailing spaces in char fields which are shorter than 
the defined lenght.

Maybe MySql uses this representation for convenience.
How does abcand abc compare for char fields in Mysql.
Are those equal??

See:
http://troels.arvin.dk/db/rdbms/#data_types-char
http://docs.oracle.com/cd/B13789_01/appdev.101/b10807/b_char.htm#i1596


Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4ec687b0.9090...@googlemail.com


Re: [dabo-users] schedule for Oracle support?

2011-03-18 Thread Uwe Grauer
On 03/18/2011 08:10 PM, Ed Leafe wrote:
 On Mar 18, 2011, at 2:28 PM, Paul McNett wrote:
 
 Any idea of how much time it would take a developer? (with experience in
 oracle, python; whatever skills you suggest...)

 With experience in Oracle and Python, and especially interacting with an 
 Oracle 
 database from Python itself, it would be straightforward but I'm not keen on 
 guessing 
 how much time it would take, but I'll put my WAG on the table anyway for a 
 not-fully-tested alpha version:

 1 week?
 
 
   I would say significantly less. Without doing anything, the current 
 code should work for everywhere that Oracle shares SQL with MySQL and 
 PostgreSQL; the only things that would need any coding are for those places 
 where the code differs. If you have Oracle experience, it would be simple 
 enough to identify those areas based on the generated SQL, and make the 
 changes. Heck, if you tell me what isn't correct, I can make the changes and 
 post them for further testing. I just don't have access to an Oracle 
 installation to test against.
 

I did the work for dbOracle.py and the only reason it is not finished
was missing unicode support in cx_oracle.
I would guess that now cx_oracle has stabilized to get it done.
Most of the things are already there.

I used the free version (Oracle 10g Express Edition) which is free to
use.

And sorry, i have no time for this due to a new job.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4d83c63e.9000...@googlemail.com


Re: [dabo-users] Default language setting

2011-02-25 Thread Uwe Grauer
On 02/25/2011 11:46 AM, Werner F. Bruhin wrote:
 I am back for looking how to set a default language for all Dabo apps.
 
 My os default language is fr, so reading up on locale.setlocale I 
 thought I could use LANG=en_EN.cp1252 env variable, but that is just 
 ignored.  googling a bit I came across a suggestion that it should be 
 LC_ALL=en_EN.cp1252, but same result.
 

I use the LANG env variable to switch languages in Linux.
e.g.:
LANG=de_DE.UTF-8
LANG=en_US.UTF-8

After dApp instantiation i do:
# get LANG from env
currrent_lang = os.getenv(LANG, None)
if currrent_lang != None:
lang, charset = currrent_lang.split('.')
if lang == 'de_DE':
print 'Setting dabo.settings.dateFormat to %d.%m.%Y'
dabo.settings.dateFormat = %d.%m.%Y
if charset == 'UTF-8': charset = 'UTF8'
print 'Calling app.setLanguage(%s, %s)' % (lang, charset)
app.setLanguage(lang, charset)

This always worked for my apps.

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4d6798ed.4090...@googlemail.com


Re: [dabo-users] Type mapping question.

2011-02-02 Thread Uwe Grauer
On 02/02/2011 11:01 AM, Werner F. Bruhin wrote:
 Hi Uwe,
 
 On 26/01/2011 16:13, Uwe Grauer wrote:
 I commited your changes with rev 6347.
 A belated thanks.
 
 Just noticed this in firebird.db:
 
  elif ftype == varying:
  if r[rdb$field_length]  64:
  ft = M
  else:
  ft = C
 
 In a utf-8 encoded database this means that varchar larger then 16 
 characters will be defined as a M field.
 
 What about using rdb$character_length instead - see exchange with 
 Helen on FbSupport?
 
 Werner

Sorry Werner,

i have no clue why varchar fields are either C or M. I never had any
problems with this. Must be really old code.

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4d499649.5080...@googlemail.com


Re: [dabo-users] Type mapping question.

2011-02-02 Thread Uwe Grauer
On 02/02/2011 07:17 PM, Werner F. Bruhin wrote:
 Hi Uwe,
 
 On 02/02/2011 18:37, Uwe Grauer wrote:
 On 02/02/2011 11:01 AM, Werner F. Bruhin wrote:
 Hi Uwe,

 On 26/01/2011 16:13, Uwe Grauer wrote:
 I commited your changes with rev 6347.
 A belated thanks.

 Just noticed this in firebird.db:

   elif ftype == varying:
   if r[rdb$field_length]  64:
   ft = M
   else:
   ft = C

 In a utf-8 encoded database this means that varchar larger then 16
 characters will be defined as a M field.

 What about using rdb$character_length instead - see exchange with
 Helen on FbSupport?

 Werner
 Sorry Werner,

 i have no clue why varchar fields are either C or M. I never had any
 problems with this. Must be really old code.

 As varchar can go pretty large at some point M makes sense.  In my 
 case when I wanted a memo type column I used a text blob, but I can 
 see that varchar is another alternative for that up to its limit.
 
 I think it should be changed to use rdb$character_length but I really 
 have no idea what the right value is to go from C to M.  I guess any 
 number is not going to fit every ones need, so might as well leave it at 64.
 
 Could you change that when you have a moment?
 
 Thanks
 Werner

Done with rev 6377.

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4d49a571.3040...@googlemail.com


Re: [dabo-users] Type mapping question.

2011-01-26 Thread Uwe Grauer
On 01/26/2011 03:01 PM, Werner F. Bruhin wrote:
 ...
 I changed my local copy of dbFirebird.py to check for field_sub_type and 
 if it is 1 I set it to M otherwise to L, but I could only do this 
 after I re-indented the whole file, which obviously makes the patch huge.
 
 I guess the file uses a mixed tabs/spaces for indentation instead of 
 just one of them (tabs is preferred, I believe) - can someone confirm 
 that this is the case?
 
 Should I submit the huge patch or just post the changes on codepad?
 
 Werner

Just put the relevant change on codepad. I will do the commit.

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4d402bc8.60...@googlemail.com


Re: [dabo-users] Type mapping question.

2011-01-26 Thread Uwe Grauer
On 01/26/2011 03:27 PM, Werner F. Bruhin wrote:
 Managed to create a clean patch using UliPad.
 
 http://dabo.codepad.org/yNQBVeQl
 
 It combines the blob subtype issue and the IndexError for which I 
 created a trac ticket (#1404) earlier on.
 
 By the way, UliPad reports also the following imports as unused:
 
 import datetime
 from dabo.dLocalize import _
 from dCursorMixin import dCursorMixin
 
 Is it a convention to have them in the db adapters?  Or are they not needed?
 

I commited your changes with rev 6347.
I did not use blob fields before.
That's why there was no need for sub_type logic.

I guess the unused imports are from old code.
I removed them.

Thanks,
Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4d403a2d.5090...@googlemail.com


Re: [dabo-users] unicode strings in connection params

2011-01-11 Thread Uwe Grauer
On 01/10/2011 11:22 AM, Uwe Grauer wrote:
 I played around with the newest svn and some old sources.
 I noticed that firebird dosn't work any more because all connection
 params contain unicode strings instead of normal python strings.
 
 Does anybody know when and where this was changed?
 Unicode strings don't work for db connection parameters like user,
 password, ... (at least for Firebird)
 

svn rev 5922 Converted more of the codebase from str() to ustr()
might be the culprit.

Do all other databases work with unicode string connection params?

The fix for Firebird would be easy, once i understand the reasons for
this change.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4d2c2aba.2070...@googlemail.com


Re: [dabo-users] unicode strings in connection params

2011-01-11 Thread Uwe Grauer
On 01/11/2011 11:02 AM, Uwe Grauer wrote:
 On 01/10/2011 11:22 AM, Uwe Grauer wrote:
 I played around with the newest svn and some old sources.
 I noticed that firebird dosn't work any more because all connection
 params contain unicode strings instead of normal python strings.

 Does anybody know when and where this was changed?
 Unicode strings don't work for db connection parameters like user,
 password, ... (at least for Firebird)

 
 svn rev 5922 Converted more of the codebase from str() to ustr()
 might be the culprit.
 
 Do all other databases work with unicode string connection params?
 
 The fix for Firebird would be easy, once i understand the reasons for
 this change.
 
 Uwe

I changed the connection params back to str type in rev 6310.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4d2c5a43.9000...@googlemail.com


Re: [dabo-users] unicode strings in connection params

2011-01-11 Thread Uwe Grauer
On 01/11/2011 02:27 PM, Ed Leafe wrote:
 On Jan 11, 2011, at 8:25 AM, Uwe Grauer wrote:
 
 I changed the connection params back to str type in rev 6310.
 
   Does Firebird not support non-ASCII characters in things like database 
 name, user name, or password? Or is it only a problem for kinterbasdb? IOW, 
 can you create a database with a ü in the name, and access it from command 
 line connections?
 
 
 -- Ed Leafe

I did some more tests and the only connection params that take unicode
is the database filename and the hostname.
For user and password unicode strings do not work (not sure if this is a
kinterbasdb limitation).

I think i should allow unicode at least for the database name.

The hostname takes a unicode string but it might be better to allow only
python strings. What do you think? Should we allow unicode as hostname?

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4d2c8c37.1090...@googlemail.com


[dabo-users] unicode strings in connection params

2011-01-10 Thread Uwe Grauer
I played around with the newest svn and some old sources.
I noticed that firebird dosn't work any more because all connection
params contain unicode strings instead of normal python strings.

Does anybody know when and where this was changed?
Unicode strings don't work for db connection parameters like user,
password, ... (at least for Firebird)

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4d2adde8.8080...@googlemail.com


Re: [dabo-users] help with Install

2010-12-19 Thread Uwe Grauer
On 12/19/2010 12:25 PM, Graham Smith wrote:
 hello,
 
 I realise this is more an Ubuntu question than a Dabo question, but I would
 like to try Dabo, but the install process is tricky for me. So i am hoping
 someone will bear with me and do a bit of hand holding.
 
From the web site http://wiki.dabodev.com/InstallationOnLinux ( I have
 slightly modifed the instructions as I think they should be set up for
 Ubuntu)
 
 # Do not use the root account for this, as it may not work in all cases
 
 cd $HOME
 mkdir src
 cd src
 svn checkout http://svn.dabodev.com/dabo/trunk dabo # I assume at this
 stage it will be asked to install SVN
 
 # Change /usr/local/lib/python2.6/dist-packages ## as I am on Ubuntu 10.10
 
 cd /usr/local/lib/python2.6/dist-packages
 
 # You need root privilege to create the following link in site-packages
 sudo ln -s $HOME/src/dabo/dabo dabo

With the above link you placed the dabo source tree into your python
enviroment. Now dabo can be imported by python scripts.

 
 I am assuming I can ignore the next few line about svn up and
 installing specific versions
 
 I assumed that this installed dabo somewhere and the src folder was
 now redundant,  but...


You installed dabo in your home. Keep it there!
The src folder is not redundant. Keep it!
The symbolic link that was placed in your python enviroment points
to the dabo files under your home.
If there are new changes in svn you cd to $HOME/src/dabo and call:
svn up
This allows you to update the dabo source tree without root privilegs.


 # To check that dabo works correctly, run the DaboDemo.py
 
 cd $HOME/src/dabo/demo
 python DaboDemo.py
 
 
 suggests that the src folder (which I took to stand for source) still
 has files that are needed, or is it just that the DabDemo.py file was
 downloaded along with the source and the source files in the src
 folder are in fact now redundant, and DabDemo could be moved to
 anywhere.
 
 
 Alternatively, from lower down the same web page, does this work with
 Ubuntu 10.10 (it says tested on 7.04)
 
 
 set -ex
 sudo apt-get --yes install python-reportlab python-wxgtk2.8 subversion
 python-mysqldb
 svn checkout http://svn.dabodev.com/dabo/trunk dabo
 cd dabo
 sudo python setup.py install
 

The above method installs dabo under your python enviroment.
You can't update the installed dabo by svn any more.
The linked in dabo source is easier to handle as you are able to
update by svn to any needed revision.
Do not use the web update method as it clashes with svn update method!

 
 Which assume does the same as the earlier step by step instructions (I
 already have python-wxgtk2.8 and python -mysqldb installed, so I
 assume I could just miss them off the list)
 

The python setup.py method doesn't do the same as the linked in svn
method. It installs the dabo source tree under your python enviroment.
You can't update this with svn directly.

 
 The final question which is on how I update Dabo, I assume this is
 really an SVN question, so again bear with me.
 

If you want to update, do this:
cd  $HOME/src/dabo
svn up

 
 I'm afraid all of this is still very alien to me, and I am still
 scared of breaking something, unless instructionsare very detailed and
 very specific to my distro and version.
 
 Any help greatly appreciated.
 
 
 Many thanks,
 
 Graham
 

Keep asking if something is unclear.

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4d0e0933.3090...@googlemail.com


Re: [dabo-users] Which database

2010-11-24 Thread Uwe Grauer
On 11/23/2010 09:17 PM, scott.ra...@bdssoftware.com wrote:
 I'm starting down the long path of switching from VFP to  
 Python/Dabo and need guidance for selecting which SQL database to use.  
   I downloaded and installed PostgreSQL, which I like, but it has a  
 too large a footprint for my requirements.  So, what would be  
 recommended that meets the following requirements:
 (1) No end-user licensing fees.
 (2) Small footprint, preferably totally transparent to the end-user.
 (3) Preferably cross platform, Windows is a must.
 (4) Simple installation, preferably minimal or no end-user inputs.
 
 A short time ago I set aside two weeks to get into Python, wxPython,  
 PostgreSQL, and Dabo.  I accomplished the first three to the point of  
 becoming productive and was very impressed.
 
 Anyway, I'll appreciate any input(s).
 
 Thanks,
 Scott

PostgreSQL is a very good advice if you go for a multiuser only solution.
If you plan to deploy by server or embedded database and want a small
footprint and easy administration, you should try Firebird.

http://www.firebirdsql.org

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4cecd4c8.8050...@googlemail.com


Re: [dabo-users] Which database

2010-11-24 Thread Uwe Grauer
On 11/24/2010 04:54 PM, Scott Ramey wrote:
 Thanks Uwe.  
 
 I took a quick look at Firebird SQL and came away with the following
 observations:
   Smaller community than MySQL or PostgreSQL.
   Good foundation based on Interbase. 
   Firebird Embedded has a shortcoming since it opens the database in
 exclusive mode.  This nullifies the small footprint advantage.
 
 Although probably half my installations are single user in practice, it would 
 be
 problematic and more time consuming to have separate single and multi user
 versions of the software.
 

Support for Firebird is one of the best!
Firebird won the Sourceforge Community Choice Award in 2009!

Why do you think you have to have single and multi users versions?
Server and Embedded look like the same engine for the developer!
These are just different deployment methods.

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4ced537c.9030...@googlemail.com


Re: [dabo-users] DaboDemo

2010-11-23 Thread Uwe Grauer
On 11/23/2010 02:06 PM, Ed Leafe wrote:
 On Nov 23, 2010, at 2:14 AM, Fraser Burns wrote:
 
 Same as Jim found - no difference.
 The extra thing I tried on both the before and after test was to turn on 
 System monitor. Approx 3 seconds after clicking the Word wrap button the 
 CPU changes to 100% and locks there.
 
 
   This may sound strange - but try changing line #88 to read:
 
 lbl = self.gettyLabel = dabo.ui.dLabel(self, Caption=txt, WordWrap=False)
 
   I tried that on my VM to see if that would stop the CPU from spiking, 
 and not only did the CPU behave, but I actually saw the text wrap as you 
 would expect with WordWrap=True.
 
   Can you try this and confirm this behavior? 
 

I can confirm this.
Your change results in correct behavior.

Now why does it misbehave with WordWrap=True ?

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4cebbe8b.6080...@googlemail.com


Re: [dabo-users] DaboDemo

2010-11-22 Thread Uwe Grauer
On 11/22/2010 02:09 PM, Ed Leafe wrote:
 On Nov 22, 2010, at 4:39 AM, Fraser Burns wrote:
 
 dLabel - Show Word Wrap
 Attempting to move the slider causes a lock up.

 
   Hmmm... works fine on OS X, so it must be Gtk-specific. Does this 
 happen with anyone else running DaboDemo on Linux?

I'm seeing this too.

Platform: GTK
Python Version: 2.6.5 on linux2
Dabo Version: Version 0.9.3; Revision 6199
UI Version: 2.8.10.1 on wxGTK (gtk2)

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4cea7b24.3010...@googlemail.com


Re: [dabo-users] DaboDemo

2010-11-22 Thread Uwe Grauer
On 11/22/2010 03:19 PM, Sibylle Koczian wrote:
 Trying to start bubblet:
 
 Traceback (most recent call last):
File /home/sib/src/dabo-trunk/dabo/ui/uiwx/dControlMixin.py, line 
 27, in _onWxHit
  self.raiseEvent(dEvents.Hit, evt, *args, **kwargs)
File /home/sib/src/dabo-trunk/dabo/ui/uiwx/dPemMixin.py, line 991, 
 in raiseEvent
  super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args, 
 **kwargs)
File /home/sib/src/dabo-trunk/dabo/lib/eventMixin.py, line 96, in 
 raiseEvent
  bindingFunction(event)
File /home/sib/src/dabo-trunk/demo/samples/bubblet.py, line 23, in 
 runGame
  def runGame(self, evt):
File /home/sib/src/dabo-trunk/dabo/ui/uiwx/dForm.py, line 928, in 
 __init__
  BaseForm.__init__(self, preClass, parent, properties, 
 attProperties, *args, **kwargs)
File /home/sib/src/dabo-trunk/dabo/ui/uiwx/dForm.py, line 45, in 
 __init__
  fm.dFormMixin.__init__(self, preClass, parent, properties, 
 attProperties, *args, **kwargs)
File /home/sib/src/dabo-trunk/dabo/ui/uiwx/dFormMixin.py, line 75, 
 in __init__
  attProperties, *args, **kwargs)
File /home/sib/src/dabo-trunk/dabo/ui/uiwx/dPemMixin.py, line 193, 
 in __init__
  self._afterInit()
File /home/sib/src/dabo-trunk/dabo/ui/uiwx/dForm.py, line 72, in 
 _afterInit
  super(BaseForm, self)._afterInit()
File /home/sib/src/dabo-trunk/dabo/ui/uiwx/dFormMixin.py, line 129, 
 in _afterInit
  super(dFormMixin, self)._afterInit()
File /home/sib/src/dabo-trunk/dabo/ui/uiwx/dPemMixin.py, line 327, 
 in _afterInit
  self.afterInit()
File 
 /home/sib/src/dabo-trunk/demo/samples/games/bubblet/BubbletForm.py, 
 line 68, in afterInit
  quitPos = fm.getItemIndex(_(Quit))
 AttributeError: 'NoneType' object has no attribute 'getItemIndex'
 

This is a very old one using LANG=de_DE.UTF-8.
It doesn't happen with:

LANG=en_US.UTF-8 python DaboDemo.py

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4cea7e08.2060...@googlemail.com


Re: [dabo-users] Oracle DB as the back-end

2010-11-12 Thread Uwe Grauer
On 11/12/2010 04:29 AM, RICAFORT ALFREDO wrote:
 Hi Uwe,

 How do I enable it so that I can see it in the 'Database Type' drop-down?


You can't enable it in the gui because it doesn't work anyway.
It is a unfinished first draft of a oracle module for Dabo.
Someone with some spare time has to get it working with the latest 
cx_oracle module.
After that it would make sense to add it to the dropdown list in the gui.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4cdcfa30.90...@googlemail.com


Re: [dabo-users] SQLite still needed if only MySQL will be used

2010-11-10 Thread Uwe Grauer
On 11/10/2010 10:19 AM, Dennis Lim wrote:
 Hi Dabo Experts,

 I found SQLite installation in the Required section.  If I plan to use MySQL 
 as
 my database backend, do I need to install SQLite?


Dabo uses sqlite for its preference settings.
Even if you use MySQL as your database settings,
the preferences are stored in sqlite.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4cda6793.2010...@googlemail.com


Re: [dabo-users] Oracle DB as the back-end

2010-11-08 Thread Uwe Grauer
On 11/05/2010 08:37 AM, RICAFORT ALFREDO wrote:
 Hi,

 I want to use DABO to access our data in an Oracle DB.  I've search
 the list and the internet and I can't find any sample on how to do
 this.  Is there a way to access an Oracle DB at the moment?

In Dabo svn there is a draft module for Oracle support.
Don't expect it to be usable!
Years ago when i did this, the unicode support in the used cx_oracle 
python module wasn't sufficient to get a working version.

In the meantime, cx_oracle improved the unicode support.
So maybe the started module (dabo/db/dbOracle.py) could be finished to 
get a working version.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4cd7b771.20...@googlemail.com


Re: [dabo-users] dGrid

2010-10-22 Thread Uwe Grauer
On 10/22/2010 09:59 AM, Fraser Burns wrote:
 Since ShowColumnLabels is deprecated, why does the code that the
 wizard generates still call it?
 Shouldn't that code be calling ShowHeaders instead, with the old
 methods still existing  in dGrid.py so as not to interfere with existing
 code? After all you have set them to just give the warning and then use
 ShowHeaders anyway.
 Or is there something about the way the methods come down that make this
 too difficult until you do the actual cutover?
 Since your wizards are so good, I am naturally going to keep using them,
 which means that I am continuing to create code that should be being
 phased out.
 - - Fraser Burns

See this related post from Ed:
http://leafe.com/archives/msg/447751

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4cc15a6c.5010...@googlemail.com


Re: [dabo-users] Pycon Tutorial validateRecord() Not Returning Message

2010-04-30 Thread Uwe Grauer
Jeff Johnson wrote:
 
 Ok.  What are you guys trying to do to me?!?  I started working on the 
 tutorial today and everything works fine.  No changes whatsoever except 
 shutting down my computer and starting it up today.
 
 Oh well, back to work.
 
 Thanks!
 

When working on Windows a Reboot can cure a lot of Problems.
Next time you see a problem - try a Reboot. ;-)

Uwe


Microsoft gives you Windows, Linux gives you the whole house!


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4bdb2bef.70...@googlemail.com


Re: [dabo-users] Change PYcon PagEditRecipes.py to not run test

2010-04-11 Thread Uwe Grauer
Andrew Stirling wrote:
 Opps
 
 https://www.cacert.org (I'm an assurer)
 
 gave me
 The site's security certificate is not trusted!
 You attempted to reach www.cacert.org, but the server presented a 
 certificate issued by an entity that is not trusted by your computer's 
 operating system. This may mean that the server has generated its own 
 security credentials, which Google Chrome cannot rely on for identity 
 information, or an attacker may be trying to intercept your 
 communications. You should not proceed, especially if you have never 
 seen this warning before for this site.
 
 Andrew Stirling
 

If you trust cacert.org, you can import the certificate:
http://wiki.cacert.org/BrowserClients

Normaly the cacert certificate isn't included in you browser.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4bc1ccff.20...@googlemail.com


Re: [dabo-users] use Dabo without PK's

2010-03-02 Thread Uwe Grauer
John wrote:
 On Tuesday 02 March 2010 06:50:12 am Paul McNett wrote:
 On 3/2/10 6:24 AM, John wrote:
 Not my tables/views.  And we aren't allowed to change anything.
 Do they have valid reasons behind their policy? I'd call a meeting and say
 thanks but no thanks: you people are binding my hands for no reason.

 Paul
 
 Even if we did have the PK field for the view we will still have issues.  For 
 example how does Dabo return the generated PK after an insert.  Recall that 
 the view in question allows inserts,  updates, and deletes.  But using the 
 Dabo's getLastInsertID () does not work for a view.   Standard Postgres 
 curval() (returns the last generated number) function requires the name of 
 the sequence used and the dbPostgres routine only works for a table.  So 
 dbPostgres does not know how to determine (in a dynamic way)  the sequence 
 name from a view (yet).  I wonder if other backends know how to determine the 
 generated PK from a view.
 
 I'm going to see if there is a way to get that done.  But in the mean time I 
 just over wrote the save() method.
 

If there is no reliable getLastInsertID() you would set the new PKs
before insert. That way you know how to retrieve the new record after an
insert.
If there is no way to retrieve the new record after an insert you have
lost the normal table behavior anyway.

Views should have the same behavior as a normal table.
Otherwise they can't be used in the same way.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4b8d46be.8080...@googlemail.com


Re: [dabo-users] dDropDown and nulls

2010-02-25 Thread Uwe Grauer
John wrote:
 Hi,
 Working with an interesting issue.  I have a table (this is not my table) 
 that 
 contains a legal null value for a field (product_category) and does not 
 have a key (just text ).  When I display the table in a grid all is fine with 
 the null value because the grid displays 'None' as I would have expected.  
 
 I also have a dropdown for the same field that needs to allow a null 
 or 'None'  for the choices (ValueMode = string because there is no key).  I 
 manually add the string 'None'  to the Choices.  However, when I select the 
 records on the grid that contain null values, the dropdown does not move to 
 the related 'None'.  Selecting a record that does not contain a Null (IOW's 
 a string for the value) the dropdown selection follows correctly.   I can't 
 add a null value to a Choices items.  So I'm looking for suggestions.
 
 I was thinking I should bind a method to update the dropdown to the grid row 
 selection.  What are your thoughts.
 
 Johnf

I solved this by a default value of 0 in the database field.
The dropdowns key, value for this is 0, -/-.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4b86325e.1020...@googlemail.com


Re: [dabo-users] Backend paramstyles

2010-02-02 Thread Uwe Grauer
Jacek Kałucki wrote:
 Hi,
 
 I get Token unknown '%' from Firebird backend.
 Why Dabo doesn't change default paramstyle driver behaviour
 from qmark to format?
 

Firebird (kinterbasdb) only allows qmark parameter style.
How did you get this error? Are you using a different
parameter style for the Firebird backend?
e.g.:
Did you use a user defined query containing % as parameter style?

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4b684d3b.7010...@googlemail.com


Re: [dabo-users] Backend paramstyles

2010-02-02 Thread Uwe Grauer
Jacek Kałucki wrote:
 Użytkownik Uwe Grauer napisał:
 Jacek Kałucki wrote:

 Hi,

 I get Token unknown '%' from Firebird backend.
 Why Dabo doesn't change default paramstyle driver behaviour
 from qmark to format?

  
 Firebird (kinterbasdb) only allows qmark parameter style.
 How did you get this error? Are you using a different
 parameter style for the Firebird backend?
 e.g.:
 Did you use a user defined query containing % as parameter style?

 
 No, I use framework.
 It's excerpt from log:
 Database Activity Log: Tue Feb 02 17:08:05 2010: FAILED SQL: insert into 
 grdtest (f1, f2, f3) values (%s,%s,%s) , PARAMS: Delta, 4, 1.25
 Database Activity Log: Tue Feb 02 17:08:05 2010: DBQueryException 
 encountered in execute(): (-104, 'isc_dsql_prepare: \n  Dynamic SQL 
 Error\n  SQL error code = -104\n  Token unknown - line 1, column 42\n  %')
 insert into grdtest (f1, f2, f3) values (%s,%s,%s)
 
 I use default paramstyle. Tried to change to format with no result.
 Do you use Firebird?
 

Yes, i'm always using Firebird.
I never did get %s parameters from the Dabo framework.
Try to find the source where the error originates.
What do you mean with Tried to change to format with no result.?
How did you try to change format?

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4b685156.5000...@googlemail.com


Re: [dabo-users] Backend paramstyles

2010-02-02 Thread Uwe Grauer
Jacek Kałucki wrote:
 Użytkownik Uwe Grauer napisał:
 How did you try to change format?

 
 I issue:
  app.dbConnection.getBackendObject().dbapi.paramstyle = format
 

That's not possible for Firebird.
Firebird only uses qmark (?) parameters.

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4b68581b.8000...@googlemail.com


Re: [dabo-users] Backend paramstyles

2010-02-02 Thread Uwe Grauer
Jacek Kałucki wrote:
 Użytkownik Ed Leafe napisał:
 On Feb 2, 2010, at 11:37 AM, Jacek Kałucki wrote:


 I issue:
  app.dbConnection.getBackendObject().dbapi.paramstyle = format

 I will try with debugger to find out reason.
  
  You're getting into implementation details again. You should never dig 
 down to the dbapi layer.


 
 Here is the working solution:
  app.dbConnection.getBackendObject().paramPlaceholder = ?
 
 Is this accepted solution or I dug too deep again?
 And why it's not default for Firebird?

Why do you want to overwrite default dbapi values?
See:
u...@athlon28:~ python
Python 2.5.2 (r252:60911, Dec  1 2008, 17:47:46)
[GCC 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]] on linux2
Type help, copyright, credits or license for more information.
 import kinterbasdb as dbapi
 dbapi.paramstyle
'qmark'


The default paramstyle for Firebird already is 'qmark'!
Changing the paramstyle is not supported by kinterbasdb.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4b68660d.3040...@googlemail.com


Re: [dabo-users] Backend paramstyles

2010-02-02 Thread Uwe Grauer
Jacek Kałucki wrote:
 Użytkownik Paul McNett napisał:
 However, your debugging has found a potential solution (good job!). But, as 
 Ed says,
 don't use that solution in *your* code (it isn't acceptable for Dabo to 
 require you
 to do that), but instead propose it as a fix on dabo-dev, where we'll need 
 to sort
 out when/where you see the problem, and why you are needing to set that 
 placeholder
 explicitly when nobody else seems to need to do so.

 In other words, you've maybe found a solution to a problem that is as-yet
 unidentified. Can you show us the problem in a simple example?


 
 Attribute paramPlaceholder is set only in two places,
 in dBackend class default % and in dbSQLite class changed to ?.
 I use kinterbasedb version 3.3 and Firebird 2.1.2.18118.
 I can't imagine how it's possible it works for other users but not for me.
 It's simple form with just one bizobj, nothing else.
 But I will try to write working example tomorrow.
 

Now i understand.
paramPlaceholder was introduced with rev 5524.
I didn't see this as i was still using rev 5464.

I just commited a change in rev 5626.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4b6877f0.30...@googlemail.com


Re: [dabo-users] Backend paramstyles

2010-02-02 Thread Uwe Grauer
Jacek Kałucki wrote:
 Użytkownik Uwe Grauer napisał:
 The default paramstyle for Firebird already is 'qmark'!
 Changing the paramstyle is not supported by kinterbasdb.

 
 I didn't change driver property but framework property.
 So why if driver setting is 'qmark' and default framework is %,
 it works for others? And why not for me?
 

I missed the addition of paramPlaceholder in rev 5524.
Just commited a change in rev 5626.

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4b687862.6040...@googlemail.com


Re: [dabo-users] Connetion Editor crashing when try connection to Firebird DB

2010-01-01 Thread Uwe Grauer
Peter Panczyk wrote:
 Hi Adrian,
 
 this is the patch for kinterbasdb, I got it from internet...
 
 Regards
 Peter
 
 

If you use kinterbasdb 3.3, you don't need a patch.
Get it from:
http://firebirdsql.org/index.php?op=develsub=python

Do you still get errors?

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4b3e1858.40...@googlemail.com


Re: [dabo-users] Connetion Editor crashing when try connection to Firebird DB

2009-12-30 Thread Uwe Grauer
Peter Panczyk wrote:
 Hi,
 
 I'm completely new in Dabo and try to evaluate, if can can use this
 promising framework.
 
 Right now I have 2 problems:
 
 1) when I try to connect to a local or server Firebird DB with
the Connection Editor (as well as Class Designer) the program
is crashing, no error message etc.
When I connect to the MySQL DB at dabodev.com, it works fine.
 
The kinterbasedb is available and working correct on FireBird 2.0
and after pathing also with FireBird 2.1.
 
 2) When I test with the connection editor and the program daboconsult,
I can run the program within the connection editor.
But when I run the program from the command line or with Boa Constructor
or with Komodo, I get an error message:
 
File C:\Programme\Dabo 
 Runtime\ide\wizards\AppWizard\daboconsult\ui\FrmMain.py, line 23, in 
 fillFileOpenMenu
fileMenu.prependMenu(MenFileOpen(fileMenu))
AttributeError: 'NoneType' object has no attribute 'prependMenu'
 
 where the code is:
 
def fillFileOpenMenu(self):
   Add the File|Open menu, with menu items for opening each form.
   app = self.Application
   fileMenu = self.MenuBar.getMenu(File)
   fileMenu.prependMenu(MenFileOpen(fileMenu))
 
 Would be happy, if I could pass these starting problems.
 
 
 /*Peter Panczyk*/
 f+p datensysteme gmbh

Welcome Peter,

I might be able to help with your connection errors to Firebird if you
give more infos on your used versions.
So which version of Python, kinterbasdb, Dabo, wxPython are you using?
What connection parameters did you specify in the Connection Editor?

I do not understand what you mean with the following:
The kinterbasedb is available and working correct on FireBird 2.0
and after pathing also with FireBird 2.1.
What do you mean with after pathing?

Please do not run Dabo programs from within Komodo or Boa because some
IDEs can change the environment in a way which could prevent Dabo from
normal function.

I also don't know anything about the program daboconsult.
Do you use the Runtime version of Dabo?
I think the runtime doesn't use any localy installed kinterbasdb module.
How did you test if kinterbasdb is working within the Dabo runtime?

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4b3b5245.7060...@googlemail.com


Re: [dabo-users] Connetion Editor crashing when try connection to Firebird DB

2009-12-30 Thread Uwe Grauer
Adrian Klaver wrote:
 On Wednesday 30 December 2009 6:08:00 am Peter Panczyk wrote:
 Hello Uwe,

 /So which version of Python, kinterbasdb, Dabo, wxPython are you using?
 What connection parameters did you specify in the Connection Editor?
 /
 I use those versions:
 - python 2.5.4 on win32
 - wxPython2.8-win32-unicode-2.8.9.1-py25
 - Dabo Version: Version 0.9.2; Revision ~5568
 - UI Version: 2.8.10.1 on wxMSW
 - kinterbasdb-3.2.win32-FB-2.0-py2.5
 - Firebird-2.0.1.12855-1-Win32.exe *or*
 - Firebird-2.1.2.18118_0_Win32

 I made a small Python program to connect to a Firebird DB 2.1, that
 did not work.
 The same program with the Firebird 2.0 was working.
 After some search in internet I used a pa*t*ch for the kinterbasdb
 __init__.py, which solved the problem with Firebird 2.1.
 

You should use kinterbasdb 3.3.0 from:
http://firebirdsql.org/index.php?op=develsub=python

The 3.3.0 version of kinterbasdb is working nice for me!
There were known problems with 3.2.x.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4b3ba52e.3020...@googlemail.com


Re: [dabo-users] Connetion Editor crashing when try connection to Firebird DB

2009-12-30 Thread Uwe Grauer
Peter Panczyk wrote:
 Hi Adrian,
 
 I tried both slash versions...
 
 Regards
 Peter
 
 
 Adrian Klaver schrieb:
 On Wednesday 30 December 2009 6:39:37 am Adrian Klaver wrote:

   
 For test with the Connection Editor, I used those for example:

 Database Type  Firebird
 Host   localhost
 Port   3050
 Database   e:/fbver/fbver.fdb
 Username   sysdba
 Password   masterkey
   

It's better to use database aliases where you can use something like:
 Database   fbver
As the database admin you can add an alias definition to your
aliases.conf (usually found in your firebird root directory):
fbver = e:\fbver\fbver.fdb

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4b3ba68f.20...@googlemail.com


Re: [dabo-users] Sub grid/form

2009-11-23 Thread Uwe Grauer
Mike wrote:
 I have a from with two data grids contacted to two different
 datasources/bizobj
 The first is a list of banks
 The second is a list of the accounts at the banks 
 The id of the bank is of course in both datasources
 I wish that the accounts grid only shows accounts for the bank on the
 row selected in the  banks grid
 
 I looked for an event like afterrowselect or oncurrentrow with the
 idea of updating the account bizobj filter then calling the update
 method for the account grid but cant find an suitable event
 What is the best way to do this- what grid event should I use or is
 there a way of expressing the relation between the two business objects
 in the business objects themselves? 
 
 Mike Ayers 

Connect your BankBizobj and your AccountBizobj with:
def createBizobjs(self):
bankBizobj = BankBizobj(self.Connection)
self.addBizobj(bankBizobj)
accountBizobj = AccountBizobj(self.Connection)
accountBizobj.LinkField = bank_iid  # foreign key to bank table
bankBizobj.addChild(accountBizobj)# accounts are childs of bank
self.addBizobj(accountBizobj)

The whole linking between banks and accounts is done by Dabo.
There is no need for manual event processing.


Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4b0a4edf.5090...@googlemail.com


Re: [dabo-users] Cursor SQL Error

2009-11-08 Thread Uwe Grauer
Jacek Kałucki wrote:
 Użytkownik Jacek Kałucki napisał:
 For Firebird this code raises other exception:
   -901, 'begin transaction: \n  invalid parameter in transaction
 parameter block'
 I feel a bit confused...

 
 With Firebird, it was kinterbasdb error (I'm using FB 2.1).
 After patching kinterbasdb.__init__.py it works correctly now.
 But problem with PostgreSQL still remains :)
 

I do not understand why patching kinterbasdb.__init__.py is necessary.
The latest kinterbasdb is working fine for me:
http://firebirdsql.org/index.php?op=develsub=python

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4af6b4d6.9090...@googlemail.com


Re: [dabo-users] Cursor SQL Error

2009-11-08 Thread Uwe Grauer
Jacek Kałucki wrote:
 Użytkownik Uwe Grauer napisał:
 Jacek Kałucki wrote:

 Użytkownik Jacek Kałucki napisał:
  
 For Firebird this code raises other exception:
-901, 'begin transaction: \n  invalid parameter in transaction
 parameter block'
 I feel a bit confused...


 With Firebird, it was kinterbasdb error (I'm using FB 2.1).
 After patching kinterbasdb.__init__.py it works correctly now.
 But problem with PostgreSQL still remains :)

  
 I do not understand why patching kinterbasdb.__init__.py is necessary.
 The latest kinterbasdb is working fine for me:
 http://firebirdsql.org/index.php?op=develsub=python

 
 But I use KInterbasDB 3.2:
  
 https://bugs.launchpad.net/ubuntu/+source/python-kinterbasdb/+bug/369589
 

Now you know that using Kinterbasdb 3.3 might be easier. ;-)

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4af6b909.4020...@googlemail.com


Re: [dabo-users] traceback opening ClassDesigner

2009-10-15 Thread Uwe Grauer
John wrote:
 openSUSE 11.0
 python 2.5
 wxPython 2.8.10
 
 Traceback (most recent call last):
   File /usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py, 
 line 14614, in lambda
 lambda event: event.callable(*event.args, **event.kw) )
   File /home/johnf/dabo/dabo/ui/uiwx/dFormMixin.py, line 187, in 
 _createStatusBar
 if (self.ShowStatusBar
   File /usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py, 
 line 14564, in __getattr__
 raise PyDeadObjectError(self.attrStr % self._name)
 wx._core.PyDeadObjectError: The C++ part of the DesForm object has been 
 deleted, attribute access no longer allowed.
 Traceback (most recent call last):
   File /usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py, 
 line 14614, in lambda
 lambda event: event.callable(*event.args, **event.kw) )
   File /home/johnf/dabo/dabo/ui/uiwx/dFormMixin.py, line 187, in 
 _createStatusBar
 if (self.ShowStatusBar
   File /usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py, 
 line 14564, in __getattr__
 raise PyDeadObjectError(self.attrStr % self._name)
 wx._core.PyDeadObjectError: The C++ part of the dForm object has been 
 deleted, 
 attribute access no longer allowed.
 Traceback (most recent call last):
   File /usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py, 
 line 14614, in lambda
 lambda event: event.callable(*event.args, **event.kw) )
   File /home/johnf/dabo/dabo/ui/uiwx/dFormMixin.py, line 187, in 
 _createStatusBar
 if (self.ShowStatusBar
   File /usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py, 
 line 14564, in __getattr__
 raise PyDeadObjectError(self.attrStr % self._name)
 wx._core.PyDeadObjectError: The C++ part of the dForm object has been 
 deleted, 
 attribute access no longer allowed.
 

I get the above traceback since rev 5454.
Platform: GTK
Python Version: 2.5.2 on linux2
Dabo Version: Version 0.9.2; Revision 5454
UI Version: 2.8.10.1 on wxGTK (gtk2)

I do not get the traceback with rev 5453.

Uwe





___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4ad75987.20...@googlemail.com


Re: [dabo-users] Class Designer Add From Data Environment problem

2009-08-26 Thread Uwe Grauer
Steve Rose wrote:
 I've been hand coding my forms but now I am trying to use the CD.  Hit a
 snag when I tried to add controls from data environment (I right clicked on
 the panel surface in the CD, clicked on Add Controls from Data Environment).
  On the Select Data Connection step, when I click on any connection file
 (even sample), then hit the Next button, nothing happens (I am not taken
 to the next page).
 I know the cnxml files are good because they work properly in the hand coded
 forms.  Any help appreciated.
 Platform: Win
 Python Version: 2.5.1 on win32
 Dabo Version: Version 0.9.1; Revision ~5105
 UI Version: 2.8.7.1 on wxMSW
 

Your version of Dabo is outdated.
Try again after updating to Dabo 0.9.2.

Uwe



___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4a94e180.2040...@googlemail.com


Re: [dabo-users] Translation failure in fresh install

2009-07-21 Thread Uwe Grauer
Paul McNett wrote:
 Rhodri James wrote:
 I've seen this crop up once or twice in the archives, but I'm not sure what
 the solution is from my perspective.
 
 I don't know what the solution is, either. All I know is that everyone 
 that's reported this seems to be running Python 2.6, which we don't 
 really support yet.
 

No, there were people using python 2.6.x on opensuse without that problem.
I think this is a ubuntu 9.x issue.

Uwe



___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4a662588.5070...@googlemail.com


Re: [dabo-users] py2exe failed on AppWizard generated app - ImportError: No module named win32com

2009-07-14 Thread Uwe Grauer
tim awa wrote:
 I generated a one table app using AppWizard.
 
 I then executed buildwin.bat but I got the following error.
 
 c:\dabodev\testpython -OO setup.py py2exe --bundle 3
 running py2exe
 ...
 import win32com
 ImportError: No module named win32com
 

Try again after installing the missing module:
http://pywin32.sourceforge.net/

Uwe



___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4a5c6cd9.8010...@googlemail.com


Re: [dabo-users] VFP keypress and keyboard equivalent

2009-07-13 Thread Uwe Grauer
Roger Gammans wrote:
 On Mon, Jul 13, 2009 at 11:31:55AM +0800, tim awa wrote:
 I wanted to trap a particular keystroke while in a grid column and
 replace it with a two keystroke combination.

 [snip] 
 How to do this in Dabo?
 ...
 You'll need to import the wx module though to have access to the 
 symbolic keycode names.


No, there is no need to import wx.
Dabo has it's own key symbols in ui/uiwx/dKeys.py.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4a5b0da0.9090...@googlemail.com


Re: [dabo-users] Linux Screencasting

2009-06-26 Thread Uwe Grauer
Roger Gammans wrote:
 I ask because mplayer which knows how to extract videos from sf, doesn't
 seem to know about the vnc format. - and I won't have flash installed on
 my desktop, so I can't watch the screencasts on the site.

Vlc (http://www.videolan.org/) can play most video formats including flv.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4a44efa8.1030...@googlemail.com


Re: [dabo-users] Vista/7 dPage Visibility problem

2009-05-07 Thread Uwe Grauer
alta...@ceid.upatras.gr wrote:
 I have encountered a problem running a dabo application in windows 7 (but
 I suppose it would be the same in Vista).
 
 I have in my dForm's (my main form) afterInitAll(), this line:
 
 self.ListPage.Visible = False
 
 which works in Linux but not in windows. ListPage is the RegID of a dPage
 in a dPageFrame I have.

Does it work on Win2000 or WinXP?
I guess windows 7 is to new to be supported.

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4a033cb9.9080...@googlemail.com


Re: [dabo-users] dDateTextBox: date not changed, if popup calendar is used

2009-04-29 Thread Uwe Grauer
Sibylle Koczian wrote:
 Hello,
 
 in my application I've got a dDateTextBox connected to a data field
 which is NULL when the application starts and which is then filled in,
 usually with a date some days past. This works correctly (the right day
 gets into the database table), if I enter the date directly, not using
 the shortcuts. It works correctly if I enter 'T' and then '-' as often
 as necessary.
 
 But if I enter 'C' to open the popup calendar and choose the day there,
 then I get the chosen date into the dDateTextBox, but the current date
 into the database table.
 

I see the same behavior with rev 5182.
I see no need to test with a different database.

If you use +/- after changing via 'C' the db value gets updated.
I also tested it with different lang settings.
I'm sure it's a bug with dDateTextBox.

Please add a ticket for this so it doesn't get forgotten.

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49f8472a.1030...@googlemail.com


Re: [dabo-users] Childs are not created

2009-04-29 Thread Uwe Grauer
freek verstringe wrote:
 
 However, now I have the following problem: The save button works, the
 delete button too, but when I create a new item, the children of the
 item are not automatically created. I was wondering whether this is
 the default behaviour and what to do about it.
 

Try to set parentBizobj.NewChildOnNew = True.
How do you trigger the new records?
Do you call form.new()?

Uwe
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49f8ae4f.70...@googlemail.com


Re: [dabo-users] What happens after self.Form.new()

2009-04-22 Thread Uwe Grauer
Paul McNett wrote:
 freek verstringe wrote:
 It is attached to a datasource, but how else can I prefill my new Form?
 Any suggestion?
 
 Don't prefill your new form (ui layer), but prefill your new record in the 
 bizobj 
 (biz rule layer).

To do that you would use a default value for your bizobj:
class MyBizobj(dabo.biz.dBizobj):
def initProperties(self):
self.DefaultValues['regprod'] = ddd

You could also overwrite you bizobjs new() method.

Uwe



___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49ef6eef.2030...@googlemail.com


Re: [dabo-users] What happens after self.Form.new()

2009-04-22 Thread Uwe Grauer
freek verstringe wrote:
 yes it is
 
 johnf schreef:
 On Wednesday 22 April 2009 12:31:57 pm freek verstringe wrote:
   
 Hmm, actually I was trying to prefill with the last defined in database
 and then adding 1 to the id...

 
 is this an auto-incremment type field?

class MyBizobj(dabo.biz.dBizobj):
def initProperties(self):
self.DataSource = MYTABLE
self.KeyField = regprod

# (field_alias, field_type, pk, table_name, field_name, field_scale)
self.DataStructure = (
(regprod, N, True, MYTABLE, regprod),
(f1, M, False, MYTABLE, f1),
...
)

#self.DefaultValues['field_name'] = value_or_function_object
self.Encoding = 'UTF-8'


def afterInit(self):
self.DataSource = MYTABLE
self.KeyField = regprod
self.addFrom(MYTABLE)
self.addField(regprod)
self.addField(f1)

If you define your bizobj sililar to the above, Dabo will fille the pk
for you. Of cause you will have to define your table DDL accordingly
as a autoincrement pk.

BTW: Please do not top post as it makes reading harder.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49ef7790.7010...@googlemail.com


Re: [dabo-users] What happens after self.Form.new()

2009-04-22 Thread Uwe Grauer
freek verstringe wrote:
 Anyway, in one of my previous posts I suggested that if in future I can 
 do some translations to dutch, although I am not a professional.
 Don't know if it got through; so here it is again.

Dabo translations can be done on launchpad:
https://translations.launchpad.net/dabo

It would be nice to get the dutch translations:
https://translations.launchpad.net/dabo/trunk/+pots/dabo

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49ef87ce.8000...@googlemail.com


Re: [dabo-users] Looking for path to python

2009-04-21 Thread Uwe Grauer
Pete Theisen wrote:
 
 I seem to not be able to cd into it:
 
 p...@pete-desktop:~$ cd /home/pete/desktop/dabo
 bash: cd: /home/pete/desktop/dabo: No such file or directory
 p...@pete-desktop:~$ cd dabo
 bash: cd: dabo: No such file or directory
 p...@pete-desktop:~$
 
 It shows on the screen, but I can't get in it.
 

You seem to be able to read!
How is it called on the screen?
I bet it is called Desktop instead of desktop, so try again.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49ed7106.1010...@googlemail.com


Re: [dabo-users] Composite primary key

2009-04-21 Thread Uwe Grauer
Sibylle Koczian wrote:
 Yes, thank you, it works. But regarding the null PK value: the database
 _doesn't_ allow null values for any of the two fields in the PK. I don't
 know why pkExpression() seems to get no valid record at this point, I
 can't see any reason in the database content or in my code (this last
 might be wrong, of course). Should I post more of that?

If you think that it depends on dbFirebird.py, please let me know.
I never had the need for composite primary keys.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49ee1d0c.4070...@googlemail.com


Re: [dabo-users] Looking for path to python

2009-04-21 Thread Uwe Grauer
Pete Theisen wrote:
 On Sun, 2009-04-19 at 14:44 +0200, Uwe Grauer wrote:
 
 sudo python setup.py install
 After that you should be able to import dabo from the python interpreter.
 Change to your dabo/ide directory and try the dabo apps:
 python Editor.py
 python Classdesigner.py
 
 Hi Uwe!
 
 After I got Desktop spelled right I re-entered the command and it ran
 for a while doing all kinds of stuff, more than the buffer holds, then
 gave me a prompt. Still won't do the commands you suggest, though, even
 when I spell it all right.
 
 p...@pete-desktop:~/Desktop/dabo$ python
 Python 2.5.2 (r252:60911, Oct  5 2008, 19:24:49) 
 [GCC 4.3.2] on linux2
 Type help, copyright, credits or license for more information.
 import dabo
 Editor.py
 Traceback (most recent call last):

You managed to import dabo without errors!

Next you should read a book to get started:
http://www.amazon.com/Python-Dummies-Computer-Tech/dp/0471778648

;-)

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49ee2054.3090...@googlemail.com


Re: [dabo-users] Executing stored procedure - how?

2009-04-20 Thread Uwe Grauer
Sibylle Koczian wrote:
 Uwe Grauer schrieb:
 The cursor holds any available resultset of the sql statement used.
 The connection which can have multiple active cursors (result sets)
 is the owner of the current transaction.
 If you want to execute a executable stored procedure you want to use
 a tempCursor of your bizobj.
 If you would use the normal cursor, you might destroy your current
 dataset. If this stored procedure changes your underlying data you would
 have to requery the bizobj.

 
 You're quite right. And even if the current dataset might survive, it
 wouldn't be useful: it wouldn't know anything about the effects of the
 procedure on the data. So requerying is necessary in any case. I had
 vague thoughts of doing without that.
 
 Now suppose my database is or should be _only_ accessed via stored
 procedures for inserting, updating, deleting. A Dabo application for
 such a database would mean overwriting new(), save(), delete(), right?
 
 Thank you,
 Sibylle
 

If would mean overwriting new(), save(), delete() of your bizobj.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49ec18c9.9080...@googlemail.com


Re: [dabo-users] Looking for path to python

2009-04-20 Thread Uwe Grauer
Pete Theisen wrote:
 Uwe Grauer wrote:
 
 You imply that there is a downside to subversion. I am interested in 
 your thoughts on that, if you care to share :-)

 Not sure I have subversion on that box, away from it at the moment.
 Just cd into your dabo directory where you have the script setup.py.
 then enter:
 sudo python setup.py install
 After that you should be able to import dabo from the python interpreter.
 Change to your dabo/ide directory and try the dabo apps:
 python Editor.py
 python Classdesigner.py
 ...
 
 Hi Uwe!
 
 Should the dabo directory be parallel to the python directory or should 
 it be a subdirectory of the python directory. As it is, it is on the 
 desktop right now.

python setup.py install will place a copy of the Dabo library below the
python site-packages directory which is usually
/usr/lib/python2.5/site-packages/dabo.
The contents of the dabo/ide directory where the Dabbo apps live can be
placed anywhere where you want it.

There is no such thing as on the desktop. It's a filesystem and the
on the desktop files are usually in the directory /home/pete/Desktop.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49ec1ba1.5040...@googlemail.com


Re: [dabo-users] Looking for path to python

2009-04-19 Thread Uwe Grauer
Pete Theisen wrote:
 Sibylle Koczian wrote:
 
 So Dabo isn't yet correctly installed. You can find installation
 instructions on the Dabo Download page or in the Dabo wiki (but the
 latter are for using Subversion, I don't know if you want to do that).
 
 Hi Dr. Sibylle!
 
 I see the subversion instructions, but not the non-subversion 
 instructions. There is a routine that starts out without subversion, but 
 gets into subversion before it is done.
 
 You imply that there is a downside to subversion. I am interested in 
 your thoughts on that, if you care to share :-)
 
 Not sure I have subversion on that box, away from it at the moment.

Just cd into your dabo directory where you have the script setup.py.
then enter:
sudo python setup.py install
After that you should be able to import dabo from the python interpreter.
Change to your dabo/ide directory and try the dabo apps:
python Editor.py
python Classdesigner.py
...

Uwe



___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49eb1cbd.6070...@googlemail.com


Re: [dabo-users] Error when Creating

2009-04-18 Thread Uwe Grauer
freek verstringe wrote:
 Best Dabo-Users,
 
 in the class designer I came across the following error.
 This is generated after doing an Add control from Data Environment in 
 the last step of the wizard.
 I'm running on Windows XP python 2.5.
 The error has probably something to do with the code on
   File C:\py\dabo\dabo\ide\ClassDesignerFormMixin.py, line 858, in 
 addBizobjCode
 Although I do not understand very well what is happening over there.
 
 Hope to find a solution,
 Freagel.

Whenever you seek help for errors you are getting it is crucial to know
which revision of Dabo you are using.
You get at this information in all Dabo apps by using the menuentry
Help/About. The button Copy Info allows you to copy the displayed
info. Paste the info into your mail. It's also nice to know if you are
using the svn version or if you use the downloaded/webupdated version.

Uwe




___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49e99f0c.2080...@googlemail.com


Re: [dabo-users] Did I do it?

2009-04-17 Thread Uwe Grauer
Pete Theisen wrote:
 Hi Everybody!
 
 It all should be here, but I can't get it to work:
 
 p...@pete-desktop:~$ python
 Python 2.5.2 (r252:60911, Oct  5 2008, 19:24:49)
 [GCC 4.3.2] on linux2
 Type help, copyright, credits or license for more information.
 exit
 Use exit() or Ctrl-D (i.e. EOF) to exit
 ...
 p...@pete-desktop:~$ sudo /pete/desktop/python setup.py install
 sudo: /pete/desktop/python: command not found
 p...@pete-desktop:~$

What is your question?

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49e82dc5.4070...@googlemail.com


Re: [dabo-users] Executing stored procedure - how?

2009-04-17 Thread Uwe Grauer
Sibylle Koczian wrote:
 johnf jfabi...@yolo.com schrieb:
 On Friday 17 April 2009 08:08:57 am Sibylle Koczian wrote:
 Additional question: the procedure I'm executing with the temporary
 cursor is executable, not selectable, so it doesn't return data. Would
 using the existing cursor wipe out the current dataset even in that
 case? At the moment I call requery() after executing the procedure,
 because I need the newly inserted data in my bizobj.
 No - a temp cursor is independent of the bizobj that created it.  So 
 newTempCursor = self.PrimaryBizObj.getTempCursor() is completely independent 
 of the primary bizobj.

 
 Yes - but I want to know something else: what happens to my existing
 dataset, if I execute a stored procedure (executable, not selectable)
 with the execute method of the bizobj, not with a temporary cursor? 

The cursor holds any available resultset of the sql statement used.
The connection which can have multiple active cursors (result sets)
is the owner of the current transaction.
If you want to execute a executable stored procedure you want to use
a tempCursor of your bizobj.
If you would use the normal cursor, you might destroy your current
dataset. If this stored procedure changes your underlying data you would
have to requery the bizobj.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49e8f209.5010...@googlemail.com


Re: [dabo-users] Mysql

2009-04-16 Thread Uwe Grauer
fv sdfsaer wrote:
 Dear Ed,
 
 Tried both,
 
 Stops with the message
 'could not find file'
 (something like that)
 At least no usefull information. Although I noticed that the current source 
 also tries to capture some registry keys with the same error message.
 

But you know that you have to install the mysql client prior to the
python driver?

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49e75001.5030...@googlemail.com


Re: [dabo-users] Mysql

2009-04-16 Thread Uwe Grauer
Ed Leafe wrote:
 On Apr 16, 2009, at 11:18 AM, Sibylle Koczian wrote:
 
 I think you probably need a client install of MySQL. That would give
 you the needed dll (don't know about header files, never tried to
 compile anything from source in Windows). I think Ubuntu pulls in
 packages for such a client install as dependencies when you install
 mysqldb, Windows is less helpful.
 
   FWIW, I've configured several Windows VMs using only the binary  
 MySQLdb installer. I did not install any special MySQL client  
 software. Same is true for kinterbasdb and psycopg. The binary  
 installers are supposed to contain all of that for you.
 

Ed, you are wrong at least for kinterbasdb.
The fbclient library is never included in any of the available installers:
http://www.firebirdsql.org/index.php?op=develsub=python

Where can i get the binary MySQLdb installer you are talking about?

Where is the the binary psycopg2 windows installer?

Does The binary installers are supposed to contain all of that for
you. mean that you are just guessing?

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49e77901.9080...@googlemail.com


Re: [dabo-users] Mysql

2009-04-16 Thread Uwe Grauer
johnf wrote:
 On Thursday 16 April 2009 11:29:21 am Uwe Grauer wrote:
 Where is the the binary psycopg2 windows installer?
 
 http://www.stickpeople.com/projects/python/win-psycopg/

I have installed postgresql 8.3.7.
I'm missing the binary for this one.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49e78c1b.6060...@googlemail.com


Re: [dabo-users] MYSQL-python-1.2.2.tar.gz

2009-04-16 Thread Uwe Grauer
Pete Theisen wrote:
 Hi Everybody!
 
 I downloaded MySQL-python-1.2.2.tar.gz 85.KB - sourceforge.net.
 Interesting that I had to install the flash plug-in before I could see
 the download dialog box. This was at the link from the dabo
 prerequisites page.
 
 Somehow, I have an idea that there is more to it than just this . . .
 

You should be able to get python-mysqldb from the ubuntu repositories.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49e796eb.6090...@googlemail.com


Re: [dabo-users] Using Application Information

2009-04-15 Thread Uwe Grauer
Manoharan Durga wrote:
 Now, when I try this (after having the 'import App from App' on top), I 
 get an error
 
 myplace = App.getAppInfo(directory)
 TypeError: unbound method getAppInfo() must be called with App instance 
 as first argument (got str instance instead)
 

When you do import App from App you are importing the class
definition. What you need to get at the information via getAppInfo() is
a instance of that App class.
myapp = App()
myplace = myapp.getAppInfo(directory)

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49e58c31@googlemail.com


Re: [dabo-users] Executing stored procedure - how?

2009-04-15 Thread Uwe Grauer
Sibylle Koczian wrote:
 Uwe Grauer schrieb:
 Sibylle Koczian wrote:
 Uwe Grauer schrieb:
 Instead of calling self.delete(startTransaction=False) you will need to
 call execute for your stored proc.
 It will work for a tempCursor and for the normal cursor, but i would use
 a tempCursor.

 Execute doesn't take a parameter startTransaction, so I suppose I need
 beginTransaction() and commitTransaction() (or rollbackTransaction()),
 right?

 With your example I hope I get this going.
 exucute() isn't a Dabo method, it's from kinterbasdb, so there is no
 startTransaction parameter. You have to do it yourself.
 
 But the tempCursor has execute(), beginTransaction(),
 commitTransaction(), rollbackTransaction() - Dabo methods or not? And
 there is dBizobj.executeSafe, which uses an auxiliary cursor. Where is
 the difference between using that and using getTempCursor()?
 
 To keep Dabo from messing with the current transaction you will have to
 use Dabos _getTransactionToken(), _releaseTransactionToken() methods.

 
 But shouldn't the methods mentioned above manage the current and the new
 transaction correctly, without me using internals?
 
You have to use the internals because execute in Dabo doesn't do
transaction handling.

Dabo doesn't use the database terminology.
A transaction is something bound to the connection not to the cursor.
Tying the transaction logically to the cursor is wrong!

The logic is as follows:
- get a connection
- start a transaction for your connection
- execute a sql command
- commit or rollback your transaction

Dabo does this for you if the method has a parameter startTransaction.
saveAll, save, deleteAllChildren, delete and deleteAll do transaction
handling.
If you want to do transaction handling for a execute call, you have to
do this on your own like i showed in my bizobj method deleteCurrentRecord().
Because a transaction is bound to a connection, it doesn't matter if you
use the regular curser, a tempCursor or a auxilary cursor.
The connection is the owner of the current transaction.
Because Dabo doesn't do transaction handling for execute, you have to do
this yourself.

Look at dBizobj.commitTransaction():
def commitTransaction(self):
# ...
ret = self._hasTransactionToken() and
  self._CurrentCursor.commitTransaction()
if ret:
  self._releaseTransactionToken()
return ret

self._CurrentCursor.commitTransaction() only gets called if the bizobj
is the owner of the transaction token.
If you do not make sure that the bizobj owns the transaction token, the
commit never gets called.

The code below is all wrong because you didn't do what i showed you
in my code example. If your insert or delete in your stored proc is
working for you, this might be a side effect of other calls.
But it is still the wrong way to do it.

 I've tried two ways (both methods in my bizobj code):
 
 def callmyproc(self, params):
   sql = EXECUTE PROCEDURE myproc(?,..?)
   isOk = self.beginTransaction()
   if not isOk:
 ...
 return False
   try:
 self.executeSafe(sql, params)
   except dabo.dException.DBQueryException, ex:
 ...
 ret = self.rollbackTransaction()
   else:
 ...
 ret = self.commitTransaction()
   return ret
 
 Or using a temporary cursor:
 
 def callmyproc(self, params):
   sql = EXECUTE PROCEDURE myproc(?,..?)
   crs = self.getTemporaryCursor()
   try:
 crs.execute(sql, params)
   except dabo.dException.DBQueryException, ex:
 ...
 ret = crs.rollbackTransaction()
   else:
 ...
 ret = crs.commitTransaction()
   return ret
 
 What I don't understand about the temporary cursor: the return value of
 crs.beginTransaction() always seems to be False, so I took this out of
 the second method.
 

It just means that there already is a started transaction.

 In all cases I get the data into the table, and I get exceptions where I
 expect them (intentional violations of unique constraints or referential
 integrity).
 
 BTW, dBizobj.save() seems to save everything in the bizobj and to
 commit. So it looks as if another way to get data into a table via
 executable procedure might simply be this:
 
 crs.execute(sql, params) # or self.executeSafe, to get the data into the
 table, but uncommitted
 self.requery() # to get the new data into the bizobj
 self.save() # now everything is saved again and committed
 
 But this was an unintentional side effect of calling save() at the wrong
 moment. I doubt it's the right way to go about this. The little test
 application I've got working at the moment doesn't use save() at all.
 

Forget what save() does. If there is another bizobj which owns the
transaction token, calling commitTransaction doesn't do what you expect.

Maybe i still did not make it clear in english.
Should i try in german?

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com

Re: [dabo-users] Table alias problem?

2009-04-12 Thread Uwe Grauer
Sibylle Koczian wrote:
 Hello,
 
 at the start of the application I get this error:
 
 (-206, 'isc_dsql_prepare: \n  Dynamic SQL Error\n  SQL error code =
 -206\n  Column unknown\n  EMPLOYEE_PROJECT.PROJ_ID\n  At line 8, column 9')
 SQL: SELECT  first 1000
 epr.EMP_NO,
epr.PROJ_ID,
employee.FIRST_NAME,
employee.LAST_NAME
   from employee_project as epr
  inner join employee on epr.EMP_NO = employee.EMP_NO
  where  employee_project.PROJ_ID = 'VBASE'
 

Which version of Firebird are you running?
Did you try the same query with flamerobin or isql?

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49e1c34f.8030...@googlemail.com


Re: [dabo-users] Table alias problem?

2009-04-12 Thread Uwe Grauer
Sibylle Koczian wrote:
 Uwe Grauer schrieb:
 As the query is built by Dabo I'm afraid this is a bug. Should I create
 a ticket in the tracker?
 

This would have been my next question.
Yes, please add a ticket.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49e230c5.2070...@googlemail.com


Re: [dabo-users] Pure Objects - How Would One Do This

2009-04-09 Thread Uwe Grauer
johnf wrote:
 On Thursday 09 April 2009 08:30:40 am Sibylle Koczian wrote:
 But if the DBMS supports triggers, inserting into a view (or rather into
 the tables it comes from) can be done that way and isn't really black
 art. Or what do I overlook?
 
 How do you setup a trigger on a view?  Or are you saying that you can execute 
 functions/store procedures to get the same result?
 

If you have a natural updatable view you don't need triggers.
For views based on joined tables you can define triggers to update the
right tables (at least in Firebird).
You define before/after insert/update/delete triggers for views just
like you would do for tables.

I don't know if this is always possible for other database systems, but
most dbs should have such concepts.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49de252b.40...@googlemail.com


Re: [dabo-users] Pure Objects - How Would One Do This

2009-04-09 Thread Uwe Grauer
Sibylle Koczian wrote:
 At second or third reading I see that the Firebird Book talks about
 this Firebird feature, so perhaps other DBMS don't have it. It's quite
 simple:
 
 CREATE TRIGGER MyView_Update FOR MyView ACTIVE BEFORE UPDATE 
 AS
 BEGIN
 statements here update the base tables as required
 END
 
 Is this really a Firebird feature? 

Oracle can do this too.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49de3c82.9030...@googlemail.com


Re: [dabo-users] Class Desiner Bug?

2009-04-09 Thread Uwe Grauer
Craig wrote:
 Hi All,
 
 This is what my CD screen look like right now.  The cdxml file is
 attached.

Next time you know that attachments are not allowed in this list. ;-)

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49de4cbf.3080...@googlemail.com


Re: [dabo-users] Executing stored procedure - how?

2009-04-07 Thread Uwe Grauer
Sibylle Koczian wrote:
 Uwe Grauer schrieb:
 Instead of calling self.delete(startTransaction=False) you will need to
 call execute for your stored proc.
 It will work for a tempCursor and for the normal cursor, but i would use
 a tempCursor.

 
 Execute doesn't take a parameter startTransaction, so I suppose I need
 beginTransaction() and commitTransaction() (or rollbackTransaction()),
 right?
 
 With your example I hope I get this going.

exucute() isn't a Dabo method, it's from kinterbasdb, so there is no
startTransaction parameter. You have to do it yourself.
To keep Dabo from messing with the current transaction you will have to
use Dabos _getTransactionToken(), _releaseTransactionToken() methods.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49db4780.9000...@googlemail.com


Re: [dabo-users] Executing stored procedure - how?

2009-04-06 Thread Uwe Grauer
Sibylle Koczian wrote:
 Hello,
 
 I thought I knew how to execute a stored procedure in a Dabo
 application, but that was an error (probable reason: my first working
 application uses a SQLite database).
 
 I'm using a temporary cursor, like this, in a method of my bizobj:
 
 def nextMach(self, neubemerk=None):
 idst = self.getFieldVal('idst')
 gemacht = self.Record.gemacht
 crs = self.getTempCursor()
 try:
 crs.execute('EXECUTE PROCEDURE sp_naechstesmal(?, ?, ?)',
 (idst, gemacht, neubemerk))

params=(idst, gemacht, neubemerk)
crs.execute(sqlstr, params)

 except dabo.dException.DBQueryException, ex:
 dabo.ui.exclaim(str(ex), Keine Termin-Automatik)
 self.requery()
 
 The procedure should insert a new record into the table belonging to the
 bizobj. The DatabaseActivityLog shows that it is executed, but
 afterwards the new record isn't in the table.
 
 Database is Firebird, and I suppose the transaction simply has to be
 committed. Is dBizobj.commitTransaction() the right method or is there a
 separate commit method for the temporary cursor? And do I need
 dBizobj.startTransaction() first?
 
 And is a temporary cursor the right way?
 
 Suppose the database has stored procedures for all inserts, updates,
 deletes. How to use that with a Dabo bizobj, which doesn't let me define
 my own insert, update, delete statements?
 
 Thank you,
 Sibylle
 

Firebird needs transactions (even for selects)!

In order to get you going i just show how i use a userdefined bizobj method:

class MyBizobj(dabo.biz.dBizobj):

def deleteCurrentRecord(self, startTransaction=True):
cursor = self._CurrentCursor
isTransactionManager = False
if startTransaction:
isTransactionManager = self._getTransactionToken()
if isTransactionManager:
cursor.beginTransaction()
try:
self.delete(startTransaction=False)
if isTransactionManager:
cursor.commitTransaction()
self._releaseTransactionToken()
all_ok = 1
except dException.DBQueryException, e:
if isTransactionManager:
cursor.rollbackTransaction()
self._releaseTransactionToken()
raise dException.DBQueryException, e
except StandardError, e:
if isTransactionManager:
cursor.rollbackTransaction()
self._releaseTransactionToken()
raise StandardError, e


Instead of calling self.delete(startTransaction=False) you will need to
call execute for your stored proc.
It will work for a tempCursor and for the normal cursor, but i would use
a tempCursor.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49da2cae.9050...@googlemail.com


Re: [dabo-users] Executing stored procedure - how?

2009-04-06 Thread Uwe Grauer
Uwe Grauer wrote:
 
 params=(idst, gemacht, neubemerk)
 crs.execute(sqlstr, params)
 

Forget the above note, your call was correct.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49da2da9.9080...@googlemail.com


Re: [dabo-users] dGrid.autoSizeCol doesn't work

2009-04-06 Thread Uwe Grauer
Sibylle Koczian wrote:
 Hello,
 
 I've got a dGrid in my main form, and in the afterInitAll() method I
 call autoSizeCol('all') after self.requery():
 
 def afterInitAll(self):
 biz = self.getBizobj('t_stamm')
 biz.setParams(self.enddatum)
 self.requery()
 self.grStammID.autoSizeCol('all')
 
 But in fact every time I open the application one of the columns is much
 too small, the other two are wider than necessary.
 
 Platform: GTK
 Python Version: 2.6 on linux2
 Dabo Version: Version 0.9.1; Revision 5171M
 UI Version: 2.8.8.1 on wxGTK (gtk2)
 
 Could this be another Python 2.6 problem? Or should I try to get a newer
 wxGTK (I'm using openSUSE 11.1)?

I don't know if your bug has to do with the wxGTK version, but
the Packman repos have 2.8.9.2:
http://packman.links2linux.de/package/wxWidgets

Here is what i'm using now:
wxWidgets-docs-2.8.9.2-0.pm.2
python-wxGTK-wxtools-2.8.9.2-0.pm.2
wxWidgets-devel-2.8.9.2-0.pm.2
wxWidgets-compat-2.8.9.2-0.pm.2
wxWidgets-gl-2.8.9.2-0.pm.2
wxWidgets-2.8.9.2-0.pm.2
python-wxGTK-2.8.9.2-0.pm.2
wxWidgets-gl-compat-2.8.9.2-0.pm.2
wxWidgets-lang-2.8.9.2-0.pm.2

You can add packman via Yast/Software Repositories/Add/Community
Repositories.

Uwe

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49da2fb8.9080...@googlemail.com


Re: [dabo-users] dDateTextBox: Shortcuts don't work, if box shows None

2009-04-06 Thread Uwe Grauer
Ed Leafe wrote:
 On Apr 6, 2009, at 4:29 PM, Uwe Grauer wrote:
 
 I believe that the problem is that the textbox contains the string
 'None', and the keys are only set to have an effect if the current
 contents of the control is a valid date. Try deleting the 'None'
 string and then type 'T' to see if the current date is inserted.
 After deleting the 'None' string and typing 'T' or 'C' the field
 contains the typed 'T' or 'C'.
 It clearly looks like a bug.
 
   If you delete the None string and enter a valid date string, do the  
 keys start working then?

Yes.



___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49da781c.8060...@googlemail.com


Re: [dabo-users] Editor Not Saving

2009-03-31 Thread Uwe Grauer
Jeff Johnson wrote:
 I can't seem to save or save as in the Editor.  I am saving the .py file 
 in a different folder, but that shouldn't be an issue.  I am saving a py 
 file in /home/jeff/Development/projects/hours/biz
 

I can confirm the bug for:

Platform: GTK
Python Version: 2.5.2 on linux2
Dabo Version: Version 0.9.1; Revision 5133
UI Version: 2.8.9.2 on wxGTK (gtk2)

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49d24561.5030...@googlemail.com


Re: [dabo-users] Editor Not Saving

2009-03-31 Thread Uwe Grauer
Nate Lowrie wrote:
 Do you have permission on the folder and does the folder exist?  Do
 you get an error or log message when you save?
 

Yes ( have permission)
Yes (folder exists)
No (no error)
No (no log message)

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49d2460f.7010...@googlemail.com


Re: [dabo-users] ClassDesigner

2009-03-24 Thread Uwe Grauer
Paul McNett wrote:
 wxPython isn't working yet with Python 2.6, so you need to use Python 2.5 
 with the 
 class designer, dabo, and wxpython.

Seems to be a bug with windows:
http://leafe.com/archives/byMID/49bf5dbc.6010...@googlemail.com

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49c96592.6020...@googlemail.com


Re: [dabo-users] Dabo 0.9.1 ran webupdate now broken

2009-03-21 Thread Uwe Grauer
Frank Cazabon wrote:
 Hi Ed,
 
 I am now getting this problem too!  I had initially installed this on an 
 old machine just for testing purposes, but yesterday decided I'd install 
 it on my main machine and have hit similar problems.  Note: I am 
 installing on XP as an admin and haven't had any of the permission 
 errors reported in this thread.
 

Frank, it's quite hard to follow your mails.
Would you please stop top posting?
It's often better to only quote relevant parts of mails instead of
asking new questions on top of unrelated things.
I guess you will get better answers too.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49c4c81a.6040...@googlemail.com


Re: [dabo-users] Dabo 0.9.1 ran webupdate now broken

2009-03-21 Thread Uwe Grauer
Frank Cazabon wrote:
 
 what's wrong with top posting?  Isn't that how email is supposed to 
 work?  (I'm not being argumentative, as you can see I've taken your 
 request seriously.)  It always irritates me that I have to scroll 
 through all the quotations of the previous emails to get to the bottom 
 where the new text/message is.
 
 My question is related to the one that I responded to.
 

If only the relevant parts are quoted you won't have to scroll that
much. I don't see how quoting the whole post and writing new stuff
on top of it is going to help the readers.

More about different posting styles:
http://en.wikipedia.org/wiki/Posting_style

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49c4ce18.6060...@googlemail.com


Re: [dabo-users] Dabo 0.9.1 ran webupdate now broken

2009-03-21 Thread Uwe Grauer
Frank Cazabon wrote (not):
 If only the relevant parts are quoted you won't have to scroll that
 much. I don't see how quoting the whole post and writing new stuff
 on top of it is going to help the readers.


The above was my text and because you didn't show this, now it looks
like it was your text - which is bad. As you seem to be using
thunderbird, i'm quite clueless how you did manage this.
Is this caused by a misconfiguration?

 So you would rather I do inline replying like this?  Or bottom posting 
 as I see Ed and Paul seem to do?  I think I tend to do inline posting if 
 I see it as being a point by point comment and if it helps the reader 
 follow what I am saying, but in this case the whole previous message was 
 applicable, so I left it in, just in case anyone wanted to review what I 
 was talking about.  Being new to this list I would like to comply with 
 the standards.

There are different standards.
Sometimes it is better to do inline quoting as you can better see the
answer to a question. Sometimes only quoting the relevant context and do
bottom posting is nicer.

This is an example on how not to do it:
http://leafe.com/archives/byMID/49c4c7cc.4060...@gmail.com

Lots of unrelated text at the bottom to just let others know that it
worked for you to try with a copy of Dabo.

Of cause the talk about posting styles is getting offtopic.
The subject Dabo 0.9.1 ran webupdate now broken doesn't fit either.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49c4d6f1.2030...@googlemail.com


Re: [dabo-users] 'maximum recursion depth

2009-03-15 Thread Uwe Grauer
Ed Leafe wrote:
 On Mar 14, 2009, at 9:55 PM, Carl Karsten wrote:
 
 c...@dv67:~$ ls -l /home/carl/bin/ReportDesigner.py
 lrwxrwxrwx 1 carl carl 43 2009-03-14 21:28 /home/carl/bin/ 
 ReportDesigner.py -
 /home/carl/dabo-trunk/ide/ReportDesigner.py


  rather than './ReportDesigner.py' from the IDE
 directory.

 same thing:
 
 
   OK, there was no indication that this was in fact the same thing.
 
   I'll defer to Paul on this one, as I can run the RD without this error.

I don't get any errors too running it with rev 5129.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49bcd324.6000...@googlemail.com


Re: [dabo-users] Expecting: unicode got:float

2009-03-15 Thread Uwe Grauer
Carl Karsten wrote:
 
 $ sqlite storage.db
 Unable to open database storage.db: file is encrypted or is not a database
 
 I am pretty sure it is not encrypted, and pretty sure that is a db. It is the 
 same db that the Appwizard used to create the app, so it was somehow able to 
 open it and get the table and field names.

You used the wrong sqlite command?
Try sqlite3.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49bd251d.5040...@googlemail.com


Re: [dabo-users] Error when following step by step guide

2009-03-13 Thread Uwe Grauer
Frank Cazabon wrote:
 Thanks Ed,
 
 I'll try it out sometime this weekend.
 
 BTW is the SBS guide complete?  The last paragraph was quite confusing, 
 looking like it is broken in mid sentence:
 

The SBS Guide is not finished yet.

From http://dabodev.com/documentation:

* The Step-By-Step Guide to Dabo Programming: A tutorial that walks
you through creating an application in Dabo. The tutorial is not yet
completed, but is updated regularly, and contains enough information to
get you started.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49ba5768.4050...@googlemail.com


Re: [dabo-users] Dabo 0.9.1 ran webupdate now broken

2009-03-13 Thread Uwe Grauer
Matt Jackson wrote:
 I've worked on this a bit but the answer is elusive and not yet
 determined.
 I'm running on Windows XP SP2 on both my laptop and my desktop.
 The file blocking I fixed, but it did not make a difference in my
 problem.
 
 One thing that is odd is that my results seem to be so inconsistent.
 What I'm doing is I've downloaded a Dabo 9.1 zip file for windows.  I
 create a folder, unzip to that folder.  Then I update my python dabo.pth
 file to point to the location of the dabo module folder.  I update the
 ui\__init__.py file to use wxversion.select(2.8-unicode) just before
 it try's loading wx.  I then run the classdesigner.py from the ide
 folder.  Usually I'm doing it from a command prompt so the error
 messages remain if it the app is unable to successfully open.  


Can you explain why you have to change ui/__init__.py ?
Do you have multiple wx versions installed?

 The part that's inconsistent is that I've only once received the message
 when I run the classdesigner that this appears to be the first time you
 are running dabo do you want to update.  Most times I get no message
 about that.  I then go into preferences and click the update now button.
 

On the first run Dabo creates a preferences file.
It is located in:
c:\Documents and Settings\YourUserDir\Application
Data\Dabo\DaboPreferences.db
You can look at the preferences by using PrefEditor.py.
If you want to start fresh, yust delete DbPreferences.db.

Sorry, i can't help about your permission problems.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49ba94dd.2090...@googlemail.com


Re: [dabo-users] app.MainFormClass = ???

2009-03-11 Thread Uwe Grauer
Sibylle Koczian wrote:
 Hello,
 
 I tried to put the parts of a new Dabo application into the
 subdirectories made by quickStart(), but to code the main form by hand
 and not with the class designer. So I have in the ui subdirectory no
 .cdxml file but a python script, and in the main project directory the
 file main.py. But I don't know how to tell the application the name of
 the main form class - everything I put into
 
 app.MainFormClass = ...
 
 only leads to different error messages. I have put the import statement
 from MyUiScript import MyMainForm into ui/__init__.py, but that didn't
 help. What's the right assignment to app.MainFormClass?

In your ui/__init__.py you should have:
from MyUiScript import MyMainForm

In you main.py you have:
from ui import *

app.MainFormClass = MyMainForm


Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49b7aaf5.5020...@googlemail.com


Re: [dabo-users] best way to filter a cursor

2009-03-09 Thread Uwe Grauer
johnf wrote:
 I have a small table that contains the counties of California and Nevada.  
 
 The data will be used in a dropdown list.  I intend to use the State 
 dropdown to trigger the setting of the where clause of the dropdown for the 
 counties.  
 
 My question what are your thoughts on the best way to filter the cursor based 
 on the selected state.
 
 I see two ways.  One using the dataset - something like
 datasetCursor.execute (select * from dataset where state = '%s' % 
 (self.statecontID.Value))
 
 Or I could set the where clause.
 self.BizObj.setWhereClause(state = '%s' %(self.statecontID.Value))
 
 Your recommendations would be very helpful.

If your result set isn't too big ( 1 second fetch time) i would prefer
to use a whereclause and refetch the records.

BTW better use the dbapi parameter substitution:
self.BizObj.setWhereClause(state = ?)
self.BizObj.setParams(self, (self.statecontID.Value,))

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49b58b0f.9040...@googlemail.com


Re: [dabo-users] Editor.py

2009-03-04 Thread Uwe Grauer
Ricardo Aráoz wrote:
 I've been using dabo's editor today and there are a couple of things I'd
 like to request/know how to set.
 I'd like to be able to choose between converting tabs to spaces or not,
 and how many spaces to a tab, the editor has 2 by default and I'm more
 comfortable with 4, and I always use conversion from tabs to spaces (I
 think is the recommended setting in PEP8(?))
 

If you want to reindent python code according to PEP8, you can use
http://pypi.python.org/pypi/Reindent/0.1.0 which does this for you.

Uwe



___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49ae3a0e.7010...@googlemail.com


Re: [dabo-users] WxGlade and Dabo

2009-03-04 Thread Uwe Grauer
bruno wrote:
 Hi all,
 
 I am a newbee in Dabo's programing and I find it very interesting.
 I should like to know if we can do the form's design with WxGlade and 
 introduce the  XRC 's file in dabo directly or we are obliged to take 
 the Dabo's tool to design the form ?
 

Dabo is a abstraction library on top of wxPython, so using WxGlade/XRC
is not possible.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49ae9964.7090...@googlemail.com


Re: [dabo-users] MultiMenu - cursors

2009-03-04 Thread Uwe Grauer
Ricardo Aráoz wrote:
 Ed Leafe wrote:
 On Mar 3, 2009, at 4:17 PM, Ricardo Aráoz wrote:

 Finally I'd like to report that crsr.getDataSet() is not as comfortable
 as it might be. Sometimes the key will be only 'Name' (in the example
 above), some other times it will be 'menu.name' (notice in the previous
 case 'Name' was cased) but some other times I use menu.name in the query
 and the key will be 'Name'. So I haven't found a rule for the naming of
 keys and I have to previously test the queries in order to know the key
 names and get the data I need into a list.
 I'm not exactly clear as to what the confusion is here. When you
 run a query, the result returned by the database has some sort of name
 identifying each column in the result set: either the actual column
 name, or an alias if your query used the 'as' clause, or a
 DB-determined name such as 'SUM(mycol)'. The key in the dataset will
 always be the value returned by the dbapi for that column.

 I've got an example here (after each query there is an output and a
 comment) :
 --
 ci = dabo.db.dConnectInfo(DbType='SQLite')
 ...

Can you please descibe what the inconsisty is you are seeing?
Did you run the same statements in sqlite client?
Was the output different from what you get in Dabo?

Dabo should use the cursor description which you get from the python
dbapi and use this for the dictionary keys.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49aeffb0.6020...@googlemail.com


Re: [dabo-users] winpdb

2009-03-01 Thread Uwe Grauer
tim awa wrote:
 I would like to learn how to debug my dabo codes. Is winpdb the recommended
 way? Any gotchas to its installation and use?
 
 I could appreciate a step-by-step tutorial if there is one available.
 
 Thanks. Have a wonderful weekend to everyone at Dabo.
 

If you use winpdb you have to make sure that you do not use the Dabo
builtin pdb as this gives problems. But winpdb does have a much nicer
interface than pdb. Only one debugger is allowed at the same time.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49aa5168.3090...@googlemail.com


Re: [dabo-users] Hot Keys on button captions in class designer

2009-03-01 Thread Uwe Grauer
Frank Cazabon wrote:
 when I run the class designer without passing in a file name, I get 
 prompted to create a new class, what do I do if I don't want to create a 
 new one, but open an existing one?
 

Click OK, open your existing one via File/Open and close the newly
created form.
Of cause the command line is faster.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49aab771.4030...@googlemail.com


Re: [dabo-users] Not seeing my posts

2009-03-01 Thread Uwe Grauer
Frank Cazabon wrote:
 All very strange as the BCCs work when I send email to other addresses.  
 Oh well...

I'm using a gmail adress too.
To get my mails back from lists, i send them out via a different
(non-gmail) smtp server.
If i send them out via gmail, they are lost too.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49aac81d.4030...@googlemail.com


Re: [dabo-users] Hot Keys on button captions in class designer

2009-03-01 Thread Uwe Grauer
Frank Cazabon wrote:
 
 Uwe Grauer wrote:
 Frank Cazabon wrote:
   
 when I run the class designer without passing in a file name, I get 
 prompted to create a new class, what do I do if I don't want to create a 
 new one, but open an existing one?

 
 Click OK, open your existing one via File/Open and close the newly
 created form.
 Of cause the command line is faster.

   
 Not if you type like me :)

As you seem to be using the M$S OS, faster typing doesn't help this
much as the win command line doesn't support command line substitution.

Try using a real shell and give cygwin a try. ;-)

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49aac8dc.8060...@googlemail.com


Re: [dabo-users] Not seeing my posts

2009-03-01 Thread Uwe Grauer
Fred Taylor wrote:
 I'm using gmail, but I don't think I'm losing anything from these lists.
 Occasionally, I get a message from gmail that states something like due to
 a filter you have in place, this message was not sent to spam or something
 like that.
 

We are not taking about spam filtering.
Are you sure you get your mail which you sent to the list back from the
list when it did arrive there?

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49aadd59.1010...@googlemail.com


Re: [dabo-users] Not seeing my posts

2009-03-01 Thread Uwe Grauer
Uwe Grauer wrote:
 Fred Taylor wrote:
 I'm using gmail, but I don't think I'm losing anything from these lists.
 Occasionally, I get a message from gmail that states something like due to
 a filter you have in place, this message was not sent to spam or something
 like that.

 
 We are not taking about spam filtering.
 Are you sure you get your mail which you sent to the list back from the
 list when it did arrive there?
 

Here you can see that it is a gmail feature:

http://wiki.list.org/display/DOC/I+use+Gmail-Googlemail,+but+I+can%27t+tell+if+any+of+my+messages+have+been+posted+to+the+list
http://mail.google.com/support/bin/answer.py?answer=6588

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49aadf0a.8050...@googlemail.com


Re: [dabo-users] Changes to the wiki

2009-02-28 Thread Uwe Grauer
Ed Leafe wrote:
   I got a nice email from Simon Michael, one of the main developers of  
 Zwiki. He found our site, and suggested alternatives to the practice  
 of forcing people to log in in order to edit pages. Now the only thing  
 that you need to do is go to the Options page and enter your name,  
 email, etc. When you save your options, you will now be able to edit.
 
   I tried it, after deleting my cookies for dabodev.com, and at first I  
 didn't get the 'edit' link to appear. But after exiting Safari and  
 trying again, I was able to see the edit link.
 
   We'll try this for a while; if it causes problems with spam or  
 difficulty editing, we can always revert to the login method.

Does that mean login doesn't work any more because i now have to
allow cookies or have to add my name all the time i want to edit?

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49a8f63a.9080...@googlemail.com


Re: [dabo-users] Error running CxnEditor.py

2009-02-28 Thread Uwe Grauer
Frank Cazabon wrote:
 Hi,
 
 I'm trying to run through the tutorial 
 (http://docs.google.com/Doc?id=dg79jzmg_3x78zkp) and I get this error:
 
 C:\development\dabo\ide\python25\python CxnEditor.py
   File CxnEditor.py, line 48
 ItemID=file_open,
  ^
 SyntaxError: invalid syntax
 
 Any ideas what's going wrong here?


It got fixed after the release.
If you change it to:
fm.prepend(_(Open Connection File...),
HotKey=Ctrl+O,
OnHit=self.onOpenFile,
ItemID=file_open,
help=_(Open an existing connection file))

it will run for you.
There is a comma missing in the line:
OnHit=self.onOpenFile

 Also for the IDE, am I expected to run a command prompt for each bit of 
 the IDE I want to use, or is there one program I run which then gives me 
 access to all the various bits of the IDE (preferably from a menu)?
 

There is no full IDE intergration yet.
You will have to start the various bits independently.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49a92440.5060...@googlemail.com


Re: [dabo-users] Error running DaboDemo.py

2009-02-27 Thread Uwe Grauer
Frank Cazabon wrote:
 Hi,
 
 I've just started to dabble with Python and Dabo.  Tried using Python 
 2.6, but got an error.  Saw a reference to the same error in the 
 archives here which suggested using 2.5 instead, so I've uninstalled 2.6 
 and installed 2.5 and wxPython.  From a command prompt I ran the python 
 setup.py install command and everything apparently went smoothly.  (BTW 
 why does the How to Install topic on the wiki not include how to install 
 Dabo?)


http://dabodev.com/wiki/InstallingDabo

 Anyhow, I start up IDLE and open the DaboDemo.py and run it, but I get 
 this error:
 
 Traceback (most recent call last):
...
 which looks like the same error I got when running with 2.6
 
 Any ideas what I have done wrong?
 

Did you try without IDLE?
I remeber some reports about problems with Idle as it changes some
things at startup.

Uwe

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49a87274.5020...@googlemail.com


  1   2   3   4   5   6   7   >