Re: [dabo-users] RegID problem

2008-08-27 Thread Ed Leafe
On Aug 26, 2008, at 5:13 PM, Henning Hraban Ramm wrote:

 Hello, please, if you implement something in this direction, think
 about switching to standard logging - you can direct that to anything.

You will be pleased to find that the new debug output uses the  
standard Python logging module.

-- Ed Leafe





___
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/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-27 Thread Henning Hraban Ramm
Am 2008-08-27 um 18:26 schrieb Ed Leafe:

 On Aug 26, 2008, at 5:13 PM, Henning Hraban Ramm wrote:

 Hello, please, if you implement something in this direction, think
 about switching to standard logging - you can direct that to  
 anything.

   You will be pleased to find that the new debug output uses the
 standard Python logging module.


Great!
And sorry that I forgot again that I cannot send attachments.


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net
https://www.cacert.org (I'm an assurer)





___
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/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread Sibylle Koczian
Am Montag, 25. August 2008 18:03:28 schrieb Uwe Grauer:
 Sibylle Koczian wrote:
   def afterRequery(self):
  self.testlogID.Value += u\nRequery ausgeführt.

 BTW, if you need this for logging only, use:
 print Requery ausgeführt.

 This will print to the command line window if you start your app from a
 command line.


Of course, but for learning Dabo I found a logging area in the main window a 
little more interesting. You were right about putting the requery() call in 
afterInitAll(). I suppose createBizobjs() is executed at a moment when the 
visual controls aren't fully created?

BTW this might answer your question about doing the work twice: it isn't work 
at the moment, at least not the applications working in linux. It's trying to 
learn one Python GUI toolkit (still not quite decided between PyQt and Dabo, 
because the PyQt/Qt documentation is so much better). 

Thank you,
Sibylle

-- 
Dr. Sibylle Koczian


___
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/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread Uwe Grauer
Sibylle Koczian wrote:
 Am Montag, 25. August 2008 18:03:28 schrieb Uwe Grauer:
 Sibylle Koczian wrote:
  def afterRequery(self):
 self.testlogID.Value += u\nRequery ausgeführt.
 BTW, if you need this for logging only, use:
 print Requery ausgeführt.

 This will print to the command line window if you start your app from a
 command line.

 
 Of course, but for learning Dabo I found a logging area in the main window a 
 little more interesting. You were right about putting the requery() call in 
 afterInitAll(). I suppose createBizobjs() is executed at a moment when the 
 visual controls aren't fully created?


You will find out that even afterInitAll() isn't the right place for a
call to requery(). Most of my forms use onActivate() with some status
variables for this kind of work.

 BTW this might answer your question about doing the work twice: it isn't work 
 at the moment, at least not the applications working in linux. It's trying to 
 learn one Python GUI toolkit (still not quite decided between PyQt and Dabo, 
 because the PyQt/Qt documentation is so much better). 
 

Dabo isn't a gui toolkit. Maybe Dabo will include other gui toolkits
like PyQt or pygtk in the future.
If we are talking about cross platform tools, PyQt isn't the right
choice because of license problems on windows and commercial use cases.
I think wxWidgets is the best gui tool in terms of cross platform usage.
Dabo just makes it very easy to use for this.

Documentation is the worst aspect of Dabo.
Feel free to add whatever is missing to the Dabo wiki.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread Ed Leafe
On Aug 26, 2008, at 5:10 AM, Sibylle Koczian wrote:

 Of course, but for learning Dabo I found a logging area in the main  
 window a
 little more interesting.

Hey, I like that idea. Traditionally we print debug info to stdout,  
but it would be handy to have a GUI option for this. I might steal  
this idea!

 You were right about putting the requery() call in
 afterInitAll(). I suppose createBizobjs() is executed at a moment  
 when the
 visual controls aren't fully created?


createBizobjs() is called in the form's afterInit(), which fires at  
the end of form creation. At that point, none of the objects contained  
in the form have been created. Since you tried to reference one of  
these contained controls, you got the error that you reported, as it  
did not yet exist. form.afterInitAll() fires after everything on the  
form is fully created, allowing you to reference them.

 BTW this might answer your question about doing the work twice: it  
 isn't work
 at the moment, at least not the applications working in linux. It's  
 trying to
 learn one Python GUI toolkit (still not quite decided between PyQt  
 and Dabo,
 because the PyQt/Qt documentation is so much better).

I love my job, but I'd really love working somewhere where I would  
get paid to develop and document Dabo. I started the step-by-step  
guide last November in the hope of illustrating several aspects of  
what's involved in creating something more complex than a Hello World- 
level demo, but then started my job, and haven't had the time to  
follow up on that.

I will grant you that our documentation is lacking, but we try to  
make up for that by being zealous about online support!

-- Ed Leafe





___
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/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread Ed Leafe
On Aug 26, 2008, at 6:14 AM, Uwe Grauer wrote:

 You will find out that even afterInitAll() isn't the right place for a
 call to requery(). Most of my forms use onActivate() with some status
 variables for this kind of work.


Why wouldn't afterInitAll() be a good time? All the controls are  
created at that point.

-- Ed Leafe





___
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/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread Uwe Grauer
Ed Leafe wrote:
 On Aug 26, 2008, at 6:14 AM, Uwe Grauer wrote:
 
 You will find out that even afterInitAll() isn't the right place for a
 call to requery(). Most of my forms use onActivate() with some status
 variables for this kind of work.
 
 
   Why wouldn't afterInitAll() be a good time? All the controls are  
 created at that point.
 

It is the best place for a form which is used in a run once situation.

But if you call other forms from a central data form than i use
onActivate() to do all data operations to be able to control
my displayed data. Of cause this depends on use cases, which
can be very different.

Uwe



___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread Paul McNett
Ed Leafe wrote:
 On Aug 26, 2008, at 6:14 AM, Uwe Grauer wrote:
 
 You will find out that even afterInitAll() isn't the right place for a
 call to requery(). Most of my forms use onActivate() with some status
 variables for this kind of work.
 
 
   Why wouldn't afterInitAll() be a good time? All the controls are  
 created at that point.

Putting too much stuff in the init phase makes forms feel like they are 
loading sluggishly. Delaying the requery until the controls that need 
the data are shown can make things feel snappier.

But that's my reason. Uwe, what's yours?

Paul


___
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/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread Nate Lowrie
On Tue, Aug 26, 2008 at 7:10 AM, Paul McNett [EMAIL PROTECTED] wrote:
 Putting too much stuff in the init phase makes forms feel like they are
 loading sluggishly. Delaying the requery until the controls that need
 the data are shown can make things feel snappier.

Why not just put it in a dabo.ui.callAfter(self.requery) in the
afterInitAll if the loading is sluggish?

Nate L.


___
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/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread Uwe Grauer
Nate Lowrie wrote:
 On Tue, Aug 26, 2008 at 7:10 AM, Paul McNett [EMAIL PROTECTED] wrote:
 Putting too much stuff in the init phase makes forms feel like they are
 loading sluggishly. Delaying the requery until the controls that need
 the data are shown can make things feel snappier.
 
 Why not just put it in a dabo.ui.callAfter(self.requery) in the
 afterInitAll if the loading is sluggish?
 

Both your way to use dabo.ui.callAfter(self.requery) and calling it
directly in afterInitAll() will work for simple use cases.

If the form stays open and has to update depending on the
state of other forms, onActivate is the best place this.
This is my workaround of not being able to use real modal forms
and was the reason i wanted support for data aware dialogs.

Typically if use code like this:
def onActivate(self, evt):
if self.ChildRetVal:
self.ProcessChildRetVal()
elif not self.FormIsActivated:
# form was newly called
self.FormIsActivated = True
...
self.requery()

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread Paul McNett
Ed Leafe wrote:
 On Aug 26, 2008, at 8:10 AM, Paul McNett wrote:
 
 Putting too much stuff in the init phase makes forms feel like they  
 are
 loading sluggishly. Delaying the requery until the controls that need
 the data are shown can make things feel snappier.
 
 
   That's different than the original issue, which was that references  
 don't yet exist in afterInit(). The point is that you *could* put it  
 in afterInitAll() and it would work.
 
   I think when working with people experiencing problems that indicate  
 that they are new to the framework, we try not to confuse them by  
 discussing particular cases, and instead recommend the standard  
 practice. If later on they have an issue regarding speed of loading,  
 we can then suggest alternatives.

Hey, I was responding to *your* question.

As a user of many products, I must say I appreciate getting a range of 
responses. If something doesn't fit right now, at least I have a 
potential connection later on.

Even if someone posts something that is downright wrong, it tends to be 
more valuable because of the ensuing correction/discussion.

I'd hate to think that we might be trying to discourage participation here.

Paul



___
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/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread Ed Leafe
On Aug 26, 2008, at 10:30 AM, Paul McNett wrote:

 Hey, I was responding to *your* question.


Which was asking Uwe why he would tell a newcomer that referencing an  
object in afterInitAll() might not work.

 Even if someone posts something that is downright wrong, it tends to  
 be
 more valuable because of the ensuing correction/discussion.

That's not my experience when I'm the one who is new to the topic  
being discussed. When I'm the one giving the advice, sure, it's more  
interesting. But when I'm starting out and somewhat confused, having  
several conflicting answers to a simple question is not helpful;  
rather, it makes me less likely to want to use the product.

 I'd hate to think that we might be trying to discourage  
 participation here.

And I'd hate to think that we are lowering the quality of support on  
this list. The primary purpose of dabo-users is *support* for people  
using the framework. Today alone we've already had one incorrect and  
one misleading reply to simple user questions. Esoteric discussions  
that are not focused on answering our users' questions belong on dabo- 
dev.

-- Ed Leafe



___
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/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread Uwe Grauer
Ed Leafe wrote:
 On Aug 26, 2008, at 10:30 AM, Paul McNett wrote:
 
 Hey, I was responding to *your* question.
 
 
   Which was asking Uwe why he would tell a newcomer that referencing an  
 object in afterInitAll() might not work.


I didn't say that referencing an object in afterInitAll() does not work.
Where did you read that?

Because of the exception she got, i told her to try to place the
refresh() call in afterInitAll() instead of afterInit().

Go read it again.

And unlike you i love the discussions on the support list as they help
to understand the whys and whens and let me improve the way i use the
framework. I don't see why discussions are lowering the quality of
support on this list.

If you really want to improve the support, then you would have to
improve the documentation. The missing documentation is the reason why
people are getting confused in the first place. Learning to use Dabo
doesn't work by reading documentation. That's why i always loved the
discussions on this list. Straight answers are not enough to compensate
missing docs.

Uwe



___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread Sibylle Koczian
Am Dienstag, 26. August 2008 14:27:27 schrieb Ed Leafe:
 On Aug 26, 2008, at 5:10 AM, Sibylle Koczian wrote:
  Of course, but for learning Dabo I found a logging area in the main
  window a
  little more interesting.

   Hey, I like that idea. Traditionally we print debug info to stdout,
 but it would be handy to have a GUI option for this. I might steal
 this idea!


For debug info: what's easier to take out again? For Windows it really would 
be useful, because copying text from the command window is not very 
comfortable. And if an application isn't started from a console, stdout 
content may not be visible.

But the demo already has this. Might be a little larger, though.

   I will grant you that our documentation is lacking, but we try to
 make up for that by being zealous about online support!


Very true. And as the mail archive is searchable quite well it's a helpful 
part of the documentation.

And so I'll put my next question into a new mail with a new and hopefully 
suitable subject.

Till then,
Sibylle

-- 
Dr. Sibylle Koczian


___
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/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread johnf
On Tuesday 26 August 2008 05:27:27 am Ed Leafe wrote:
  Of course, but for learning Dabo I found a logging area in the main  
  window a
  little more interesting.

 Hey, I like that idea. Traditionally we print debug info to stdout,
   but it would be handy to have a GUI option for this. I might steal this
 idea!

Please may sure I can turn off the output to the GUI.  I like the fact that 
tracebacks and print statement are directed to standard out.

-- 
John Fabiani


___
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/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread Ed Leafe
On Aug 26, 2008, at 2:41 PM, johnf wrote:

 Please may sure I can turn off the output to the GUI.  I like the  
 fact that
 tracebacks and print statement are directed to standard out.


There would be no output by the framework. It would be for debugging  
that you yourself insert. Think the the DEBUGOUT() command in VFP.

-- Ed Leafe





___
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/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread johnf
On Tuesday 26 August 2008 01:38:45 pm Ed Leafe wrote:
 On Aug 26, 2008, at 2:41 PM, johnf wrote:
  Please may sure I can turn off the output to the GUI.  I like the
  fact that
  tracebacks and print statement are directed to standard out.

   There would be no output by the framework. It would be for debugging
 that you yourself insert. Think the the DEBUGOUT() command in VFP.

 -- Ed Leafe

Then +2 from me.  I think that sounds great.


-- 
John Fabiani


___
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/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-26 Thread Henning Hraban Ramm

Am 2008-08-26 um 22:38 schrieb Ed Leafe:

 On Aug 26, 2008, at 2:41 PM, johnf wrote:

 Please may sure I can turn off the output to the GUI.  I like the
 fact that
 tracebacks and print statement are directed to standard out.

   There would be no output by the framework. It would be for debugging
 that you yourself insert. Think the the DEBUGOUT() command in VFP.


Hello, please, if you implement something in this direction, think  
about switching to standard logging - you can direct that to anything.

I could contribute a (not very clever) handler that logs to a dabo  
widget, see attachment; I also tried to redirect dabo's output to  
standard logging (and then to the same widget), but that's not  
completely working...


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net
https://www.cacert.org (I'm an assurer)




--- StripMime Report -- processed MIME parts ---
multipart/mixed
  text/plain (text body -- kept)
  text/x-python-script
---

___
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/[EMAIL PROTECTED]


[dabo-users] RegID problem

2008-08-25 Thread Sibylle Koczian
Hello,

in the afterInit method of my form I put a dGrid in with

 testLog = dabo.ui.dEditBox(self, RegID=testlogID, ReadOnly=True)
 testLog.Value = SQLite Feldtest
 panel.Sizer.append1x(testLog)

and in the afterRequery method I want to put additional text in:

 def afterRequery(self):
self.testlogID.Value += u\nRequery ausgeführt.

If I try to run the application I get:

Traceback (most recent call last):
  File sqlite_feldtest.py, line 49, in module
app.start()
  File /usr/lib/python2.5/site-packages/dabo/dApp.py, line 314, in start
self.setup()
  File /usr/lib/python2.5/site-packages/dabo/dApp.py, line 279, in setup
self.initUIApp()
  File /usr/lib/python2.5/site-packages/dabo/dApp.py, line 306, in initUIApp
self.uiApp.setup()
  File /usr/lib/python2.5/site-packages/dabo/ui/uiwx/uiApp.py, line 279, in 
setup
frm = self.dApp.MainForm = mfc()
  File /usr/lib/python2.5/site-packages/dabo/ui/uiwx/dForm.py, line 895, in 
__init__
BaseForm.__init__(self, preClass, parent, properties, attProperties, 
*args, **kwargs)
  File /usr/lib/python2.5/site-packages/dabo/ui/uiwx/dForm.py, line 44, in 
__init__
fm.dFormMixin.__init__(self, preClass, parent, properties, attProperties, 
*args, **kwargs)
  File /usr/lib/python2.5/site-packages/dabo/ui/uiwx/dFormMixin.py, line 72, 
in __init__
attProperties, *args, **kwargs)
  File /usr/lib/python2.5/site-packages/dabo/ui/uiwx/dPemMixin.py, line 185, 
in __init__
self._afterInit()
  File /usr/lib/python2.5/site-packages/dabo/ui/uiwx/dForm.py, line 70, in 
_afterInit
super(BaseForm, self)._afterInit()
  File /usr/lib/python2.5/site-packages/dabo/ui/uiwx/dFormMixin.py, line 
128, in _afterInit
self.createBizobjs()
  File sqlite_feldtest.py, line 41, in createBizobjs
self.requery()
  File /usr/lib/python2.5/site-packages/dabo/ui/uiwx/dForm.py, line 499, in 
requery
self.afterRequery()
  File sqlite_feldtest.py, line 44, in afterRequery
self.testlogID.Value += u\nRequery ausgeführt.
AttributeError: 'FrmTest' object has no attribute 'testlogID'

FrmTest is the name of the main form. Why this error? I thought this was the 
way to use the RegID property? What's wrong here?

Sibylle
-- 
Dr. Sibylle Koczian


___
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/[EMAIL PROTECTED]


Re: [dabo-users] RegID problem

2008-08-25 Thread Uwe Grauer
Sibylle Koczian wrote:
 
  def afterRequery(self):
   self.testlogID.Value += u\nRequery ausgeführt.

BTW, if you need this for logging only, use:
print Requery ausgeführt.

This will print to the command line window if you start your app from a
command line.

Uwe


___
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]