Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Delphi Dialog Pointer Problem  (Read 1956 times)
bruffner
Customers
Community Member
*****
Posts: 200


« on: October 20, 2003, 01:39:22 AM »

Problem:

When exiting a delphi Application with TV initialized an exception is thrown error 216 (dereferencing a nil pointer)

To Recreate:

Open delphi tutorial A1

Add OpenDialog and rename to OD

Add button to main form

Add following code to button

Code:
OD.execute


Exit application
Logged

Visit us at:
bruffner
Customers
Community Member
*****
Posts: 200


« Reply #1 on: October 20, 2003, 02:05:43 AM »

I found a workaround for this problem but its horribly ugly as most workarounds are:

Create a second form and drop the open dialog.

form2.show;
Form2.OD.Execute
Form2.Hide;

The important part is that form2 is visible or the exception will occur.  I set the borderstyle := bsNone and set the width/height := 0.

BR
Logged

Visit us at:
jlucard
Community Member
*
Posts: 587


« Reply #2 on: April 27, 2006, 05:26:21 PM »

I do realise that this thread is about 3 years old but.. I got the exact same problem a few days ago! I am pretty sure that the suggested workaround works but I can't help but wonder.. has anybody found a more elegant solution to this?
Logged
AriusMyst
Guest
« Reply #3 on: April 27, 2006, 06:56:36 PM »

There isn't an elegant solution. If I remember rightly this is something to do with old VB6 code in 6.x( not 5 of course - all c++ there ). I wasn't aware you were a delphite jlucard Smiley.
Logged
jlucard
Community Member
*
Posts: 587


« Reply #4 on: April 27, 2006, 07:03:47 PM »

Actually I have both delphi and C# sharp installed and move between them all the time, lol.

I suspect the error might not be related to TV3D at all. It is possible that it is some sort of delphi problem. I need to experiment a bit more with that and find out if I can replicate it without including the TV3D library.
Logged
AriusMyst
Guest
« Reply #5 on: April 27, 2006, 07:14:21 PM »

This is from way back when. I first noticed it here: http://www.truevision3d.com/phpBB2/viewtopic.php?t=4374&highlight=bsdialog

As you can see, I was replicating it a different way. I'm 99% sure I was told by Sylv that it was old VB6 code, and delphi errors cause it debugs correctly(as opposed to VB6) an catches some VB6 junk. But if you do find its something Delphi related I would be interested in hearing as it was one of those PITA bugs in 6.2 an it'd be nice to put it to rest in my head. Though, as I said before, I don't suffer from it now I use 6.5.
Logged
jlucard
Community Member
*
Posts: 587


« Reply #6 on: April 28, 2006, 03:32:01 AM »

Ooops, you just found a second problem with my app! I tried this one out and guess what? If I play around with the minimising and maximising buttons of the form I get the very same error when closing the app. Computer 2, jlucard 0. I hate it when computers behave this way, lol. I guess I should just unplug it for a few minutes just to remind it who is the boss around here.

PS: Thanks for bringing this second problem to my attention ariusmyst.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks