For Programmers: Free Programming Magazines  


Home > Archive > Smalltalk > November 2005 > Dataset Problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Dataset Problem
delfert@gmail.com

2005-11-19, 9:58 pm

Hi everyone,

I'm having a problem with datasets. I am trying to have an editable
column in the dataset. I can select rows ok when I click on a
non-editable column, but when I click on the editable column I get the
following exception -- Message not understood: #editor

The error occurs when the program reaches the setupEditor:at:downcast:
method on the DataSetView --


editor := aColumnDescriptor editorForRowHolder: nil.
editor widget notNil ifTrue:
[component := self topComponent keyboardProcessor keyboardConsumers
remove: editor widget
ifAbsent: [nil].
component isNil ifTrue: "it was a comboBox"
[component := self topComponent keyboardProcessor
keyboardConsumers
remove: editor widget editor
ifAbsent: [nil]].
(state isTabStop and: [component notNil])
ifTrue: [self topComponent keyboardProcessor
keyboardConsumers add: component after: self]].


aColumnDescriptor is the DataSetColumn passed to the setupEditor
argument, and "editor
widget" is then an InputFieldView. For some reason, the InputFieldView
is
not being added properly to the keyboardConsumers of the
ApplicationWindow,
because when remove: is called InputFieldView is absent from this
list and nil is returned. The program then falsely enters the "it was
a
combobox" logic. The "message not understood" error is generated when
it
tries to "remove: editor widget editor," since the InputFieldView does
not
understand #editor. So, the problem seems to be that the
InputFieldView
keyboardConsumers is not being added to the keyboardConsumers.
The initialize method of the figure just calls allButOpenInterface:
#windowSpec on the ApplicationModel.

One other thing to mention is that when I just send #open directly to
the
ApplicationModel I am able to edit the column ok. This seems odd
because
#open and #allButOpenInterface: end up calling about the same logic,
and I
even tried substituting #open in my figure initialization but that
didn't
work.

I have been trying to figure out this problem for a while and I am at a
loss here, so I would greatly appreciate any help :)

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com