Re: [dabo-users] Using 'Set Crypto Key' in CxnEditor causes ValueError: IV must be 8 bytes long

2013-08-15 Thread Jacek Kałucki

Użytkownik Arnie Elkins napisał:

I removed Python 2.7.5 and installed Python 2.7.3.  I got exactly the same
error.  I have no 64-bit tools installed, even though I run Win8.  My users
run a variety of systems from WinXP forward, so at this point I do not use
any 64-bit tools.


Hi.

The problem is new version of Crypto package.
I will send you a patch that fixes my problems with it.

Regards
Jacek Kałucki


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/520c9eb7.2030...@rz.onet.pl


Re: [dabo-users] set a None default value for a control

2013-06-27 Thread Jacek Kałucki

Użytkownik John Fabiani napisał:

Hi,
Is it possible to set a different None Display value for a control?

I'd like to set the None value of a MaskedTextBox to something other than  None 
.



Hi,

What about overriding the getBlankValue() class method?

Regards
Jacek Kałucki

___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/51ccb492.6080...@rz.onet.pl


Re: [dabo-users] [SPAM] Re: [SPAM] Re: MsSQL Trouble

2012-12-07 Thread Jacek Kałucki

Użytkownik Ed Leafe napisał:

On Dec 6, 2012, at 6:59 PM, Carey Gagnon careydeangag...@gmail.com wrote:


Well it is actually returning something. All the tables by the lloks of it.
There's no data so I'm not worried about obfucating the output.


OK, that helps - now at least I can see what sort of data is returned, 
and how it needs to be massaged.

I tried to create a slick nested list comprehension, but wasn't able to 
get it to return what was needed. So I resorted to the good ol' procedural 
approach. I have a replacement for the getDictCursorClass() method here:

http://dabo.codepad.org/w2NS0mUY

Could you try replacing that method in your code with the new version, 
and let me know how it works? If it is successful, I'll update the code in the 
repository.



Hi.

I just committed long awaiting update for that issue.
There is much more fixes to go, e.g. full support for FirebirdSQL dialect 1 
databases,
but I afraid, I must to postpone them until next year.

--
Regards
Jacek Kałucki
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/50c1ba37.40...@rz.onet.pl


Re: [dabo-users] [SPAM] Re: MsSQL Trouble

2012-12-02 Thread Jacek Kałucki

Użytkownik Carey Gagnon napisał:

Thanks for the reply Ed. That's the problem. pymssql version 1.02 is not
working. I suppose I could try the newer version but Jacek post said it
didn't work on windows for him. I wish my employer would stop using MS
products. The Dabo apps built using mssql for the backend work fine.

I'll see what Jacek says if he replies and tryout a newer version in the
meantime.



Hi.

The binary version provided by pymssql site doesn't work for me.
Currently I have working 2.0.0b1 version compiled from the scratch for Python 
2.7 on Windows.
I can send you it if you wish.

--
Regards
Jacek Kałucki
___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/50bc58b9.2080...@rz.onet.pl


Re: [dabo-users] dNumeric issue

2012-03-22 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 OpenSuse 12.1, python 2.7,  wxpython 2.8.11, latest Dabo.

Hi.

It's probably wxPython issue.
I don't have such problems on 2.8.12.1.
Can you upgrade to the newer version?
-- 
Regards
Jacek Kałucki
___
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/4f6adaee.3040...@rz.onet.pl


Re: [dabo-users] dNumeric issue

2012-03-22 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 On Thursday, March 22, 2012 08:55:26 AM Jacek Kałucki wrote:
 Użytkownik John Fabiani napisał:
 OpenSuse 12.1, python 2.7,  wxpython 2.8.11, latest Dabo.

 Hi.

 It's probably wxPython issue.
 I don't have such problems on 2.8.12.1.
 Can you upgrade to the newer version?

 I can't upgrade but I doubt that's the problem.  Adrian is reporting that he
 is having the same trouble with 2.8.12.  This has something to do with the
 insertion point and the fact I'm trying to use the class with a integer.
 Works great with anything that has decimal but not with the decimal = zero.
 At first I thought it had something to do with the Alignment setting but with
 that removed I'm still getting the same traceback.

Ok, I'll try to look deeper into this tonight.

-- 
Regards
Jacek Kałucki
___
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/4f6b4c8d.2060...@rz.onet.pl


Re: [dabo-users] Special characters in Dabo (á, é, í, ó, ú, ñ)

2012-03-05 Thread Jacek Kałucki
Użytkownik STyler napisał:
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xf3 in position 0:
 ordinal not in range(128)

Two general rules:
1) your *.py files should start with encoding declaration line, e.g.
# -*- coding: utf-8 -*-
# replace utf-8 with desired encoding
2) strings with national characters should be defined as
uąłśćźćńżź.

I hope it helps.
-- 
Regards
Jacek Kałucki
___
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/4f551ad4.6070...@rz.onet.pl


Re: [dabo-users] Special characters in Dabo (á, é, í, ó, ú, ñ)

2012-03-05 Thread Jacek Kałucki
Użytkownik Ed Leafe napisał:
   I've confirmed that there is an encoding error in the sample for 
 dTextBox. I'll take a look at it as soon as I can.


I fixed this unicode error. We should remember that keyChar attribute holds raw 
key character.
Or we should change this behaviour, should we?
-- 
Regards
Jacek Kałucki
___
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/4f552196.9080...@rz.onet.pl


Re: [dabo-users] global (app) keyboard events?

2012-02-06 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 Interesting code.  What platform required the code?  While working with
 barcode readers in the past (I have only used symbol) they just acted as a
 keyboard.  I did not find it necessary to write any code.  I did however have
 to strip out the beggining and ending char's to gain access to the data.  But
 I was doing that anyway.  Your code avoids the stripping.

I have Windows platform application with DataLogic scanners supported.
But I think it should work in any software environment and with any scanner
with Wedge interface support, the only thing to do is to customize scanned code 
prefix and suffix.
The main advantage of this code is that you have no longer need to put focus on 
control
that accept keyboard output.
You can trigger scan button anywhere the focus is placed.
-- 
Regards
Jacek Kałucki
___
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/4f2fef8e.9010...@rz.onet.pl


Re: [dabo-users] global (app) keyboard events?

2012-02-06 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 Interesting code.  What platform required the code?  While working with
 barcode readers in the past (I have only used symbol) they just acted as a
 keyboard.  I did not find it necessary to write any code.  I did however have
 to strip out the beggining and ending char's to gain access to the data.  But
 I was doing that anyway.  Your code avoids the stripping.

I asked Ed for adding UIAppClass feature two years ago when I developed my 
application
and it was done in r5581. The FilterEvent method is present in wxPython code 
since 2005 year, ASFAR.
About using this method, I noticed it could be a bottleneck on older machines 
when used
for something more than just barcode servicing, so I suggest to call 
SetCallFilterEvent(False)
when feature isn't needed, to save CPU cycles.
-- 
Regards
Jacek Kałucki
___
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/4f302b06.9060...@rz.onet.pl


Re: [dabo-users] global (app) keyboard events?

2012-02-05 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 That sounds interesting - if you don't mind tells more about what you are
 doing.

Here is link to sample code that handles barcode reader output: 
http://dabo.codepad.org/zx8I2NXN

-- 
Regards
Jacek Kałucki
___
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/4f2ed725.9020...@rz.onet.pl


Re: [dabo-users] global (app) keyboard events?

2012-02-04 Thread Jacek Kałucki
Użytkownik Paul McNett napisał:
 Unfortunately I don't think there is a clean way of doing this (wxPython 
 limitation).

Hi.

Actually, there is a way to capture and handle events globally.
The way to achieve this is to use dApp.UIAppClass property.
Then you have to create your own class inherited from uiApp class and
define the FilterEvent method in it.
I'm using this method to handle barcode reader output in my applications.
-- 
Regards
Jacek Kałucki
___
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/4f2d6166.3050...@rz.onet.pl


Re: [dabo-users] pymssql is it working?

2012-01-10 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 If there happens to be a problem please explain the issues.  I'll set
 something up and attempt to get it fixed.  Of course if it's working I'll
 report that too.

Hi.

I didn't noticed any problems with Dabo, but rather with pymssql library.
For me, the latest working version on Windows platform is stable pymssql 1.0.2,
but it must be patched (you can find my patch on trac).
The latest beta 2.0.0b1-dev-20111019 release works for me on *nix platform,
but it doesn't work on Windows. There are many problems with FreeTDS on that 
platform.
-- 
Regards
Jacek Kałucki
___
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/4f0c55a2.5080...@rz.onet.pl


Re: [dabo-users] Pass parameters to main form

2012-01-01 Thread Jacek Kałucki
Użytkownik OKB (not okblacke) napisał:
 What is the right way in Dabo to specify extra information that is
 needed when starting an app or instantiating a control?

Personally, I do that this way:
code
# Create application
app = App(MainFormClass=None)
...
app.setup()
# Create main form
app.MainForm = app.ui.FrmMain(put parameters here...)
app.startupForms()
# Start the application event loop...
app.start()
/code
-- 
Regards
Jacek Kałucki
___
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/4f00f9a5.40...@rz.onet.pl


Re: [dabo-users] something wrong with bizobj.moveToPK()

