Author Topic: Defining new event handler- can't save file  (Read 6450 times)

cappy2112

  • Community Member
  • Posts: 91
  • Hero Points: 0
Defining new event handler- can't save file
« on: January 19, 2007, 02:22:41 AM »


I've got a control on a form. When I try to define a new event handler, I double click on the control, select the event, then Slick tells me it can't find the file.

I've got the file open in the editor- the one Slick is complaining it can't find, when I try to define a new event handler.

What have I done wrong?

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: Defining new event handler- can't save file
« Reply #1 on: January 19, 2007, 10:34:26 AM »


I've got a control on a form. When I try to define a new event handler, I double click on the control, select the event, then Slick tells me it can't find the file.

I've got the file open in the editor- the one Slick is complaining it can't find, when I try to define a new event handler.

What have I done wrong?

That happens to me as well, including in the V12 beta with a new dialog I've been creating that I copied over from V11.  I just tried to reproduce the problem with a new form with a command button in V12 but couldn't.  I've always wondered if it happens because I've renamed a file or moved it from where it was first created or because the name of the file is different to the name of the form - but from a quick test in V12 just now I couldn't get it to go wrong on a new simple form.  You can type in the event handlers manually into the code  - they just need to come after the correct "defeventtab form-name" statement.

If you get a "Slick C stack dump" due to an error (e.g. mistyped function name), clicking in the error window should take you to the source file with the error, but here, Slick sometimes also reports "can't find file".  If you take a note of the error offset reported, you can use  st -f <offset value>  on the slick cmd line to go to the location of the error.

Maybe slick-team know what causes this.

Graeme

cappy2112

  • Community Member
  • Posts: 91
  • Hero Points: 0
Re: Defining new event handler- can't save file
« Reply #2 on: January 19, 2007, 10:00:17 PM »
That happens to me as well, including in the V12 beta with a new dialog I've been creating that I copied over from V11.  I just tried to reproduce the problem with a new form with a command button in V12 but couldn't.  I've always wondered if it happens because I've renamed a file or moved it from where it was first created or because the name of the file is different to the name of the form - but from a quick test in V12 just now I couldn't get it to go wrong on a new simple form.  You can type in the event handlers manually into the code  - they just need to come after the correct "defeventtab form-name" statement.

If you get a "Slick C stack dump" due to an error (e.g. mistyped function name), clicking in the error window should take you to the source file with the error, but here, Slick sometimes also reports "can't find file".  If you take a note of the error offset reported, you can use  st -f <offset value>  on the slick cmd line to go to the location of the error.

Maybe slick-team know what causes this.

Graeme


Is there a workaround?
I'd rather not have macro files I've defined in the default directory locations slick defines.

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: Defining new event handler- can't save file
« Reply #3 on: January 22, 2007, 09:23:32 PM »
Quote
Is there a workaround?
I'd rather not have macro files I've defined in the default directory locations slick defines.

I'm not sure what causes it.  I'll try and send a reproducible test case to SE support.

Graeme