Re: Oracle Power Objects-Combo Box-ValueList

From: Michael Kranzdorf <mikek_at_krt.com>
Date: 1995/08/24
Message-ID: <mikek-2408951346510001_at_franklin-tty15.jvnc.net>#1/1


In article <41gd2u$71s_at_agate.berkeley.edu>, "Larry M. Jones" <ljones_at_mindseye.berkeley.edu> wrote:

> Thanks for further information, but I've just about given up. I couldn't
> get the cmbListField.UpdateList() to work from anywhere in the parent
> form, even without trying to include a where clause. I tried after
> commiting new records in the parent form, post-update, post-change,
> post-insert, post-delete, & I don't know where else. Nothing new shows
> up in the combo box until you quit the form and come back in. (Never try
> version 1.0 of anything?)

Just so people don't get the wrong idea about OPO, I replicated the exact problem from the original post and it works fine, just as my solution described, with no updatelist() call required. I change the parent record (using a scroll bar on the parent form), and a new popup menu for the combo box appears as soon as I click on it.

If you want to insert a record into the child table for something typed into the combo text field, add a version of this to the combo's postupdate() method:

a=form1.field1.value
b=self.value
EXEC SQL INSERT INTO TABLE2 VALUES (:a,:b) self.updatelist()

(Note that
1. this includes no checking for duplicate values, etc. and 2. the user must signal in some way that they want to accept the typed value, such as hitting a tab)

There's probably something else wrong in the your form that prevents these solutions from working, such as bindings or parent/child anomalies. They both work for me. I suggest you try a bare-bones test in a new form.

Michael Kranzdorf                      ---           mikek_at_krt.com
Director of Information Systems        ---                NYSE:KRT
Kranzco Realty Trust                   ---            610.941.9292
Received on Thu Aug 24 1995 - 00:00:00 CEST

Original text of this message