I have found one more prob / bug in PureFORM.
If you use the settings wat shows the image and Save the code for PB in PureFORM you dont have the arry in the code and so you cant compile the code in PB.
If you set the config for Languages to "Procedure" it works fin but not with arry´s.
And one more question:
How i can config PureFORM so that PureFORM generats more code files, 1 for the Loop and 1 codefile for forms (like the form stuff) and 1 for the common (for crate the variables and arry´s and so)?
If i build a software i have every time 3 main code files. So it is esay and clearly to work.
I think it is not a good way to have all in one code file
A smal example how i work:
1. the main code file (with the loop as main.pb)
Code: Select all
XIncludeFile "declars.pb"
OpenWindow_Window_0()
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
EventGadget = EventGadget()
EventType = EventType()
Case #PB_Event_Menu
EventMenu = EventMenu()
If EventMenu = #menu_new
ElseIf EventMenu = #menu_open
ElseIf EventMenu = #menu_save
ElseIf EventMenu = #menu_exit
EndIf
Case #PB_Event_CloseWindow
EventWindow = EventWindow()
If EventWindow = #Window_0
CloseWindow(#Window_0)
Break
EndIf
EndSelect
ForEver
2. the declare file (declare of all variables, Enums, arry´s .....)
Code: Select all
;{- Variables
Global hwnd
;}
;{- Windows
Enumeration
#Window_0
EndEnumeration
;}
;{- Menu
Enumeration
#Menu_Window_0
EndEnumeration
Enumeration
#menu_new
#menu_open
#menu_save
#menu_exit
EndEnumeration
;}
Define.l Event, EventWindow, EventGadget, EventType, EventMenu
XIncludeFile "Forms.pb"
3. tghe Forms code file (all the stuff for create the Windows as Forms.pb)
Code: Select all
Procedure OpenWindow_Window_0()
If OpenWindow(#Window_0, 382, -2, 890, 709, LanguageItem(#Window_0_W_Lng), #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar|#PB_Window_ScreenCentered)
If CreateImageMenu(#Menu_Window_0, WindowID(#Window_0))
MenuTitle(LanguageItem(_Lng))
MenuItem(#menu_new, LanguageItem(#menu_new_Lng))
MenuItem(#menu_open, LanguageItem(#menu_open_Lng))
MenuItem(#menu_save, LanguageItem(#menu_save_Lng))
MenuItem(#menu_exit, LanguageItem(#menu_exit_Lng))
EndIf
If CreateGadgetList(WindowID(#Window_0))
EndIf
EndIf
EndProcedure
This is only a example
If you can insert a option so that PureFORM can separate the code, it would be very nice.
Regards,
Nico[/code]