Author Topic: stepping through widget _oncreate  (Read 4165 times)

warnerrs

  • Senior Community Member
  • Posts: 114
  • Hero Points: 4
stepping through widget _oncreate
« on: October 05, 2014, 04:25:49 AM »
I'm trying to understand how the tools -> options -> import/export -> "setup export groups" checkbox tree widget works. I'd like to step through it's _oncreate method, but Slick doesn't like to break in event handlers. I've tried adding a function call to the _oncreate, but I don't think it is ever applying.

I've tried adding the call in optionsxml.e, then I quit Slick. Delete vslick.stu, then start slick. And nothing. I can't seem to insert any code into that function. If I could, I presume I could put a breakpoint there and actually observe the initialization of the widget.

Any suggestions on how to accomplish this exploration?

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: stepping through widget _oncreate
« Reply #1 on: October 08, 2014, 05:22:37 PM »
Can I assume this is a step along the way to some bigger goal?  What's the bigger picture thing you're trying to achieve?

After you added a call in optionsxml.e _options_tree_form.on_create, did you recompile the file?
What are you trying to add into the on_create method?

Also, modifying the Tools|Options code might be a little risky.  If the bigger picture thing can be shared, that might lead to alternative ideas.

warnerrs

  • Senior Community Member
  • Posts: 114
  • Hero Points: 4
Re: stepping through widget _oncreate
« Reply #2 on: October 08, 2014, 11:45:21 PM »
Don't want to modify it. Simply want to be able to step through it, to help me understand how to use the tree widget. I want to build my own form that uses the tree widget in the same way that the options export dialog does, a tree with checkboxes.

The GNU C Options / Warnings form has proved to be easier to step through. It has places I can set breakpoints that actually work. It doesn't utilize the hierarchical tree aspect of the widget, but it is very informative none the less.

This leaves me wondering if it is possible to somehow set a breakpoint on some of Slick's code that runs as it opens. Using "Start Click-C Debugger" attaches you to your existing Slick session, and the startup code has already ran.

I tried opening the SCDebug.vpw, then I attempted to connect that to a new slick edit instance using the Debug->Attach Debugger->Debug Other Executable... dialog. I pointed it to the vs_exe and gave it the +new switch. But that is not the magic incantation required to step into Slick.

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: stepping through widget _oncreate
« Reply #3 on: October 10, 2014, 12:04:04 PM »
I think you can set breakpoints in event handlers.  Maybe there's something special about optionsxml.e.
Have you seen the document SlickCMacroBestPractices.pdf in the slick installation docs folder.  It doesn't help with this problem but if you're writing macros it has useful information.