PureBasic Forum
https://www.purebasic.fr/english/

RAD EventDesigner V3 (All OS)
https://www.purebasic.fr/english/viewtopic.php?f=14&t=73531
Page 1 of 2

Author:  mk-soft [ Mon Sep 02, 2019 9:17 pm ]
Post subject:  RAD EventDesigner V3 (All OS)

Rapid Application Development - Event Designer V3

Link: FTP - EventDesigner V3
Info MacOS. With Safari you can't open FTP folders anymore. Switch to another browser.

Quote:
With the new version each form will have its own event file.
A subsequent modification or extension of the form files is possible. After changing the form file, call EventDesigner again.
If the constants of the original form file are changed, the dialog windows for assigning the old constants to the new constants appear.

Create several Forms.pbf with the PureBasic FormDesigner without PB_Any and without event procedures and add them to the EventDesigner.
After successful creation of the event codes, the following files are ready.

- GuiCommonFile.pb
- GuiMainFile.pb
- GuiEventMainFile.pb
- GuiEvent[Form].pb

* The Copy Images option copies the files to the [ProjectPath]/Resources folder.
* With macOS copied to the folder [ProjectPath]/MyAppData/Resources

! macOS:
! So that the resources are available in the APP at runtime, you need the MacOS IDE tool MyAppData.
! The required code for the tool can be saved under Menu Tools.


Structure of the form files without the FormDesigner
Code:
;-TOP

; Enumeration not used

LoadFont(#Constant, ...)

Use[XY]ImageDecoder()

LoadImage(#Constant, ...)

; ----

;{ Begin : This always in the same form file

Procedure Open[Window_Constant]()
  If OpenWindow(#Window_Constant, ...)
    ; ...
  EndIf
EndProcedure

; ----

Procedure ResizeGadgets[Window_Constant]()
  ; ...
EndProcedure

;} End

; ----

Procedure InitPopupMenu()
  If CreatePopupImageMenu(#Popup_Constant[, ...])
    ; ...
  EndIf
EndProcedure : InitPopupMenu() ; On same line

; ----

Procedure [Others]()
  UseGadgetList(WindowID(#Window_Constant))
  ; ...
EndProcedure


Thank you :wink:

Author:  mk-soft [ Tue Sep 03, 2019 10:33 pm ]
Post subject:  Re: RAD EventDesigner V3 (Beta)

Update v3.01 (Beta 2)
- Bug fixes
- Evaluation of external procedures revised

Example:
- Adding PopupMenus to Event Management.

The code is automatically adjusted and added to GuiCommonFile.pb
Code:
;-TOP

; File: FormPopupMenus.pb

Procedure InitPopupMenu1()
 If CreatePopupImageMenu(#Popup1, #PB_Menu_ModernLook)
    MenuItem(#Open, "Open")
    MenuItem(#Save, "Save")
    MenuItem(#SaveAs, "Save as")
    MenuItem(#Quit, "Quit")
    MenuBar()
    OpenSubMenu("Recent files")
    MenuItem(#SubMenu1, "PureBasic.exe")
    MenuItem(#SubMenu2, "Info.txt")
    CloseSubMenu()
  EndIf
EndProcedure : InitPopupMenu1()

Procedure InitPopupMenu2()
 If CreatePopupImageMenu(#Popup2, #PB_Menu_ModernLook)
    MenuItem(#Open, "Open")
    MenuItem(#Save, "Save")
    MenuItem(#SaveAs, "Save as")
    MenuItem(#Quit, "Quit")
  EndIf
EndProcedure : InitPopupMenu2()

Author:  mk-soft [ Wed Sep 04, 2019 4:56 pm ]
Post subject:  Re: RAD EventDesigner V3 (Beta)

Update v3.04
- Bugfixes

The PB editor sometimes doesn't notice that the files have changed... ?!
Looking for a long time for the error, why the change of the file was not translated correctly :|
So better close the files before.

:wink:

Author:  Bitblazer [ Wed Sep 04, 2019 5:18 pm ]
Post subject:  Re: RAD EventDesigner V3 (Beta)

mk-soft wrote:
The PB editor sometimes doesn't notice that the files have changed... ?!


Some IDE functions only notice changes after they where written to external memory / harddisk. Thats what i noticed.

Author:  mk-soft [ Wed Sep 04, 2019 6:02 pm ]
Post subject:  Re: RAD EventDesigner V3 (Beta)

During the test I opened all files. These are rewritten in the background (CreateFile).
The editor only recognizes two changed files, but sometimes all files have changed. :cry:

Update v3.05
- Added information

Author:  mk-soft [ Wed Sep 04, 2019 9:07 pm ]
Post subject:  Re: RAD EventDesigner V3

Update v3.07
- Bugfix Macro ResizeGadget
- Bugfix write BOM

Author:  mk-soft [ Sun Sep 08, 2019 12:24 am ]
Post subject:  Re: RAD EventDesigner V3

Update v3.08
- Bugfix
- Restart Purebasic-IDE

Under Linux the tool "wmctrl" is needed to automatically terminate the Purebasic IDE.
Quote:
sudo apt-get install wmctrl


:wink:

Author:  Kwai chang caine [ Sun Sep 08, 2019 8:57 am ]
Post subject:  Re: RAD EventDesigner V3

Hello MkSoft :D

Excuse me to not try to help you before, but i have problems with SYMANTEC on my enterprise machine, and it's not the moment to load EXE of PB :cry:
Now i'm in my home, and i want to help you with my little means, for test your new toy, if that can help you a little bit :wink:

But like usually i have not all understand :oops:
I have create a form "essai.pbf" with the actual designer of the 5.70, without #PB_ANY and events

Code:
; Form Designer for Purebasic - 5.70
; Warning: this file uses a strict syntax, if you edit it, make sure to respect the Form Designer limitation or it won't be opened again.

;
; This code is automatically generated by the FormDesigner.
; Manual modification is possible to adjust existing commands, but anything else will be dropped when the code is compiled.
; Event procedures needs to be put in another source file.
;

Enumeration FormWindow
  #Window_0
EndEnumeration

Enumeration FormGadget
  #Button_0
  #String_0
EndEnumeration


Procedure OpenWindow_0(x = 0, y = 0, width = 490, height = 140)
  OpenWindow(#Window_0, x, y, width, height, "", #PB_Window_SystemMenu)
  ButtonGadget(#Button_0, 50, 60, 410, 50, "")
  StringGadget(#String_0, 50, 20, 420, 30, "")
EndProcedure

I have load "essai.pbf" in your program, and launch start process ...and nothing with happening with W10 X64 / v5.70 X86 :shock:
I'm really a "Ham butter" :oops:

Author:  mk-soft [ Sun Sep 08, 2019 11:50 am ]
Post subject:  Re: RAD EventDesigner V3

I tried your form-file under Win 10 with PB-X86.
After saving the project.xml I quit Purebasic-IDE and created the code. After that the Purebasic-IDE was started again with the file GuiMainFile.pb.

What did the output show you?

- Close Purebasic IDE ...
- Start ...
- ?

The Purebasic IDE must be closed. If the IDE is not terminated, the process will not start.

After the process the following files must be present
- GuiCommonFile.pb, GuiMainFile.pb, GuiEventMainFile.pb, GuiEvent[Formfiles].pb

The original [Form].pbf is not changed, so that it can be adapted again and again by the FormDesigner.

If the constants of the original Form file are changed, the dialog windows for assigning the old constants to the constants appear.

P.S.
Saving the project.xml is important, as it is used to evaluate the changes made to the FormFile.pbf.
It also defines the target path for the Gui-Files.

Translated with http://www.DeepL.com/Translator


I haven't read correctly again...
Virus protection times again.
Add the program to the exceptions of the virus scanner!

Actually a normal program with the libraries XML (expat) and lib for PNG.

Author:  mk-soft [ Sun Sep 08, 2019 2:08 pm ]
Post subject:  Re: RAD EventDesigner V3 (All OS)

Update descriptions :wink:

Author:  Kwai chang caine [ Sun Sep 08, 2019 4:36 pm ]
Post subject:  Re: RAD EventDesigner V3 (All OS)

Aaaah ok !!!
This time that works

I have that in GuiEventMainFile :wink:

Code:
;-TOP

; ***************************************************************************
;
; Comment : EventDesigner - Common Event Main File
; Create  : 2019.09.08 17.32.26
;
; Info    : Do not edit this file. This file always overwrite.
;
; ***************************************************************************

; - Include Event Files
IncludeFile "D:\Temp\GuiEventessai.pb"

; ----

Prototype _MyPrototypeInvoke()

Structure _MyInvokeEvent
  Invoke._MyPrototypeInvoke[0]
EndStructure

Global *vTableEventSizeWindow._MyInvokeEvent = ?vTableEventSizeWindow
Global *vTableEventCloseWindow._MyInvokeEvent = ?vTableEventCloseWindow
Global *vTableEventMenu._MyInvokeEvent = ?vTableEventMenu
Global *vTableEventGadget._MyInvokeEvent = ?vTableEventGadget

#_CountEventWindow = 1
#_CountEventMenu = 0
#_CountEventGadget = 2

; ----

Procedure _MyEventSizeWindow()
  Protected WindowID = EventWindow()
  Select WindowID
    Case 0 To #_CountEventWindow - 1
      *vTableEventSizeWindow\Invoke[WindowID]()
  EndSelect
EndProcedure

; ----

Procedure _MyEventCloseWindow()
  Protected WindowID = EventWindow()
  Select WindowID
    Case 0 To #_CountEventWindow - 1
      *vTableEventCloseWindow\Invoke[WindowID]()
  EndSelect
EndProcedure

; ----

Procedure _MyEventMenu()
  Protected MenuID = EventMenu()
  Select MenuID
    Case 0 To #_CountEventMenu - 1
      *vTableEventMenu\Invoke[MenuID]()
  EndSelect
EndProcedure

; ----

Procedure _MyEventGadget()
  Protected GadgetID = EventGadget()
  Select GadgetID
    Case 0 To #_CountEventGadget - 1
      *vTableEventGadget\Invoke[GadgetID]()
  EndSelect
EndProcedure

; ----

; - Bind Events
BindEvent(#PB_Event_Menu, @_MyEventMenu())
BindEvent(#PB_Event_Gadget, @_MyEventGadget())
BindEvent(#PB_Event_SizeWindow, @_MyEventSizeWindow())
BindEvent(#PB_Event_CloseWindow, @_MyEventCloseWindow())
   
; ----

DataSection
  vTableEventSizeWindow:
  Data.i @MyEventSizeWindow_Window_0()
 
  vTableEventCloseWindow:
  Data.i @MyEventCloseWindow_Window_0()
 
  vTableEventMenu:
 
  vTableEventGadget:
  Data.i @MyEventGadget_Window_0_Button_0()
  Data.i @MyEventGadget_Window_0_String_0()
 
EndDataSection

; ----
Thanks for sharing and your explanation 8)

Author:  mk-soft [ Sun Sep 08, 2019 4:55 pm ]
Post subject:  Re: RAD EventDesigner V3 (All OS)

Fine :wink:

Update v3.09
- Exiting the Purebasic IDE optional
- Windows: SetForeGroundWindow for Purebasic IDE removed

Now the PB-IDE doesn't crowd in :wink:

Author:  mk-soft [ Mon Sep 09, 2019 7:12 pm ]
Post subject:  Re: RAD EventDesigner V3 (All OS)

Update v3.10
- Added ToolbarButton "Stop Process"
- Optimize GuiEventMainFile.pb

I am now using the new EventDesigner myself for the development of the EventDesigner :wink:

Author:  mk-soft [ Tue Sep 10, 2019 12:29 pm ]
Post subject:  Re: RAD EventDesigner V3 (All OS)

Update v3.10r2
- Bugfix Add Gadgets

:wink:

Author:  Bitblazer [ Tue Sep 10, 2019 1:04 pm ]
Post subject:  Re: RAD EventDesigner V3 (All OS)

mk-soft wrote:
I am now using the new EventDesigner myself for the development of the EventDesigner :wink:


Thats the best way to find bugs, glitches and improve software imho :wink:

Page 1 of 2 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/