Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: Stefan S. on February 14, 2008, 12:46:07 pm



Title: tool "fglped" and "Column attribute editor"
Post by: Stefan S. on February 14, 2008, 12:46:07 pm
Hello 4JS,
in the Demo-Directory I discover two nice tools.
The PER-Editor is a nice tools to create the per-files. As you mentioned in the discribtion of the program do you want to hear some wishes:

It would be nice to choose a font-size for the editor.

Is it possible to combine the Column-Attribute Editor with the Per-Editor/Generator or how can I use the settings in the Column-Attribute Editor within a per-file ?


kind regards

Stefan Serwe



Title: Re: tool "fglped" and "Column attribute editor"
Post by: Leo S. on February 14, 2008, 03:53:15 pm
Hi Stefan,
>It would be nice to choose a font-size for the editor.
Like in the README said, its hard coded for the moment:
edit fglped.4st and uncomment the "TextEdit" styles
...
  <Style name="TextEdit.per">
     <StyleAttribute name="textSyntaxHighlight" value="per" />
     <StyleAttribute name="fontFamily" value="'Courier New',monospace" />
     <StyleAttribute name="fontSize" value="14pt" />
  </Style>
...

Use whatever fixed font family you like, but it must be a monospaced font!

>Is it possible to combine the Column-Attribute Editor with the Per-Editor/Generator or how can I use the settings in the Column-Attribute Editor within a per-file ?

"fglcaed" edits ".val" files of a schema
(look at <http://www.fourjs.com/online_documentation/fjs-fgl-2.10.01-manual-html/User/DatabaseSchema.html> to know more about .val files)
If "fglform"  detects a suitable .val file when compiling a .per file, it merges in automatically the  attributes from the .val file.
So the answer is: "fglped" supports "fglcaed" edited attributes automatically by calling "fglform".

Sample:
1.Start "fglcaed"
2.Load the "stores" schema in $FGLDIR/demo/Tools/fglped/samples
3.Add a "comments" attribute for the customer.fname column.
4.Save and exit
  stores.val (in the same directory as stores.sch) should now contain the line:
customer^fname^COMMENTS^"First Name"^
!!!

5.Start "fglped" (ideally in $FGLDIR/demo/Tools/fglped/samples ..)
6.Type in (the fast programmer type way)
  D<Tab> stores
  L<Tab>
  G<Tab><Enter>
  {
  [fname    ]
  }
  E<Tab>
  T<Tab> c<Tab>
  A<Tab>
  fn<Tab>=c<Tab>.f<Tab>;

  or paste in the lazy Cut-n-Paste way (:-)

DATABASE stores
LAYOUT
GRID
{
[fname]
}
END
TABLES customer
ATTRIBUTES
fname=customer.fname;

If the form shows up (otherwise there may be a compile error) hover with the mose over the "fname" field and you will get the "First Name" tooltip.

So fglcaed is for editing the default attributes of the columns.
Things like the comment for a column or the include list can be stored in a central place rather then in the individual .per files.
Compared to INFORMIX you can add some additional attributes, for example could you specify the GUI widget type always as "combobox" for the usual "gender" column.
In fact it is for offline editing of the syscolvalues/syscolattributes values in the INFORMIX database. Normally the .val files are also created by "fgldbsch" if syscolvalues/syscolattributes contain data suitable for the exported columns.
See the code of the FUNCTION extract_upscol in $FGLDIR/src/fgldbsch.4gl for that. What fglcaed should perhaps also offer is a way to write back the .val file into the syscolvalues but if this is important for you , the write a small LOAD to syscolvalues by yourself.


Hope that helps and Kind Regards, Leo




Title: Re: tool "fglped" and "Column attribute editor"
Post by: Stefan S. on February 15, 2008, 01:11:58 pm
thanks,
but I do not see the comment in the per-file.
When using the "form-wizard" it would be fine to see the field-types and attributes in the per-file

f.e.: dateedit f001=customers.datum, tilte = "AnlageDatum"



 ... (if the attribute of this column is dateedit ant title is "AnlageDatum"


Title: Re: tool "fglped" and "Column attribute editor"
Post by: Leo S. on February 15, 2008, 01:38:08 pm
Hi Stefan, this is the idea of the defaults in syscovalues/syscolattributes. It prevents you from the need to put it into the .per file. The "title" attribute is merged in by fglform, hence you can see the column title only in the preview, not in the .per file.
If you want to use the column in another .per file, you will not have to repeat the error prone task to repeat the title, just add the column and that's it.
If you work with fglcaed and fglped side by side and you make a change in the .val file by pressing "save" it is enough to press "F5"(refresh by recompile) in fglped to visualize the change...
Kind Regards, Leo


Title: Re: tool "fglped" and "Column attribute editor"
Post by: Leo S. on February 15, 2008, 02:03:41 pm
..But I guess you are after something else, I assume you want to get the fglcaed kind of dialog in fglped to configure the attributes of a form field, right ?
This might be added in a future version of fglped.
Kind Regards, Leo