Re: [Lazarus] tchart series zorder

2010-03-02 Thread Andrea Mauri

Il 02/03/2010 6.45, Alexander Klenin ha scritto:

Use Series.ZPosition property.


ZPosition is not what I'm looking for. Put a chart on a form then add a 
TLine serie. If you change the zposition the line is moved. I don't 
wanto to move the line I just want to see the line also if there is a 
BarSerie or a Pie Serie on the chart. I want that the line is drawn in 
front of the other series.

andrea

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


Re: [Lazarus] dbl click on a grid

2010-03-02 Thread Andrea Mauri

Il 01/03/2010 22.03, Hans-Peter Diettrich ha scritto:

Check the clicked row in your event handler.


If row = 3 and I click on a fixedrow the row property still remains 3. 
So how can I check that the dblclick is performed on a fixed row?
My problem is that if the user click on the fixed row the grid is 
sorted, while if the user dblclick on the grid or on a fixed column (non 
fixed row) a viewer of the current record/row is shown. My problem is 
that also dblclicking on a fixed row the viewer is shown.


I also noticed that the click event is not raised if I click on a fixed 
row/column while the dblclick is raised also if performed on a fixed 
row/column.


any hints?

andrea

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


Re: [Lazarus] debug windows layout

2010-03-02 Thread Graeme Geldenhuys
Flávio Etrusco wrote:
 
 Graeme,
 we understand what you mean, (but) we just don't think there's an
 authoritative definition.

On the contrary, Waldo Kitty hit the nail on the head. IBM and Microsoft
defined the definition when they invented the idea of MDI for OS/2 and
early Windows. So I would say the behaviour of MDI under Windows (and as I
described) would be an accurate definition of what MDI is and how it should
work.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/


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


Re: [Lazarus] Codebrowser, Search Identifier

2010-03-02 Thread Juha Manninen
Hi,

 My gtk2 theme does not show anything hilighted. I tried some others:
 none does.
 What gtk2 theme do you use?

GTK2 style is ClearLooks here. I can set it under KDE settings.
Strange difference between our GTKs.

Anyway, the problem was not widget binding related this time. Both GTK2 and QT 
versions had logically the same problem although GTK2 version didn't select 
the item automatically.


Juha

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


Re: [Lazarus] debug windows layout

2010-03-02 Thread John

Graeme Geldenhuys wrote:

Flávio Etrusco wrote:
  

Graeme,
we understand what you mean, (but) we just don't think there's an
authoritative definition.



On the contrary, Waldo Kitty hit the nail on the head. IBM and Microsoft
defined the definition when they invented the idea of MDI for OS/2 and
early Windows. So I would say the behaviour of MDI under Windows (and as I
described) would be an accurate definition of what MDI is and how it should
work.


Regards,
  - Graeme -

  
The trouble with this whole messy thread is that SDI and MDI are single 
/ multiple DOCUMENT interfaces (not single / multiple windows).  When a 
single file is a single document displayed in a single form(eg a word 
processor file) then it is all pretty straight forward, much like Graeme 
has described.  When you try to apply it to something like a development 
IDE, the first thing you have to define is what the document is - is it 
a source file (unit) or the whole project ?  And all the extra windows 
(inspectors, watches, messages, etc) just don't fit either model.  in a 
normal MDI, you can open multiple documents, but it usually assumes they 
all open exactly the same way, eg another instance of the same class of 
editor.  (Consider the old Delphi MDI application template).


If you consider the document to be a project, then Deplhi (= 6) and 
lazarus are SDIs - you only have one project open at once, (unless you 
have multiple Delphi/Lazs open).  If you think of the units as the 
documents, you can only relate the models to the source editor window, 
and it doesn't follow either model.  (Is that what TDI is ? Tabbed doc 
interface ?)


For the record, in Deplhi 4* where I have docking, I usually have all 
the source files in one tabbed set, form design windows separate, and 
all the other stuff - inspectors, watches, messages, etc, docked into 
another tabbed set.  If the docking problems are to do with synedit, 
then even if we could dock all the Lazarus windows except the source 
editor and design forms into a tabbed set, that would be a great step 
forward.  But I would not like to be be FORCED to have anything as a 
tabbed set (as in Graeme's original proposal), as you never know when 
you want to look at two things at the same time.


cheers,
John Sunderland

* Last version of Delphi that I have access to that does databases.

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


Re: [Lazarus] debug windows layout

2010-03-02 Thread Flávio Etrusco

 The trouble with this whole messy thread is that SDI and MDI are single /
 multiple DOCUMENT interfaces (not single / multiple windows).  When a single
 file is a single document displayed in a single form(eg a word processor
 file) then it is all pretty straight forward, much like Graeme has
 described.  When you try to apply it to something like a development IDE,
 the first thing you have to define is what the document is - is it a source
 file (unit) or the whole project ?  And all the extra windows (inspectors,
 watches, messages, etc) just don't fit either model.  in a normal MDI, you
 can open multiple documents, but it usually assumes they all open exactly
 the same way, eg another instance of the same class of editor.  (Consider
 the old Delphi MDI application template).

 If you consider the document to be a project, then Deplhi (= 6) and lazarus
 are SDIs - you only have one project open at once, (unless you have multiple
 Delphi/Lazs open).  If you think of the units as the documents, you can only
 relate the models to the source editor window, and it doesn't follow either
 model.  (Is that what TDI is ? Tabbed doc interface ?)

 For the record, in Deplhi 4* where I have docking, I usually have all the
 source files in one tabbed set, form design windows separate, and all the
 other stuff - inspectors, watches, messages, etc, docked into another tabbed
 set.  If the docking problems are to do with synedit, then even if we could
 dock all the Lazarus windows except the source editor and design forms into
 a tabbed set, that would be a great step forward.  But I would not like to
 be be FORCED to have anything as a tabbed set (as in Graeme's original
 proposal), as you never know when you want to look at two things at the same
 time.

 cheers,
 John Sunderland

 * Last version of Delphi that I have access to that does databases.


Nicely said.
Well, back to another discussion. what about a poll (you see I like
them :-P ) to make Lazarus a single-parent-window app regardless of
fixing/finishing drag'n'dock?

Best regards,
Flávio

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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread Hans-Peter Diettrich

Martin schrieb:

IMO the IDE should use an cache for the SynEdits, that must contain at 
least the currently active text file. More opened files can be parsed 
and added to the cache later, when they are really activated. When the 
systems runs out of memory, old entries can be removed from the cache. 
Inactive files can be parsed in the background, when the system is idle.


Well there are 2 option. Actually both can exist at the same time.

1) SynEdit scanning on idle. I had that idea for a long time already, 
but a lot more needs to change in SynEdit, before this can be done.
2) The IDE only opening a tab, and defer creating the SynEdit. I haven't 
looked into this.


