Author Topic: Custom logic and forms for new projects  (Read 6547 times)

nathanfrid

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Custom logic and forms for new projects
« on: September 04, 2006, 05:20:07 PM »
Hi All,
   Does anyone know how I can add a new project type to the Projects->New dialog ?  The customization button allows you to duplicate an existing project wizard and set the configuration fields, but that's not good enough because I need to use a different set of forms than the built-in GCC wizard and logic based on the user's choices in those forms (i.e. slick-c).
   I'm coming from the Visual Studio world where choosing the project type, name and location is a built-in form, but from there on, control is turned over to your script.  How can I do this with SlickEdit?  At the moment, I'm using an added menu item to the Project menu, but this:
           a) is less intuitive than adding it to the other project types
           b) will force me to duplicate part of the Projects->New dialog for choosing project name and location.

                           Thanks,
                                 Nathan Frid

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: Custom logic and forms for new projects
« Reply #1 on: September 05, 2006, 10:40:55 AM »
Hi All,
   Does anyone know how I can add a new project type to the Projects->New dialog ?  The customization button allows you to duplicate an existing project wizard and set the configuration fields, but that's not good enough because I need to use a different set of forms than the built-in GCC wizard and logic based on the user's choices in those forms (i.e. slick-c).
   I'm coming from the Visual Studio world where choosing the project type, name and location is a built-in form, but from there on, control is turned over to your script.  How can I do this with SlickEdit?  At the moment, I'm using an added menu item to the Project menu, but this:
           a) is less intuitive than adding it to the other project types
           b) will force me to duplicate part of the Projects->New dialog for choosing project name and location.

                           Thanks,
                                 Nathan Frid


I don't know if any of this is useful or will work for you but just in case ...  did you know you can edit (using the form designer) any of the existing dialogs and forms in slickedit by either bringing up the dialog and pressing CTRL SHIFT SPACE, or by going through main menu -> macro -> open form and selecting the form ( _workspace_new_form in this case).
e.g. if you go into edit mode on _workspace_new_form you can double click the OK button, select the offered lbutton_up event and you'll be taken to the code that handles the OK button (ctlok.lbutton_up in wkspace.e).  You could then customise this code to check for your specific project type.  Also did you know slickedit forms support "clipboard inheritance" - e.g. with the _workspace_new_form open in the form designer, press CTRL A to select all, then CTRL C to copy all.  You can then close the form and start a brand new form, press CTRL V and all the widgets etc will appear on your new form and should have all their event handlers hooked to the event handlers for the _workspace_new_form.  Hence you can create a customised dialog without starting from scratch.

Also, have you looked at the usrprjtemplates.vpt file in your config directory?
In case you try any of this, I suggest you back up your config folder and slick macros folder first.  Also, a problem with customising slickedit macro source is that when you install an update you can lose all your patches/ changes.

Graeme