Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Container problem
Message
From
08/02/2002 10:06:02
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
08/02/2002 04:09:55
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00617065
Message ID:
00617359
Views:
17
>>Hi All,
>>
>>I have a container of objects that I have created. I did this so I could instantiate container in several different places. I also wanted instantiate the container on a page of a pageframe at run time. Everything was working fine until I decided to add a combo box to the container as lookup for one column in a table. I have code in the combo class so it will populate itself with the proper data at run time. Here is the issue. Only on the page the init code will not run. I put the following in the init:
>>
>>Set step on
>>Dodefault()
>>
>>This code does not seem to run because the error I get is it can’t find the cursor that I have setup in the rowsource. If I drop the container on a form all works as expected. I also put the same code above in the container’s init and it did not seem to fire as well.
>>
>>Hope someone has some ideas?
>>
>>More info. I cleared the rowsource and added the rowsource on the last line of the init it is now working????? Not sure why this made a difference.
>
>James,
>Probably it's related with event firing sequence. When there are multiple objects on a form (who has < bg >) first the innermost object's init fires and last the form's. That's roughly like :
>form.pgf.pg.cnt.cmb.init
>form.pgf.pg.init
>form.pgf.init
>form.init
>I suspect rowsource is not loaded in form.load or from dataenvironment which both occur before any init.
>PS: If rowsourcetype was SQL it'd open its base table(s) automatically. If applicable I suggest to use SQL rowsource instead of fields or alias.
>Cetin

Cetin

The rowsourcetype was alias. The problem seemed to come from having a rowsource defined and opening the cursor in the init. With this configuration the init would not fire at all and this only happend when using a pageframe. Once I removed the rowsource and then added it back after the cursor was opened, all worked fine. The form is now working but this is really strange.

Thanks for you help.

Jim
Previous
Reply
Map
View

Click here to load this message in the networking platform