With multiple editor windows, the files must be kept (and parsed...) in 
their own pool, separate from the SynEdit viewers.


Then again. My PC is about 3 years old, with an average of 10 - 20 
SynEdits, it takes 1 to 2 seconds of parsing. Opening a 100 files on 
loading of the IDE may be a legitimate action, and may have good 
reasons, and certainly can be justified by personal choise = but how 
many people are affected by it?


That depends on the meaning of open. The filenames can be imported 
from a project or desktop layout file, into the file pool. Actual 
loading can be deferred until the files really are required in the IDE.


Even if newer machines have enough power to process a huge number of 
files within a few seconds, I'd take care for users with old equipment - 
who else would do, if not Lazarus? Virtual machines also can have less 
RAM, and performance can become very poor once such a system starts 
swapping.



Caching, and removing? why re-invent the wheel. It has a similar effect 
than the OS doing swaping memory to swap-file...; And you have to keep a 
copy of all open files, just in case they get modified on disk, while 
they are in memory.


When the user has not seen an file already, it doesn't matter whether it 
was modified on disk. Whenever a modified file becomes active in the 
editor, the user should be asked whether the file should be reloaded, so 
that parsing of inactive files may be a waste of resources.



Also having looked at the gprof numbers, the time seems to be lost while 
assigning the keycodes. Which seems to be done in a very inefficent 
manner. My guess is that the IDE-defaults/user-configs are merged with 
the SynEdit defaults, and during this probably each code is tested for 
existence (looked up) first, before potentially being added. Given that 
there are 100of key combos, which have to be iteraded a 100 times (and 
this is for each synedit...) = well (rather not so well).


I just don't understand what you mean. The SynEdits should *perform* 
edit commands, but the *detection* of keycodes is the job of the 
framework (IDE).


It get's on the todo list now (but little priority). Maybe creating just 
one merged list, and then simply clear+copy for each synedit.


That's a wrong approach, IMO.

DoDi


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


Re: [Lazarus] Lazarus MySQL 5.1

2010-03-02 Thread Marco van de Voort
On Mon, Mar 01, 2010 at 10:18:48PM -0600, Terry A. Haimann wrote:
 I upgraded my laptop to Fedora Core 12, which has MySQL 5.1.42 
 installed.  I have installed the latest Lazarus RPM, which is 0.9.28.2 
 and FPC 2.2.4.  My Lazarus App won't connect to the server.  I have the 
 libmysqlclient.so.16.0.0 installed.  I am not sure where to get the 
 libmysqlclient.so.15.0.0. 

Where does .15.0.0 come from in this discussion? It is a filename that
seems to have fallen from the air, connecting to nothing ?


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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread Flávio Etrusco
Can you (people) stop hijacking my thread? :-P

On Tue, Mar 2, 2010 at 10:50 AM, Hans-Peter Diettrich
drdiettri...@aol.com wrote:
 Martin schrieb:

 IMO the IDE should use an cache for the SynEdits, that must contain at
 least the currently active text file. More opened files can be parsed and
 added to the cache later, when they are really activated. When the systems
 runs out of memory, old entries can be removed from the cache. Inactive
 files can be parsed in the background, when the system is idle.

 Well there are 2 option. Actually both can exist at the same time.

 1) SynEdit scanning on idle. I had that idea for a long time already, but
 a lot more needs to change in SynEdit, before this can be done.
 2) The IDE only opening a tab, and defer creating the SynEdit. I haven't
 looked into this.

3) SynEdit defer the parsing of files until they are shown.
4) All options above. Actually I don't think 1 is necessary if the
bottlenecks are found.


 With multiple editor windows, the files must be kept (and parsed...) in
 their own pool, separate from the SynEdit viewers.

Why?

 Then again. My PC is about 3 years old, with an average of 10 - 20
 SynEdits, it takes 1 to 2 seconds of parsing. Opening a 100 files on loading
 of the IDE may be a legitimate action, and may have good reasons, and
 certainly can be justified by personal choise = but how many people are
 affected by it?

We should make this better. Martin Waldenburg would die in disgust if
he reads this hehe


 That depends on the meaning of open. The filenames can be imported from a
 project or desktop layout file, into the file pool. Actual loading can be
 deferred until the files really are required in the IDE.

Deinfetely.

 Even if newer machines have enough power to process a huge number of files
 within a few seconds, I'd take care for users with old equipment - who else
 would do, if not Lazarus? Virtual machines also can have less RAM, and
 performance can become very poor once such a system starts swapping.


 Caching, and removing? why re-invent the wheel. It has a similar effect
 than the OS doing swaping memory to swap-file...; And you have to keep a
 copy of all open files, just in case they get modified on disk, while they
 are in memory.

 When the user has not seen an file already, it doesn't matter whether it was
 modified on disk. Whenever a modified file becomes active in the editor, the
 user should be asked whether the file should be reloaded, so that parsing of
 inactive files may be a waste of resources.


 Also having looked at the gprof numbers, the time seems to be lost while
 assigning the keycodes. Which seems to be done in a very inefficent manner.
 My guess is that the IDE-defaults/user-configs are merged with the SynEdit
 defaults, and during this probably each code is tested for existence (looked
 up) first, before potentially being added. Given that there are 100of key
 combos, which have to be iteraded a 100 times (and this is for each
 synedit...) = well (rather not so well).


... ok.

 I just don't understand what you mean. The SynEdits should *perform* edit
 commands, but the *detection* of keycodes is the job of the framework (IDE).


Yeah. But we must implement two/multiple keystroke ActionList handling.


 Maybe creating just

 It get's on the todo list now (but little priority).
 one merged list, and then simply clear+copy for each synedit.

 That's a wrong approach, IMO.


