How to use MoniMessage

Hello,

I would like to use the MoniMessage package to send messages from my application into a dialog box or something like that. I would like also use it with the Resource package for translation. But I don't know where to begin, because the documentation of those package and how to use them is not very clear ( or doesn't exists ).

Does somebody use that ? Can you help me ?

Thanks in advance,

Stephane

C R Johnson's picture

Read the .cdl files in the OCC source. There is a lot of explanation in there.

Cliff

S. Routelous's picture

A LOT ? Of course I read the CDLs files before posting. The problem is that the CLDs are describing what each class does, but no clue on how to integrate them, on the whole process, etc..

Stephane

S. Routelous's picture

OK, after some tries, I did it.

To the OpenCASCADE development team : But why are these classes in TKShHealingStd ? Should they not be in TKernel ? And why using its own mecanism in MoniMessage_MsgFile ? Is it not possible to unify all the classes to use the Resource package ?

Stephane

Roman Lygin's picture

Dear Stephane,

For "historical" reason MoniMessage package is in TKShHealingStd (and as of July is in TKShHealing, in former it is temporarily kept for compatibility with 3.x). It is the case because the given message mechanism is only being used by Data Exchange module for the moment. To get more about it, you might have a look at its use in IGESData.cxx, IGESToBRep_TopoCurve.cxx and XSTEPMessage unit for instance. Please take into account that several classes from MoniMessage (like MsgFile, Msg, TraceFile) are used through "obsolete" aliases (e.g. MoniTool_MsgFile, Interface_TraceFile) defined as "typedef".

But, definitively, you are right and that mechanism is more proper to reside in TKernel. There is an intent to improve MoniMessage (e.g. to extend for Unicode), to unify with resource managers and re-locate it in the TKernel. So, in coming months you will be able to take advantage of this. Stay tuned !

Best regards, Roman