Apache2k Posted February 17, 2016 Posted February 17, 2016 I know how to do this and have done it. BUT. I have multiple products.ini, products2.ini files where i get the values for popup_list. The first selected is ok. However when i change to the external ini file to the next ini file. The content of the popup_list is still the one i have used at first. I cant post the whole lisp nor DCL but has someone experienced this before and how can i "flush" the old external ini values? Thanks. Quote
rlx Posted February 17, 2016 Posted February 17, 2016 I know how to do this and have done it. BUT.I have multiple products.ini, products2.ini files where i get the values for popup_list. The first selected is ok. However when i change to the external ini file to the next ini file. The content of the popup_list is still the one i have used at first. I cant post the whole lisp nor DCL but has someone experienced this before and how can i "flush" the old external ini values? Thanks. Make shure you refresh your dialog each time you start it. When loading your ini , first set the old ini's to nil. I suppose you use a list to fill your popup list , so upon load , first set this list to nil also. Try to make a function to reset all viariables and lists whenever you load a new ini. And last but not least , have a critical look that variable are declared properly , global / local. gr. Rlx Quote
Apache2k Posted February 17, 2016 Author Posted February 17, 2016 Thanks for the quick reply. I did reset the values. It is there. Its one function doing all of it and idid use (setq prod nil) Still no luck. Im turning blue Is there a reset for the internal lists or something similar in lisp? Quote
rlx Posted February 17, 2016 Posted February 17, 2016 Thanks for the quick reply.I did reset the values. It is there. Its one function doing all of it and idid use (setq prod nil) Still no luck. Im turning blue Is there a reset for the internal lists or something similar in lisp? I have posted serverall dcl related routines on this forum , just search for rlx and maybe you find something of use. My personal experience for this kind of errors , which I frequently have my self , is what I call sloppy programming , I start out with a good strategy , but then I change something and forget or fail to see the impact on other parts. Use breakpoints in your editor and check each step. If for example you have a routine to fill your popup list and have declared this list local , then trying to change it in another part of your program will have no effect. Unless your pc is bewitched and you can blame your wife or girlfriend (usually the case) , there must be a logical error in your program/ thinking. You could go old school and make a special variable dump routine that prints your variables at certain points in your app , thus confirming each step. But if its any comfort , I know exacly how frustrated it can be when a bug is eating your brain ;-). If nothing helps , post or mail the part that's bugs you. Gr.Rlx Quote
Apache2k Posted February 17, 2016 Author Posted February 17, 2016 Thanks Rlx Its what i did try to avoid, so lets split it in to parts and check Ill inform the result. Quote
Hippe013 Posted February 17, 2016 Posted February 17, 2016 How are you opening and reading your .ini files? Quote
Apache2k Posted February 17, 2016 Author Posted February 17, 2016 Like this: (setq produfile (findfile ininame1)) (open produfile "r") Quote
Hippe013 Posted February 17, 2016 Posted February 17, 2016 Are you then closing it with the following? (close produfile) Quote
Apache2k Posted February 17, 2016 Author Posted February 17, 2016 Yes Its closed. Forgot to mention. I hate bugs found so many bugs but none of them fixed this issue. Still fixing/searching. Quote
Tharwat Posted February 17, 2016 Posted February 17, 2016 Hi, The action_tile that selects the file should have the codes to retrieve the contents of the new selected file then the variable that holds the strings must be set to nil prior appending strings to it. Quote
rlx Posted February 17, 2016 Posted February 17, 2016 wow , my eyes are getting tired pfff... where to begin... Guess you're still trying to devellop your own programming style ;-) Couple of things a first glance a lot of variables are not declared in your main defun like inifile1 etc. This means even after your app has ended their values are still in the memory. If this is your intend , ok , if not just put them with the rest of your variables right after the defun xxxxx ( / ... That way you don't have to set them to nil each time. Same for lcp4list02cq7jtq. I suspect when you run your app twice , the list gets longer each time? Just put all your variables in 'the bucket' as mentioned above. Sure there is more to be said but it was a long day for me , so will have a second look later but first declare all your variables properly is my advice at this time. Maybe someone is awake to help you further right now , but it's bedtime for me (yawn...) Gr. Rlx Quote
Apache2k Posted February 17, 2016 Author Posted February 17, 2016 Sorry Rlx to bother you at this time. I figured it out the lcp4list02cq7jtq and variables where messed up. Works now better. Thanks for helping me out. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.