(Now I'm lost)


Best regards,
Flávio

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


Re: [Lazarus] Lazarus MySQL 5.1

2010-03-02 Thread Henry Vermaak
On 2 March 2010 14:48, Marco van de Voort mar...@stack.nl wrote:
 On Mon, Mar 01, 2010 at 10:18:48PM -0600, Terry A. Haimann wrote:
 I upgraded my laptop to Fedora Core 12, which has MySQL 5.1.42
 installed.  I have installed the latest Lazarus RPM, which is 0.9.28.2
 and FPC 2.2.4.  My Lazarus App won't connect to the server.  I have the
 libmysqlclient.so.16.0.0 installed.  I am not sure where to get the
 libmysqlclient.so.15.0.0.

 Where does .15.0.0 come from in this discussion? It is a filename that
 seems to have fallen from the air, connecting to nothing ?

I presume it comes from here (in mysql.inc):

  const
mysqllib = 'libmysqlclient.'+sharedsuffix;
  {$IF DEFINED(mysql50)}
mysqlvlib = mysqllib+'.15';
  {$ELSEIF DEFINED(mysql41)}
mysqlvlib = mysqllib+'.14';
  {$ELSE}
mysqlvlib = mysqllib+'.12';
  {$ENDIF}

This probably doesn't cover all the cases.  Assuming that a specific
client library can only talk to a specific server may also be wrong.
Debian testing also has libmysqlclient 16 and mysql-server 5.1.

Henry

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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread Graeme Geldenhuys
Mattias Gaertner wrote:
 Then again. My PC is about 3 years old, with an average of 10 - 20 
 SynEdits, it takes 1 to 2 seconds of parsing. Opening a 100 files on 
 loading of the IDE may be a legitimate action, and may have good 
 reasons, and certainly can be justified by personal choise = but how 
 many people are affected by it?
 
 I don't see how people can navigate a hundred files. Lazarus
 has only shortcuts for the first ten. And for the window menu you need
 a big screen with a tiny font.


I don't see how people can navigate 5+ files in default Lazarus setup.
Hence the reason I have vertical tabs setup in Lazarus+GTK2 - my own custom
hack. This allows me to easily navigate up to 20 files on a 1440x900
resolution screen. Much better than the previous 5 tabs and then horizontal
scrolling occurs. :-(

Can't we implement vertical tabs by default to platforms that support them?
I know Windows can't because they use this pretty dumb idea of making text
vertical too. Maybe a custom written/drawn LCL PageControl is needed for
IDE use only - then all platforms can enjoy the benefit vertical tab layout
gives?

Screenshot of tabs on right.

  http://opensoft.homeip.net/~graemeg/laz_notebook_right.png


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/


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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread Mattias Gaertner
On Tue, 02 Mar 2010 14:50:18 +0100
Hans-Peter Diettrich drdiettri...@aol.com wrote:

 Martin schrieb:
 
  IMO the IDE should use an cache for the SynEdits, that must contain at 
  least the currently active text file. More opened files can be parsed 
  and added to the cache later, when they are really activated. When the 
  systems runs out of memory, old entries can be removed from the cache. 
  Inactive files can be parsed in the background, when the system is idle.
  
  Well there are 2 option. Actually both can exist at the same time.
  
  1) SynEdit scanning on idle. I had that idea for a long time already, 
  but a lot more needs to change in SynEdit, before this can be done.
  2) The IDE only opening a tab, and defer creating the SynEdit. I haven't 
  looked into this.
 
 With multiple editor windows, the files must be kept (and parsed...) in 
 their own pool, separate from the SynEdit viewers.

Why do you think this is needed?
AFAIK I'm the only one that has provided some profiler output and it
showed that the synedit scanner is not a big number. The bigger
limitation is the visual controls (pagecontrol, pages).

 
  Then again. My PC is about 3 years old, with an average of 10 - 20 
  SynEdits, it takes 1 to 2 seconds of parsing. Opening a 100 files on 
  loading of the IDE may be a legitimate action, and may have good 
  reasons, and certainly can be justified by personal choise = but how 
  many people are affected by it?
 
 That depends on the meaning of open. The filenames can be imported 
 from a project or desktop layout file, into the file pool. Actual 
 loading can be deferred until the files really are required in the IDE.

Open is here: in the source editor.
Of course the IDE handles hundreds or thousands of files in the
background.

 
 Even if newer machines have enough power to process a huge number of 
 files within a few seconds, I'd take care for users with old equipment - 
 who else would do, if not Lazarus? Virtual machines also can have less 
 RAM, and performance can become very poor once such a system starts 
 swapping.

The source editor mem to disk ratio is about 1:6. For example opening
5mb (150kloc) of sources needs 30mb of RAM.

 
  Caching, and removing? why re-invent the wheel. It has a similar effect 
  than the OS doing swaping memory to swap-file...; And you have to keep a 
  copy of all open files, just in case they get modified on disk, while 
  they are in memory.
 
 When the user has not seen an file already, it doesn't matter whether it 
 was modified on disk. Whenever a modified file becomes active in the 
 editor, the user should be asked whether the file should be reloaded, so 
 that parsing of inactive files may be a waste of resources.

They are parsed only once and only because the user wanted the file to
be open in the source editor. I still see no reason why someone wants
to always open a hundred files in the source editor.

 
  Also having looked at the gprof numbers, the time seems to be lost while 
  assigning the keycodes. Which seems to be done in a very inefficent 
  manner. My guess is that the IDE-defaults/user-configs are merged with 
  the SynEdit defaults, and during this probably each code is tested for 
  existence (looked up) first, before potentially being added. Given that 
  there are 100of key combos, which have to be iteraded a 100 times (and 
  this is for each synedit...) = well (rather not so well).
 
 I just don't understand what you mean. The SynEdits should *perform* 
 edit commands, but the *detection* of keycodes is the job of the 
 framework (IDE).

It does for other commands. And since synedit already can handle
keys on its own, the IDE just tells synedit which key code should do
what.

 
  It get's on the todo list now (but little priority). Maybe creating just 
  one merged list, and then simply clear+copy for each synedit.
 
 That's a wrong approach, IMO.


