PureFORM 1.99 (yet another FORM designer)

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

The PureFORM for the project wat not work right with PanelGadget and itemselect is:

Code: Select all

;{[PureFORM Project]
;PureFORM_Project_Begin
;Project¶admin_conf_form
;Window¶1¶#Window_0¶348651522¶#PB_Window_SystemMenu|#PB_Window_TitleBar|#PB_Window_WindowCentered¶Window_0¶428¶110¶522¶357¶0¶10¶10¶0¶5000¶5000¶0¶-1¶0¶¶¶
;PanelGadget¶-372¶#admi_pan¶1¶-1¶-1¶0¶0¶19¶0¶0¶¶¶¶-1¶0¶¶¶0¶0¶1¶1¶4¶0¶0¶520¶355¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶-1¶-1¶Default·User·Program¶0¶¶0¶0
;PureFORM_Project_End
;}
regards,
Nico
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

nicolaus wrote:The PureFORM for the project wat not work right with PanelGadget and itemselect is:
This file is corrupt (bad gadget id) !
PanelGadget¶-372¶#admi_pan¶...
Could you reproduce the steps to get such a file ?
It should be:

Code: Select all

;{[PureFORM Project] 
;PureFORM_Project_Begin 
;Project¶admin_conf_form 
;Window¶1¶#Window_0¶348651522¶#PB_Window_SystemMenu|#PB_Window_TitleBar|#PB_Window_WindowCentered¶Window_0¶428¶110¶522¶357¶0¶10¶10¶0¶5000¶5000¶0¶-1¶0¶¶¶ 
;PanelGadget¶1¶#admi_pan¶1¶-1¶-1¶0¶0¶19¶0¶0¶¶¶¶-1¶0¶¶¶0¶0¶1¶1¶4¶0¶0¶520¶355¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶-1¶-1¶Default·User·Program¶0¶¶0¶0 
;PureFORM_Project_End 
;}
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

Could you reproduce the steps to get such a file ?
The steps was normal.
- New Project
-> at a panelgadget
-> at the items

but at this time my PureFORM was crashed with the prob wat i have post yesterday.
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 670
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Post by Kurzer »

Hello Gnozal, thank you for your latest update of PureFORM

There is still a bug in the menu-editor. If I try to insert a seperator a errormessage pops up "Menuitem '' allready exists".
So I am not able to insert seperators. :)

Image

Another improvement suggestion: New menu items are placed *before* the currently selected item. It is more practical if new items would placed *after* the current item (and maybe the new item becomes the current item [selection]).

And a second issue regarding gadgets with images: If I click the button to load an "Image File" for a Imagegadget the filerequesters path is always(!) "Eigene Dateien" (only if the imagepath stringgadget is empty).
It would be fine if PureFORM remember and use the last path of the filerequester.
I have all my icons and buttonimages in the same directory. And for each Image I have to click click click click click... me from "Eigene Dateien" to this directory. :-)

PS: If "Don't generate Eventloop code" is enabled, PureFORM must not define the following variables: "Define.l Event, EventWindow, EventGadget, EventType, EventMenu", but PF do this!

PS2: Another (small) issue regarding images:
I placed an image in a window and PureFORM gave them an Enum-ID (#Image_Image_1). The code works and all went okay.
Now I changed the Enum manually to "#Image_Aboutlogo". But PureForm changes only the Image-ID, but not the label text for LoadImage/CatchImage. The label text is still the old one.
Image
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

Well i have the same probe like kurzer.
No way to at a seperator into a menu.
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

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.

Image

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]
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

nicolaus wrote: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.
Could you be more precise ?
Note that you need at least one gadget in your form !
nicolaus wrote: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)?
You can't.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

kurzer wrote:There is still a bug in the menu-editor. If I try to insert a seperator a errormessage pops up "Menuitem '' allready exists".
So I am not able to insert seperators. :)
Silly me :wink:
Will fix.
kurzer wrote:New menu items are placed *before* the currently selected item. It is more practical if new items would placed *after* the current item (and maybe the new item becomes the current item [selection]).
Did you try 'Add' instead of 'Insert' ?
kurzer wrote:And a second issue regarding gadgets with images:
...
PS: If "Don't generate Eventloop code" is enabled, PureFORM must not define the following variables: "Define.l Event, EventWindow, EventGadget, EventType, EventMenu", but PF do this!
Ok, will see.
kurzer wrote:PS2: Another (small) issue regarding images:
I placed an image in a window and PureFORM gave them an Enum-ID (#Image_Image_1). The code works and all went okay.
Now I changed the Enum manually to "#Image_Aboutlogo". But PureForm changes only the Image-ID, but not the label text for LoadImage/CatchImage. The label text is still the old one.
The label is based on the image ID, not the enum.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

Changes :
- Menu builder : fixed menu separator issue
- Add (another) sanity check when loading a project
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 670
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Post by Kurzer »

gnozal wrote:Silly me :wink: Will fix.
Works great, Thanks for the fast fix! *thumbsup*
gnozal wrote:
kurzer wrote:New menu items are placed *before* the currently selected item. It is more practical if new items would placed *after* the current item (and maybe the new item becomes the current item [selection]).
Did you try 'Add' instead of 'Insert' ?
:shock: Ooops, no. :oops: Thank you for the hint. -painful-
gnozal wrote:The label is based on the image ID, not the enum.
Okay, thanks for clarify this.

Edit PS: Gnozal, what do you think about Arrow-buttons within the gadgetlist (Integratorwindow) to change the Tab-order of the gadgets instead of using a seperate Window for this job? Drag 'n drop entries within the gadgetlist would be fantastic too (like in the official VD).
mueckerich
User
User
Posts: 22
Joined: Thu Dec 16, 2004 10:36 am
Location: Germany/Allgaeu

Post by mueckerich »

Hi Gnozal, there is another issue which has to be fixed. I press one Button from the Spin Gadgets in the Gadget Properties window once and keep it pressed to move a gadget. The Value start to count but it stops after 15 increments. In older Versions this featur has worked correct.
Believe means you don't know
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

mueckerich wrote:Hi Gnozal, there is another issue which has to be fixed. I press one Button from the Spin Gadgets in the Gadget Properties window once and keep it pressed to move a gadget. The Value start to count but it stops after 15 increments. In older Versions this featur has worked correct.
Should be fixed in new build (255).
Download updated.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Micko
Enthusiast
Enthusiast
Posts: 244
Joined: Thu May 24, 2007 7:36 pm
Location: Senegal
Contact:

Post by Micko »

gnozal if the color of the MenuTitle can be Unchanged it would be nice(when using MenuIcon)
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Micko wrote:gnozal if the color of the MenuTitle can be Unchanged it would be nice(when using MenuIcon)
Sorry, I don't understand what you mean.
And are we talking about PureCOLOR or PB4.20 generated menu code ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Micko
Enthusiast
Enthusiast
Posts: 244
Joined: Thu May 24, 2007 7:36 pm
Location: Senegal
Contact:

Post by Micko »

gnozal wrote:And are we talking about PureCOLOR or PB4.20 generated menu code ?
sure !
when i create MenuItem whith Icon, why the MenuTitle background color change ?(white now) should be SystemColor
Post Reply