Re-opening a Form

Started by JEdwardL, November 02, 2010, 11:27:33 AM

Previous topic - Next topic

JEdwardL

I have a main form that displays a second form then closes.  I want to return to the original form upon closing the second one, but haven't been successful.  I can get the second form to display and when I press the exit button its supposed to close the current one and show the first.

I'm not sure if I'm working the Form_Show and Form_Close functions properly...there doesn't seem to be a lot of documentation about them.

Thanks,

J

JEdwardL

Never mind...I just discovered the Form_Hide function.

J

Fred Tomke

Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Fred Tomke

Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

JEdwardL

OK, I give up...I can't see any reason that this code and dialog won't work.  I've simplified my dialog to the point that the only controls that are functional are the OK and the Cancel button, but I still get an ADS error message.  Could it possible be because I'm working on a USB drive?  I've had quirks like that before, but all the files are on the same drive so that shouldn't be a problem.

Please tell me where I'm going wrong.

Thank you

J

owenwengerd

You're setting continue to nil in both return cases.  It looks like you intended to set it to T when the return value is 2.

JEdwardL

This code is a very simplified version of the SELECTIONS.LSP code provided with the OpenDCL samples.  Apparently that routine doesn't care how the WHILE loop terminates, perhaps because the list is already defined and nothing remains to be done on termination of the form.  Anyway, it seems to work for SELECTIONS, but not for me.

owenwengerd

I'm sure someone will help if you post some code that demonstrates the problem.

JEdwardL

I think I discovered what the problem is.  When I created the form I copied some controls from another form in the project and then re-named the control.  Unfortunately, it looks like ODCL isn't accepting this edited control name.  When I created a couple of new buttons from scratch the code ran just fine.  What do I need to do to get ODCL to accepted the edited name?

Thanks,

J

owenwengerd

Are you referring to event handler function names?  You can edit those in the events pane, or use Tools -> Reset Event Names to reset them for all events in a form.

JEdwardL

I didn't know that.  Thanks for the tip.  Like I said at the beginning, I'm new to OpenDCL.

andrew

when i load up your code, i only get the 1 form showing, the other form doesnt have code to load it.
it looks like your missing close forms and show forms code

can you give a little better description of what you are trying to accomplish?

JEdwardL

I was having trouble with Form_Close on the two buttons.  I reduced the problem to its simplest elements and that's what you see.  It turns out that the function names in the odcl file had not been re-set after I copied and renamed them.

Thanks,


J