Mattias

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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread Mattias Gaertner
On Tue, 02 Mar 2010 17:01:49 +0200
Graeme Geldenhuys graemeg.li...@gmail.com wrote:

 Mattias Gaertner wrote:
  Then again. My PC is about 3 years old, with an average of 10 - 20 
  SynEdits, it takes 1 to 2 seconds of parsing. Opening a 100 files on 
  loading of the IDE may be a legitimate action, and may have good 
  reasons, and certainly can be justified by personal choise = but how 
  many people are affected by it?
  
  I don't see how people can navigate a hundred files. Lazarus
  has only shortcuts for the first ten. And for the window menu you need
  a big screen with a tiny font.
 
 
 I don't see how people can navigate 5+ files in default Lazarus setup.
 Hence the reason I have vertical tabs setup in Lazarus+GTK2 - my own custom
 hack. This allows me to easily navigate up to 20 files on a 1440x900
 resolution screen. Much better than the previous 5 tabs and then horizontal
 scrolling occurs. :-(
 
 Can't we implement vertical tabs by default to platforms that support them?
 I know Windows can't because they use this pretty dumb idea of making text
 vertical too. Maybe a custom written/drawn LCL PageControl is needed for
 IDE use only - then all platforms can enjoy the benefit vertical tab layout
 gives?
 
 Screenshot of tabs on right.
 
   http://opensoft.homeip.net/~graemeg/laz_notebook_right.png

Or maybe use a treeview so the open files can be grouped, for example
by directory or files in the project, files in a package, ...


Mattias

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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread Martin

On 02/03/2010 15:11, Mattias Gaertner wrote:

On Tue, 02 Mar 2010 14:50:18 +0100
Hans-Peter Diettrichdrdiettri...@aol.com  wrote:
   

Martin schrieb:
With multiple editor windows, the files must be kept (and parsed...) in
their own pool, separate from the SynEdit viewers.
 

Why do you think this is needed?
AFAIK I'm the only one that has provided some profiler output and it
showed that the synedit scanner is not a big number. The bigger
limitation is the visual controls (pagecontrol, pages).
   


The files must be parsed (for highlighting) within the overall SynEdit.
But, this parsing must move from the viewer/display part to the 
content provider part. Otherwise if you view the same source twice 
(and both views use the same highlighter), then the text would be 
scanned twice, even though once would be enough.


Anyway, that has been iterated last year, under the topic 
Model-View-Controller So lets not go there


Martin

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


[Lazarus] Raster image data in RGB24 or ARGB32

2010-03-02 Thread petr . kristan
Hi.

I'am working on Cairo Canvas implementation 
and for implementing StretchDraw function I need 
to get RasterImage data in format RGB24 or ARGB32.

CAIRO_FORMAT_ARGB32
  each pixel is a 32-bit quantity, with alpha in the upper 8 bits, then
red, then green, then blue. The 32-bit quantities are stored
native-endian. Pre-multiplied alpha is used. (That is, 50% transparent
red is 0x8080, not 0x80ff.)

CAIRO_FORMAT_RGB24
  each pixel is a 32-bit quantity, with the upper 8 bits unused. Red,
Green, and Blue are stored in the remaining 24 bits in that order. 

Can I use TLazIntfImage for this task and how?

Thanks.

Petr

-- 
Petr Kristan
.
EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice
tel: +420 466335223Czech Republic (Eastern Europe) 
fax: +420 466510709

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


Re: [Lazarus] Raster image data in RGB24 or ARGB32

2010-03-02 Thread Luiz Americo Pereira Camara

petr.kris...@epos.cz escreveu:

Hi.

I'am working on Cairo Canvas implementation 
and for implementing StretchDraw function I need 
to get RasterImage data in format RGB24 or ARGB32.


CAIRO_FORMAT_ARGB32
  each pixel is a 32-bit quantity, with alpha in the upper 8 bits, then
red, then green, then blue. The 32-bit quantities are stored
native-endian. Pre-multiplied alpha is used. (That is, 50% transparent
red is 0x8080, not 0x80ff.)

CAIRO_FORMAT_RGB24
  each pixel is a 32-bit quantity, with the upper 8 bits unused. Red,
Green, and Blue are stored in the remaining 24 bits in that order. 


Can I use TLazIntfImage for this task and how?
  


AFAIK is not possible. Search for thread How to load aRGBA data from a 
bitmap file using TLazIntfImage in Lazarus list.


Also read http://forum.lazarus.freepascal.org/index.php/topic,7771.0.html

BTW: in LuiImage implementation you can find how implement StrechDraw 
feature in cairo: 
http://luipack.googlecode.com/svn/trunk/luicairo/luiimage.pas


There you will find also how to get the appropriate data format for 
cairo using imaginglib


Luiz

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


Re: [Lazarus] debug windows layout

2010-03-02 Thread Hans-Peter Diettrich

John schrieb:

If you think of the units as the 
documents, you can only relate the models to the source editor window, 
and it doesn't follow either model.


Count the editor windows, that implement the user interface (access) to 
the documents.



 (Is that what TDI is ? Tabbed doc interface ?)


Right. I also found mentioned IDE-style interface in the wikipedia. The 
obvious need for terms for models that are neither pure SDI nor MDI 
leads to more confusion than clearness.



For the record, in Deplhi 4* where I have docking, I usually have all 
the source files in one tabbed set, form design windows separate, and 
all the other stuff - inspectors, watches, messages, etc, docked into 
another tabbed set.  If the docking problems are to do with synedit, 
then even if we could dock all the Lazarus windows except the source 
editor and design forms into a tabbed set, that would be a great step 
forward.  But I would not like to be be FORCED to have anything as a 
tabbed set (as in Graeme's original proposal), as you never know when 
you want to look at two things at the same time.


With dockable windows every user can create his own layout, from fully 
undocked until monolithic (everything docked to the IDE main bar).


In my docking model the SynEdits should be dockable as well, i.e. the 
editor notebook is under control of the DockManager; this way one can 
have any number of concurrently visible documents. The IDE sends 
keystrokes and commands to the currently active SynEdit, and opens new 
files in the currently active editor notebook; code explorers also 
should be created for every editor notebook, when the user decided to 
dock one to the editor window; otherwise single global instances could 
be used for all source code navigation tools. These aspects IMO make the 
big difference between single and multiple document INTERFACEs, from the 
technical viewpoint.


Optionally, as a replacement or extension of the MDI window menu, 
different layouts can be activated for distinct IDE states (edit, 
debug...), with possibly further distinction between form design (using 
OI and component palette), and normal source code editing. The 
component palette can be presented both in classic (horizontal) or new 
(vertical) arrangement, possibly depending on the width/height of its 
dock zone.


DoDi


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


Re: [Lazarus] debug windows layout

2010-03-02 Thread Hans-Peter Diettrich

Flávio Etrusco schrieb:


Well, back to another discussion. what about a poll (you see I like
them :-P ) to make Lazarus a single-parent-window app regardless of
fixing/finishing drag'n'dock?


I don't like it, so I won't vote for it :-]

DoDi


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


Re: [Lazarus] (Attn DoDi) multiply edit windows [Re: debug windows layout]

2010-03-02 Thread Hans-Peter Diettrich

Martin schrieb:


How far are you with multiply edit windows?


Don't ask me, I'm not familiar with the current IDE interfaces and 
layout management :-(


AFAIR the ElasticSite demo demonstrates the available docking features, 
including persistence. What remains to do is the integration of docking 
and persistence into the IDE.


Because I am (or will be) at 
the same thing. In order for opening the same source in multiply views ( 
$DEFINE SynDualView ), I need to look at multiply windows.


The SynDualView is nice, it only lacks the same set of features for 
every view.


I am/was deferred by a lot of other things, so I can't tell exactly when 
I will continue with it


I'm also busy with many other things sigh. In the next step I'll add 
top-level docking to the EasyDockSite. From the user VP this is only a 
minor extension, but it does not fit nicely into the existing 
implementation.


Perhaps we should open an branch for a dockable IDE with full support of 
multiple editor windows. The interfaces deserve a lot of refactoring for 
this model, that should not affect the proper operation of the current 
Lazarus IDE. Also the LDockTree manager and TabView should be replaced 
by the new implementation.


DoDi


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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread Hans-Peter Diettrich

Mattias Gaertner schrieb:


I don't see how people can navigate a hundred files. Lazarus
has only shortcuts for the first ten. And for the window menu you need
a big screen with a tiny font.


The many include files are a mess, WRT editor notebook(s). I already 
thought of a two-layer structure, with the units in the top layer 
notebook, and all related files in another sub-notebook. No problem with 
freely dockable tabs, once the IDE is refactored to know about an 
ActiveSynEdit as the currently active document :-)


DoDi


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


Re: [Lazarus] (Attn DoDi) multiply edit windows [Re: debug windows layout]

2010-03-02 Thread Martin

On 02/03/2010 15:26, Hans-Peter Diettrich wrote:

Martin schrieb:


How far are you with multiply edit windows?


Don't ask me, I'm not familiar with the current IDE interfaces and 
layout management :-(
It sounded for a moment you started on the IDE integration. I just 
wanted to make sure we don't fo the same thing.


Since you are not (yet), I'll be looking at enabling multiply 
SourceNotebooks. This can later be combined with docking.




AFAIR the ElasticSite demo demonstrates the available docking 
features, including persistence. What remains to do is the integration 
of docking and persistence into the IDE.


Because I am (or will be) at the same thing. In order for opening the 
same source in multiply views ( $DEFINE SynDualView ), I need to look 
at multiply windows.


The SynDualView is nice, it only lacks the same set of features for 
every view.
I know. I hadn't had much time the last 2 or 3 month... hopefully it 
will get better again.




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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread JoshyFun
Hello Lazarus-List,

Tuesday, March 2, 2010, 2:54:05 AM, you wrote:

MG I did that. Now it does not appear in gprof any more. Saves a few
MG percents. I doubt someone will notice.

My experiences with gprof in Windows shows me that it is almost
useless for this kind of tests. As it is a pooling tracer it must take
a lof of snapshots to get a clear picture of a process, so it must
be repeated for many time, like several minutes. Tracing operations
that involves only a few seconds results in a non real time
distribution which will change a lot simply by removing or adding one
line of code.

Is there any invasive tracer that can be linked with fpc/lazarus ?

-- 
Best regards,
 JoshyFun


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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread Mattias Gaertner
On Tue, 2 Mar 2010 19:21:02 +0100
JoshyFun joshy...@gmail.com wrote:

 Hello Lazarus-List,
 
 Tuesday, March 2, 2010, 2:54:05 AM, you wrote:
 
 MG I did that. Now it does not appear in gprof any more. Saves a few
 MG percents. I doubt someone will notice.
 
 My experiences with gprof in Windows shows me that it is almost
 useless for this kind of tests. As it is a pooling tracer it must take
 a lof of snapshots to get a clear picture of a process, so it must
 be repeated for many time, like several minutes. Tracing operations
 that involves only a few seconds results in a non real time
 distribution which will change a lot simply by removing or adding one
 line of code.

I use it under Linux with lot of success for single threaded apps.
It takes one hundred samples per second and does not slow down the
program. You need at least a few seconds of computation and you can
ignore anything that takes less than 0.1 second.
Beside the samples it also shows the number of each call and who calls
whom. So if a function was called more often than expected you know
what to fix.



 Is there any invasive tracer that can be linked with fpc/lazarus ?

valgrind.

see here
http://wiki.lazarus.freepascal.org/Profiling


Mattias

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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread JoshyFun
Hello Lazarus-List,

Tuesday, March 2, 2010, 7:33:33 PM, you wrote:

 that involves only a few seconds results in a non real time
 distribution which will change a lot simply by removing or adding one
 line of code.
MG I use it under Linux with lot of success for single threaded apps.
MG It takes one hundred samples per second and does not slow down the

Yes and you have a lot of possibilities that the sample takes in an
fpc_movememory function :) But a 2 or 3 seconds process is too small
for gprof.

MG Beside the samples it also shows the number of each call and who calls
MG whom. So if a function was called more often than expected you know
MG what to fix.

Call sequence is statiscally propagated and when recursion happends it
could becomes crazy... Anyway it is more than nothing for sure :)

 Is there any invasive tracer that can be linked with fpc/lazarus ?
MG valgrind.
MG see here
MG http://wiki.lazarus.freepascal.org/Profiling

Yes on Linux I know (but not used) valgrind, but for windows ? I think
no, so us will no go more off topic ;)

-- 
Best regards,
 JoshyFun


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


Re: [Lazarus] Lazarus MySQL 5.1

2010-03-02 Thread Marco van de Voort
On Tue, Mar 02, 2010 at 02:59:12PM +, Henry Vermaak wrote:
  seems to have fallen from the air, connecting to nothing ?
 
 I presume it comes from here (in mysql.inc):
 
   const
 mysqllib = 'libmysqlclient.'+sharedsuffix;
   {$IF DEFINED(mysql50)}
 mysqlvlib = mysqllib+'.15';
   {$ELSEIF DEFINED(mysql41)}
 mysqlvlib = mysqllib+'.14';
   {$ELSE}
 mysqlvlib = mysqllib+'.12';
   {$ENDIF}
 
 This probably doesn't cover all the cases.  Assuming that a specific
 client library can only talk to a specific server may also be wrong.
 Debian testing also has libmysqlclient 16 and mysql-server 5.1.

mysql version is a disaster (and one of the reasons why I avoid mysql when I
can). IMHO FPC should never hardcode the number in the first place, but
should link to mysqlclient.so (using the symlink, the unix way).

Anyway, long story short, FPC has a provision for such mistakes, -XLA

Try passing -XLAlibmysqlclient.so.15=libsqlclient.so.16 and pray.


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


Re: [Lazarus] tchart reticule mode

2010-03-02 Thread Geoffray
Le Lundi 01 Mars 2010 15:24:46, Andrea Mauri a écrit :
 dear Alexander,
 using the last svn I have problems with reticulemode property.
 If I set it to True every time I click on a chart the reticule is drawn
 and does not disappear.
 To reproduce it just enable reticule mode on a chart with at least one
 serie and click on the chart.
 Andrea
 
I have the same bug. Also when using the mouse to zoom on an area, there's no 
indicators (i mean no boxes) and the reticule is not following the mouse.

-- 
Geoffray fatalerrors Levasseur
http://jeff.levasseur.tuxfamily.org/
Sic luceat lux et pax

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


Re: [Lazarus] tchart reticule mode

2010-03-02 Thread Alexander Klenin
On Wed, Mar 3, 2010 at 05:52, Geoffray jeff.levass...@free.fr wrote:
 Le Lundi 01 Mars 2010 15:24:46, Andrea Mauri a écrit :
 dear Alexander,
 using the last svn I have problems with reticulemode property.
 If I set it to True every time I click on a chart the reticule is drawn
 and does not disappear.
 To reproduce it just enable reticule mode on a chart with at least one
 serie and click on the chart.
 Andrea

 I have the same bug.

Acknowledged, I will work on a fix in a day or two.

 Also when using the mouse to zoom on an area, there's no
 indicators (i mean no boxes)

Do you mean zoom rectangle is not drawn for you?
I can't reproduce that.

 and the reticule is not following the mouse.

That's half-intentional, it seems to me that it would be visually
confusing to display both reticule and zoom rectangle at the same time.
So perhaps correct behaviour would be to hide reticule on
mousedown, and show it again on mouseup?
That would also fix the original bug.

-- 
Alexander S. Klenin

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


Re: [Lazarus] UTF-8 string recognition

2010-03-02 Thread Robin Hoo
Hi, Antonio

Pls check the function I used for check UTF8 string. Hope it helpful

