Menu

#12 No adding units in uses

v1.0_(example)
closed
None
5
2014-10-16
2013-10-05
AlexL
No

If to add any component in uidesigner, for example, Button on Form, then no adding fpg_buttons in uses section.

Discussion

  • Graeme Geldenhuys

    This is by design. In a sense, the uidesigner was designed for a single task - generating UI code that the developer would have written otherwise. I didn't want the uidesigner to interfere with anything else in a unit, hence the usage of comment markers. The uidesigner ONLY modifies code between the comment markers.

    This makes the uidesigner in some respects more advanced that Delphi or Lazarus's form designers too. eg: the fpGUI uidesigner can edit multiple forms in a single unit, something neither Delphi nor Lazarus can do. No external streaming is required for forms, no external .lfm or .dfm files are required etc. The uidesigner generates pure Object Pascal code only.

    Also unlike other toolkits (eg: VCL or LCL), the mapping between component and unit in fpGUI is very straight forward. So you don't need a complex UI Designer to manage the units for you.

    eg:
    Button --> fpg_button
    Form --> fpg_form
    Edit --> fpg_edit
    Label --> fpg_label

     
  • Graeme Geldenhuys

    • status: open --> closed
    • assigned_to: Graeme Geldenhuys
     
  • AlexL

    AlexL - 2013-10-13

    Workaround for uidesigner-1.0:
    cd uidesigner
    sed -i -e "s|Ind(1) + 'SysUtils, Classes, fpg_base, fpg_main, fpg_form;' + LineEnding + LineEnding +|Ind(1) + 'SysUtils, Classes, fpg_base, fpg_main, fpg_form, fpg_label, fpg_edit, fpg_memo, fpg_button, fpg_checkbox,' + LineEnding +\n Ind(1) + 'fpg_radiobutton, fpg_combobox, fpg_popupcalendar, fpg_listbox, fpg_grid, fpg_panel, fpg_progressbar, fpg_trackbar,' + LineEnding +\n Ind(1) + 'fpg_listview, fpg_tree, fpg_tab, fpg_gauge, fpg_editbtn, fpg_colorwheel, fpg_splitter, fpg_hyperlink;' + LineEnding + LineEnding +|g" ./vfdfile.pas

     
  • StrPt

    StrPt - 2014-10-16

    Workaround for uidesigner-1.2 is the same.

     

Log in to post a comment.