Hi George,
Stick with me werner. I've been hopping between 2.8 and 2.9.
As you are starting something new I would definitely recommend 2.9, and best would be 2.9.5. This will provide you the newer pubsub stuff and much much much move and it contains a ton of bug fixes you would not get with 2.8.x.
If you are on 2.9 the move to 3.0 will be easier and the same will be true to move to Phoenix when it comes out.
In 2.8 is get "'module' object has no attribute 'addTopicDefnProvider''
I don't remember when that was added, it might have been in 2.8 already BUT only if one set pubsub to run with its API 3, in 2.8 pubsub by default runs with API 1.
Using 2.9:
your csv.topics.py is a kind-of singleton class. Where I need
to set the parameters in that mod correct? The subpud examples at the web site
has a similar example as yours. I can't find any working examples.
That file just defines the valid messages and for each message you define the parameters to be passed around in its "msgDataSpec" method, e.g.:
def msgDataSpec(dirname, filename):
This defines that we have to pass a 'dirname' and a 'filename'.
I have attached a changed sample where I added my 'data' message class which has different message to deal with the 'data' state in my application.
See here for more info:
http://pubsub.sourceforge.net/usage/usage_advanced_maintain.html#specify-topic-tree-def
I now realize the main panel will not open since I'm passing a instance that's out of the loop.
Note sure what you mean here.
The right panel needs the directory file. I want the right panel to show a blank column list (as it does at run), you
open a file, and wham! there's the data in the column list.
So, your listener has to load the data into the list.
So ideally.. the subpub reciever sees the mesage and def createAndLayout(self) and switches self.sortedlist =
to self.sortedlist = [ 'the open formatted list' ].
I changed so the right list is filled when opening the file.
Please help me understand my fundamental issue.
Do a diff of the attached against your code and it should help you understand what you missed.
I would probably do the following to clean this up some more.
- better separation of 'duties', e.g. currently your 'createAndLayout' does some stuff which is not really needed at that point and is duplicated in the method I added. Maybe change 'createAndLayout' to 'createListCtrl' and really only create the empty list and it could call 'reloadList', but in your case I don't think there ever is data so not really needed.
- be consistent in your naming of methods etc, e.g. 'GetListCtrl' should be 'getListCtrl' - myself I was really really bad in this, getting better with it and I really think it helps a lot when I later on look at code.
- the listctrl does not indicate the sortorder when one clicks on the column header - look at the demo for this (a little tip - ImageList)
Hope this helps
Werner
csv_topics.py (2.29 KB)
csv_splitter_try.py (5.99 KB)
···
On 07/10/2013 02:20, George McCown wrote: