PureFORM 1.99 (yet another FORM designer)

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

Moderator: gnozal

klaver
Enthusiast
Enthusiast
Posts: 147
Joined: Wed Jun 28, 2006 6:55 pm
Location: Schröttersburg

Post by klaver »

Why the X and Y coordinates aren't updated while resizing?
Redo/Undo not working :(
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

klaver wrote:Why the X and Y coordinates aren't updated while resizing?
Should be fixed in build 374.
klaver wrote:Redo/Undo not working
Could you be more specific ?
Note that undo has to be enabled in preferences.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
klaver
Enthusiast
Enthusiast
Posts: 147
Joined: Wed Jun 28, 2006 6:55 pm
Location: Schröttersburg

Post by klaver »

I think I found a bug:
Put a PanelGadget in form. Place a ScrollArea on it's Tab. Now, click on TOP edge of this ScrollArea and resize it by moving your cursor. Note the ScrollArea moves a bit to the top while it should only RESIZE. Every time you perform this action, the gadget gets higher and higher...
gnozal wrote:Note that undo has to be enabled in preferences.
... Actually, I didn't know. :oops: It's the strangest thing I ever seen! :lol:
Can you tell me what is the point of saving forms to temporary files for Undo/Redo actions? Why don't use memory as most of programs do?

Let's assume that to remember 1 action done by user (like move, resize, edit text, etc) you need ~10 bytes (might be wrong - correct me if so) in just 1MB of memory about 100k of such actions could be remembered.
Forgive asking this, but I'm afraid I can't read 75 pages of this topic to check if it was already answered :shock:.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Let's assume that to remember 1 action done by user (like move, resize, edit text, etc) you need ~10 bytes (might be wrong - correct me if so) in just 1MB of memory about 100k of such actions could be remembered.
hehe, you have never coded an undo facility have you? :wink:

Imagine in the case of PureFORM then, that a user deletes a container gadget which contains 300 child gadgets, some of which are containers etc. All of these 300 child gadgets have had lots of properties set such as colors, sizes, fonts... Now this single deletion obviously results in all of these 300 or so child gadgets being deleted as well.

Fancy undoing that little lot anytime soon? :) It's not so much about having to reinstate the 300 or so gadgets etc. it's as much a problem to reinstate all individual properties (colors etc.) for those gadgets.

Having said all of this, there are ways around this, but my rather contrived example does serve to illustrate that coding a full undo/redo facility is not as easy at it might at first seem! :) Believe me! A lot of the effort I have spent writing a visual report designer has been concerned with providing a full undo/redo facility and by gum it has proved difficult at times! :) I took an approach based on a simple scripting engine. All actions taken by the user result in a simple 'script' being sent to an internal command processor which then acts upon the commands therein (e.g. moves controls around, changes properties, adds new controls etc.) My undo/redo facility simply stores, for each action taken by the user, an appropriate script which can, in the event of the user hitting the undo key, reverse the action etc. The undo script is simply sent to the command processor just like any other 'script'. This method undoubtedly uses more memory than other methods, but I just find it very convenient and easy to implement. :) It' surprisingly fast as well!

I think that Gnozal adopted his particular method simply for convenience. I think it is fair to say that for complex applications you really need to build your undo/redo facility in from the start. It is next to impossible to add it in at a later date.
I may look like a mule, but I'm not a complete ass.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

klaver wrote:I think I found a bug
The next build may fix it.
klaver wrote:Can you tell me what is the point of saving forms to temporary files for Undo/Redo actions?
The point is it's much easier to code and it works.
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 (build 376)

Changes :
- this build should fix the resizing issue posted by klaver
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
StormPete
New User
New User
Posts: 2
Joined: Tue Jun 16, 2009 7:37 pm
Location: USA

Code Infusion

Post by StormPete »

Gnozal,

I am having a blast with PureFORM however my staccato programming style has me writing just a few lines of code at a time before doing a compile/run. With the Code Infusion being modal, I spend a tremendous amount of time closing and re-opening windows.

If had three wishes they would be:

Code Infusion editor and Explorer would stay open during compile. If that is not feasible, the Explorer would stay open at a minimum.

Selecting Code Infusion from right clicking on a gadget would pop up the the event and line you were last editing for that gadget or at least just the event.

Compile errors would pop up Code Infusion or Code View with the offending line highlighted or CodeView. Double clicking a line in Code View would open the Code Infusion editor for that line.
Zooker
User
User
Posts: 22
Joined: Sun Apr 27, 2003 1:46 am
Location: So.Illinois USA

menu for PureForm

Post by Zooker »

How can I downloade this manual for PureForm. It looks like it has possibilities. So did Purevision and Visual Deaigner Tho. With out a manual
it would be a real pain to half to go to the web every 1/2 hr or so. I don't keep my computer online because the fixing virus's is more expensive when your continually online.
It took 73 years for me to get this Stupid!
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: menu for PureForm

Post by gnozal »

Zooker wrote:How can I download the manual for PureForm.
1. The manual is included in the download [http://freenet-homepage.de/gnozal/PureFORM.zip -> PureFORM.exe (executable) + PureFORM.chm (manual/help file) ].
2. You can also view it on line : http://freenet-homepage.de/gnozal/PureF ... Manual.htm
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Zooker
User
User
Posts: 22
Joined: Sun Apr 27, 2003 1:46 am
Location: So.Illinois USA

Post by Zooker »

Thanks
It took 73 years for me to get this Stupid!
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 670
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

PureForm: Wrong resize-function for toolbar buttons

Post by Kurzer »

Hello Gnozal,
there is a little issue in the toolbar-editor of PureForm.

If you select a 'custom icon size' for a toolbar button (for instance you load a 16 x 16 icon for the button and select then 16 x 32 size), then the button-rect will be strechted in the wrong direction. The image will be stretched correctly.

Image

It seems you mix up the x and y coordinates for the image stretching in the procedure "SetToolBarIconSize()".
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Actually, it was a bit more complicated. Some old debugging code ...
Shoud be fixed now.
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 (build 377)

Changes :
- fixed a toolbar editor issue with custom icon sizes
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
storck
User
User
Posts: 83
Joined: Sat Oct 18, 2003 4:56 pm
Location: Sweden

PureFORM Request

Post by storck »

Hi Gnozal!

As always, thank you for PureFORM. PB wouldn't be the same without it. I am coding an app and for the preferences section I use a treegadget to show or hide different containergadgets. This would be very hard without hiding/disabling the gadgets since they occupy the same space. I am well aware that the hide/disable options aren't saved. My question is: could this be made optional? Now I how to disable all containergadgets but one every time I am working on this project. There are quite a few and it just seems a lot of unnecessary work. In a distant future maybe?

Best Regards,

Storck
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureFORM Request

Post by gnozal »

storck wrote:Hi Gnozal!
As always, thank you for PureFORM. PB wouldn't be the same without it. I am coding an app and for the preferences section I use a treegadget to show or hide different containergadgets. This would be very hard without hiding/disabling the gadgets since they occupy the same space. I am well aware that the hide/disable options aren't saved. My question is: could this be made optional? Now I how to disable all containergadgets but one every time I am working on this project. There are quite a few and it just seems a lot of unnecessary work. In a distant future maybe?
Done.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Post Reply