[Bond-users] child window initialisation: dbobject and update container; Bug or enhancement?

Colin Close itchka at compuserve.com
Sun Nov 29 19:58:40 EST 2009


Hi All,

I have a question about the use of child windows.

Say I have a primary window and a child window. In the primary window I have 
either an <entry name="foo"  updatecontainer="true"> widget with an <sql> tag 
in it with some sql that selects a variable that I wish to use in the child 
window.
As far as I can tell at the moment the <entry> tag does not get initialised  
with its value until after the child windows dbobject is loaded if the child 
windows dboject is constructed thus:-

<dbobject dynamic_table_names="true"
		<sql>
				SELECT * 
				FROM xmas_list_<widget>foo</widget>
		</sql>
</dbobject>

it will fail with a not spawned error.

If you try it a different way by using a dbobject in the primary window and 
getting the variable from that thus:-

<assuming dbobject created>

The child windows dbobject 

<dbobject dynamic_table_names="true"
		<sql>
				SELECT * 
				FROM xmas_list_<field dbobjectsrc="xmas_ref">xmas_year</field>
		</sql>

again it will fail with the following error:-

Bondobject attached to widget xmas_ref does not exist. Has it been spawned 
yet?

My question is that if one has child windows of a primary window the 
implication of this is that they should be able to share data between them if 
all the dbobjects and <entry> fields with sql are spawned in the primary 
window.
I would call this a bug if you can't do this; otherwise what is the point of 
child windows? Incidently this can be made to work if the secondary window 
starts off closed and is opened by a trigger from a button or similar widget, 
it may also be possible to do it with a notify trigger but it's all a bit 
crude. This demonstrates that the data is shared and and shows this is the 
intention of the child window. What appears to be happening is that the child 
windows are being opened before all the dbobjects and widgets in the primary 
window that can get data via sql queries have been populated.

Comments? Fixes? gratefully received.

Best

Colin Close



More information about the Bond-users mailing list