Re: [Lazarus] Brook 1.0 - A new framework for web was born

2012-12-14 Thread Marc Hanisch
Thanks Silvio,Your work looks amazing! Thank you very much, I thinks there is the need for another framework (and good documenation). Thanks again for making it Open Source!Do you want to announce this on the Google+ Free Pascal Community page? We allready have an audience of 170+ members. You can find it here: http://gplus.to/FreePascalLazarusBest regards,Marc-- ★ Esperanto - Lingvo internacia ★ http://www.esperanto.de ★ http://e-gikoj.com ★Am 15.12.2012 04:24 schrieb silvioprog : Hello all,More than 15,000 lines of source code, more than 90 test cases, more than one year of work. Today, a new framework for web development was born. It's name is Brook and its nice features are available for you.

I thank the FPWeb, the Freespider, the Powtils, the ExtPascal, the CustCGI and the EazyCGI developers. I got inspiration in all of them and and still in Rails and Slim Framework.Special thanks, I drive to João Moraes, who gave me valuable advices to decoupling the code. Thanks for Luciano de Souza, responsible for the documentation and the name of methods and properties. Thanks also for Marcos Douglas, the author of Greyhound, project  wich started as an inspiration and finished as a valuable partner in the new web ways.

Finally, I thank for the Free Pascal and Lazarus community for the precious tips and quick helps.I was thinking about what to write in the launching e-mail. But, there's no much to say. The site of Brook and its documentation will speak for me. So I present the Brook's house:

http://brookframework.orgYour visit will be appreciated.Their, you find the documentation, you find examples running online and you find also the hopeness this work will be very useful to the Free Pascal and Lazarus commoties.

On Sunday, I am going to start my vacations. Thanks God. The work is ready and the conscious is quiet.Enjoy!-- Silvio ClécioMy public projects - github.com/silvioprog


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Brook 1.0 - A new framework for web was born

2012-12-14 Thread silvioprog
Hello all,

More than 15,000 lines of source code, more than 90 test cases, more than
one year of work. Today, a new framework for web development was born. It's
name is Brook and its nice features are available for you.
I thank the FPWeb, the Freespider, the Powtils, the ExtPascal, the CustCGI
and the EazyCGI developers. I got inspiration in all of them and and still
in Rails and Slim Framework.

Special thanks, I drive to João Moraes, who gave me valuable advices to
decoupling the code. Thanks for Luciano de Souza, responsible for the
documentation and the name of methods and properties. Thanks also for
Marcos Douglas, the author of Greyhound, project  wich started as an
inspiration and finished as a valuable partner in the new web ways.

Finally, I thank for the Free Pascal and Lazarus community for the precious
tips and quick helps.

I was thinking about what to write in the launching e-mail. But, there's no
much to say. The site of Brook and its documentation will speak for me. So
I present the Brook's house:

http://brookframework.org

Your visit will be appreciated.

Their, you find the documentation, you find examples running online and you
find also the hopeness this work will be very useful to the Free Pascal and
Lazarus commoties.

On Sunday, I am going to start my vacations. Thanks God. The work is ready
and the conscious is quiet.

Enjoy!

-- 
Silvio Clécio
My public projects - github.com/silvioprog
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] LazReport: printing on the next page, using stretch and breaked band

2012-12-14 Thread waldo kitty

On 12/14/2012 13:17, Marcos Douglas wrote:

On Fri, Dec 14, 2012 at 8:05 AM, Marcos Douglas  wrote:

Hi,

I have a table with a "memo field".
I put a "retangle" with stretch property True; the band is stretch and
breaked property too.

The question:
If the info is bigger than a page, how the report can continue
printing in the next page?


Not possible or nobody understood?


or it is the weekend and those who might are elsewhere? ;)

plus, it was only 12hours or so between the first post and the second ;)

i would help if i could but i'm still pretty much an observer in many instances 
;)


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Arabic beta tester for SynEdit needed

2012-12-14 Thread Martin

On 14/12/2012 21:15, patspiper wrote:

On 14/12/12 21:33, Martin wrote:

On 13/12/2012 14:39, Martin wrote:


Ok, bad news, I did some more testing myself, and it turns out, that 
WIndows allocates the extra space (song connection line) just 
anywhere in the word, or at the end of it, but not always where the 
ligation is.



.

So what's next.
The only way to support this, is to make SynEdit aware of the 
ligatures. And that is a lot of work, so it will take more time. And 
I don't yet know when I will schedule it


Ok, I found a quick way to get a use-able behaviour.

:)


*  it is currently WINDOWS ONLY

:(


For GTK, I believe this 
functionhttp://developer.gnome.org/pango/stable/pango-Text-Processing.html#pango-get-log-attrs
   can deliver the information needed.
But in addition there may be a need for further fixes/improvements in 
ExtTextOut (widgetset)

Other WidgetSets: No idea

If anyone wants to give GTK a try, I will mail what needs to be done.



- ligatures are handled as follows.
   There is  no middle caret
   Depending on the caret being before or after (and accordingly 
backspace or delete being used) the first or 2nd char is deleted
  # So it is 2 chars, but any caret move will just be translated into 
skipping the middle pos


When you mention ligatures, do you mean any 2 connected characters 
(ex: ???), or characters that combine such as Lam Alef (??)?

Lam Alef

combining codepoints (such as dots or accents added to chars) are 
handled diferrently (SynEdit knows them for Arabic Only):

- Backspace (from behind the char), deletes one codepoint
- Delete (from before the char) deletes char + all combining (leaving 
the dot without the char makes little sense?)


combining codepoints not known to synedit (none arabic), will act like 
ligatures.




I tested the behaviour of Libre Office Writer (Ubuntu):

- Damma or shadda or similar will combine with the affected character 
and form one character as far as the cursor movement is concerned. 
Backspace after the combined character will remove the damma. Delete 
before the character will remove both.

See above


- Lam Alef produced by pressing a single keyboard key (?) acts as a 
single character in all aspects.


- Lam followed by Alef will combine visually into one character (??) 
but acts as 2 characters in all aspects.


I can not test (I don't know haw to write Arabic, except for hitting 
random keys on an Arabic layout). If the single keystroke, produces a 
single utf8 char, then yes.


SynEdit works on Utf8 Codepoints. Except where it finds combining 
Codepoints, if they are in the list of combining, that SynEdit includes.


--
On addition, it asks Windows, if any sequence of codepoints is drawn as 
a single glyph. This is used to calculate the position of the caret, in 
relation to each glyph, as well as the length of the line, and where to 
apply highlights.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Arabic beta tester for SynEdit needed

2012-12-14 Thread patspiper

On 14/12/12 21:33, Martin wrote:

On 13/12/2012 14:39, Martin wrote:


Ok, bad news, I did some more testing myself, and it turns out, that 
WIndows allocates the extra space (song connection line) just 
anywhere in the word, or at the end of it, but not always where the 
ligation is.



.

So what's next.
The only way to support this, is to make SynEdit aware of the 
ligatures. And that is a lot of work, so it will take more time. And 
I don't yet know when I will schedule it


Ok, I found a quick way to get a use-able behaviour.

:)


*  it is currently WINDOWS ONLY

:(
* It will NOT be enabled by default in the IDE (but if anyone needs 
it, you can add it for your own projects, or even the IDE)


- define WithSynExperimentalCharWidth  and it should work (need to 
recompile SynEdit package)

- define SynSystemWidthChars for log messages (should there be problems)

- Adds a small slowdown, but hardly noticeable
- not limited to Arabic, should do all languages, if windows does
- according to my tests it works for lines up to 32001 chars. After 
that the OS does not handle the line (SynEdit would need to split it)
  In this case SynEdit behaves (for that line) as if the define was 
not present.

- ligatures are handled as follows.
   There is  no middle caret
   Depending on the caret being before or after (and accordingly 
backspace or delete being used) the first or 2nd char is deleted
  # So it is 2 chars, but any caret move will just be translated into 
skipping the middle pos


When you mention ligatures, do you mean any 2 connected characters (ex: 
???), or characters that combine such as Lam Alef (??)?


I tested the behaviour of Libre Office Writer (Ubuntu):

- Damma or shadda or similar will combine with the affected character 
and form one character as far as the cursor movement is concerned. 
Backspace after the combined character will remove the damma. Delete 
before the character will remove both.


- Lam Alef produced by pressing a single keyboard key (?) acts as a 
single character in all aspects.


- Lam followed by Alef will combine visually into one character (??) but 
acts as 2 characters in all aspects.


Stephano
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Arabic beta tester for SynEdit needed

2012-12-14 Thread Martin

On 13/12/2012 14:39, Martin wrote:


Ok, bad news, I did some more testing myself, and it turns out, that 
WIndows allocates the extra space (song connection line) just anywhere 
in the word, or at the end of it, but not always where the ligation is.



.

So what's next.
The only way to support this, is to make SynEdit aware of the 
ligatures. And that is a lot of work, so it will take more time. And I 
don't yet know when I will schedule it


Ok, I found a quick way to get a use-able behaviour.

*  it is currently WINDOWS ONLY
* It will NOT be enabled by default in the IDE (but if anyone needs it, 
you can add it for your own projects, or even the IDE)


- define WithSynExperimentalCharWidth  and it should work (need to 
recompile SynEdit package)

- define SynSystemWidthChars for log messages (should there be problems)

- Adds a small slowdown, but hardly noticeable
- not limited to Arabic, should do all languages, if windows does
- according to my tests it works for lines up to 32001 chars. After that 
the OS does not handle the line (SynEdit would need to split it)
  In this case SynEdit behaves (for that line) as if the define was not 
present.

- ligatures are handled as follows.
   There is  no middle caret
   Depending on the caret being before or after (and accordingly 
backspace or delete being used) the first or 2nd char is deleted
  # So it is 2 chars, but any caret move will just be translated into 
skipping the middle pos




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] LazReport: printing on the next page, using stretch and breaked band

