Page 1 of 3

Problems with COM

PostPosted: Aug 21, 2004 @ 11:08pm
by kornalius
I am trying to access the Fields property and it works like a charm. But then, I try to access the Item property to get the value of a field.

I do this:

value$ = GetProperty (Fields$, "Item", index$);

But I get an error, Invalid number of parameters. The Fields property is 1 parameter right? The index of the field no?

Anybody can help?

PostPosted: Aug 22, 2004 @ 3:27am
by PointOfLight

PostPosted: Aug 22, 2004 @ 11:50am
by mervjoyce

PostPosted: Aug 22, 2004 @ 4:58pm
by kornalius
Hi,

Merv: I still have a lot of work to do on the COM functions. I will give your sample a try. Would it be possible for you to convert more lines after that so that I can get a real-life example to work with? Lets do this piece-by-piece, I fix this code, I give you PPL pre-release, you give me another piece of code, and so on... How does that sound to you?


PointOfLight: Fields is an IDispatch property and then I can access Fields.Item() but the Item function is not working. It sees the Item function no problem but when I invoke() it, I get an invalid number of parameters even though the internal suggest that 1 is the number of parameters. I will try out some more tomorrow.

PostPosted: Aug 22, 2004 @ 4:59pm
by kornalius
Btw, Item() should return a IDispatch to a Field type structure. Then I can play with Value() from there.

PostPosted: Aug 22, 2004 @ 10:15pm
by PointOfLight

PostPosted: Aug 22, 2004 @ 11:52pm
by mervjoyce

PostPosted: Aug 23, 2004 @ 3:07am
by mervjoyce

PostPosted: Aug 23, 2004 @ 4:06am
by kornalius
Hi Merv,

Yep, the operators +, -, * and / have been enhanced a whole lot in v0.8. I will do some more testing tomorrow. Strange, it should still work like before. Probably a bug with my IsValidInt() internal function to test if a string can be converted to int correctly. I will get back to you shortly.

PostPosted: Aug 23, 2004 @ 4:12am
by PointOfLight
Any updates on COM progress? This is my experience so far:

CreateObject, DeleteObject work great
GetProperty / SetProperty work intermittently
Invoke blows chunks on anything with parameters

By the way: there was a question (possibly in the other thread) as to why CreateObject(ADOCE) didn't work? I'm still not sure, but I did find out that CreateObject("adoce.3.1") {with no specific object type defined} does work. Not sure if that helps you any, kornalius, but I thought I'd offer it.

PostPosted: Aug 23, 2004 @ 4:52am
by kornalius
I am still working hard on the COM implementation, learning a lot as I am going through. I might have find out how to access Collection properties also. Reading some technical article on it right now.

Don't forget the COM implementation is very rough stage right now and is going through some major work and some re-write. I will get back here with a pre-release version for you guys in the next day or so. This way when 0.8 comes out, it will be fully-working (hopefully). I am getting there, slowly...

PostPosted: Aug 23, 2004 @ 4:53am
by kornalius
Btw, thanks for all your inputs, I see I am getting there.

PostPosted: Aug 23, 2004 @ 6:35am
by PointOfLight

PostPosted: Aug 23, 2004 @ 6:11pm
by kornalius

PostPosted: Aug 23, 2004 @ 6:14pm
by kornalius