Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Container problem
Message
De
08/02/2002 04:09:55
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
07/02/2002 17:35:12
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00617065
Message ID:
00617160
Vues:
21
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform