« first day (276 days earlier)      last day (2125 days later) » 
09:00 - 23:0023:00 - 00:00

09:56
argh @DMA57361 I'm trying to tweak my lists but I just can't get it to work
to change the row color I need a ListItem, but no idea how to create one
D'oh
GetFocusedItem()
Gets the currently focused item or -1 if none is focused.


Returns:

wx.ListItem
yeah... that's exactly what I was about to say...
honest :)
> self.sessionOlv.rowFormatter = self.rowFormatter(self, listitem)
TypeError: rowFormatter() takes exactly 2 arguments (3 given)
well I honestly couldn't find it anywhere
I even had the docs open
then I tried searching the page again
and there it was...
it prints the result of GetFocusedItem = <type 'int'>
:\
print(listitem == wx.ListItem) = False
odd :S
well I fear GetFocusedItem gets overwritten by objectlistview
that inherits from listctrl, but it probably has several 'unique' functions
10:11
hmmm, that's not the case either
10:27
ok I managed to get it through a detour
now it doesn't do what it needs to do :P
hmmm well at least I figured out how to remove those buttugly alternating backgrounds
@IvoFlipse lol, the blue/yellow wasn't particularly pleasant
right I think I understand how it works now
the downside is, the data in the list needs to contain the conditional formatting info
def rowFormatter(listItem, customer):
    if customer.amountOwed > 0:
        listItem.SetTextColour(wx.RED)

self.objectListView1.rowFormatter = rowFormatter
so that customer.amountOwed needs to be something that's inside that objectlistview
not something you pass it along
or at least, I believe that's the point :\
what I don't understand is that they do = rowFormatter
how does rowformatter get the customer info then :\
@IvoFlipse it has a customer parameter
10:42
rowFormatter
To further control the formatting of individual rows, this property
can be set to a callable that expects two parameters: the listitem whose
characteristics are to be set, and the model object being displayed on that row.

The row formatter is called after the alternate back colours (if any) have been
set.

Remember: the background and text colours are overridden by system defaults
while a row is selected.
right, well in my case the model object doesn't have the required information :\
ah, that'd be an issue
I wanted to tweak the background or text color based on the status of an object
so a session with measurements would have a different color
or a measurements which contacts are stored
that way you get these small visual cues of the state of the data
well it doesn't have to be that difficult, I just need to bolt it on somewhere
the module that makes the model object should get a message whenever the condition is set/changed whatnot
oh wait, that's not even required
as long as its a class instance I can just bolt it on wherever I want
11:36
crap, the model object is read-only
ok it does work if I set it directly to the original data
so now I need to figure out how to take this attribute and update it
12:04
huzzah @DMA57361 I got it working :)
but I think I need to move some of the checking to the model, because it needs to happen BEFORE it get's filled
and obviously not with such ugly colors ;P
so it looks pretty now then?
no what it does now is change the color of a session in the list if it has any measurements
win.SetBackgroundColour(wxColour(0,0,255))
win.SetBackgroundColour('BLUE')
win.SetBackgroundColour('#0000FF')
win.SetBackgroundColour((0,0,255))
hmmm I can pick whatever I want
@DMA57361 the problem is now, it only checks if there are measurements when its already selected. That's too late obviously
it feels like quite the achievement to have managed this though :D
12:32
The color is a bit fluorescent, but it works :)
@IvoFlipse mmm, glowly
I need to do the same for the processing panel, but I'm happy I got it running
now if only I could bolt on the tooltips
only downside is that it doesn't override the OS 'selected item' colors, but that's too much trouble
12:54
@DMA57361 oh boy, I really need to pick some different colors, this hurts my eyes, hehe
@IvoFlipse ah, yeah, I would if I were you
well choice enough :)
I didn't know how to use these at first, but I think I know what to do now
 
2 hours later…
14:38
well I got a popup, even one I can make very fancy
but I actually fear its a bit too complicated
It can also do something like this
I can probably enable the contexthelp programmatically but it shows a stupid ?-mark cursor
@IvoFlipse that's pretty cool... but do you need it?
not here, but I want to use it display information that doesn't fit the screen
uhh wtf it already has one :\
15:15
argh I have a popup, but it won't selfdestroy :(
 
1 hour later…
16:15
so how's it going @IvoFlipse
I'm diving in the source code of wxpython
trying to find how that popup is being generated
so I can hack it :)
@IvoFlipse sounds like fun!
I'm about to dive into my app some more. I've got a deadline to get this app done by thurs
@KronoS oi, that means we have some work ahead of us!
16:18
lol ya... but hey I'll get it done...
python xy is 2.6 right?
@KronoS think so
what are you lacking?
you have nothing else to do until thursday?
well kinda... I just have my car to finish fixing
and anything else related to the Access model that we've made.
@IvoFlipse just a sec. I'll let you know.
I might just post up a wiki page and use it to detail all the things that I need
ok
You can also make a project in Fogbugz
and track bugs+adding features
Hmmm... i think I might just do that
right now I'm installing python xy onto this computer (work pc)
ok, as long as you don't mess with MY bugs in Fogbugz ;)
16:25
lol...
ok just installed python onto the lappy (tablet) that we'll be conducting the tests with. It works great. First thing I need to do is figure out how to automatically adjust buttons and windows according to the viewable space
but for now while I wait for the installer I'm going to create a proj on fogbugz and then post a wiki of everything I know
how do I create a new proj in fogbugz @IvoFlipse ?
@KronoS let me have a look
I've made you one
when you go to list Cases
then refine further to a different project
crap I'm adding all my own cases to the main one I believe
sigh
@IvoFlipse thanks!
oh @IvoFlipse i think I'm going to switch to mySQL if that's possible
16:41
how so?
I find it a pain to set up
but its your call :)
becuase I think that I need to have a better databasing prog for future use
@IvoFlipse how so?
sqlite can hold up its own
yes you lose some functionality, like the fancy GUI interface and concurrency stuff
but its also lighter
portable, etc
I couldn't figure out where to find an embedded version of mysql
Will sqlite be able to sync with the Access databases that I'm creating?
@KronoS if python can access your Access database, it doesn't matter what you do
@IvoFlipse yes it will be able to access the databases
here's what I'm thinking of doing...
we're using dropbox to keep files updated.
what I was thinking of doing with the app is have users 'log on' or simply enter their name
16:45
I would keep the database local and/or a dropbox account
then when you want to sync, both local databases sync with the central repository
from there we'll have python create temp DB's for each user that is tracking. When he/she is done then the changes they make are updated to a 'main database'
sqlite locks itself when written to, so you can't have to programs writing to the same one
@KronoS yeah that should work fine
17:01
ok @IvoFlipse I've uploaded the wiki for everything that I can think of that needs to be done
your formulas are a tad large :P
@IvoFlipse o.O formulas?
> I'm choosing to switch to MySQL for better control of the database and possible migration to and from the Access databases (maybe even SQL server)
Oh whoops
oh that lol... ya I can't resize pictures
the only thing I would agree with is that with MySQL its very easy to do it with a GUI
but I'm sure there are GUI based editors for sqlite
besides you only need to learn the build code once and then it becomes easier
> Buttons need to automatically fit to screen according to size
17:05
@IvoFlipse will it be easy to migrate to mySQL from SQLlite if necessary?
You could also opt for a maximal list length, then its broken down into a second list
@KronoS well it would require to rewrite all the sql-statements and the build code isn't the same
@IvoFlipse prob is that our tablets are long but the pc I'm working on is wide
plus mysql has some difficulties installing with python, so at least it won't be trivial for idiots to instlal
for example the instead of the normal 400x800 the tablets will be 800x400
@KronoS you can check the size of the window
or we need to switch back to label + button
because then its easier to wrap the text
17:07
@IvoFlipse so instead of the current for looping that we're doing, do each individually?
@KronoS well that's another option, but I meant instead of a button with the text on it
have a grid, with the text wrapped + button with Start in it
hi @Sparafusile
@IvoFlipse OH! so like this?
that's our access interface
yeah, unless you want to ask on SO how to wrap text on a ToggleButton
I no longer want to break my head over it
@IvoFlipse I really don't wanna deal with it right now... since I have a thurs dead line... maybe afterward I'll ask
@IvoFlipse ok I think let's do that...
btw right now I'm putting togther how I envision the numbering system of the patients and then the session and then the unique ID of each 'event' written to the DB
@KronoS ok, you need to think of all the tables we need. What the unique combination needs to be to prevent dupes and what the index will be
17:19
@IvoFlipse ok I'll try to put that all together. I gotta admit, I don't know much at all about databases so I'll need some coaching
@KronoS I'm sure we'll be fine
17:33
1
Q: How to tweak my tooltips in wxpython?

Ivo FlipseI was trying to add a tooltip to show the full content of a truncated ObjectListView, until it turned out it had such a feature built-in: I tried making my own tool tips using wx.TipWindow, wx.PopupWindow and SuperToolTip, but none of them looked as 'native' as this one. While I'm aware of...

Man you always have the tough questions
@KronoS do my images work?
@IvoFlipse what do you mean?
@KronoS if it were easy I didn't have to ask :P
I already managed to change the color of the lists based on some condition
@KronoS somebody had left a comment, but its removed already
anyway, I'm going for a run to clear my mind :P
worst case I'll try to hack away at the supertooltip
they worked fine to me... wasn't sure if you meant the question or not
17:37
I just want it to work the way I want it
and its a great learning experience, though its taking far too much time
@IvoFlipse have fun. I'm still working on the wiki to get a full plan of what I want currently working on tables
tables, well you can use those objectlistviews I've been using
or off course a grid, but meeh :P
lol I mean the tables for the DB
:)
oh right :P
17:57
@IvoFlipse drop me a ping when you get back in...
18:37
out to lunch
@KronoS ping that I'm back in...
18:59
@IvoFlipse I'm back
I sent a push your way. I was trying to get it to have a window title for the app and then came across this:
and thought it'd be cool to have a 'file' and 'about' stuff
File? what for? :P
I dunno...
the about though would be kinda cool... but I guess we could just tack that onto the ribbon
I'm really liking this ribbon though
@KronoS In Office they have the 'Orb' which basically has a menu attached to it
I believe you can attach menu's to just about anything
so technically we could just put some fancy icon there
Hmmm... I'll think about that...
then when you click you get a dropdown menu
19:05
I need to quit thinking about fancies and work more on content ATM
@IvoFlipse that would be really cool though
even small icons can get a dropdown
so I'm sure it can be done for a large one
self.Bind(wx.EVT_MENU, self.OnPositionLeftIcons, id=ID_POSITION_LEFT)
this says: bind a menu event to function OnPositionLeftIcons to the button with id=ID_position_left
def OnPositionLeftIcons(self, event):

self.SetBarStyle((RB.RIBBON_BAR_DEFAULT_STYLE &~RB.RIBBON_BAR_SHOW_PAGE_LABELS) |
RB.RIBBON_BAR_SHOW_PAGE_ICONS | RB.RIBBON_BAR_FLOW_VERTICAL)
hmmm not entirely what I expected
def OnPositionTopDropdown(self, event):

        menu = wx.Menu()
        menu.Append(ID_POSITION_TOP, "Top with Labels")
        menu.Append(ID_POSITION_TOP_ICONS, "Top with Icons")
        menu.Append(ID_POSITION_TOP_BOTH, "Top with Both")
        event.PopupMenu(menu)
this is what I meant :)
19:23
oh whoops I wasn't paying attention and have been working on the ribbon :P
Oh cool! Well like I said earlier I think that I should get this running on the basics and then move onto the fancy stuff
@KronoS you started about the fancy stuff ;P
@IvoFlipse I know! :)
I get distracted way to easily
so @IvoFlipse is there a way to create a 'global' ribbon buttons? so like what I have for the System Setting except that I have the code copied and pasted in each section
is there a way to do this once and have it repeated in each section OR it's a global thing?
@KronoS you can reuse the id + function it points to
@KronoS hmm in that case you'd have to wrap it in a function
I'd say copy paste if for now
Oldy Foldy :(
once it works, we'll refactor it
oh man, I create nasty bugs at times...
19:44
@IvoFlipse ya?
it didn't want to add contacts, I couldn't find why
turned out my color coding wrecked havoc because it depended on something that didn't exist yet
and I worked around it
but that just postphones it, as I expected :(
ah, thank god for exceptions
Hmmmm... I'm trying to load some more of those icons... but now it's giving me a 'file doesn't exist' error... and I know that it does!
@KronoS then why don't you add an icon to that folder? :P
lol I did!
oh wait... you already put that icon in there! D'oh!
brb
 
1 hour later…
20:56
I'm back @IvoFlipse
huzzah
how many patients do those doctors have?
Observations Table: (Table of observations that are made while following the subject)

Observation: ID
Task: Number
Task: Start
Task: Stop
Task: Weight
Session: Time (AM/PM)
Session: ID
Patient: ID
Clinic: Location Code
Obeserver: Initials
I'm not sure its a great idea to stick everything in one table
You have like 30 tasks, this way you'd duplicate half of the table 30 times
You could make a measurement or add some info to the session
well there could be quite a few patients
brb sorry...
ok back...
so I was wondering about that...
what should I do then?
@IvoFlipse and how did you do that?
21:13
well you have a table with all the sessions
I would put the patient id in there + observer + clinic
and make them unique by the observation/session id
then you make another table with session id + task no + task start/stop/weight
that reduces duplication
as for how I did that
I made it with Powerpoint :P
@IvoFlipse Lol! and here I though you quickly made some database and printed out the structure
that's from my blog ;P
I used it to compose a question
Oh that's right... I didn't look too much into what it said...
@IvoFlipse how do I separate the tasks for each patient though
taskid
which is used in the task table
task no/task id
Hmmm I've done something to screw up the app...
21:19
btw going to play LoL
but feel free to shoot any questions
well then roll back :)
that's why you commit
@IvoFlipse I will.. just frustrated cuz I keep trying to import all these icons and it keeps screwing up somehow
just copy paste how I did it
and make sure its in the right folder
don't use - in the name of the icon
that screws it up somehow, use _ instead
I've been doing all that... so what I'm doing now is adding each icon individually and then running the app and seeing if it's a specific icon that's messing up.
there I think I found it... I was accidently pulling the cancel icon twice
21:46
yep that was it...
good
so what are you adding next?
22:07
ok so I've got the ribbon looking about as best as I can and with the options that I can think
of
push coming your way
pushed
ok so how much longer are you going to be up?
what the?! I just got a 'flag comment' thingy here in chat?!
there it was again!
do I have mod rights on SE chat?
no idea :\
@IvoFlipse that's what I get
that's probably to help the mods then
22:22
Hmmm... maybe
just showed up today... was wondering
anyways... so what we probably should do is figure out the tables and stuff
do you have the time?
in a sec I will
okey dokey... take your time
soooo
oeh fancy icons
where on earth did you get that stdout from?
ah: app = MyApp(redirect=False)
@KronoS?
22:37
oh sorry.. had a little bug I was working on
good now :)
was also trying to create a new window whenever I click on User Options or Database Options
But I'm all ears now @IvoFlipse
I would advise against it, but that's just me :P
I'd do it like Chrome, display settings fullscreen
@IvoFlipse why's that?
but if you insist, I believe there's wx.Dialog to give you 'popups'
because popups just suck in my opinion
Hmmm... Maybe I'll convert my 'Results' tab to Options and make it that
its a slippery slope for putting everything in a window when you don't know where to put it
22:40
Ok so back to DB structure...
So to track Observations all we really need is:
if you go to tasktrackermodel you'll see that builtdatabase code
index, observationid, taskid, stop, stop, weight
oh so the self.tables = I'm assuming is the tables that are created right?
self tables doesn't do anything atm
22:43
oh...
I think I was planning on using that for something
thats fine, don't worry
we have 5 tables, so we need to copy paste the code in the cursor
and perhaps name them: observation_query, task_query etc
even better would be to move them into a text file, but that's for later
first see if we can build the database
so we do have 5 tables, but I think those tables need to be restructured before we code it.... right?
yes, but first copy paste the code :P
Ah ok... so sorry to be so dense, but which code exactly am I copying and pasting?
and where too?
:P
observation_query = """CREATE TABLE IF NOT EXISTS `results`
(tasktrackerid INTEGER PRIMARY KEY,
userid INTEGER,
taskname VARCHAR,
timediff VARCHAR,
UNIQUE(userid, taskname))
""")
that's what you need to create 5 times
then executing it, is simply: self.cursor.execute(observation_query)
22:46
Ok... is this a new file that I'm using? or appending this to the tasktrackermodel?
@IvoFlipse Ah!
you should make a new file
I called it Initdatabase
or something of that kind
for initialize database?
which I run before the problem starts
yes
Ok...
I have it check if the database tables exist, if not: make me the database
22:48
So I'm going to put this file in the database folder unless you feel that it should go somewhere else
once you have a database, we can have a confing/settings file that simply says: database_installed = True
@KronoS yes that's correct
should I first define the the function or have it run?
like this one:
`def builtdatabase(self):`
` print('database_init.builtusernamedb')`
`self.cursor.execute("""CREATE TABLE IF NOT EXISTS `results``
(tasktrackerid INTEGER PRIMARY KEY,
userid INTEGER,
taskname VARCHAR,
timediff VARCHAR,
UNIQUE(userid, taskname))
""")`
sticking it in a function is fine
then its easier to turn on and off
so like this:
except now for 5 tables total
22:56
ok built :)
great, have you tweaked the content of the tables too?
else you just made a strange table ;P
no I haven't....
that's fine
just wondering ;)
but I'm not sure what I'm editing...
what do you mean
22:58
nvm.. i think I got it
so I'm just going to go off this structure and we can fix it later:
so all the tables get an index
I normally give it the name of the table+id
its of the type INTEGER
09:00 - 23:0023:00 - 00:00

« first day (276 days earlier)      last day (2125 days later) »