[VD Alpha16 Linux] duplicate code

You need some new stunning features ? Tell us here.
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

[VD Alpha16 Linux] duplicate code

Post by walker »

The line Openwindow() is written twice in the codeviewer tab...(for each window you may add)
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

An example or screen shot? I'm not sure what you mean here.
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Post 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
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post 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?
Last edited by Berikco on Sat Feb 02, 2008 11:38 pm, edited 1 time in total.
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Post by Foz »

I suggest you remove this bit of code ;):

Code: Select all

If WindowsOS
  causeHeadaches = 0
Else
  causeHeadaches = 1
EndIf
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post 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) ...
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post 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 :)
Post Reply