2012-12-14 Thread Marcos Douglas
On Fri, Dec 14, 2012 at 8:05 AM, Marcos Douglas  wrote:
> Hi,
>
> I have a table with a "memo field".
> I put a "retangle" with stretch property True; the band is stretch and
> breaked property too.
>
> The question:
> If the info is bigger than a page, how the report can continue
> printing in the next page?

Not possible or nobody understood?

Marcos Douglas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Difference between Delphi 2010 / Lazarus

2012-12-14 Thread Jorge Gonçalves
Worked 
for now I'm  using on my own unit as a temporary hack.

Thx
jGoncalves


On Fri, Dec 14, 2012 at 10:21 AM, Mattias Gaertner <
nc-gaert...@netcologne.de> wrote:

> On Fri, 14 Dec 2012 10:05:52 +
> Jorge Gonçalves  wrote:
>
> > >
> > > What does "Calculated" do?
> > >>
> > >
> > > Judging from the Delphi code, it is no longer used. The GetCalculated
> > > returns
> > >
> > >
> > Yes i know.
> > The problem surges when we read the dfm. The reader will give one
> exception
> > that the property is unknown.
> > If we try to remove the property from the file, Delphi will introduce
> them
> > again, next time we edit the datamoudule.
>
> I added an ignore in lcl/dbctrls.pp:
>   RegisterPropertyToSkip(TField,'Calculated','VCL compatibility property',
> '');
>
> Please test.
>
> Mattias
>
> --
> ___
> Lazarus mailing list
> Lazarus@lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] LazReport: printing on the next page, using stretch and breaked band

2012-12-14 Thread Marcos Douglas
Hi,

I have a table with a "memo field".
I put a "retangle" with stretch property True; the band is stretch and
breaked property too.

The question:
If the info is bigger than a page, how the report can continue
printing in the next page?

Marcos Douglas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Difference between Delphi 2010 / Lazarus

2012-12-14 Thread michael . vancanneyt



On Fri, 14 Dec 2012, Mattias Gaertner wrote:


On Fri, 14 Dec 2012 11:30:31 +0100 (CET)
michael.vancann...@wisa.be wrote:




On Fri, 14 Dec 2012, Jorge Gonçalves wrote:

>>
>> What does "Calculated" do?
>>>
>>
>> Judging from the Delphi code, it is no longer used. The GetCalculated
>> returns
>>
>>
> Yes i know.
> The problem surges when we read the dfm. The reader will give one exception
> that the property is unknown.
> If we try to remove the property from the file, Delphi will introduce them
> again, next time we edit the datamoudule.

You can install an unknown property event handler in TReader: OnPropertyNotFound

But that requires that you are able to choose which reader is used, because
now you cannot: I've long wanted to install a hook so you can select which 
reader/writer is used in TStream.ReadComponent.


Maybe the lazarus implementation offers a hook ?


Maybe you mean in unit lresources.pp:
 LRSObjectReaderClass: TLRSObjectReaderClass=TLRSObjectReader;
 LRSObjectWriterClass: TLRSObjectWriterClass=TLRSObjectWriter;


Something like it, and also the hooks you posted in your other reply.

I think that the 2 variables you post above can be moved to the classes
unit: ObjectReaderClass and ObjectWriterClass. These should then be used in
the TStream.ReadComponent and TStream.WriteComponent.

That's what I meant with the 'install a hook'.

Once it is in place, the LCL can simply set these hooks, and remove any
custom hooks you made.

Michael.--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Difference between Delphi 2010 / Lazarus

2012-12-14 Thread Mattias Gaertner
On Fri, 14 Dec 2012 11:30:31 +0100 (CET)
michael.vancann...@wisa.be wrote:

> 
> 
> On Fri, 14 Dec 2012, Jorge Gonçalves wrote:
> 
> >>
> >> What does "Calculated" do?
> >>>
> >>
> >> Judging from the Delphi code, it is no longer used. The GetCalculated
> >> returns
> >>
> >>
> > Yes i know.
> > The problem surges when we read the dfm. The reader will give one exception
> > that the property is unknown.
> > If we try to remove the property from the file, Delphi will introduce them
> > again, next time we edit the datamoudule.
> 
> You can install an unknown property event handler in TReader: 
> OnPropertyNotFound
> 
> But that requires that you are able to choose which reader is used, because
> now you cannot: I've long wanted to install a hook so you can select which 
> reader/writer is used in TStream.ReadComponent.
> 
> Maybe the lazarus implementation offers a hook ?

