Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Calling OnMaintUI Directly


3 replies to this topic

jcalkins

jcalkins
  • Members
  • 1 posts

Posted 04 December 2001 - 14:24

HI,
I want to know if I can call OnMaintUIBefore, OnMaintUi, and OnMaintUIAfter programmatically?
They are already triggered by events when the GUID is the same but I also need to call themn programmatically.

Can this be done? Has anyone else done this? If so, how?

Jim Calkins
Systems Developer
First Union


lasenbby

lasenbby
  • Members
  • 744 posts

Posted 04 December 2001 - 15:41

Yes, however, if you call them out of order (don't call onmaintuib from onfirstuib or onmaintuia from onfirstuia), you will get double events fired and the result is that you may get two sdfinishreboot dialogs, etc.

FYI:
Typical practice for an overinstall is to call onfirstuib from on onmaintuib and onfirstuia from onmaintuia.  You may need to have strategically placed exit statements to halt execution of the event functions that you do not want.


jcakins

jcakins
  • Members
  • 2 posts

Posted 04 December 2001 - 16:30

We are doing a database upgrade from Interbase 5.5 to Interbase 6. If the Guid is the same, OnMainUI executes a call to a C DLL for upgrading their database.

If the Guid is different, we still want to upgrade them but the OnMaintUI function does not get executed, OnFirstUI does instead. So, it sounds like I need a way to call OnMaintUI from OnFirstUI without triggering dual events.

Jim


lasenbby

lasenbby
  • Members
  • 744 posts

Posted 04 December 2001 - 20:56

opps!  return statements not exits...  Sorry.

You should have no problem calling onmaintuibefore from onfirstuibefore  (or onmaintuiafter from onfirstuibefore) as long as you block out the code that is uninstall specific.  The problem occurs when you call onbegin/end from onfirstuibefore/after or something like that.  

(Edited by lasenbby at 8:01 pm on Dec. 4, 2001)