[Done] Form Designer creates duplicate constant names

You need some new stunning features ? Tell us here.
User avatar
Michael Vogel
Addict
Addict
Posts: 2677
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

[Done] Form Designer creates duplicate constant names

Post by Michael Vogel »

I didn't use the purebasic form designer for a year or so, today I wanted to make a new start...

...but it still feels not "pure" and also not "basic" for me - I tried to ignore the design (the used fonts are not displayed completely) and was trying to use all wellknown methods (mouse and keyboard) to create some objects, what took me quite a while. When I wanted to start the created code (see below) by pressing F5, it did not work, also when I changed one of the duplicate constant names in the form designer window.
After that, I spent some more time with the designer, but the whole thing is still to complicate for me. For instance, the text of a text gadget is moved (totally) to the right, when the #pb_text_center flag will be enabled and a lot of other things.

I am sure, a lot of time was spent to create the form designer with its enormous functions and it might be a jewel for all who learn to work with it. But for me it is really hard, because the designers concept seems to be (a little bit) different to all the tools I have used so far for editing ressource files, starting in ancient time with the Borland Ressource Workshop.

So maybe it is worth to add another help page to give some hints, how the designer should be used most efficently. Perhaps some more improvements could be done to polish the tool here and there, like checking constant names prefixes and just adding numbers (#String_002 instead of #String_0_Copy1_Copy1).

Code: Select all

;
; 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
  #Text_0
  #String_0
  #String_0_Copy1
  #Text_0_Copy1
  #String_0_Copy1
  #String_0_Copy1_Copy1
  #Button_0
  #Button_1
  #String_0_Copy1_Copy1_Copy1
EndEnumeration


Procedure OpenWindow_0(x = 0, y = 0, width = 375, height = 195)
  OpenWindow(#Window_0, x, y, width, height, "", #PB_Window_SystemMenu)
  TextGadget(#Text_0, 15, 30, 105, 25, "")
  StringGadget(#String_0, 165, 30, 90, 25, "")
  StringGadget(#String_0_Copy1, 270, 30, 90, 25, "")
  TextGadget(#Text_0_Copy1, 15, 75, 100, 25, "")
  StringGadget(#String_0_Copy1, 120, 75, 30, 25, "")
  StringGadget(#String_0_Copy1_Copy1, 165, 75, 90, 25, "")
  ButtonGadget(#Button_0, 165, 150, 90, 25, "")
  ButtonGadget(#Button_1, 270, 150, 90, 25, "")
  StringGadget(#String_0_Copy1_Copy1_Copy1, 270, 75, 90, 25, "")
EndProcedure
Marc56us
Addict
Addict
Posts: 1479
Joined: Sat Feb 08, 2014 3:26 pm

Re: Form Designer creates duplicate constant names

Post by Marc56us »

Hi Michael,

Form Designer work fine (yes!) I use it for my software. But keep in mind, it a 'robot' :)

If you perform an object copy, rename it immediately and do not forget to change fields before pressing F5 if not it does not validate the last entry. (therefore there may be duplicate names)

There are a few other niceties (bug) to know, but overall this tool is very convenient, especially when doing windows with resizable objects.

:wink:
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer creates duplicate constant names

Post by Polo »

Marc56us wrote:If you perform an object copy, rename it immediately and do not forget to change fields before pressing F5 if not it does not validate the last entry. (therefore there may be duplicate names)
Fixed.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: [Done] Form Designer creates duplicate constant names

Post by Polo »

For the issues or feature requests from the first post, just create one topic per bug or requests as otherwise it's not manageable.
Post Reply