Page 1 of 1

Is this a bug or is this newby missing something

Posted: Fri Apr 14, 2023 10:23 pm
by Songdog
So I'm noticing that when I use the IDE to run a program then edit it and run again it runs the old code that was there b4 editing unless I close the IDE then reopen it again. Any one else having this problem Using doze 7..

I'm running some sample code that I hacked.

Code: Select all


;If OpenWindow(0, 0, 0, 230, 90, "Event handling example...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
EnableDebugger
OpenWindow(0, 0, 0, 230, 90, "Event handling example...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
someCondition=0
   ButtonGadget  (1, 10, 10, 200, 20, "Click me")
   CheckBoxGadget(2, 10, 40, 200, 20, "Check me")

   If CreateMenu(0, WindowID(0))
     MenuTitle("Menu")
     MenuItem(1, "Item 1")
     MenuItem(2, "Item 2")
     MenuItem(3, "Item 3")
   EndIf

   Repeat
     WWE = WaitWindowEvent()
     Result$ = Str(WWE)
     Select WWE
       Case #PB_Event_Gadget
         Eg$ = Str(EventGadget())
       ;  Debug "Eg = "+ Eg$
         Select EventGadget()
           Case 1 : Debug "Button 1 clicked! " + Result$ + " Eg= " + Eg$
           ;  Debug Result$
           Case 2 : Debug "Button 2 clicked! " + Result$ + " Eg= " + Eg$
           ;  Debug Result$
         EndSelect
         
       Case #PB_Event_Menu
         MenuNumber = EventMenu()
         Mn$ = Str(EventMenu())
       ;  Debug "Mn = " + Mn$
         Select EventMenu()
           Case 1 : Debug "Menu item 1 clicked! " + Result$ + " MN= " + Mn$
           ;  Debug Result$
           Case 2 : Debug "Menu item 2 clicked! " + Result$ + " MN= " + Mn$
           ;  Debug Result$
           Case 3 : Debug "Menu item 3 clicked! " + Result$ + " MN= " + Mn$
           ;  Debug Result$
         EndSelect
     EndSelect
    ; someCondition = 0
     If someCondition
       Break
     EndIf
   Until WWE = #PB_Event_CloseWindow
; EndIf

Re: Is this a bug or is this newby missing something

Posted: Fri Apr 14, 2023 10:43 pm
by mk-soft
Settings adjusted by the IDE?

Preferences -> Editor
- Auto-save before compiling
- Save all sources with auto-save

Re: Is this a bug or is this newby missing something

Posted: Fri Apr 14, 2023 11:00 pm
by Songdog
Thanks for the reply mk-soft.

I found
Preferences -> Editor under the file Menu, but could not find the options for
- Auto-save before compiling
or
- Save all sources with auto-save
what am I missing? :?

Re: Is this a bug or is this newby missing something

Posted: Sat Apr 15, 2023 1:19 am
by mk-soft
- Menu File
-> Preferences ...
--> Tree - Editor

Re: Is this a bug or is this newby missing something

Posted: Sat Apr 15, 2023 1:57 am
by BarryG
Songdog wrote: Fri Apr 14, 2023 10:23 pmwhen I use the IDE to run a program then edit it and run again it runs the old code that was there b4 editing
Sounds like you didn't compile/run, but just ran the code again. Any edits need a new compile/run each time. Auto-saving of the code isn't required (I never auto-save).

Re: Is this a bug or is this newby missing something

Posted: Sat Apr 15, 2023 9:35 am
by Songdog
Barry, you hit the nail squarely on the head.
Thank You