It is currently Thu Nov 21, 2019 12:50 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: RAD EventDesigner V3 (All OS)
PostPosted: Mon Sep 02, 2019 9:17 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2046
Location: Germany
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:

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Last edited by mk-soft on Sat Oct 05, 2019 11:16 am, edited 13 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: RAD EventDesigner V3 (Beta)
PostPosted: Tue Sep 03, 2019 10:33 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2046
Location: Germany
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()

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: RAD EventDesigner V3 (Beta)
PostPosted: Wed Sep 04, 2019 4:56 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2046
Location: Germany
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:

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: RAD EventDesigner V3 (Beta)
PostPosted: Wed Sep 04, 2019 5:18 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Apr 10, 2017 6:17 pm
Posts: 288
Location: Germany
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.

_________________
webpage


Top
 Profile  
Reply with quote  
 Post subject: Re: RAD EventDesigner V3 (Beta)
PostPosted: Wed Sep 04, 2019 6:02 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2046
Location: Germany
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

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: RAD EventDesigner V3
PostPosted: Wed Sep 04, 2019 9:07 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2046
Location: Germany
Update v3.07
- Bugfix Macro ResizeGadget
- Bugfix write BOM

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: RAD EventDesigner V3
PostPosted: Sun Sep 08, 2019 12:24 am 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2046
Location: Germany
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:

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: RAD EventDesigner V3
PostPosted: Sun Sep 08, 2019 8:57 am 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4528
Location: Lyon - France
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:

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
 Post subject: Re: RAD EventDesigner V3
PostPosted: Sun Sep 08, 2019 11:50 am 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2046
Location: Germany
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.

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: RAD EventDesigner V3 (All OS)
PostPosted: Sun Sep 08, 2019 2:08 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2046
Location: Germany
Update descriptions :wink:

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: RAD EventDesigner V3 (All OS)
PostPosted: Sun Sep 08, 2019 4:36 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4528
Location: Lyon - France
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)

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
 Post subject: Re: RAD EventDesigner V3 (All OS)
PostPosted: Sun Sep 08, 2019 4:55 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2046
Location: Germany
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:

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: RAD EventDesigner V3 (All OS)
PostPosted: Mon Sep 09, 2019 7:12 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2046
Location: Germany
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:

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: RAD EventDesigner V3 (All OS)
PostPosted: Tue Sep 10, 2019 12:29 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2046
Location: Germany
Update v3.10r2
- Bugfix Add Gadgets

:wink:

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: RAD EventDesigner V3 (All OS)
PostPosted: Tue Sep 10, 2019 1:04 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Apr 10, 2017 6:17 pm
Posts: 288
Location: Germany
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:

_________________
webpage


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye