Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another VFP DLL Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00538616
Message ID:
00540103
Vues:
14
>Hi!
>
>I meant the COM object used in this particular case, if you follow the thread. Talking in general I would like to say 'You cannot see all PEMs of COM objects ...' ;) I know that type library definitions are visible to VFP debugger. In my tests in this thread, for example, main COM object properties are visible, but object created by SCATTER NAME and passed through COM in debugger appear with no properties.
>
>Thanks for this note, it make things more clear.

Vlad,

You're correct in saying that they do not initially appear, however, I'm correct in saying that once the individual properties have been referenced they will.

Kevin sent me an email on Friday, asking me to look into this. Since I'd sort of followed the thread (and have known him for a few years) I said I would. Further, since I wasn't really doing anything else, I thought I'd take a shot at it. Here's what happened.

I created a small in-process COM server that would open a table, move the record pointer and return an object. Doing a simple SCATTER NAME/GATHER NAME after an APPEND BLANK didn't work. The new record appeared, but each of the fields was empty. Further, the individual properties didn't (as we've said) appear in the debugger. For some reason, the hwnd property of the treeview came to mind. I'd realized some time ago that it wouldn't appear in the debugger, unless it had been previously reference and the variable re-entered. Further, I recalled similar behavior with other COM objects within VFP.

Since I knew the name of the fields, I simply issued a ? object.fieldname from the command window for each of the fields. After doing so, I checked the debugger and, sure enough, there were the fields as properties. I then repeated the APPEND/GATHER process. This time the new record was added, and the data was present.

I emailed Kevin back suggesting that he add an array property for the COM object to hold the field names retrieved from AFIELDS(), then iterate through it referencing each field. It is a bit of a kludge, but it works. When I sent my email to him, I found that I had an email waiting. It was from Kevin, and he had found the same behavior.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform