1

Is it possible to turn off the automatic call to the event handler over the table (Initialize) if the Stereotype changes? Alternatively, if it can't be turned off, is it possible to determine from the call whether it is creating a new object, copying an object, and most importantly changing the stereotype?

Can it be globally set to not replicate the stereotype over a table to another package?

PD: 16.7.2

Thank you David

  • I hadn't thought about the fact that the Initialize was called again when changing the stereotype... The reason may be that extended attributes associated with the new stereotype could require some initialization. If the Initialize() is idempotent, that would not be a problem to call it several times. Or you could track a list of ObjectID (as a long text) on the parent folder (Model, or Package) for which the Initialize has already been called. – pascal Jul 26 '23 at 22:15
  • 1/3 In the "initialize" on table event handler is Message Box (our funkcionality) for renaming table....Its use for automatic renaming columns, foreign kyes, default values etc.... When I want copy table, I can USE copy past.....message dialog ask me for new table name....and everything was right. But when I want to change stereotyp (especial in grid of tables), the initialize metod has been called. – user2408345 Jul 27 '23 at 13:25
  • 2/3When I have package (package model)- the table has been replicated, I can set of replicate Stereotype manualy...and after change of it on detail replicated table the initialize try rename foreign keys, defaults etc... but there are error, because the other attribute can not be changed (setting replicate attributes). – user2408345 Jul 27 '23 at 13:26
  • 3/3 I can resolve this by test in initialize (IsTableReplicated) but I need more info. (initialize has been called because copy past, because standard create....and because of change stereotype only).....it is my idea :-) And the global setting set off (no replicate stereotype by default) help me in one step only. – user2408345 Jul 27 '23 at 13:26

0 Answers0