Re: [Zope-dev] Trouble populating a dictionary of dictionaries

2002-09-11 Thread Lennart Regebro
From: Anton Hughes [EMAIL PROTECTED] After playing around for too long on it, I can't seem to get it to work. I even tried pre-filling the d-o-d with empty strings. I just don't understand what I am doing wrong. Your not thinking object oriented enough. Encapsulate, encapsulate, encapsulate.

[Zope-dev] Trouble populating a dictionary of dictionaries

2002-09-05 Thread Anton Hughes
Hi All, I'm trying to implement a computer booking system for staff members here. At the moment I have a table with date, timeslot (eg 8:00 - 9:00), resource (eg. PC 1) and person. I want to draw a table showing the bookings for the day looking something like this: |Time| PC 1 | PC 2 | PC 3 |

Re: [Zope-dev] Trouble populating a dictionary of dictionaries

2002-09-05 Thread Andy McKay
After playing around for too long on it, I can't seem to get it to work. I even tried pre-filling the d-o-d with empty strings. I just don't understand what I am doing wrong. Its really rather hard to say if you dont show us some code ;) -- Andy McKay Agmweb Consulting

RE: [Zope-dev] Trouble populating a dictionary of dictionaries

2002-09-05 Thread Anton Hughes
September 2002 3:12 PM To: Anton Hughes; [EMAIL PROTECTED] Subject: Re: [Zope-dev] Trouble populating a dictionary of dictionaries After playing around for too long on it, I can't seem to get it to work. I even tried pre-filling the d-o-d with empty strings. I just don't understand what I am doing

Re: [Zope-dev] Trouble populating a dictionary of dictionaries

2002-09-05 Thread Andy McKay
Error Type: TypeError Error Value: unsupported operand type(s) for - resource = row['resource'] - 1 You should check that row['resource'] is a data type that supports subtraction. If for example row['resource'] is a string, this will raise the error. Try: resource = int(row['resource'])

RE: [Zope-dev] Trouble populating a dictionary of dictionaries

2002-09-05 Thread Anton Hughes
Thanks Andy, Error Type: TypeError Error Value: unsupported operand type(s) for - resource = row['resource'] - 1 ^^^ That was pretty stupid of me. A hangover from my earlier attempt at a 2D array :( Anton