On Oct 27, 2009, at 12:13 AM, Aaron R. Short wrote:
> First I got the svn code and copied it over the dir I run dabo
> classdesigner from on c:\program files\dabo but that didn't seem to
> find the code when I ran so then I copied the svn code over my site-
> packages in C:\Python26\Lib\site-packages\Dabo-0.9.2-py2.6.egg\ I
> thought I saw some note on that in searches and it seemed to find
> the new code when I ran (at least i got a different error msg) so
> hopefully that's the way I'm supposed to install svn code.
Wow, that sounds like a really difficult to maintain way to update.
In the future I'd recommend Web Update, but that wouldn't have helped
much here, as I haven't yet pushed this revision to Web Update. I was
going to follow up this morning with instructions for updating to test
things, but it seems you've already figured out a way to do this.
> self.Bind(dEvents.EditorStyleNeeded, self.OnStyleNeeded2)
>
> Then I adjust the OnStyleNeeded2 method a little from yesterday.
> This then pops the following error so I'm not exactly sure where to
> write the code for the event. I did do some searching on the wiki
> and mailing groups for how to use dEvents but all the code I found
> seemed to import the module and then do nothing with it. either that
> or there's some python magic going on i'm not familure with yet.
> (still fairly new to python though I've hacked a few things together)
>
> ---------------------------
> Attribute Error
> ---------------------------
> Attribute Error: type object 'EditorStyleNeeded' has no attribute
> 'Bind'
> ---------------------------
This is probably the biggest issue with working at the wx-level:
confusion of naming. 'Bind' is a wx method; at the Dabo layer, you
want to use 'self.bindEvent'.
Also, Dabo has a few built-in naming conventions to automate event
binding. If you name a method 'onFoo' (note the initial lower-case
'o'), and there is a Dabo event named 'Foo', that method will
automatically be bound to the Foo event for you. In this case, in your
dEditor subclass, if you had named your method
'onEditorStyleNeeded()', you wouldn't even need a call to bindEvent().
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
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]