PureFORM 1.99 (yet another FORM designer)
Moderator: gnozal
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
With the 'code inject' feature I am working on you could add this code easily.rule wrote:There is a new feature in version 4.xx: StickyWindow (stay on top), is it posible to add this to your app?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
I hope.Kiffi wrote:whow, sounds very good!

New features I am adding :
1. PureFORM should be able to update an existing source code, using special code tags (all text between two Start/End code tags will be added/replaced). The rest of the text will remain untouched.
2. The code-inject feature : you can add text in some locations, like window start code, gadget events, etc...
I am not sure exactly how to do all this, I am currently experimenting some alternative solutions.
A screenshot of the code I am playing with this morning :
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Update
Changes :
- source update feature ('Project' menu, item 'Update code in source')
- code inject feature ('Edit' menu, item 'Code injection' / or F8 / or Context menu item 'Code injection')
- added flag #SS_NOPREFIX for TextGadget
Important notes :
1. Source update
PureFORM is able to update the source code : the first time you save the generated code with 'Save as code', meanwhile you can add some extra code in jaPBe and the next time after you changed the form you can update the source with 'Update code in source'.
You have to enable option 'Add PureFORM code tags to generated code' in Preferences. PureFORM assumes your source file is 'MyProject.pb' when your form file is 'MyProject.pbf'.
The code tags are used to detect the code to be updated in a source file. Note that all code between two Start/End tags is replaced.
Example of code tags :At any time you can erase or rename (:-PureFORM:Windows:Start:/:-PureFORM:Windows:End:) the code tags and the code in between will no longer be updated.
For safety reasons, the source before update is renamed to 'MyProject.pb.PureFORM.Bak'.
2. Code injection
By default, the code inject window uses a scintilla control. You can also use an embedded jaPBe window if you check 'Use embedded jaPBe in Code Inject' (this only works if PureFORM is started as plugin from jaPBe ; for best results update to jaPBe V3 build 608+).
All code entered via the code inject dialog will be injected in the generated source code. This code is saved in a separated 'MyProject.pbfi' file.
Changes :
- source update feature ('Project' menu, item 'Update code in source')
- code inject feature ('Edit' menu, item 'Code injection' / or F8 / or Context menu item 'Code injection')
- added flag #SS_NOPREFIX for TextGadget
Important notes :
1. Source update
PureFORM is able to update the source code : the first time you save the generated code with 'Save as code', meanwhile you can add some extra code in jaPBe and the next time after you changed the form you can update the source with 'Update code in source'.
You have to enable option 'Add PureFORM code tags to generated code' in Preferences. PureFORM assumes your source file is 'MyProject.pb' when your form file is 'MyProject.pbf'.
The code tags are used to detect the code to be updated in a source file. Note that all code between two Start/End tags is replaced.
Example of code tags :
Code: Select all
...
some code (untouched)
...
;:PureFORM:Windows:Start:
...
all code here is replaced
...
;:PureFORM:Windows:End:
...
some code (untouched)
...
For safety reasons, the source before update is renamed to 'MyProject.pb.PureFORM.Bak'.
2. Code injection
By default, the code inject window uses a scintilla control. You can also use an embedded jaPBe window if you check 'Use embedded jaPBe in Code Inject' (this only works if PureFORM is started as plugin from jaPBe ; for best results update to jaPBe V3 build 608+).
All code entered via the code inject dialog will be injected in the generated source code. This code is saved in a separated 'MyProject.pbfi' file.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Update
Changes :
- displayed text 'Code injection' replaced by 'Code infusion' after a quick synonym search, as 'Code injection' is used by PureVisionXP (requested by Paul).
Changes :
- displayed text 'Code injection' replaced by 'Code infusion' after a quick synonym search, as 'Code injection' is used by PureVisionXP (requested by Paul).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal,
I think there's a problem with the "Gadget enumeration" combo box list in the latest version. Whenever I change any Pureform Configuration setting, the combo box is blank and the "FORM_GadgetEnumerationMode" setting in the ini file gets set to -1.
Also, would it be possible to have jaPBe automatically reload the code file after PureForm closes, assuming it has been run as a plugin?
Finally, have you given any consideration of officially supporting an event engine like EasyVent. The combination would be great.
Thanks a lot for this effort. PureForm seems to be the only form designer that is being actively updated, and it is quickly surpassing all the others!
I think there's a problem with the "Gadget enumeration" combo box list in the latest version. Whenever I change any Pureform Configuration setting, the combo box is blank and the "FORM_GadgetEnumerationMode" setting in the ini file gets set to -1.
Also, would it be possible to have jaPBe automatically reload the code file after PureForm closes, assuming it has been run as a plugin?
Finally, have you given any consideration of officially supporting an event engine like EasyVent. The combination would be great.
Thanks a lot for this effort. PureForm seems to be the only form designer that is being actively updated, and it is quickly surpassing all the others!
> syntax coloring : added option 'Load colors from Purebasic.prefs'
Thanks, but it doesn't work properly with my prefs file for code injection,
it has black text on my black background. Do you want a copy of my prefs
file to find out why? PM me with where to send it, if so. Thanks for your
quick addition of this request, too.
Thanks, but it doesn't work properly with my prefs file for code injection,
it has black text on my black background. Do you want a copy of my prefs
file to find out why? PM me with where to send it, if so. Thanks for your
quick addition of this request, too.

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
last build 86 sometimes lost names for gadgets
probably it's happened then string in ini file stay -1
FORM_GadgetEnumerationMode = -1
how that happened I don't know

