Page 1 of 1

[VD Alpha16 Linux] duplicate code

Posted: Sat Feb 02, 2008 7:10 pm
by walker
The line Openwindow() is written twice in the codeviewer tab...(for each window you may add)

Posted: Sat Feb 02, 2008 11:02 pm
by Berikco
An example or screen shot? I'm not sure what you mean here.

Posted: Sat Feb 02, 2008 11:17 pm
by Foz
Freshly opened VD (all I've done is click in the code view) results in this code:

Code: Select all

Global Window_0

Procedure Open_Window_0()
  
  Window_0 = OpenWindow(#PB_Any, 5, 5, 400, 200, "Window 0",  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
  Window_0 = OpenWindow(#PB_Any, 5, 5, 400, 200, "Window 0",  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
    If CreateGadgetList(WindowID(Window_0))
      
      
    EndIf
  EndIf
EndProcedure

Open_Window_0()

Repeat
  
  Event  = WaitWindowEvent()
  
Until Event = #PB_Event_CloseWindow

End

Posted: Sat Feb 02, 2008 11:31 pm
by Berikco
Okay, i see what you mean.
Pretty weird as it's the same code for Linux and Windows....
/me scratches head

Edit: ha, its a cosmetic bug, this line does not show up in the saved code i think?

Posted: Sat Feb 02, 2008 11:34 pm
by Foz
I suggest you remove this bit of code ;):

Code: Select all

If WindowsOS
  causeHeadaches = 0
Else
  causeHeadaches = 1
EndIf

Posted: Sun Feb 03, 2008 1:25 am
by walker
Berikco wrote: Edit: ha, its a cosmetic bug, this line does not show up in the saved code i think?
yes, that's true... and here's another duplication... created a scintilla gadget and then moved it a little... and got two lines for the creation of the Scintilla-Gadget (but not in the saved code)

When creating the next gadget, this one has a duplicate entry (and for the previous one is only one entry left...)
It seems, that only the last created gadget (or window) has 2 lines (in the code viewer tab, not in the saved code of course) ...

Posted: Sun Feb 03, 2008 9:11 am
by Berikco
walker wrote:
Berikco wrote: Edit: ha, its a cosmetic bug, this line does not show up in the saved code i think?
yes, that's true... and here's another duplication... created a scintilla gadget and then moved it a little... and got two lines for the creation of the Scintilla-Gadget (but not in the saved code)

When creating the next gadget, this one has a duplicate entry (and for the previous one is only one entry left...)
It seems, that only the last created gadget (or window) has 2 lines (in the code viewer tab, not in the saved code of course) ...
It looks like a PB Linux bug, so it does not show in windows.
Only a Gadget and Linkedlist is used in this code, i will try to hunt it down so Fred can kill it :)