Maybe you mean in unit lresources.pp:
  LRSObjectReaderClass: TLRSObjectReaderClass=TLRSObjectReader;
  LRSObjectWriterClass: TLRSObjectWriterClass=TLRSObjectWriter;

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Difference between Delphi 2010 / Lazarus

2012-12-14 Thread michael . vancanneyt



On Fri, 14 Dec 2012, Jorge Gonçalves wrote:



What does "Calculated" do?




Judging from the Delphi code, it is no longer used. The GetCalculated
returns



Yes i know.
The problem surges when we read the dfm. The reader will give one exception
that the property is unknown.
If we try to remove the property from the file, Delphi will introduce them
again, next time we edit the datamoudule.


You can install an unknown property event handler in TReader: OnPropertyNotFound

But that requires that you are able to choose which reader is used, because
now you cannot: I've long wanted to install a hook so you can select which 
reader/writer is used in TStream.ReadComponent.


Maybe the lazarus implementation offers a hook ?

Michael.--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Difference between Delphi 2010 / Lazarus

2012-12-14 Thread Mattias Gaertner
On Fri, 14 Dec 2012 10:05:52 +
Jorge Gonçalves  wrote:

> >
> > What does "Calculated" do?
> >>
> >
> > Judging from the Delphi code, it is no longer used. The GetCalculated
> > returns
> >
> >
> Yes i know.
> The problem surges when we read the dfm. The reader will give one exception
> that the property is unknown.
> If we try to remove the property from the file, Delphi will introduce them
> again, next time we edit the datamoudule.

I added an ignore in lcl/dbctrls.pp:
  RegisterPropertyToSkip(TField,'Calculated','VCL compatibility property', '');

Please test.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Difference between Delphi 2010 / Lazarus

2012-12-14 Thread Jorge Gonçalves
>
> What does "Calculated" do?
>>
>
> Judging from the Delphi code, it is no longer used. The GetCalculated
> returns
>
>
Yes i know.
The problem surges when we read the dfm. The reader will give one exception
that the property is unknown.
If we try to remove the property from the file, Delphi will introduce them
again, next time we edit the datamoudule.


jGoncalves
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Downtime www/svn/bugtracker : Maintenance

2012-12-14 Thread Michael Van Canneyt


Hello,

Tomorrow (Saturday 15 December) during the day, the main Free Pascal server 
will be moved to a new location.


You may experience some downtime.
Normally, it should not be very long: 1 or 2 hours.

Mailing Lists, DNS, forum, wiki and the lazarus website should be unaffected by 
this move.

Only www.freepascal.org, svn.freepascal.org and bugs.freepascal.org will be 
affected.

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Difference between Delphi 2010 / Lazarus

2012-12-14 Thread michael . vancanneyt



On Fri, 14 Dec 2012, Kostas Michalopoulos wrote:


What does "Calculated" do?


Judging from the Delphi code, it is no longer used. 
The GetCalculated returns


function TField.GetCalculated: Boolean;
begin
  Result := FFieldKind = fkCalculated;
end;

And setcalculated does:

procedure TField.SetCalculated(Value: Boolean);
begin
  if Value then
FieldKind := fkCalculated
  else if FieldKind = fkCalculated then
FieldKind := fkData;
end;

So it can safely be ignored.

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Difference between Delphi 2010 / Lazarus

2012-12-14 Thread Kostas Michalopoulos
What does "Calculated" do?


On Thu, Dec 13, 2012 at 11:57 PM, Howard Page-Clark wrote:

> On 13/12/12 9:45, Jorge Gonçalves wrote:
>
>> Hi,
>> I'm translating one application from delphi  to lazarus, and I'm having
>> some problems with the way lazarus and delphi stores calculate fields in
>> the dfm.
>> The delphi store one more property :"Calculated". This property is
>> public and are stored using the procedure DefineProperties at TField
>> level.
>>
>> dfm example :
>> Delphi :
>> object DetailsTOTAL: TFloatField
>>FieldKind = fkCalculated
>>FieldName = 'TOTAL'
>>DisplayFormat = '0.00'
>> *   Calculated = True*
>>
>>  end
>>
>> Lazarus :
>> object DetailsTOTAL: TFloatField
>>FieldKind = fkCalculated
>>FieldName = 'TOTAL'
>>DisplayFormat = '0.00'
>>  end
>>
>> Any easy way to solve the problem ?
>>
>
> Bit of a hack, but you could use the Tag property as a boolean on Lazarus.
> Its published, so is stored in the .lfm. But obviously this would require
> {$IFDEF  } to compile on Delphi too.
>
>
> --
> __**_
> Lazarus mailing list
> Lazarus@lists.lazarus.**freepascal.org
> http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus