Author Topic: Changes in _form source not reflected when form displayed  (Read 14786 times)

Aaron

  • Guest
Changes in _form source not reflected when form displayed
« on: June 26, 2006, 02:07:07 PM »
When I make changes to the source of a form, later when that object is displayed my changes are not reflected.  I am using version 7.0.1.  Any ideas as to what is going on?

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: Changes in _form source not reflected when form displayed
« Reply #1 on: June 26, 2006, 09:22:51 PM »

I don't have version 7 but ...

How long have you been using this particular form?
Have you been able to change the form successfully before?
Has anything changed on your system recently e.g. new operating system.
Have you tried unloading and reloading the form?
If you change the associated source file do the changes work?

Have you tried starting a new config directory to see if it works there - use -sc switch on the command line that invokes slickedit, then copy over your forms and macro files and rebuild them.  To copy over a form, use macro menu, then "insert form or menu source".  You probably need to add #include "vslick.sh" at the top of the form file.  Then you could check if the design time view of your form agrees with what you see now.

Graeme

Aaron

  • Guest
Re: Changes in _form source not reflected when form displayed
« Reply #2 on: June 26, 2006, 09:38:09 PM »
I've been able to change the form but cannot reproduce what I did, it always seems to be a bit of luck.
I have tried loading the form as a module, (with the include "vslick.sh" at the top) and then calling it from my macro with no luck.  I also tried commenting out the include statement and then just including the form file into my macro file.

If I unload the form and macros, and then change the source of the form, and reload that module, the changes are NOT reflected.  Even if I unload, quit the program, come back and load it.  No good.

What DOES work is if I change the form name.  If I just change the name then the changes are reflected.  But this is very annoying-- every time I make a change to my form I have to for example change "_form gui" to "_form gui2" and then in my show statement change it there as well.

But I think the fact that if rename it changes immediately take effect mean SlickEdit is keeping the old forms in memory, even when I unload the modules.  I will look into the -sc switch as well.  Thanks for the reply!

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: Changes in _form source not reflected when form displayed
« Reply #3 on: June 27, 2006, 10:46:11 AM »

It sounds like there's a reasonable chance starting a new config directory and state file will solve the problem.  Copying your settings etc from your old config to a new one can be a bit of a challenge but it's a good way to get a clean start, especially if you've been "experimenting" with macros.

You might be able to achieve the same thing more easily by deleting your state file but I've never tried that.  Either way, you can reload the settings that are kept in vusrdefs.e just by entering the full path and name of vusrdefs.e on the slick command line (with quotes around the pathname if it has spaces in it) and pressing return.  You could probably make a full copy of your existing config directory, then try deleting the state file etc. and if it doesn't work out, restore the config directory.  I guess you'll need to save all your forms and menus in source form first if you haven't already.

Graeme

Aaron

  • Guest
Re: Changes in _form source not reflected when form displayed
« Reply #4 on: June 27, 2006, 12:24:04 PM »
Would I have to do this every time I make changes to the form?

Anyways, I don't have a vusrdefs.e.  I will try to reset configuration to default other ways.  Thanks for taking the time to help me!
« Last Edit: June 27, 2006, 12:39:40 PM by Aaron »

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: Changes in _form source not reflected when form displayed
« Reply #5 on: June 27, 2006, 10:34:31 PM »

Nope, you wouldn't have to do this every time you changed the form - just once, to see if the problem goes away.  I was thinking that something had got confused within your state file (vslick.sta) and the best way to fix it is to start a new one.  If you're usng unix, the file corresponding to vusrdefs.e is vunxdefs.e I think.  Search for "vslick.ini" in the help and look for a topic called "User configuration files".

Didi the problem you're having just suddenly start happening or have you always had this problem when doing form development with vslick 7?

Graeme

Aaron

  • Guest
Re: Changes in _form source not reflected when form displayed
« Reply #6 on: June 28, 2006, 12:24:16 PM »
I am running SlickEdit on windows, I've always had this problem but I have only been developing macros for SlickEdit for about three weeks so its not saying too much.

I experimented on a co-worker's machine that had a fresh install of SlickEdit, and experienced the same phenomenon.  I'll look into that configuration file though, thanks for your help!

Aaron

  • Guest
Re: Changes in _form source not reflected when form displayed
« Reply #7 on: July 05, 2006, 08:28:14 PM »
Ok removing the configuration file works in that SlickEdit forgets the old form and then loads the new one.  However from that point on it no longer reflects changes. Also this blew away custom toolbar icons and other settings I had set up, and would be very inconvenient to have to do each time.

EDIT: I probably should have mentioned the _form declarion is in another .e file that I include in my main macro file.  Am I wrong to understand #include simply puts that code where the #include statement is in the file?  I also have some global variables declared in another file and now am having problems getting changes in them to be reflected in the macro.  Perhaps it is a problem with including files?!  Whatever it is this is very frusterating!

EDIT 2: Ok I just copied and pasted the code right where the include statement is with the same net results: changes in global variables are not updated.

Is there some way or command to flush out SlickEdit's memory of declared variables, forms, etc without having to delete files or blow away other user preferences.  Even so, shouldn't it replace variables with newer versions when it encounters ones with the same name as it loads the module?!
« Last Edit: July 06, 2006, 12:18:24 PM by Aaron »