function IsUTF8(UnknownStr:string):boolean;
var
i:Integer;
begin
if length(UnknownStr)=0 then exit(true);
i:=1;
while ilength(UnknownStr) do
begin
// ASCII
if  (UnknownStr[i] = #$09) or
(UnknownStr[i] = #$0A) or
(UnknownStr[i] = #$0D) or
(UnknownStr[i] in [#$20..#$7E]) then
begin
inc(i);
continue;
end;
// non-overlong 2-byte
if  (UnknownStr[i] in [#$C2..#$DF]) and
(UnknownStr[i+1] in [#$80..#$BF]) then
begin
inc(i,2);
continue;
end;
// excluding overlongs
if ((UnknownStr[i]=#$E0) and
  (UnknownStr[i+1] in [#$A0..#$BF]) and
(UnknownStr[i+2] in [#$80..#$BF]))
or
// straight 3-byte
(((UnknownStr[i] in [#$E1..#$EC]) or
(UnknownStr[i] = #$EE) or
(UnknownStr[i] = #$EF))
and
(UnknownStr[i+1] in [#$80..#$BF]) and
(UnknownStr[i+2] in [#$80..#$BF]))
or
 // excluding surrogates
 ((UnknownStr[i]=#$ED) and
  (UnknownStr[i+1] in [#$80..#$9F]) and
  (UnknownStr[i+2] in [#$80..#$BF])) then
begin
inc(i,3);
continue;
end;
// planes 1-3
if ((UnknownStr[i]=#$F0) and
(UnknownStr[i+1] in [#$90..#$BF]) and
(UnknownStr[i+2] in [#$80..#$BF]) and
(UnknownStr[i+3] in [#$80..#$BF]))
or
// planes 4-15
   ((UnknownStr[i] in [#$F1..#$F3]) and
(UnknownStr[i+1] in [#$80..#$BF]) and
(UnknownStr[i+2] in [#$80..#$BF]) and
(UnknownStr[i+3] in [#$80..#$BF]))
or
// plane 16
   ((UnknownStr[i]=#$F4) and
(UnknownStr[i+1] in [#$80..#$8F]) and
(UnknownStr[i+2] in [#$80..#$BF]) and
(UnknownStr[i+3] in [#$80..#$BF])) then
begin
inc(i,4);
continue;
end;
exit(false);
end;
exit(true);
end;


2010/2/27 Antônio antoniog12...@gmail.com

 How to determine whether a string is UTF-8 or not?

 --
 ___
 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


Re: [Lazarus] Lazarus MySQL 5.1

2010-03-02 Thread Terry A. Haimann

I have tried this and it doesn't work.

waldo kitty wrote:

On 3/1/2010 23:18, Terry A. Haimann wrote:

I upgraded my laptop to Fedora Core 12, which has MySQL 5.1.42
installed. I have installed the latest Lazarus RPM, which is 0.9.28.2
and FPC 2.2.4. My Lazarus App won't connect to the server. I have the
libmysqlclient.so.16.0.0 installed. I am not sure where to get the
libmysqlclient.so.15.0.0. What are my options? Please do not recommend
Zeos, On my installation I have never seen it compile correctly and if I
have trouble a newbie would definitly have problems.


since you're on linux, what's wrong with going into the dir where your 
libmysqlclient is and creating a link pointing to it for the 15 
version you need? ;)


--
___
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


Re: [Lazarus] Lazarus MySQL 5.1

2010-03-02 Thread Terry A. Haimann

How do I do this in Lazarus?

Marco van de Voort wrote:

On Tue, Mar 02, 2010 at 02:59:12PM +, Henry Vermaak wrote:
  

seems to have fallen from the air, connecting to nothing ?
  

I presume it comes from here (in mysql.inc):

  const
mysqllib = 'libmysqlclient.'+sharedsuffix;
  {$IF DEFINED(mysql50)}
mysqlvlib = mysqllib+'.15';
  {$ELSEIF DEFINED(mysql41)}
mysqlvlib = mysqllib+'.14';
  {$ELSE}
mysqlvlib = mysqllib+'.12';
  {$ENDIF}

This probably doesn't cover all the cases.  Assuming that a specific
client library can only talk to a specific server may also be wrong.
Debian testing also has libmysqlclient 16 and mysql-server 5.1.



mysql version is a disaster (and one of the reasons why I avoid mysql when I
can). IMHO FPC should never hardcode the number in the first place, but
should link to mysqlclient.so (using the symlink, the unix way).

Anyway, long story short, FPC has a provision for such mistakes, -XLA

Try passing -XLAlibmysqlclient.so.15=libsqlclient.so.16 and pray.


--
___
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


Re: [Lazarus] Lazarus MySQL 5.1

2010-03-02 Thread waldo kitty

On 3/2/2010 18:34, Terry A. Haimann wrote:

I have tried this and it doesn't work.


in what way it doesn't work?? do you get an error or a complete failure with 
nothing indicating what went wrong?


FWIW: it doesn't work is pretty poor for an analysis to work from :P ;)


waldo kitty wrote:

On 3/1/2010 23:18, Terry A. Haimann wrote:

I upgraded my laptop to Fedora Core 12, which has MySQL 5.1.42
installed. I have installed the latest Lazarus RPM, which is 0.9.28.2
and FPC 2.2.4. My Lazarus App won't connect to the server. I have the
libmysqlclient.so.16.0.0 installed. I am not sure where to get the
libmysqlclient.so.15.0.0. What are my options? Please do not recommend
Zeos, On my installation I have never seen it compile correctly and if I
have trouble a newbie would definitly have problems.


since you're on linux, what's wrong with going into the dir where your
libmysqlclient is and creating a link pointing to it for the 15
version you need? ;)



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


Re: [Lazarus] tchart reticule mode

2010-03-02 Thread Geoffray
Le Mardi 02 Mars 2010 23:06:09, Alexander Klenin a écrit :
 Do you mean zoom rectangle is not drawn for you?
 I can't reproduce that.

Exactly. I'm using Qt. After some test there's no bug when using GTK widget 
set. This happen with Qt but I can't test something else than GTK and Qt.

-- 
Geoffray fatalerrors Levasseur
http://jeff.levasseur.tuxfamily.org/
Sic luceat lux et pax

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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread Hans-Peter Diettrich

Graeme Geldenhuys schrieb:


Can't we implement vertical tabs by default to platforms that support them?
I know Windows can't because they use this pretty dumb idea of making text
vertical too. Maybe a custom written/drawn LCL PageControl is needed for
IDE use only - then all platforms can enjoy the benefit vertical tab layout
gives?


A List- or ComboBox would do that everywhere. Since the pages are all of 
the same type (SynEdit), it's not necessary to use complicated paged 
controls for the documents.


DoDi


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


Re: [Lazarus] (Attn DoDi) multiply edit windows [Re: debug windows layout]

2010-03-02 Thread Hans-Peter Diettrich

Martin schrieb:


How far are you with multiply edit windows?


Don't ask me, I'm not familiar with the current IDE interfaces and 
layout management :-(
It sounded for a moment you started on the IDE integration. I just 
wanted to make sure we don't fo the same thing.


It doesn't make sense when I would work on IDE code without SVN write 
access. The resulting patches would be huge, so that nobody will check 
and commit them. That's why I suggested an SVN branch for such development.


Since you are not (yet), I'll be looking at enabling multiply 
SourceNotebooks. This can later be combined with docking.


You started that work and I don't want to interfere, unless you ask for 
assistance and specify a goal.


DoDi


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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread Hans-Peter Diettrich

Flávio Etrusco schrieb:


With multiple editor windows, the files must be kept (and parsed...) in
their own pool, separate from the SynEdit viewers.


Why?


Because no file can be assigned to a single SynEdit.



I just don't understand what you mean. The SynEdits should *perform* edit
commands, but the *detection* of keycodes is the job of the framework (IDE).



Yeah. But we must implement two/multiple keystroke ActionList handling.


Where's the problem?

DoDi


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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread Hans-Peter Diettrich

Mattias Gaertner schrieb:

With multiple editor windows, the files must be kept (and parsed...) in 
their own pool, separate from the SynEdit viewers.


Why do you think this is needed?


For simplicity, when multiple SynEdits can show the same file.


AFAIK I'm the only one that has provided some profiler output and it
showed that the synedit scanner is not a big number. The bigger
limitation is the visual controls (pagecontrol, pages).


In a simple approach the controls should not have any impact on the
performance. Since the tab clients are all of the same type (SynEdit), a
 single (visible) client control and a separate tab control would be
sufficient. When multiple SynEdits are required, all but the active one
can be hidden (see my notebook-docking approach).

Then again. My PC is about 3 years old, with an average of 10 - 20 
SynEdits, it takes 1 to 2 seconds of parsing. Opening a 100 files on 
loading of the IDE may be a legitimate action, and may have good 
reasons, and certainly can be justified by personal choise = but how 
many people are affected by it?
That depends on the meaning of open. The filenames can be imported 
from a project or desktop layout file, into the file pool. Actual 
loading can be deferred until the files really are required in the IDE.


Open is here: in the source editor.
Of course the IDE handles hundreds or thousands of files in the
background.


What's the difference?

Even if newer machines have enough power to process a huge number of 
files within a few seconds, I'd take care for users with old equipment - 
who else would do, if not Lazarus? Virtual machines also can have less 
RAM, and performance can become very poor once such a system starts 
swapping.


The source editor mem to disk ratio is about 1:6. For example opening
5mb (150kloc) of sources needs 30mb of RAM.


That looks acceptable, also on small systems.



They are parsed only once and only because the user wanted the file to
be open in the source editor. I still see no reason why someone wants
to always open a hundred files in the source editor.


Me2, but I frequently found 30+ open files when exploring the Lazarus
project. When the tabs are not closed manually, they will be reopened at
the next start.



I just don't understand what you mean. The SynEdits should *perform* 
edit commands, but the *detection* of keycodes is the job of the 
framework (IDE).


It does for other commands. And since synedit already can handle
keys on its own, the IDE just tells synedit which key code should do
what.


That's not in accordance with MDI nor MVC. You oberserved the overhead
yourself, that results from a deviation from accepted designs.

DoDi


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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread Graeme Geldenhuys
Mattias Gaertner wrote:
 
 Or maybe use a treeview so the open files can be grouped, for example
 by directory or files in the project, files in a package, ...


For me at least, it isn't important to know if units are in different
directories or packages instead of project. The important part is easily
getting to the opened files, reordering them etc.

OpenUnitFiles.lpk does all of this already. Maybe it can be integrated and
replacing the PageControl. Embed the 'Open unit files' dialog into the
editor window on the right, and remove PageControl completely, or hide the
tabs. Then we have the best of both worlds.

 * Vertical display of open files on all platforms.
 * Quick search feature to find open unit
 * Reordering of files by simply draging them up or down

The only reason I'm not using OpenUnitFiles.lpk by default is because it's
a separate window and duplicates some information already displayed by the
PageControl. But having this as part of the editor window and replacing the
tab would be brilliant. :)

If you haven't seen that add-on package yet, here is a screenshot of it
attached.

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/

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


Re: [Lazarus] RFC: remove StayOnTop for splash screen

2010-03-02 Thread Graeme Geldenhuys
Hans-Peter Diettrich wrote:
 
 A List- or ComboBox would do that everywhere. Since the pages are all of 
 the same type (SynEdit), it's not necessary to use complicated paged 
 controls for the documents.

Yes, a listbox will work perfectly and something like that already exists.
See my reply to Mattias.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/


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


Re: [Lazarus] UTF-8 string recognition

2010-03-02 Thread Mattias Gaertner
On Wed, 3 Mar 2010 07:24:35 +0800
Robin Hoo robin.hoo...@gmail.com wrote:

 Hi, Antonio
 
 Pls check the function I used for check UTF8 string. Hope it helpful

You combine a IsText (no special characters in #0-#31) and IsUTF8 - good
idea.

 
 function IsUTF8(UnknownStr:string):boolean;

Maybe better name it IsUTF8Text ?


 var
 i:Integer;
 begin
 if length(UnknownStr)=0 then exit(true);
 i:=1;
 while ilength(UnknownStr) do
 begin
 // ASCII
 if  (UnknownStr[i] = #$09) or
 (UnknownStr[i] = #$0A) or
 (UnknownStr[i] = #$0D) or
 (UnknownStr[i] in [#$20..#$7E]) then

#12 is a valid character too in texts (form feed).


 begin
 inc(i);
 continue;
 end;
 // non-overlong 2-byte
 if  (UnknownStr[i] in [#$C2..#$DF]) and
 (UnknownStr[i+1] in [#$80..#$BF]) then
 begin
 inc(i,2);
 continue;
 end;
 // excluding overlongs
 if ((UnknownStr[i]=#$E0) and
   (UnknownStr[i+1] in [#$A0..#$BF]) and
 (UnknownStr[i+2] in [#$80..#$BF]))
 or
 // straight 3-byte
 (((UnknownStr[i] in [#$E1..#$EC]) or
 (UnknownStr[i] = #$EE) or
 (UnknownStr[i] = #$EF))
 and
 (UnknownStr[i+1] in [#$80..#$BF]) and
 (UnknownStr[i+2] in [#$80..#$BF]))
 or
  // excluding surrogates
  ((UnknownStr[i]=#$ED) and
   (UnknownStr[i+1] in [#$80..#$9F]) and
   (UnknownStr[i+2] in [#$80..#$BF])) then
 begin
 inc(i,3);
 continue;
 end;
 // planes 1-3
 if ((UnknownStr[i]=#$F0) and
 (UnknownStr[i+1] in [#$90..#$BF]) and
 (UnknownStr[i+2] in [#$80..#$BF]) and
 (UnknownStr[i+3] in [#$80..#$BF]))
 or
 // planes 4-15
((UnknownStr[i] in [#$F1..#$F3]) and
 (UnknownStr[i+1] in [#$80..#$BF]) and
 (UnknownStr[i+2] in [#$80..#$BF]) and
 (UnknownStr[i+3] in [#$80..#$BF]))
 or
 // plane 16
((UnknownStr[i]=#$F4) and
 (UnknownStr[i+1] in [#$80..#$8F]) and
 (UnknownStr[i+2] in [#$80..#$BF]) and
 (UnknownStr[i+3] in [#$80..#$BF])) then
 begin
 inc(i,4);
 continue;
 end;
 exit(false);
 end;
 exit(true);
 end;


Mattias

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


Re: [Lazarus] Lazarus MySQL 5.1

2010-03-02 Thread Mattias Gaertner
On Tue, 02 Mar 2010 17:37:46 -0600
Terry A. Haimann te...@haimannonline.com wrote:

 How do I do this in Lazarus?

Project / Project Options / Compiler / Other

[...]
  Try passing -XLAlibmysqlclient.so.15=libsqlclient.so.16 and pray.


Mattias

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