2011-12-24 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 The output from above is:
 1102  #this is the PK
 2009-11-20  # a date field (correct)
 1102 #this is the PK after moveToPK
 2008-07-25  #this is a old date from a different record. Not correct!

 As you can see the dates do not match - but the pk's match???

I didn't noticed such behaviour, but what is your backend database? Is it 
SQLite?
Are you sure that user doesn't change that pwvoyage row?
Because it looks as such issue to me.
Dabo doesn't requery modified cursors.
What happens after saving it:
self.pwvoyage.save()
 self.pwvoyage.moveToPK(KeyValue)
?

-- 
Regards
Jacek Kałucki
___
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/4ef65baa.60...@rz.onet.pl


Re: [dabo-users] something wrong with bizobj.moveToPK()

2011-12-24 Thread Jacek Kałucki
Użytkownik Jacek Kałucki napisał:
 What happens after saving it:
   self.pwvoyage.save()
   self.pwvoyage.moveToPK(KeyValue)
 ?


I reposted proper code on codepad: http://dabo.codepad.org/FV231hKP

-- 
Regards
Jacek Kałucki
___
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/4ef65dfd.1060...@rz.onet.pl


Re: [dabo-users] simple way to maintain form size

2011-12-22 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 Is there a simple way to maintain individual form sizes?

Did you try to set individual Name property for each form?

-- 
Regards
Jacek Kałucki
___
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/4ef38151.1020...@rz.onet.pl


Re: [dabo-users] drag and drop scheduler/calendar

2011-12-20 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 Hi,
 It looks like I may have to develop a drag and drop scheduler/calendar for a
 client.  Does anybody have something that will provide a starting point.  I
 just need to associate a name with a time slot - drag from the name list to
 the calendar.


Hi.

Take look at the Chandler. It's written in wxPython and has implemented DD 
calendar.

-- 
Regards
Jacek Kałucki
___
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/4ef12264.5050...@rz.onet.pl


Re: [dabo-users] AppWizard Request

2011-12-09 Thread Jacek Kałucki
Użytkownik Rand Batchelder napisał:
 I would like to build an app from a View, but the appwizard only lists 
 available tables.
 Is this doable ?

Hi.

I posted fix in r7012 commit. Check it now please.

-- 
Regards
Jacek Kałucki
___
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/4ee1c74c.30...@rz.onet.pl


Re: [dabo-users] AppWizard Request

2011-12-09 Thread Jacek Kałucki
Użytkownik Rand Batchelder napisał:
 Now I can see the views listed with available tables,
 but now the appwizard doesn't include any fields in the app
 for a view or a table from MSSQL.

Sorry, try r7015 instead.

-- 
Regards
Jacek Kałucki
___
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/4ee2423a.80...@rz.onet.pl


Re: [dabo-users] query a dabo cursor using sql commands

2011-12-02 Thread Jacek Kałucki
Użytkownik ghircoias camil napisał:
 I am a vfp developer and I know the masters of dabo are former vfp 
 developers. I don't  know  very much about dabo.

 I want to know if it is posible to query a vfp dabo cursor using select sql 
 commands like in vfp we do with cursors obtained from server databases?

 I mean we query a postgresql database, obtain a cursor (in vfp) and in dabo a 
 dabo cursor) and want to query that particulary dabo cursor (not the server 
 database) using sql commands to obtain another dabo cursor and so on.

Hi.

Actually Dabo cursors are type of dDataSet and are proxy of SQLite cursors,
so answer is yes, it's possible with dDataSet.execute() command.

 If it is possible 3 more questions:
 - can you provide an example of that ? Or a link to an example because I 
 did'nt fount one.

http://dabo.codepad.org/ZrebkNYe

 - is there any memory limit of that ?

Yes. Size is limited to the memory available for your OS.

 - it is posible do run against the dataset other sql commands like insert or 
 delete (for example insert into dataset 1 (select * from dataset2) ?)

See link above.
You can execute any query with dataset as source.
Remember, there are no joins possible between different dDataSet objects in 
queries,
however you can join many dDataSet objects with '+' operator.
-- 
Regards
Jacek Kałucki
___
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/4ed8a351.8000...@rz.onet.pl


Re: [dabo-users] One Child : Many Parents : 'LinkField' : How to?

2011-11-24 Thread Jacek Kałucki
Użytkownik Vineet Deodhar napisał:
 If multiple 'LinkFields' is not supported , then how do I define
 multiple parents for a child?

Simply, you can't. It's like paramecium, there is only one parent, no more.
But if you need such behaviour, you can override dBizobj.getParams() method,
e.g. for first relation use LinkField (acid) and for the second addWhere() 
method:

...
self.addWhere(catid = ?)
...

def getParams(self):
return (self.biz_cat.getFieldVal(catid),)

But I never tried this, so there may be additional steps to take.

-- 
Regards
Jacek Kałucki
___
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/4ece3646.2040...@rz.onet.pl


Re: [dabo-users] Non-date value in dDateTextBox

2011-11-24 Thread Jacek Kałucki
Użytkownik Dewald Jacobs napisał:
 Any idea what the problem could be?

Hi.
I just posted fix in r6975. Should be fine now.
-- 
Regards
Jacek Kałucki
___
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/4ece5e73.3090...@rz.onet.pl


Re: [dabo-users] Non-date value in dDateTextBox

2011-11-24 Thread Jacek Kałucki
Użytkownik Ed Leafe napisał:
   It seems as though SQLite is returning an empty string instead of None. 
 Does the date column in the database allow null values? If not, it looks like 
 it is storing an empty string for the value.


It's very strange because for me, SQLite returns date: 0001-01-01 value for new 
blank date fields.
What is your environment, Dewald?
Can you check if setting default value for your field to datetime.date.today 
helps?

-- 
Regards
Jacek Kałucki
___
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/4ece805f.3090...@rz.onet.pl


Re: [dabo-users] Non-date value in dDateTextBox

2011-11-24 Thread Jacek Kałucki
Użytkownik Dewald Jacobs napisał:
 It seems this is the problem. Whenever I manually add a record in the 
 database and leave the date column as
 NULL, I can access the Available Keys, but as soon as I then choose a date 
 I get the following 
error:
 ERROR - !!! Data Type Mismatch: table=Geskiedenis; field=Datum. 
 Expecting:type 'unicode'; 
got:type 'datetime.date'


It looks like you have incorrectly defined dBizobj.DataStructure property.


 Not 100% sure what you meant with environment but I take it you are asking 
 what I use to create and edit my SQlite databases? I'm using the Firefox 
 extension SQLite Manager. As for setting the default value to 
 datetime.date.today it made no differance to the error.

I meant Python, wx version, OS type, etc.

-- 
Regards
Jacek Kałucki
___
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/4eced19e.7050...@rz.onet.pl


Re: [dabo-users] Child doesn't relate to Parent

2011-11-23 Thread Jacek Kałucki
Użytkownik Dewald Jacobs napisał:
 I have tested and played around with LinkField and ParentLinkField but it 
 makes no difference at all. Exact same result every time. Any help would be 
 appreciated.

Hi.

Did you check database activity log first?
If not, please post here public.contacts table requery entry from it.

-- 
Regards
Jacek Kałucki
___
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/4eccae6d.6090...@rz.onet.pl


Re: [dabo-users] Child doesn't relate to Parent

2011-11-23 Thread Jacek Kałucki
Użytkownik Dewald Jacobs napisał:
  self.Linkfield = Nr

Shouldn't it be:
self.LinkField = Nr

-- 
Regards
Jacek Kałucki
___
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/4ecce417.40...@rz.onet.pl


Re: [dabo-users] clear does not permanently remove text drawn by drawText

2011-11-12 Thread Jacek Kałucki
Użytkownik tdtran tran napisał:
 1.  The clear function does not permanently clear the text drawn with 
 drawText. For example, I start a simple app with only a textbox and in the 
 command window. I exectute the drawText function on the text box. The text
 is drawn as expected. I think execute the clear command. The drawn text is 
 cleared. However if I re-size the window, the cleared text would reappear.


Hi.

What the clear() method does, it clears background.
You must use removeDrawnObject(...) method before to remove it from the pool.

-- 
Regards
Jacek Kałucki
___
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/4ebe3708.3050...@rz.onet.pl


Re: [dabo-users] Is there an event that triggers when the records are changed

2011-11-06 Thread Jacek Kałucki
Użytkownik tdtran tran napisał:
 Where would I hook such a function?

Hi.
You can use either, form navigation methods hooks, I mean 
dForm.afterPointerMove() method
or RowNumChanged event which is bound by default to form 
dForm.onRowNumChanged() handler.
-- 
Regards
Jacek Kałucki
___
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/4eb6665b.2090...@rz.onet.pl


Re: [dabo-users] dMaskedNumBox

2011-11-04 Thread Jacek Kałucki
Użytkownik Paul McNett napisał:
 Jacek, would you like to do the honors of adding this?

Done in r6960, however class name evolved to dNumericBox.

-- 
Regards
Jacek Kałucki
___
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/4eb3d79a.4010...@rz.onet.pl


Re: [dabo-users] dMaskedNumBox

