Hi,
  I just found this after spending most of the afternoon trying to find out what the problem was.
 
  I thought it was worth issuing at least a warning, since it was impossible to debug.
 
  This is a D7 Gotcha, I don't know if it affects other versions of Delphi.
 
  Create a package called, say MyControls.
 
  Include in that package a unit called, say MyControl.
 
  Create another package called, say MyDeathWish.
 
  Make MyDeathWish depend on MyControls.
 
  Create a unit in MyDeathWish which has in its uses clause: MyControls.
 
  Don't actually reference anything in the unit that you had intended (MyControl) or you will get a compile time error and will save yourself a whole bunch of time.
 
  Any time you call LoadPackage on MyDeathWish, you will get what you wished for: a completely dead program.
 
  It seems that is not an error (as far as the compiler is concerned) to use a package name in the uses clause instead of a unit name, but you can be totally sure that the resulting code will not run.  No exceptions, no error messages, just a complete program lock-up. 
 
  I've spent all afternoon trying to track this one down.  I'm impressed that after all this time, I'm still capable of pushing the boundaries of stupidity.
 
  I hope that this helps someone.
 
Trevor
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to