Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Mapping events in COM object

$
0
0

I read your answer, studied many various codes and try to make it by myself but I failed. So...

The problem is that I want to create the ribbon object instead of window menu and toolbar into my application windows created by Dialog-System. So as I mentioned in previous post I wrote a native COBOL class for my application that serves as an interface (here it's not meant as COM object interface!) between the application and my own COM object written in managed COBOL. So this native COBOL class calls methods in the managed COBOL COM object class and this COM class inherits from the C# class (the C# object is just a .NET class, not regularly registered COM) of the ribbon object. I don't know if it's the best way how to do it but the ribbon object is created correctly just as I want. So creation is ok. And here starts the problem because I don't know if or when to use delegates of events, how to join it with my "IInterfaceEvent" or if an event could be caught without the delegates etc. I certainly took a look at the examples you mentioned in the Samples Browser but I didn't find what I needed. May be I should mention that I cannot interfere into the already created Dialog-System screensets - everything must be processed outside these screensets. As for the question whether I want to handle the events within the managed COBOL code or directly outside into the native COBOL code, better way is the managed code. But I certainly want to learn both ways. While I was taking a look at the example with window hosting the grid control, I noticed that in the event interface were defined some numeric ID values for all the events and in the native code these IDs were used for mapping those events to entry-points using "SetEventToEntry" method. That's ok but I still don't understand how the delegates, the "Fire..." methods and the declarations in the event interface are connected and HOW IT WORKS. And finally, I don't want to use entry-points but methods and doesn't matter if overriden, using delegates etc.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>