2011-11-04 Thread Jacek Kałucki
Użytkownik melkarth0 napisał:
 Thank You, Jacek;  I think I'm gonna use a lot of dNumericBoxes from now on.

You are welcome.
Any comments/suggestions are welcome.
-- 
Regards
Jacek Kałucki
___
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/4eb3e3f5.9030...@rz.onet.pl


Re: [dabo-users] delete() parent

2011-10-16 Thread Jacek Kałucki
Użytkownik Vineet Deodhar napisał:
 I have RESTRICT at DB level.
 Whenever I wish to delete a parent record, I am in a fix (irrespective
 of REFINTEG=3 or 2 in dabo).
 Because at DB level, it will not allow to delete a parent row when child
 rows are there referencing this parent row).

 That's why I need to delete the child rows in order from bottom to top
 in beforeDelete().
 Then delete the parent.

Ok, now I understand. Any security rationale for doing that?
It's very unhandy.
In this situation you should use framework REFINTEG_RESTRICT integrity rule,
then write deleteUpward() method yourself, e.g.:

code
def deleteUpward(self, startTransaction=True):

startTransaction = startTransaction and self.beginTransaction()
try:
self.deleteAll(startTransaction=False)
parent = self.Parent
if parent:
parent.deleteUpward(startTransaction=False)
if startTransaction:
self.commitTransaction()
except (dException.DBQueryException, StandardError):
if startTransaction:
self.rollbackTransaction()
raise
/code

Conditionally, you can use beforeDelete method, but remember that there will
be no single transaction, but one per business object.
-- 
Regards
Jacek Kałucki
___
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/4e9aae08.1010...@rz.onet.pl


Re: [dabo-users] delete for deep chain of Parent:Child

2011-10-15 Thread Jacek Kałucki
Użytkownik Vineet Deodhar napisał:
 Before asking this query, I have gone through 3 similar links in archive
 as under.
 
 http://news.gmane.org/find-root.php?message_id=%3c054.fe70fb1da2b15c6056833296f57e0261%40ulmcnett.com%3e
 
 msg#00244
 
 Ticket #1012 (closed defect: wontfix)
 
 DB is MySQL.
 Chain of Parent:Child:Grandchild:.. is deep
 In MySQL child tables, referential integrity is 'RESTRICT'.
 So the DB will give error while deleting a parent record, if child
 record(s) exist(s).

 My idea is to do something like this:
 * Make use of beforeDelete()
 * In that, iterate through childs, grandchilds, etc.
 * Use delete() for each bizobj.
 (should I use deleteAllChildren() here?)

 bizobj's REFINTEG should be what in this case?
 CASCADE or IGNORE

 Pl. suggest if there is any fine-tuning or correction required in my
 approach.


Hi.

Personally, I prefer to use backend based integrity rules.
Most important advantage is, it's much faster than framework based.
If you do so, use REFINTEG_IGNORE.
But if you intend to use framework one, you should use REFINTEG_CASCADE.
You don't need additional steps with beforeDelete() method, since framework
handle all references himself.
-- 
Regards
Jacek Kałucki
___
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/4e995010.1000...@rz.onet.pl


Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form

2011-10-13 Thread Jacek Kałucki
Użytkownik Ed Leafe napisał:
 On Oct 13, 2011, at 2:35 PM, Chris G wrote:

 I'm still digging around in the event handling to find where to add
 events for using the tab key for moving from column to column (and,
 hopefully, to add a new row when at the last column).

   You could start by binding the KeyDown event of the grid to a method; 
 not sure how it would work with editable columns, though. If you get stuck, 
 post what you've done and we can help from there.



Right.
Personally, I'm useing something like that as grid method: 
http://dabo.codepad.org/kFVSLpj7

-- 
Regards
Jacek Kałucki
___
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/4e97479f.1080...@rz.onet.pl


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

2011-10-12 Thread Jacek Kałucki
Użytkownik Ed Leafe napisał:
   I'm wondering if adding a DataAlias property would help. This would 
 allow you to specify an alias for a bizobj that shares the same DataSource as 
 another. DataSource would still be used to link to the underlying table, but 
 DataAlias would be used when retrieving a bizobj reference; it would default 
 to DataSource if no alias is set.

   Does that sound reasonable?

This is what I proposed years ago in #1318.
Personally, I'm using this code in my business layer.
If you agree, I can implement it.

-- 
Regards
Jacek Kałucki
___
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/4e95f693.8050...@rz.onet.pl


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

2011-10-11 Thread Jacek Kałucki
Użytkownik tdtran tran napisał:
 class SecurityConfigBiz( ConfigBiz):

  def initProperties(self):
  self.super()
  self.DataSource = configs.security # Can't do this!


Currently, must be source table name. Let to inherit it from parent.


  self.addWhere( configurations.configgroup= 'Security' )

 On my form I want to add the bizobj for multiple configuration groups, so I 
 can connect the bizobj to
 different panels displaying the configuration groups.

 The DataSource is the unique reference for the bizobj for the form. I have 
 named them differently for the bizobj for each group so they can be added to 
 the
 main form. The trouble is the DataSource field MUST match the table name, 
 otherwise the field will be set as a non update field. So if I have
 SecurityConfigBiz as above, 'configvalue' will not be updated when save is 
 called.

 So basically, is there a way of adding bizobjs for the same table to a form? 
 What is the correct way of doing this?

 cheers.

Hi.

One of the limitations of Dabo form data manager is inability to manage multiple
bizobjs of the same data source.
It's because the target resolution is based on DataSource property, which could
be the same for multiple data objects.
However you still can add your biz objects to the form assigning them to the 
attributes, e.g.
form.bizSecurityConfig = app.biz.SecurityConfigBiz(...)
Now to play with form data methods, you must pass bizobj explicitly:
form.save(form.bizSecurityConfig)
form.cancel(form.bizSecurityConfig)
and so on for other methods.
-- 
Regards
Jacek Kałucki
___
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/4e9410f1.6020...@rz.onet.pl


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

2011-10-11 Thread Jacek Kałucki
Użytkownik Vineet Deodhar napisał:
 'distid' is auto-generated by DB.
 Would it make any sense to initialize 'distid' field to None value or any 
 valid FK?

And yet another thing.
Try to call appendDataSet(..., updateInternals=True).
Otherwise you must call setNewFlag() for every new row to set its new flag.
-- 
Regards
Jacek Kałucki
___
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/4e9449a9.2060...@rz.onet.pl


Re: [dabo-users] SystemError: Unknown Error on windows Python 2.7

2011-09-18 Thread Jacek Kałucki
Użytkownik Ashish Yadav napisał:
 SystemError: unknown opcode

It's interpreter problem. Delete all *.pyc and *.pyo files
in your project and Python\Lib directory.

-- 
Regards
Jacek Kałucki
___
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/4e764f03.8020...@rz.onet.pl


Re: [dabo-users] New record validation in bizobj

2011-09-17 Thread Jacek Kałucki
Użytkownik Vineet Deodhar napisał:
 While saving a changed record, the validateRecord() code fires.
 But it is not getting fired while saving newly added record.

Did changing SaveNewUnchanged to True helps?

-- 
Regards
Jacek Kałucki
___
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/4e7459f5.3010...@rz.onet.pl


Re: [dabo-users] afterNew method for New record validation in bizobj

2011-09-17 Thread Jacek Kałucki
Użytkownik Vineet Deodhar napisał:
 Maybe this is on purpose or a bug?

No, it's a feature ;)
Framework doesn't save unchanged fields, by default.
But probably there is another problem.
After issuing new, all fields are filled with default values,
depending of field type, e.g. string fields are filled with empty string ''.
This mean that setting this field to '' does nothing.
To avoid such behaviour you must set bizobj property DefaultValues = None.
I hope it helps.
-- 
Regards
Jacek Kałucki
___
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/4e7465d4.2010...@rz.onet.pl


Re: [dabo-users] bizobj UserSQL traceback

2011-08-21 Thread Jacek Kałucki
Użytkownik Vineet Deodhar napisał:
 class PublicDistBizobj(dabo.biz.dBizobj):
  def afterInit(self):
  self.DataSource ='dist'
  self.KeyField = 'distid'
 #self.addFrom('dist')
 #self.addField('distid')
 #self.addField('distnm')
 #self.addField('statid')
  self.UserSQL = 'select distid,distnm,statid from stat'
 

First, your DataSource is dist table and you perform query
from the stat table as source?
It won't work.

-- 
Regards
Jacek Kałucki
___
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/4e51295a.1080...@rz.onet.pl


Re: [dabo-users] Error in _getRecord() of dCursorMixin()

2011-08-18 Thread Jacek Kałucki
Użytkownik Vineet Deodhar napisał:
 AttributeError: 'module' object has no attribute '_getRecord'
 Code line in ''dCursorMixin()' is:
 ret = self._cursorRecord = dabo.db._getRecord(self)

BTW, if Paul is listening here, I thing there should be no
self parameter in this function definition:
def _getRecord(self):
because it could be deceiving , what do you think?
-- 
Regards
Jacek Kałucki
___
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/4e4d26bc.8040...@rz.onet.pl


Re: [dabo-users] I have blue lines

2011-08-18 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 class HeaderToolBar(dabo.ui.dPanel):

Base question.
Why are you using dPanel instead of dToolBar control as tools container?

-- 
Regards
Jacek Kałucki
___
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/4e4d5ec6.8010...@rz.onet.pl


Re: [dabo-users] I have blue lines

2011-08-18 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 I couldn't get the icon large enough  (if memory serves me) on the toolbar.

Are you using icons larger than 32pix?
I thought that dToolBar can handle any icon size, but I used 32 max.

-- 
Regards
Jacek Kałucki
___
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/4e4d627f.1060...@rz.onet.pl


Re: [dabo-users] Error in _getRecord() of dCursorMixin()

2011-08-18 Thread Jacek Kałucki
Użytkownik Paul McNett napisał:
 If you are proposing renaming 'self' to something else, that would be fine. 
 But I

This is what I mean.

-- 
Regards
Jacek Kałucki
___
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/4e4d8d86.5080...@rz.onet.pl


Re: [dabo-users] 'NoneType' error...

2011-08-11 Thread Jacek Kałucki
Użytkownik Dewald Jacobs napisał:
  vervangingsverseBizobj =
 self.Application.biz.VervangingsverseBizobj(self.Co
 nnection)
 AttributeError: 'NoneType' object has no attribute 'VervangingsverseBizobj'


As a rule of thumb, you must remember, if you want use application
attribute reference to internal modules: biz, ui, etc.,
instead of Python namespace, you must ensure correct references.
Your application startup script, verse.py must have:

app = App(...)
import biz
app.biz = biz
import ui
app.ui = ui

and biz and ui must of course be a valid python packages.
Second, to refer bizobj classes that way, they must be imported
into biz package namespace, biz/__init__.py:
from VervangingsverseBizobj import VervangingsverseBizobj

If these conditions are meet, it _must_ be working.
-- 
Regards
Jacek Kałucki
___
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/4e443f9c.1040...@rz.onet.pl


Re: [dabo-users] standalone BizObj with FK relation not saving into database

2011-08-10 Thread Jacek Kałucki
Użytkownik Vineet Deodhar napisał:
 2] Unsuccessful example--
   from myDir import bo
   bo.distBizObj.seek('MyDist1', fld='distnm')
   bo.distBizObj.setFieldVal('distnm', 'MyDist2')

1) How did you know if expression is found?
Is bo.distBizObj.seek('MyDist1', fld='distnm') = 0?
2) I'm not sure now, but for UserSQL, you should also define
DataStructure property.
3) I can't see if you set DataSource property for distBizObj.
-- 
Regards
Jacek Kałucki
___
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/4e42c1ea.9010...@rz.onet.pl


Re: [dabo-users] dabo not working

2011-08-09 Thread Jacek Kałucki
Użytkownik Bob K. napisał:
 C:\Program Files (x86)\Dabo Runtime\idepython classdesigner.py
 Traceback (most recent call last):
File classdesigner.py, line 8, inmodule
  import dabo
File
 c:\python27\lib\site-packages\dabo-0.9.3-py2.7.egg\dabo\__init__.py, li
 ne 103, inmodule
  import logging
 ImportError: No module named logging


I think you should use one of these methods and don't mix them:
1) download and install latest SVN version, then call framework tools
with e.g.: python classdesigner.py
or register .PY as valid shell command and just type classdesigner.py
2) if you decide to use runtime , use links from runtime Common subdirectory
to start framework tools.

-- 
Regards
Jacek Kałucki
___
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/4e412871.3070...@rz.onet.pl


Re: [dabo-users] dabo not working

2011-08-09 Thread Jacek Kałucki
Użytkownik Bob K. napisał:
 ImportError: No module named logging

Again, check for directory existence:
C:\Python27\Lib\logging

If you don't have it, reinstall Python please.

-- 
Regards
Jacek Kałucki
___
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/4e417f7a.3010...@rz.onet.pl


Re: [dabo-users] dabo not working

2011-08-08 Thread Jacek Kałucki
Użytkownik Bob K. napisał:
  import logging
 ImportError: No module named logging

Looks like broken Python installation or,
are you maybe using virtualenv?

-- 
Regards
Jacek Kałucki
___
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/4e3ffc32.1020...@rz.onet.pl


Re: [dabo-users] 'NoneType' error...

2011-08-07 Thread Jacek Kałucki
Użytkownik Ximo Nadal napisał:
 has been deprecated as of Python 2.6
 dabo.ui.stop(_(Attribute Error: %s) % e.message, _(Attribute Error))

Hi.

It shouldn't harm.
But I see you have quite old Dabo version, since this code no longer exist
from longer than few months.
I just tested the recipe application and it works for me seamlessly.
Could you provide complete error traceback?
-- 
Regards
Jacek Kałucki
___
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/4e3efc50.7060...@rz.onet.pl


Re: [dabo-users] Runtime error

2011-08-06 Thread Jacek Kałucki
Użytkownik quantrum75 napisał:
bizClient = self.Application.biz.ClientBizobj(conn)
 AttributeError: 'module' object has no attribute 'ClientBizobj'

 I do not understand what I am doing wrong. I have checked all of my naming 
 conventions etc and they are exactly as shown in the tutorial. Also I am 
 using WingIDE. Could someone point me to what I am doing wrong?

Hi.

Sounds like missing import.
You must import your ClientBizobj into the biz namespace, something like:

biz/__init__.py:
from ClientBizobj import ClientBizobj
biz/ClientBizobj.py
class ClientBizobj(...



-- 
Regards
Jacek Kałucki
___
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/4e3dd0f5.3080...@rz.onet.pl


Re: [dabo-users] Incorrect DataStructure

2011-08-06 Thread Jacek Kałucki
Użytkownik OKB (not okblacke) napisał:
   I tracked down the source of the problem.  The issue is that
 dCursorMixin uses DataStructure to determine whether the given column is
 valid for a sort.  The DataStructure code, in turn, relies on the
 BackendObject's getStructureDescription method.  But this method uses
 something called getStructureOnlySQL, and that uses getSQL --- bypassing
 the UserSQL.  The result is that, even when UserSQL is specified, the
 cursor tries to get the DataStructure by using the auto-generated SQL.
 This fails when custom SQL returns different columns than are present
 in the table, since then the actual results don't match the structure-
 only description.

Hi.

I guess that if you define your dBizobj.DataStructure manually in the
class initProperties method, then everything should works fine.
Try to do this.

-- 
Regards
Jacek Kałucki
___
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/4e3dd2e7.6060...@rz.onet.pl


Re: [dabo-users] 4 digit year

2011-08-05 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 On Thursday, August 04, 2011 03:42:30 pm John Fabiani wrote:
 Hi,
 I believe I used to force a four digit year in dDateTextBox.  But I can't
 recall how I forced it.

 Can someone remind me - please!

 Johnf

 I couldn't find anything so I wrote something that appears to work.  However,
 it only work for this century.  So i won't publish.

Hi.

Personally, I use daboized wx.DatePickerCtrl class for date controls.
I didn't publish it since I can't test it on OSX.
If you wish I will send you the source.

-- 
Regards
Jacek Kałucki
___
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/4e3bab12.7050...@rz.onet.pl


Re: [dabo-users] 4 digit year

2011-08-05 Thread Jacek Kałucki
Użytkownik Ed Leafe napisał:
 On Aug 5, 2011, at 3:34 AM, Jacek Kałucki wrote:

 Personally, I use daboized wx.DatePickerCtrl class for date controls.
 I didn't publish it since I can't test it on OSX.

   The better approach is to release it, and those of us with OS X can 
 test it and either fix or at least document anything that doesn't work.


Ok, Ed. I added it to the trunk.
I know that at last colour related properties doesn't work as they should.

-- 
Regards
Jacek Kałucki
___
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/4e3c13f9.3000...@rz.onet.pl


Re: [dabo-users] 4 digit year

2011-08-05 Thread Jacek Kałucki
Użytkownik Ed Leafe napisał:

   I'm finally starting to get settled after my move, so I might have some 
 time to look over this on OS X this weekend.


Thanks.


-- 
Regards
Jacek Kałucki
___
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/4e3c1665.6060...@rz.onet.pl


Re: [dabo-users] Grid column headers not displaying text

2011-08-05 Thread Jacek Kałucki
Użytkownik George Griffin napisał:
File PagSelectReccats.py, line 188, inmodule
  test.createItems()
File
 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Dabo-0.9.3-py2.7.egg/dabo/lib/datanav/Page.py,
 line 222, in createItems
  self.selectOptionsPanel = self.getSelectOptionsPanel()
File PagSelectReccats.py, line 75, in getSelectOptionsPanel
  opt = self.getSelectorOptions(memo, wordSearch=True)
File
 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Dabo-0.9.3-py2.7.egg/dabo/lib/datanav/Page.py,
 line 446, in getSelectorOptions
  chcList.append(QRY_OPERATOR.MATCH)
 AttributeError: 'tuple' object has no attribute 'append'

Hi.

Fixed in r6739.
Thanks.

-- 
Regards
Jacek Kałucki
___
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/4e3ccfa9@rz.onet.pl


Re: [dabo-users] Grid column headers not displaying text

2011-08-05 Thread Jacek Kałucki
Użytkownik Paul McNett napisał:
 Ok, the problem is that we haven't done a lot of testing with Python  2.6.5 
 nor with
 wxPython  2.8.11. Thanks for the reports of issues.

Python 2.7 works fine.
Main problem is wx 2.9 branch, which a isn't stable release, with lot of changes
compared to the previous, 2.8 version.

-- 
Regards
Jacek Kałucki
___
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/4e3cd5d7.2010...@rz.onet.pl


Re: [dabo-users] Getting the old field value in Bizobj validate method

2011-07-19 Thread Jacek Kałucki
Użytkownik Nate Lowrie napisał:
 I know I've asked this before but for the life of me I can't find it.
 In the validation method of the bizobj, how do I 1) see what fields
 are changed and 2) compare an old field value to the current field
 value.


Hi.

What about dBizobj.getRecordStatus() method?

-- 
Regards
Jacek Kałucki
___
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/4e25bdbf.6060...@rz.onet.pl


Re: [dabo-users] What is the dbMsSql status

2011-07-13 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 2. A fast MS SQL Server client library for Python directly using C API
  instead of ODBC.
  It is Python DB-API 2.0 compliant. Works on Linux, *BSD, Solaris, Mac OS
  X and Windows.
  http://code.google.com/p/pymssql/

But don't use link from main page to download driver.
Instead use this:
http://pymssql.googlecode.com/issues/attachment?aid=-5682366781538954821name=pymssql-1.9.908.win32-py2.6.exetoken=c99b17c3dcfa49c88fc6c407286b37b4

It's fixed version although it has the same version as original.

-- 
Regards
___
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/4e1da7bc.1060...@rz.onet.pl


Re: [dabo-users] What is the dbMsSql status

2011-07-12 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 Hi,
 Looks like I will need to access MsSQL again.  I recall there were others who
 also had the need.  So I'm wondering if the current Dabo tools to access MsSQL
 are working?  If not what are the current issues.  Thanks for the help.

Hi.
I have few patches I will publish today evening.
AFIK, there is no driver for Python 2.7.
I tried to compile but without success.

-- 
Regards
Jacek Kałucki
___
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/4e1cd689.5060...@rz.onet.pl


Re: [dabo-users] [ADMIN] On the road

2011-07-11 Thread Jacek Kałucki
Użytkownik Ed Leafe napisał:
   Just wanted to give a heads-up: I'm in the midst of packing up my stuff 
 in my present home and moving for good to San Antonio, so over the next two 
 weeks I will be offline a good deal of the time. If any problems should arise 
 on the email lists, it might be a while before I can get to them.

Good luck!

-- 
Regards
Jacek Kałucki
___
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/4e1ae118.7090...@rz.onet.pl


Re: [dabo-users] More strnage 2.7

2011-07-09 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 Hi,
 I continue to get strange errors from 2.7. openSUSE 11.4, wxPython 2.8.11.0
 latest Dabo.

 Here's a new one
 Traceback (most recent call last):
File /home/johnf/dabo/dabo/ui/uiwx/dPageFrameMixin.py, line 47, in
 __onPageChanging
  self.Pages[oldPageNum]._saveLastActiveControl()
 AttributeError: 'InfoPanel' object has no attribute '_saveLastActiveControl'



It's not related to the Python 2.7 but r6667.
I didn't handle exceptions there, because I assumed, evidently wrong,
that all frame pages inherit from dPage class.
I will fix it.
-- 
Regards
Jacek Kałucki
___
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/4e18a1d7.1050...@rz.onet.pl


Re: [dabo-users] More strnage 2.7

2011-07-09 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 You could be correct but then why don't I see the error using 2.6.5?

 And thanks in advance for the fix.

Fixed in r6689.
Maybe you have UseSmartFocus set to False on 2.6?
I just switched to the 2.7 branch and have no problems with it.

-- 
Regards
Jacek Kałucki
___
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/4e18a69b.1040...@rz.onet.pl


Re: [dabo-users] More strnage 2.7

2011-07-09 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 What is UseSartFocus I don't see it in Dabo?

It's very strange if you don't know what it is,
because it's set by default to False.
So, there shouldn't be any exception at all.

-- 
Regards
Jacek Kałucki
___
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/4e18a9ca.80...@rz.onet.pl


Re: [dabo-users] More strnage 2.7

2011-07-09 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 Now I see
 2011-07-09 12:05:56 - ERROR - The 'PageTabs' control must inherit from dPage
 to use the UseSmartFocus feature.

Now I see. I missed something, should be fine after r6691.
Thanks John.

-- 
Regards
Jacek Kałucki
___
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/4e18ab26.2010...@rz.onet.pl


Re: [dabo-users] More strnage 2.7

2011-07-09 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 Looks good now.  BTW what does UseSmartFocus do?

It restores focus to the last used control on every page container.
Currently, when you switching pages forth and back, page tab remains active.
Then you must click control with mouse or navigate with keyboard
to make it active.
-- 
Regards
Jacek Kałucki
___
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/4e18c318.1020...@rz.onet.pl


Re: [dabo-users] Dabo-users Digest, Vol 85, Issue 4

2011-07-07 Thread Jacek Kałucki
Użytkownik Lui Martini napisał:
 Thanks Jacek for the insight and advices.
 Now it makes sense. Being new to Python, I'll probably keep playing
 with the ClassDesigner still for a while.
 Maybe I'll even keep doing the UI via the ClassDesigner (it's cute after all,
 and looks like it can save lots of time) and probably will only need
 to debug the bizobj classes.

You are welcome.
Of course, ClassDesigner is a great tool for certain kind of projects.

-- 
Regards
___
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/4e156789.8040...@rz.onet.pl


Re: [dabo-users] How to debug event code in Eclipse or PyCharm

2011-07-05 Thread Jacek Kałucki
Użytkownik Lui Martini napisał:
 My problem is that the execution then stops only at breakpoints which
 are set up in the main program (created via the File/Save Runnable
 App), and never at those breakpoints set up in the onHit() event
 method (i.e. after I press the related button). It's the minimalistic
 app with just one button - after pressing it the onHit event method is
 executed correctly (so the app works as expected).
 When the breakpoint is set on any line of the onHit method, the
 execution is not stopped there after the button is pressed - it just
 continues there and the message box is displayed as if no breakpoint
 was there. Here are two tiny videos with everything:

Ok, I understand now.
This is one of the reasons I don't use ClassDesigner.
Its python code is stored as XML source and dynamically
executed on runtime. This is why you can't set breakpoint directly there.
Other possible solutions are:
- try to track classFromText() function execution and set your breakpoints
dynamically too;
- open e.g. C:/Python26/Lib/site-packages/dabo/ui/uiwx/dPemMixin.py in Eclipse
and set breakpoint in the proper superclass method, like 
__onWxGotFocus()
Be careful, because there is plenty timed code and application behaviour may
vary depending it's running under debugger or in real environment.

-- 
Regards
Jacek Kałucki
___
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/4e12f535.8020...@rz.onet.pl


Re: [dabo-users] How to debug event code in Eclipse or PyCharm

2011-07-04 Thread Jacek Kałucki
Użytkownik Lui Martini napisał:
 Hi All,

 I am pretty new to Python but long time ago having developed in FoxPro, I
 was happy when stumbled upon Dabo.
 I'm just starting and already can see it's gonna be fun to learn Python
 through Dabo.

 To my problem: as I can see in this mailing list, some people mentioned they
 can debug using Eclipse+PyDev.
 I tried it and it worked OK in the little starting main program genreated by
 the Class designer (via Save Runnable App),
 but never stopped at a breakpoint in the event code - I started out with the
 Hello_MsgBox tutorial from the Dabo Doc page
 and tried to set the breakpoint inside the onHit event method. Tried the
 same with the eval. version of PyCharm, but it behaved exactly same way.

 I guess there must be a trick how to do it - please could you describe it to
 a newbie? This would be a great info for the Newbie FAQ page as well I
 believe.


Hi.

I'm assuming you had created project for your application.
Just right click on left grey margin of the editor window.
You will see popup menu with Add breakpoint at first position,
or even simpler, just double click on that margin.
Then green dot with a tail should appear.
Now, select your project startup script, right click somewhere in the code,
then select Debug asPython run from popup menu and follow the instruction.
If you have properly configured environment, next time just choose a Bug icon
from main toolbar - Eclipse remembers last launched application.
I suggest that you add DABO_DEFAULT_UI = wx environment variable in PyDev 
preferences.

-- 
Regards
Jacek Kałucki
___
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/4e119e6a.9040...@rz.onet.pl


Re: [dabo-users] How to debug event code in Eclipse or PyCharm

2011-07-04 Thread Jacek Kałucki
Link to screen capture:
http://imageshack.us/photo/my-images/8/eclipsepydev.jpg/

-- 
Regards
Jacek Kałucki
___
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/4e119eea.1010...@rz.onet.pl


[dabo-users] dGrid and find dialog issue

2011-06-28 Thread Jacek Kałucki
Hi.

I noticed issue when searching large grids (more than 4k rows)
on Windows platform with the find dialogue (Ctrl+F).
If I start search from the beginning and final result
is located near the end, I receive system error
(it's not an exception so I can't mask it for user) when the search ends:

1158: Couldn't create a timer.
The current process has used all of its system allowance of handles for Window 
Manager objects.

It won't happen on *nix machines of course.
Positive is, that user can close notification window and application
performs well.
Any ideas how to avoid this, please?

-- 
Regards
Jacek Kałucki
___
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/4e09e1c1.1010...@rz.onet.pl


Re: [dabo-users] [SPAM] Re: dGrid and find dialog issue

2011-06-28 Thread Jacek Kałucki
Użytkownik Paul McNett napisał:
 Then again, Find is implemented in dGrid, not wx.grid.Grid. Could be 
 something to do
 with our implementation. See lines 3119-3136 in dGrid. I see nothing wrong 
 with the
 implementation by the way, but at least it's something to play with. You 
 could print
 out system information in each iteration and try to narrow down what's eating 
 up the
 handles.

Agree. I guess there is something wrong with wxTimerHiddenWindowModule
implementation, but I'm not sure now.
Since there is no wxTimer open reference in Dabo nor wxPython, so it must be
instantiated internally somewhere inside wx core.
I will check pure wx implementation first.

-- 
Regards
Jacek Kałucki
___
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/4e0a0029.8000...@rz.onet.pl


Re: [dabo-users] MsSQL problem in setup.py (create distribution)

2011-06-09 Thread Jacek Kałucki
Użytkownik enrico secco napisał:

 Hi,
 I did try to solve with the:
 packages: [pymssql]
 but nothing change.
 So I did add:
 import pymssql
 in the main file costo.py
 Problem solved but ...
 Now I have this log:
 
 Traceback (most recent call last):
File costo.py, line 22, inmodule
File zipextimporter.pyo, line 82, in load_module
File pymssql.pyo, line 30, inmodule
File zipextimporter.pyo, line 98, in load_module
 ImportError: MemoryLoadLibrary failed loading _mssql.pyd
 
 I did find some information in the py2exe documentation but is relative to a 
 bug in the 0.6.6 version and seems to be fixed in the 0.6.9 version, that I 
 use.
 I did verify the presence of the _mssql.pyd file in the costo.exe zip and the 
 file is present.
 Any idea? Must I install the complete python environment to jump the problem?
 Enrico


First and the most important, what pymssql package branch are you using?
If it's 1.9.x, use package from this link:
http://pymssql.googlecode.com/issues/attachment?aid=-5682366781538954821name=pymssql-1.9.908.win32-py2.6.exetoken=47c1fe5ce9f7d95c81cb929a5183dea1
It's improved compared to the original one (read thread 
http://code.google.com/p/pymssql/issues/detail?id=2).
Your py2exe configuration must contain:
packages: [pymssql],
includes: [_mssql, pymssql],

This works for me, and if it isn't for you, I give up at this moment.

-- 
Regards
Jacek Kałucki
___
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/4df08c23.1020...@rz.onet.pl


Re: [dabo-users] MsSQL problem in setup.py (create distribution)

2011-06-08 Thread Jacek Kałucki
Użytkownik enrico secco napisał:

 Hi,
 I did develop an allpication with DABO and now I'm tryng to create the 
 distribution.
 The application run very well in the develop machine, using at the same time 
 two databases, MsSQL and PostgreSQL.
 My installation on the develop machine is:
 Platform: Win
 Python Version: 2.5.4 on win32
 Dabo Version: Version 0.9.3; Revision ~6449
 UI Version: 2.8.10.1 on wxMSW
 When I run my .exe, directly from the dist directory in the develop pc, the 
 application exit with error and the log is
 
 2011-06-08 14:00:24 - ERROR - You do not have the database module for MsSQL 
 installed
 C:\temp\dabo-odbc\prova\costo\dist\costo.exe\dabo\lib\SimpleCrypt.py:52: 
 UserWarning: WARNING: SimpleCrypt is not secure. Please see 
 http://wiki.dabodev.com/SimpleCrypt for more information
 Traceback (most recent call last):
File costo.py, line 38, inmodule
File dabo\dApp.pyo, line 1007, in getConnectionByName
File dabo\db\dConnection.pyo, line 32, in __init__
File dabo\db\dConnection.pyo, line 79, in _openConnection
 AttributeError: 'NoneType' object has no attribute 'KeepAliveInterval'
 
 I tryed to add some info in the setup.py file like:
 includes: [pymssql,_mssql]
 but the result is the same.
 I searched in the mailing list but nothig.
 Have somebody an idea?
 Thanks for help!


Hi.

If you don't intend to use backends other than MsSQL and PostgreSQL,
you could manually edit your .cnxml file and remove redundant
backend connection definitions.
Otherwise you must include referenced interfaces in your distribution.

-- 
Regards
Jacek Kałucki
___
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/4def6d7f.3040...@rz.onet.pl


Re: [dabo-users] MsSQL problem in setup.py (create distribution)

2011-06-08 Thread Jacek Kałucki
Użytkownik enrico secco napisał:

 If I wont include referenced interfaces in my distribution how can I do?
 The
 includes: [pymssql,_mssql]
 in the setup.py in evidently not sufficient.
 Enrico Secco


I think that your problem is that Dabo detects all connection files
placed in different locations, e.g. in db, data, %USERPROFILE%/Dabo/data, 
etc.
Just try to find all .cnxml files and use the correct one (remove redundant).
Or if you have mySQL driver installed, add MySQLdb package to your distribution:
options = {
py2exe: {
packages: [MySQLdb]
}
}

-- 
Regards
Jacek Kałucki
___
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/4def7b32.9040...@rz.onet.pl


Re: [dabo-users] MsSQL problem in setup.py (create distribution)

2011-06-08 Thread Jacek Kałucki
Użytkownik Ed Leafe napisał:
 On Jun 8, 2011, at 8:39 AM, Jacek Kałucki wrote:

 Otherwise you must include referenced interfaces in your distribution.


   I think that's his question: how to tell py2exe to pull in the required 
 modules for MsSQL.


Sorry, you are absolutely right. The 27c degrees without AC in room is too much 
for me.
I'm using MsSQL without any problem with the following setup declaration:

packages: [pymssql]

-- 
Regards
Jacek Kałucki
___
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/4def8563.5070...@rz.onet.pl


Re: [dabo-users] Ubuntu 'Indicator' system tray integration for Dabo app

2011-06-08 Thread Jacek Kałucki
Użytkownik Jamie Adams napisał:
 Hello,

 Still a bit of a newbie to all the stuff I'm playing with here, so
 forgive any obvious errors.  I found this nice little code sample to
 create an indicator applet in Python for Ubuntu's Indicator area
 (basically equivalent to the system tray in Windows-land).

 https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators#Python+version



Hi.

I'm afraid that Dabo doesn't implement such control but wx does.
You probably should play with wx.TaskBarIcon control.
Documentation says that it should work for GNOME = 2,
but I never tried this, just use wx demos to check if it works.
Or, I guess it's related with your sanity question - you have to be
a desperate to follow that way, write your indicator with PyGTK and
application core in wx, then use third party library to connect
each other (sockets, XMPP?).

-- 
Regards
Jacek Kałucki
___
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/4defa46c.1050...@rz.onet.pl


Re: [dabo-users] Grid with graphic drop list

2011-05-23 Thread Jacek Kałucki
Użytkownik Gabriel Martin del Campo y Eternod napisał:
 I'va have a table that contain tasks, and each task have a status (active,
 in progress, cancel, terminated, etc) and for each status instead of a
 leyend or letter I want to use a simbol or icon.

 It is posible to make a grid that in one column contains for each tasks
 (row) a listbox with the icons (picture/image) of the status?


Hi.

I think you must play with the custom cell renderer/editor class, e.g.:
- create custom renderer class MyCustomListCellRenderer
- set column.CustomRendererClass = MyCustomListCellRenderer

There were similar threads on this forum, check archive please and
wxPython demo too (GridStdEdRend.py).

Regards
Jacek Kałucki
___
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/4dda69e0.4030...@rz.onet.pl


Re: [dabo-users] Error in connection

2011-05-06 Thread Jacek Kałucki
Użytkownik Camelot napisał:
 I cann't to understand why cxneditor write encoding=1251?


Hi.

Just change it to utf-8 and should be fine.
There is a small bug in Dabo dicttoxml() function.
It takes sencoding setting from dabo.getEncoding() function which returns
default system encoding, while real application encoding is defined
with dabo.defaultEncoding attribute.

Regards
Jacek Kałucki
___
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/4dc3aaf7.20...@rz.onet.pl


Re: [dabo-users] Ubuntu recent update to wxPython

2011-04-26 Thread Jacek Kałucki
Użytkownik Jim Byrnes napisał:
 On 04-22-11 I let Synaptic apply an update for wxPython from 2.8.11.0-0
 to 2.8.12.0-0. Since then a small app I wrote  that is a data entry
 frontend to MYSQL is behaving very strangely.

 The problem seems to center on my use of a dMaskedTextbox, other parts
 of the UI seem to be OK.  I have a series of dMaskedTextboxes that I
 step through by entering data and hitting the enter key.  when I enter
 data to the phone number box the database is queried. If there is a
 match in the names table all the data entered previously is written to
 the items table and the form is cleared for new input.  If there is no
 match two more TB's are shown once data is entered and a submit button
 pushed data is written to both the names and items tables and the form
 is cleared.

 That's how it worked for months. Since the update it's very erratic.
 Now not all of the TB's are cleared and it's not always the same ones
 not being cleared.  It looks like data is written to the items table but
 not the names table when it should be.  I just discovered this problem
 and haven't had a chance to try to analyze it in more depth.

 I am wondering is any other Ubuntu 10.04 users are seeing any problems
 after this update?


Hi.

I recently switched my application to 2.8.12 and didn't noticed any 
problems,
so I can't help you much.
Although, I don't use dMaskedTextbox controls at all, but rather customized
wx.lib.masked.NumCtrl to edit numeric data.
Did you try to update Dabo to the latest available version?
Is your problem related with what control has focus on it when you use 
save button?

Regards
Jacek Kałucki
___
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/4db6bf1d.8060...@rz.onet.pl


Re: [dabo-users] linux slow down - long post

2011-04-19 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 I see an immediate issue with the bizobj use.  You assume that the bizobj is
 only used for the choices and keys.  I often need to use the same bizobj in
 different ways and you can't use the same table twice in Dabo.  Although,


Actually, you can use the same data source unlimited number of times
with some limitations considering UI layer,
e.g. only the first instance of the particular data source can be accessed
with form getBizobj() method.
These limitations doesn't concern situation where you refer
your bizobjs as object form attributes.

 others have reported otherwise - I have not been successful in just renaming a
 bizobj.   So I have two methods
 1. use a temp cursor to access the data directly  - I use this often!
 2. created a view that matched my requirements.

 updateChoices method does it the way I do it (accept you require a bizobj).
 But you are also filtering.  What happens when the bizobj data is very large?
 Do you really want to retrieve all the data?

 ensureSourceValInChoices method - I like it and with your permission will
 use some of it.  However, you are appending the invalid value even if the
 value is not valid.  How does that get around the issue I have where the
 stored value is no longer valid?

 Not all dropdown routines will depend on OnHit.   There is a ChangedValue.
 You might want to capture more events.\


I have working mixin class I use for such tasks with most item controls like
dropdown list, list control, etc.
It's universal and can rely on bizobj, dataset or callable as his data 
source.
If control is bound to the bizobj, all changes in Choices are handled 
automatically.
I would like to share my code with you but I'm still lack of time to 
document it well
and write few samples, what is even more important.
Maybe in next week I will got some free time and will try to put it on 
wiki page.

Regards
Jacek Kałucki
___
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/4dadc6ef.4050...@rz.onet.pl


Re: [dabo-users] custom business rules requirement

2011-04-03 Thread Jacek Kałucki
Użytkownik Nate Lowrie napisał:
 the addresses tied to orders don't change.  When a user edits an
 address, if there are any changes, I need to be able to make a copy of
 the data as a new record with the is_active field set to true and then
 revert the old record and set it's is_active field to false. I would
 like to define this at the bizobj level and I think it should go after
 validation but before the save completes.


Hi.

You can use beforeSave() and cloneRecord() together.
Remember to restore row pointer when returning from beforeSave() method.
There also could be additional problem with scanChangedRows() used with
saveAll() method - you must use two phase save.

Regards
Jacek Kałucki
___
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/4d98478d.7030...@rz.onet.pl


Re: [dabo-users] PyCon 2010 Example - Page 24- running into errors

2011-04-03 Thread Jacek Kałucki

 Hi John,
 I'm running the demo on page 24 so there shouldn't be any other modules
 being run (that I'm aware of) and I have not created any classes or modules
 named pdb. How can I confirm that pdb.set_trace is present? I tried running
 it on a 32 bit version on Win 7 and Python 2.6.5 and the exercise on page 24
 worked.
 So I went back to my 64 bit PC and tried to uninstall Dabo and install it
 under the Python 2.6.6 directory - No luck. On my 64 bit PC I uninstalled
 Dabo, using easy_install.py -mxN Dabo then deleting the directories. I
 then tried to install Dabo in the Python26 directory, but it keeps
 installing the egg directory in the Python27 directory. I tried the dabo.pth
 file in the Python\Site-packages directory but it only works for the files I
 create in that directory.

 My question is - how can I get Dabo installed into the Python26 directory?
 Python 2.6.6 is now the default, but I need to keep 2.7 installed for other
 projects that I'm trying to work on. Is there a configuration file somewhere
 that I need to delete in the original installation directory?



Hi.

Currently I have unpleasantness to work with one Win 7 64 machine.
After all, 32bit Python applications including Dabo works fine for me.
If you intend to use 32 and 64bit Python together, it's useful
you provide a way to switching PATH environment variable
to point correct interpreter version.
Otherwise default will be the first one available in the PATH.
Second, I stopped using easy_install because it's unreliable,
I mean, it can't install some packages correctly, e.g. with py2exe,
it doesn't install binary stuff, so I couldn't prepare packages.
If you still are getting into trouble, just try to copy entire dabo
directory into the site-packages directory.

Regards
Jacek Kałucki

___
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/4d984d21.7030...@rz.onet.pl


Re: [dabo-users] Problem on saving new records. - reposting

2011-04-01 Thread Jacek Kałucki
Użytkownik enrico secco napisał:
 Hi,

 I re-post the problem because of no-subject in the first and because of some 
 news.
 (question: is possible to change, or add, the subject of a post?)

 I'm tryng to develop an application but I'm blocked in a crucial point:
 I have 2 database, the first MSSQLSERVER and the second PostgreSQL.
 The first operation the user must do is extract a recordset from a table 
 'ARCDIPAN' in the MSSQL, select some record, then export the selected records 
 in table 'public.anagrafica' in PostgreSQL.
 To consent to select the records I add a field 'PRESEL' to the extracted 
 record and in the grid I show this value with e boolean editable field. So 
 the user can select the records.
 Than I did re-defined the onSave method in the FrmArcdipan ui class, relative 
 to the extraction table ARCDIPAN, and write the method to getDataSet from the
 biz of the class and try to saveAll in a biztmp defined:
 biztmp = dabo.biz.dBizobj(self.Application.dbConnection, 
 DataSource=public.anagrafica, KeyField=idsessione,coddip)
 where the self.Application.dbConnection is the connection to the PostgreSQL 
 db.

 The structure of the original DataSet and the destination DataSet are 
 different so in the method I construct a list (called dsExp) of dictionary, 
 any dictionary with the structure of the destination bizObj and than I try:
 biztmp.appendDataSet(dabo.db.dDataSet(tuple(dsExp)))
 biztmp.saveAll()

 To do that I did copy from examples found in this mail-list.

 Problem! No record is saved. No error message.

 I did try in an other way. I did construct the biz object to write with the 
 class defined by the AppWizard:
 bizExp = self.Application.biz.Public_Anagrafica(self.Application.dbConnection)
 bizExp.appendDataSet(dabo.db.dDataSet(tuple(dsExp)))
 bizExp.saveAll()



Hi.

The appendDataSet() method, it doesn't do anything with you data.
Especially, it doesn't toggle *new* row flag required to recognize row 
as modified.
Try to do something like this:

code
 cursor = biztmp._CurrentCursor

 def toggleNewFlag():
 cursor.setNewFlag()

 biztmp.scanRows(toggleNewFlag, [list of appended rows])
/code

Regards
Jacek Kałucki
___
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/4d95acb4.7000...@rz.onet.pl


Re: [dabo-users] Problem on saving new records. - reposting

2011-04-01 Thread Jacek Kałucki
Użytkownik Jacek Kałucki napisał:
 The appendDataSet() method, it doesn't do anything with you data.
 Especially, it doesn't toggle*new*  row flag required to recognize row
 as modified.
 Try to do something like this:

 code
   cursor = biztmp._CurrentCursor

   def toggleNewFlag():
   cursor.setNewFlag()

   biztmp.scanRows(toggleNewFlag, [list of appended rows])
 /code



Before doing this, you probably also need to:
- set biztmp.SaveNewUnchanged = True
- set proper PK values for each row if not set.

Regards
Jacek Kałucki
___
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/4d95af70.4030...@rz.onet.pl


Re: [dabo-users] Problem on saving new records. - reposting

2011-04-01 Thread Jacek Kałucki
Użytkownik enrico secco napisał:
 Hi.


 The appendDataSet() method, it doesn't do anything with you data.
  
 No. With the debugger I see the data in the bizObj. So the method append 
 really the data to the bizObj.


I know that. This method transfer all fields except PK filed,
if AutoPopulatePK is set.
But it doesn't alter internal framework structures like changed data buffer,
new record list, etc.

 Especially, it doesn't toggle *new* row flag required to recognize row
 as modified.
 Try to do something like this:

 code
  cursor = biztmp._CurrentCursor
  def toggleNewFlag():
  cursor.setNewFlag()

  biztmp.scanRows(toggleNewFlag, [list of appended rows])
 /code
  
 Ok. But I did already set bizObj.SaveNewUnchanged = True.
 And if I try to do wath you say I find 2 situation:
 If I append the data first than I find the _.CurrentCursor is None.


I had never seen nothing like this. Although it can return None value
if for some reasons, provided key can't be used as dictionary key.
The _CurrentCursorKey could be None, and usually
is for master bizobj, but  _CurrentCursor property always return cursor 
instance
although it could be an empty cursor of course.

 But if I don't use your method and I follow the execution with winpdb I find 
 allways the the data set correctly,
 all the tests are passed except the IsAdding is False for all the records.

 I start to think to export the data with a 'low level' system. I open a 
 simple psycopg connection to insert the data.
 Could be is un-elegant but I resolve.


Suit yourself.

Regards
Jacek Kałucki

___
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/4d95ca66.1090...@rz.onet.pl


Re: [dabo-users] Problem on saving new records. - reposting

2011-04-01 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 tempCur.execute(insert into table (someval,moreval) values (%s, '%s') %
 (codeval,morecodeval))



I rather dissuade such query usage.
The preferred way is:

tempCur.execute(insert into table (someval,moreval) values (%s, %s),
(codeval,morecodeval))

Regards
Jacek Kałucki
___
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/4d95ddfe.5050...@rz.onet.pl


Re: [dabo-users] Using ReportDesigner: data? bizobj?

2011-03-26 Thread Jacek Kałucki
Użytkownik Sibylle Koczian napisał:
 As far as I can see at the moment it's the LIMIT clause added to the
 SQL. Firebird uses SELECT FIRST x SKIP yrest of query  (or with new
 versions SELECTrest of query  ROWS y+1 TO y+x) instead. If a Dabo
 application uses a normal dBizobj this is no problem, the usual LIMIT
 1000 addition is changed to FIRST 1000 and this clause is put into
 its correct place.

 But the createreport script uses dConnection.getDaboCursor() and that
 doesn't seem to do this adaptation. Using a Firebird connection it
 crashes with exactly the same error message I get from FlameRobin if I
 try to execute a query with LIMIT x directly.

 I'll try to find out more about this, but perhaps somebody else has good
 advice?




Hi.

You mean that cursor.setLimitClause(1000) doesn't work?

Regards
Jacek Kałucki
___
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/4d8e1ff2.8040...@rz.onet.pl


Re: [dabo-users] Using ReportDesigner: data? bizobj?

2011-03-26 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 No I think what he is saying is the code I provided (designed to work with
 Postgres) is causing a problem with FireBird because of the LIMIT statement
 I'm most likely added.

 I guess there are several ways this can be handled.

 1. create an if elif statement handling the different ways the different
 databases require it.

 2.  change the code to use .setLimitClause(1000) - I'm guessing that will be
 much harder.


I think it's not so hard.
Instead of using cursor.execute(some sql), use the embedded SQL 
builder instead:
 cursor.setFieldClause(...)
 cursor.setFromClause(...)
 cursor.setWhereClause(...)
 cursor.setLimitClause(1000)
 cursor.executeSQL((param1, param2, param3))

It's the backend independent way.

Regards
Jacek Kałucki

___
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/4d8e27eb.8000...@rz.onet.pl


Re: [dabo-users] 6494 changes error

2011-03-16 Thread Jacek Kałucki
Użytkownik Paul McNett napisał:
 I'm sorry but I don't have an answer. I think there may be a better
 solution to my problem buy until we find it I have to stick with what
 works.


If you have free time, send me please few details about your problems:
- your encoding
- what framework lines raises unicode errors
- etc.

Regards
Jacek Kałucki
___
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/4d806ab2.6020...@rz.onet.pl


Re: [dabo-users] 6494 changes error

2011-03-16 Thread Jacek Kałucki
Użytkownik Paul McNett napisał:
 The only thing I remember is that I had a customer database that wouldn't work
 correctly with some records without the str factory. I think either Jeff 
 Johnson or
 John Fabiani suggested the change. I researched it briefly and determined 
 that it
 didn't cause problems, and committed it.

 Look in dabo-dev and/or dabo-users archive around October 20, 2010.



Was your problem related to the ½” symbol handling in string data?
If yes, I got this thread.

Regards
Jacek Kałucki
___
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/4d80ca3b.2070...@rz.onet.pl


Re: [dabo-users] 6494 changes error

2011-03-16 Thread Jacek Kałucki
Użytkownik John Fabiani napisał:
 I don't recall being involved but I do agree with the statement made in the
 comments:
 dCursor.Encoding should
 come from what the database reports, and stay that way unless the appdev
 changes
 it.



Agree. I will add the pragma statement and do some tests.

Regards
Jacek Kałucki
___
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/4d80cd0d.70...@rz.onet.pl


Re: [dabo-users] 6494 changes error

2011-03-15 Thread Jacek Kałucki

 See log for r6123. I was having errors on Windows until setting the 
 text_factory to str.



I have problems just with this commit.
Since for sqlite backend the _alreadyCorrectedFieldTypes is always true,
Dabo never corrects field types.
Without this commit everything works fine for me but with it,
I receive garbaged strings, e.g. ń becomes Ĺ„.
I got no unicode errors regardles factory is set to str or text.
It looks like our commits exclude each other.
What the next?

Regards
Jacek Kałucki
___
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/4d7f482a.30...@rz.onet.pl


Re: [dabo-users] dabohangover

2011-03-14 Thread Jacek Kałucki
Użytkownik JK napisał:
 my install directory (C:\Documents and
 Settings\administrátor\Dokumenty\Setups\Dabo\dabo\ide\) with


Read me carefully please:
- your .cdxml must be encoded with utf-8
- first line of connection file should be:
?xml version=1.0 encoding=utf-8 standalone=yes?

This is why administrátor in xml file is administr\xc3\xa1tor.
This is the main problem sqlite can't decode path.
Or move your database to path location without national characters.

Regards
Jacek Kałucki

___
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/4d7e6f0d@rz.onet.pl


Re: [dabo-users] dabohangover

2011-03-14 Thread Jacek Kałucki
Użytkownik JK napisał:
 I am sorry, I don´t understand what you mean with database in this
 sentence of yours:
 Or move your_database_  to path location without national characters.
 Do you mean the Dabo folder in this my path: C:\Documents and 
 Settings\administrátor\Dokumenty\Setups\Dabo\dabo?
 If yes, and I change the path to c:/Dabo, how will the installation
 in c:/python26/lib/site-packages/Dabo-0.9.3-py2.6.egg get it know?


There is error in Dabo that prevents from correct path decoding.
Your path contains national character á and can't be properly decoded.
Hold on please, I'm working on this.

Regards
Jacek Kałucki
___
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/4d7e78ca.40...@rz.onet.pl


Re: [dabo-users] dabohangover

2011-03-14 Thread Jacek Kałucki

 There is error in Dabo that prevents from correct path decoding.
 Your path contains national character á and can't be properly decoded.
 Hold on please, I'm working on this.


Ok. Get latest SVN commit version and try again please.

Regards
Jacek Kałucki
___
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/4d7e7c6d.6070...@rz.onet.pl


Re: [dabo-users] dabohangover

2011-03-14 Thread Jacek Kałucki

 Thank you, I will do it.
 In the meantime, I have started to experience folloving message, which
 strikes me dumb:

 Traceback (most recent call last):
 File C:\Python26\lib\site.py, line 525, inmodule
   main()
 File C:\Python26\lib\site.py, line 508, in main
   known_paths = addsitepackages(known_paths)
 File C:\Python26\lib\site.py, line 288, in addsitepackages
   addsitedir(sitedir, known_paths)
 File C:\Python26\lib\site.py, line 185, in addsitedir
   addpackage(sitedir, name, known_paths)
 File C:\Python26\lib\site.py, line 155, in addpackage
   exec line
 File string, line 1, inmodule
 AttributeError: 'module' object has no attribute '__plen'



Check packages you recently added to the site-packages directory,
e.g import them separately one by one.
There is an error in package or corresponding .pth file.

Regards
Jacek Kałucki
___
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/4d7e9017.7010...@rz.onet.pl


Re: [dabo-users] 6494 changes error

2011-03-14 Thread Jacek Kałucki

 I'm getting the following from 6494

   File /home/johnf/pespy/pespy/lkgridClass.py, line 124, in afterInit
  self.ds = self.schgridDS.execute(select * from dataset where regid = 
 '%s'
  % (self.LookupID,))
File /home/johnf/dabo/dabo/db/dDataSet.py, line 355, in execute
  if not self._alreadyCorrectedFieldTypes:
 AttributeError: 'dDataSet' object has no attribute
 '_alreadyCorrectedFieldTypes'



Hi.

I revertet dDataSet changes.
I'm not really sure if we need change default sqlite text factory here 
to the str type,
since it uses utf-8 and all Dabo data manipulations has take place at 
cursor level.
What if we leave this setting unchanged?

Regards
Jacek Kałucki
___
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/4d7eb014.3020...@rz.onet.pl


Re: [dabo-users] dabohangover

2011-03-13 Thread Jacek Kałucki
Użytkownik JK napisał:
 Well,  I did find DaboPreferences.db file in c:/DS/admin/Application
 Data/Dabo folder
 and renamed the file.
 Started Python in the WPS konzole, calledapp=dabo.dApp() and got
 the same as priviously (message B).
 Tovim



Hi.

Did you generate .cnxml file with the wizard?
If you did, edit it and change enconding attribute
in the header to utf-8.

Regards
Jacek Kałucki
___
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/4d7d36a6.9020...@rz.onet.pl


  1   2   3   4   5   >