Possible row selection interfering with Update

Hi All,

Please find attached my main.pl file along with the GtkBuilder file I have the gui in.  I couldn't think of a 
great example but it is using the same code and widget types in my main project.

I am running the program on Windows XP with camelbox installed as 'perl main.pl'

The problem is that only the shopper name updates not all of the new information entered into the text views. 
 I have to re-select the line, re-enter the new information in the text views and then it updates the second 
time around.  It's easier to see if you run the program.

To Reproduce:
1. perl main.pl

2. Select a line number, select a shopper, enter a description, enter a size/qty and enter a price

3. Click Add button

4. Repeat steps 2 & 3 with a different shopper and information to distinguish from first line. For example I 

5. Select/Highlight line 1 or 2, in this example select line 2.
- selected information populates entry area (using sub row_selected)

6. Select a different shopper from combo box and enter different descriptions, size/qty, price information, 
for example:

7. Click Update button

Only the shopper name is updated in the table.

If click back on line 2, the entry area is repopulated with what
appears in that line.  Then need to re-enter updated information and
click 'Update' button again.  This time the changes are applied in the model.

Each subsequent update after that works as expected.  Select a line, update entry information, click update, 
table updated.

Description, size/qty, price information updated when first click update button.

Hope you can see what I'm talking about.  It only occurs on the first attempted update click.

Is someone able to tell me what I'm doing wrong?  Can't work out why the first time the update click only 
captures the shopper name but then works the second time with the shopper name and the info entered into the 
text views.

Thank you for any help.



Attachment: ItemRecorder.ui
Description: Binary data

Attachment: main.pl
Description: Binary data

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]