Code: Select all
;{[PureFORM Project]
;PureFORM_Project_Begin
;Project¶PureFORM_Clipboard2
;Window¶1¶#Window_0¶13500416¶#PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar¶#Window_0¶234¶138¶400¶400¶0¶10¶10¶0¶5000¶5000¶0¶-1¶0¶¶
;PanelGadget¶1¶¶1¶-1¶-1¶0¶0¶19¶0¶0¶¶¶¶-1¶3¶¶¶0¶0¶1¶1¶2¶25¶30¶120¶265¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶-1¶-1¶Tab #1¶0¶¶0¶0
;PanelGadget¶2¶¶1¶-1¶-1¶0¶0¶19¶0¶0¶¶¶¶3¶3¶¶¶0¶0¶1¶1¶2¶170¶30¶185¶280¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶-1¶-1¶Tab #1¶0¶¶0¶0
;SplitterGadget¶3¶¶1¶-1¶-1¶0¶0¶24¶196¶3¶#PB_Splitter_Separator|#PB_Splitter_Vertical¶Gadget_2¶¶2¶0¶¶¶1¶2¶0¶0¶0¶5¶0¶390¶390¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶0¶0¶¶0¶¶0¶0
;PureFORM_Project_End
;}
FORM_GadgetEnumerationMode = -1
how that happened I don't know
That's a result of the bug I described a couple of postings ago.probably it's happened then string in ini file stay -1
FORM_GadgetEnumerationMode = -1
how that happened I don't know
Any time you modify any PureForm Configuration settings the FORM_GadgetEnumerationMode will be reset to -1
and PureForm will screw up the gadget names.
A workaround for this is to manually edit the PureForm.ini file and change FORM_GadgetEnumerationMode to 0, 1 or 2
where 0=Number, 1=Class/Number, and 2=Window/Class/Number for Gadget Enumeration.
I'm sure gnozal will correct this soon as he apparently rarely sleeps!

-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
I made a little change. I hope it works now.PB wrote:> syntax coloring : added option 'Load colors from Purebasic.prefs'
Thanks, but it doesn't work properly with my prefs file for code injection,
it has black text on my black background. Do you want a copy of my prefs
file to find out why? PM me with where to send it, if so. Thanks for your
quick addition of this request, too.
Should be fixedQ*bert wrote:I think there's a problem with the "Gadget enumeration" combo box list in the latest version. Whenever I change any Pureform Configuration setting, the combo box is blank and the "FORM_GadgetEnumerationMode" setting in the ini file gets set to -1.
Look at the new option in Preferences.Q*bert wrote:Also, would it be possible to have jaPBe automatically reload the code file after PureForm closes, assuming it has been run as a plugin?
If you start PureFORM as a plugin and your current file in jaPBe is 'MyProject.pb', PureFORM will open 'MyProject.pbf', and reload 'MyProject.pb' in jaPBe before quitting.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
>> [...] black text on my black background
>
> I made a little change. I hope it works now.
Yes, now the text shows when I type it, but there's no cursor seen, so it must
be black on my black background? Makes it hard to see where I'm typing.
Also, there's no capitalization, eg. if I type "debug" it doesn't become "Debug".
Is that something you might be able to add in later?
>
> I made a little change. I hope it works now.
Yes, now the text shows when I type it, but there's no cursor seen, so it must
be black on my black background? Makes it hard to see where I'm typing.

Also, there's no capitalization, eg. if I type "debug" it doesn't become "Debug".
Is that something you might be able to add in later?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.