Page 1 of 1

New requirements in PB 3.93?

Posted: Mon Mar 07, 2005 3:19 pm
by chippy73
I notice that if you don't put a "ProcedureReturn" in the windows procedure, it won't display ie...

Code: Select all

Procedure Open_Window_0()
  If OpenWindow(#Window_0, 216, 10, 600, 300,  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "New window")
    If CreateGadgetList(WindowID(#Window_0))
      ButtonGadget(#Button_0, 120, 110, 60, 20, "OK")
      ;HideWindow(#Window_0,0)
      ProcedureReturn WindowID()
    EndIf
  EndIf
EndProcedure
Is this a new feature requirement in PB 3.93? And are there others that we should be aware of?

Or maybe there is a site so that we can read about it.

Alan

Posted: Mon Mar 07, 2005 4:37 pm
by Sparkie
This works for me with PB 3.93...

Code: Select all

#Window_0 = 0
#Button_0 = 0
Procedure Open_Window_0()  
  If OpenWindow(#Window_0, 216, 10, 600, 300,  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "New window") 
    If CreateGadgetList(WindowID(#Window_0)) 
      ButtonGadget(#Button_0, 120, 110, 60, 20, "OK") 
      ;HideWindow(#Window_0,0) 
      ;ProcedureReturn WindowID() 
    EndIf 
  EndIf 
EndProcedure
Open_Window_0()
Repeat
  event = WaitWindowEvent()
Until event = #PB_Event_CloseWindow
End

Posted: Mon Mar 07, 2005 5:52 pm
by chippy73
Sparkie,

Yes it worked for me too.

Did some investigating and found it was due to the bit under your code "Repeat"

I always get this tail bit wrong.

Thanks for you help.

Alan