Domingo Alvarez Duarte | 2 Jul 2008 13:37
Picon

Code generator, metaprogramming initial example.

Attached is an initial working version of what can become a code 
generator based on simple text specification.

It uses lua as language to process it.

Actually after running the example:

lua partnersedit.lua

Two files are generated:

genpartners.pas
genpartners.mfm

If someone want's to play with it and send any feedback, they will be 
wellcome.

Thanks for your attention !
dbTables = {
	{'partners' , {
		{name='id', type='integer', pk=true, caption='ID'},
		{name='semaphore', type='integer'},
		{name='reference',  type='string', size=12, caption='Ref.', hint='Short reference'},
		{name='name', type='string', size=40,hint='Common name'},
		{name='company',type='string', hint='Legal name'},
		{name='address',type='string', hint='Street address'},
		{name='zip',type='string', caption='ZIP', hint='Postal code'},
		{name='city',type='string'},
(Continue reading)

Attid | 2 Jul 2008 16:42
Picon
Favicon

Re: execute block

MS> Please try again with trunk 2352.

work. thanks

Attid | 2 Jul 2008 16:46
Picon
Favicon

some Q about tkeystringeditdb

i use tkeystringeditdb to show user some dataset

after he choose what i need i mast use this record from dataset, now i do it 
manual

  qtoy.first;
  while (not qtoy.eof) and (qtoy.FieldByName('name').AsString <> 
tkeystringeditdb2.value) do
    qtoy.next;

and than work with qtoy.field*

may be it can be easy ? =) 

Martin Schreiber | 2 Jul 2008 21:46

Re: some Q about tkeystringeditdb

Attid wrote:

> i use tkeystringeditdb to show user some dataset
> 
> after he choose what i need i mast use this record from dataset, now i do
> it manual
> 
>   qtoy.first;
>   while (not qtoy.eof) and (qtoy.FieldByName('name').AsString <>
> tkeystringeditdb2.value) do
>     qtoy.next;
> 
> 
> and than work with qtoy.field*
> 
> may be it can be easy ? =)

I don't understand, for me the lookup data set will be scrolled to the
selected record?
Hint: for better performance use a t*lookupbuffer and one of the *lb
widgets. Lookupbuffers use a binary search, best performance is achieved
with a integer keyfield.

Martin

Vincent Snijders | 2 Jul 2008 22:53
Picon
Favicon

Re: MSE* packages for Linux/Debian

IvankoB schreef:
> 2) the guy personally offered to help doesnt'respond to my e-mails.

I know that mazen (he is one of the persons that does the debian 
packaging for fpc and lazarus) is on vacation until 14 July or so. I 
could ask him when he is back.

Vincent

IvankoB | 3 Jul 2008 09:09
Picon
Favicon

Re: MSE* packages for Linux/Debian

> I know that mazen (he is one of the persons that does the debian packaging 
> for fpc and lazarus) is on vacation until 14 July or so. I could ask him 
> when he is back.
>

Wow, the guy has the best possible rest -  to disconnect from the whole 
world :)

IvankoB | 3 Jul 2008 11:57
Picon
Favicon

Wish: tdatetimedisp: more flexible "format" property

smth like "hh hours  mm minutes ss seconds" witn ( "hours", "minutes" & 
"seconds" in any locale ) etc to display:

"23 hours 59 minutes 59 seconds".

L505 | 3 Jul 2008 17:11

Re: Include a Preprocessor in MSEIDE

Domingo Alvarez Duarte wrote:
 > Hello again !
 >
 > One of the things I'm missing in freepascal is a kind of prerpocessor to

Freepascal has a preprocessor, have you seen it?

It should be used extremely rarely, IMO.

By the way: looking through the freepascal sourcecode.. the 
preproceessor is embedded right into the fpc sources, making it a 
maintenance nightmare. It bloats up the fpc code with gibberish and adds 
bugs.It should have been done modularly, not embedded right into the 
compiler sources. It simply obfuscates the compiler sources and adds 
tons of complexity.

IvankoB | 3 Jul 2008 20:31
Picon
Favicon

Re: Include a Preprocessor in MSEIDE

>  > One of the things I'm missing in freepascal is a kind of prerpocessor to
> 
> Freepascal has a preprocessor, have you seen it?
> 
> It should be used extremely rarely, IMO.
> 

Even rarely is more than just a probability.

> By the way: looking through the freepascal sourcecode.. the 
> preproceessor is embedded right into the fpc sources, making it a 
> maintenance nightmare. It bloats up the fpc code with gibberish and adds 
> bugs.It should have been done modularly, not embedded right into the 
> compiler sources. It simply obfuscates the compiler sources and adds 
> tons of complexity.
 >

It matters only FPC team expeditures not the users.

Domingo Alvarez Duarte | 3 Jul 2008 20:34
Picon

TMseReport and UserDataSource like Lazarus report and TfrUserDataset ?

In Lazarus report there is a component called TfrUserDataset wich is a dummy dataset that call user
provided functions for check for EOF get 
NEXT record, onFirstRecord, that is useful for reports with data produced by programming.

I didn't found something like that in MSEGUI, TMseMemDataset is the closest one but it's broken.

The implementation of the component TfrUserDataset in lazreport is quite simple.

How hard could be to implement something like that in TMseReport ?


Gmane