Re: [Lazarus] How TDBGrid works

2016-05-07 Thread Jesus Reyes A.
En Sat, 07 May 2016 01:26:38 -0500, Martin Schreiber   
escribió:



On Friday 06 May 2016 23:20:41 Aradeonas wrote:

Thanks.

So what is the best way to provide those 100 to 1100 record at least
without Dataset calling AfterScroll event?
I want to not make any event while scrolling my custom Grid so other
connected DB controls change their values otherwise while Im scrolling
my custom grid it will cause calling all connected DB controls to update
their values.
I hope it is more clear now.


If the wanted record is in window of TDataLink.FirstRecord..FirstRecord +
BufferCount - 1 you can temporarily switch the record which supplies the
field data by setting TDatalink.ActiveRecord which doesn't fire any  
events. I

assume you know that. ;-)
See for example the MSEgui functions TGridDatalink.GetDisplay*Buffer(),
BeginGridRow() and EndGridRow().
https://gitlab.com/mseide-msegui/mseide-msegui/raw/master/lib/common/db/msedbedit.pas



Good luck by trying that while FirstRecord is "pointing" to record 1000  
AND keeping RecNo at 1, maybe I misunderstood something.


Jesus Reyes A.

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


Re: [Lazarus] How TDBGrid works

2016-05-06 Thread Jesus Reyes A.
En Fri, 06 May 2016 16:20:41 -0500, Aradeonas   
escribió:



Thanks.


So what is the best way to provide those 100 to 1100 record at least  
without Dataset calling >AfterScroll event?


I want to not make any event while scrolling my custom Grid so other  
connected DB controls change >their values otherwise while Im scrolling  
my custom grid it will cause calling all connected DB >controls to  
update their values.


I hope it is more clear now.

Regards,

Ara


The easy one is probably to make two independent connections to the  
database. More elaborated solutions would be for example copy all said  
records to a memdataset and only connect that to a dbgrid, OR put the  
records in a non-dataset enabled component, like a TDrawGrid or  
TStringGrid, browsing that will not trigger any dataset events so other db  
controls will be unaffected, etc. The problem here is I think  
synchronizing stuff, you will have a funny time getting the updates to  
those records into the original source.


Jesus Reyes A.

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


Re: [Lazarus] Flexible exporter for grid-like components

2016-05-06 Thread Jesus Reyes A.

En Fri, 06 May 2016 15:51:41 -0500, Bart  escribió:


On 5/6/16, Werner Pamler  wrote:
...
About writing a patch:
Don't you have svn commit (to LCL)?
If so, just commit it, since nobody seems to object to the basic
philosophy of your idea and implementation.
Once committed, others will participate.



+1

I would only suggest to keep the new units to a minimum, or if two units  
are needed name the grid related code as gridutils.


Jesus Reyes A.

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


Re: [Lazarus] How TDBGrid works

2016-05-06 Thread Jesus Reyes A.
On Fri, 06 May 2016 15:07:18 -0500, Aradeonas   
wrote:



Thanks, It seems I should explain better.
For RecordCount you are right and it seems DBGrid doesn't know correct  
number either otherwise it should has a better scroll size.
I want to do something like DBGrid and for that I want to get only a  
part of data for example record 1000 to 1100 and for that I can >set  
BufferCount to 100 but in this case I should navigate dataset to record  
1000 to get these value but I prefer to not change RecNo >and use  
something like DataLink's ActiveRecord that changes record you want  
without changing RecNo of Dataset.




You can't, there is no way using TDataset facilities. But anyway, changing  
ActiveRecord *should* change RecNo (provided that RecNo is reliable, it  
definitively is not if Dataset.IsSequenced=false OR dataset is filtered),  
if it's not then you found a bug.


So if I have 1 Dataset that is fully load all 1500 record can I just  
print records from 1000 to 1100 without changing RecNo?

Regards,
Ara



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


Re: [Lazarus] How TDBGrid works

2016-05-06 Thread Jesus Reyes A.
On Fri, 06 May 2016 13:44:46 -0500, Aradeonas   
wrote:


Jesus,In that demo if I set BufferCount to 9 always get 9 records and  
even Query.RecordCount will be 9 even result is more.
How can I get real count? I can get count before setting the link but is  
it the best way?


DbGrid does not do that, and it doesn't have to. And the best way would  
depend, I guess, on the specific situation and what set of components are  
being used.




How can I move or scroll link without moving Query? I want to scroll the  
grid and get new data without changing RecNo.
In your example if I only got 9 record for example but I want for  
example 20th record.




Not sure if I understand the part on "moving the query", but using  
TDataset derived components, and without using the basic MoveBy, Locate,  
first, last, next or prev you can't. Some dataset descendants may have  
some properties that help at some cost, for example y you set  
PacketRecords:=-1 then sqldb will load all the records and in this case  
RecordCount may be reliable, that is if dataset is not filtered (or that  
seems to indicate the relevant documentation). Some datasets may actually  
return a valid record count, probably TDbf is in this case. In any case  
without using the mentioned basic operations you can't select records.



Regards,
Ara



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


Re: [Lazarus] How TDBGrid works

2016-05-05 Thread Jesus Reyes A.
En Thu, 05 May 2016 16:53:00 -0500, Aradeonas   
escribió:



Hi,
I'm curious about how TDBGrid now what to show in a column as value.
I mean if I want to make a custom grid simple solution si going from  
first to last of TDataset and read columns value.
I Browsed TDBGrid code lately but sadly I couldnt find how it works to  
get data without (as I think) browsing and changing TDataset records.

Regards,
Ara
--http://www.fastmail.com - Send your email first class


DBGrid does not read all records from first to last in order to show them,  
it only "specify" how many records it can show at the same time, it does  
this using a data link, TComponentDatalink, which is just a TDatalink with  
some custom dataset events for easy hooking, a data link is an  
intermediary between the grid and the dataset. So once the amount of  
records is set, the grid uses a datalink property: ActiveRecord in order  
to select which record from the ones it has reserved is the active record,  
then DbGrid maps this active record to the grid.Row property, the grid.Col  
property is mapped to a field index and using the standard dataset  
properties like Fields[i] or the field associated to a column which is  
again just taken from the dataset.


The dataset is in charge all the time in keeping the reserved records up  
to date, the grid just shows the values it finds in the records.


The starting point when the records are shown in DbGrid is procedure  
TCustomDBGrid.DrawAllRows; there the ActiveRecord is selected, DrawAllRows  
eventually ends calling  individual cells for each row which does  
DefaultDrawCell and several others.


In bug report http://bugs.freepascal.org/view.php?id=29764 I put an  
example of using TDatalink with multiple records and without DbGrid in a  
console program. Hope that helps.


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


Re: [Lazarus] EasyLazFreeType demo not working

2016-04-09 Thread Jesus Reyes A.
En Sat, 09 Apr 2016 12:50:42 -0500, Ondrej Pokorny   
escribió:


I test the EasyLazFreeType from lazutils package. I cannot make the  
example work (in directory examples\lazfreetype).


The actual problem is in TFreeTypeFont.LoadFace line "familyItem :=  
Collection.Family[FName];" where Collection is nil (the FontCollection  
global variable in EasyLazFreeType is nil).
I downloaded all font files and placed them into the directory, they are  
correctly loaded.


Can somebody help? :)

Ondrej



It runs here if I give to it three arguments in command line, example:

lazfreetypetest.exe fonts\arial.ttf fonts\timesi.ttf fonts\verdana.ttf

of course I created the directory fonts and put there the ttf files.

If you don't run it this way, it tries to get the fonts from some kind of  
font manager but has that is not initialized and it fails, at least that  
is what I remember.


Jesus Reyes A.

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


Re: [Lazarus] FLC-PDF and LazReport

2016-04-08 Thread Jesus Reyes A.
En Fri, 08 Apr 2016 15:10:47 -0500, Michael W. Vogel   
escribió:



Hi,

In a project I use LazReport and TlrCairoExport, cause I need  
implemented fonts and unicode support.


Is there a plan to do it or anybody working on a wrapper for the new FPC  
PDF generator or is it even somehow possible today?


Thank you

Michl



It's planned, I was testing fpPdf (or how will it be named?) with that in  
mind. But if somebody is in a hurry and wants to jump in, please say so.


Jesus Reyes A.

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


Re: [Lazarus] PDF generator, try 2

2016-04-06 Thread Jesus Reyes A.
En Wed, 06 Apr 2016 13:14:49 -0500, Michael Van Canneyt  
 escribió:





On Wed, 6 Apr 2016, silvioprog wrote:

On Wed, Apr 6, 2016 at 2:14 PM, Michael Van Canneyt  


wrote:
[...]


Why is this patch needed ? It should not be needed at all ?



Sorry, I sent a wrong patch, please consider this new one in attachment.

My patch just fix wrong chars in the generated PDF, eg, before the apply
it, I got:


I see. I don't understand why this patch fixes it for you.

Because it means that somewhere a conversion happens that should not  
happen.




Here it fixes the problem too. So I did a small investigation and this is  
what I found:


The problem starts with this code:

procedure TPDFPage.AddTextToLookupLists(AText: UTF8String);
var
  str: UnicodeString;
begin
  if AText = '' then
Exit;
  str := UTF8ToUTF16(AText);
  Document.Fonts[FFontIndex].AddTextToMappingList(str);
end;

AText (a CP_UTF8 tagged string) is passed away to UTF8ToUTF16(AText) which  
expects a mere and mundane ansistring (to be used later as a pchar), the  
assembler window shows at what point the conversion is attempted:


C:\ThePathTo\fpctrunk\packages\fcl-pdf\src\fppdf.pp:1583  str :=  
UTF8ToUTF16(AText);

00435974 8b45fc   mov-0x4(%ebp),%eax
00435977 8d4dc8   lea-0x38(%ebp),%ecx
0043597A 66ba mov$0x0,%dx
0043597E e80d3dfdff   call   0x409690 
00435983 8b45c8   mov-0x38(%ebp),%eax
00435986 8d55f4   lea-0xc(%ebp),%edx
00435989 e8a286   call   0x43e030 

fpc_ansistr_to_ansistr converts AText from the given UTF8String to  
ansistring via RawbyteString. And it converts it to whatever  
DefaultSystemCodePage says it should. Now this is a problem because in  
Windows and according to the wiki this value is "The result of the GetACP  
OS call, which returns the Windows ANSI code page". In my case, and I  
guess Silvio's too, DefaultSystemCodePage=1252 not CP_UTF8, so in our case  
if AText is 'Greek: Γειά σου κόσμος' there will be problems converting  
that to CodePage=1252 which is solved by showing the "?" in the  
problematic characters


the SetMultiByteConversionCodePage(CP_UTF8) call makes  
DefaultSystemCodePage=CP_UTF8 which matches UTF8String and so in  
fpc_ansistr_to_ansistr no conversion is performed.


And so that is why SetMultiByteConversionCodePage(CP_UTF8) is needed when  
compiling in windows

:)

Jesus Reyes A.



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


Re: [Lazarus] PDF generator, try 2

2016-04-06 Thread Jesus Reyes A.
On Wed, 06 Apr 2016 12:23:12 -0500, Graeme Geldenhuys  
 wrote:



On 2016-04-01 20:16, Jesus Reyes A. wrote:
(it seems currently is not necessary because the matrix is  
auto-adjusted)

and then ...

   P.WriteUTF8Text(15, 120, 'Languages: English: Hello, World!');
   P.WriteUTF8Text(40, 130, 'Greek: %1B-FÃåéÜ óïõ êüóìïò');
   P.WriteUTF8Text(40, 140, 'Polish: Witaj %1B-B¶wiecie');
   P.WriteUTF8Text(40, 150, 'Portuguese: Ol%1B-Aá mundo');

Of course, before DoUnitConversion(p1); there should be a
DoMatrixTransform(p1); etc.



This change has been made and will be available in FPC repo shortly.
Incidently, this drastically reduces the amount of application code and
makes it much neater. Something I like. :)


Regards,
  - Graeme -



;)

Thanks.

Jesus Reyes A.

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


Re: [Lazarus] PDF generator, try 2

2016-04-01 Thread Jesus Reyes A.
On Thu, 31 Mar 2016 18:16:18 -0600, Graeme Geldenhuys  
 wrote:


BTW, out of curiosity, in the sample there is code like this:

  lPt1 := P.Matrix.Transform(15, 120);
  P.WriteUTF8Text(lPt1.X, lPt1.Y, 'Languages: English: Hello, World!');

  lPt1 := P.Matrix.Transform(40, 130);
  P.WriteUTF8Text(lPt1.X, lPt1.Y, 'Greek: -FÃåéÜ óïõ êüóìïò');

  lPt1 := P.Matrix.Transform(40, 140);
  P.WriteUTF8Text(lPt1.X, lPt1.Y, 'Polish: Witaj -B¶wiecie');

  lPt1 := P.Matrix.Transform(40, 150);
  P.WriteUTF8Text(lPt1.X, lPt1.Y, 'Portuguese: Ol-Aá mundo');

and then WriteUTF8Text and practically every other drawing function does  
something like this:


  p1.X := X;
  p1.Y := Y;
  DoUnitConversion(p1);

The question is why isn't the transformation matrix "active"?,

I mean the code above would be simply:

  p.SetTransformationMatrix(paramst o adjust the matrix) // or 
  p.Matrix.SetTransformationMatrix(params to adjust the matrix);

(it seems currently is not necessary because the matrix is auto-adjusted)  
and then ...


  P.WriteUTF8Text(15, 120, 'Languages: English: Hello, World!');
  P.WriteUTF8Text(40, 130, 'Greek: -FÃåéÜ óïõ êüóìïò');
  P.WriteUTF8Text(40, 140, 'Polish: Witaj -B¶wiecie');
  P.WriteUTF8Text(40, 150, 'Portuguese: Ol-Aá mundo');

Of course, before DoUnitConversion(p1); there should be a  
DoMatrixTransform(p1); etc.


One thought is that coordinates could be reused and in such case it might  
help but it doesn't seem to be a very strong reason, is interesting to  
know the real reason.


Jesus Reyes A.

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


Re: [Lazarus] PDF generator, try 2

2016-03-31 Thread Jesus Reyes A.
En Thu, 31 Mar 2016 18:16:18 -0600, Graeme Geldenhuys  
 escribió:



On 2016-03-31 22:18, Jesus Reyes A. wrote:
TPDFPage has some basic primitives for drawing: lines, rects, ellipses  
and

images. I don't see a way to add our own (except by patches to fpPDF of
course)



  // Add your custom page as follows
  P := TMyPDFPage.Create(Doc);
  Doc.Pages.Add(P); // global Page Object list
  lSection.AddPage(P); // which Section our page belongs too



Yes that would suffice, thanks.

Jesus Reyes A.

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


Re: [Lazarus] PDF generator, try 2

2016-03-31 Thread Jesus Reyes A.
On Thu, 31 Mar 2016 14:58:07 -0600, Michael Van Canneyt  
 wrote:




Synopse pdf is the reason I started fppdf. Synopse is heavily Windows
centric, but otherwise quite capable.

Fppdf is a young library (although it required many months of work)
I am sure many improvements will be made as the reporting library  
develops.


A canvas descendant that renders to pdf is planned, but not very high
priority.

Patches and suggestions are definitely welcome. The library is intended  
for

production, so quality is important.

Michael.



TPDFPage has some basic primitives for drawing: lines, rects, ellipses and  
images. I don't see a way to add our own (except by patches to fpPDF of  
course) but it would be nice to have some mechanism for extension, for  
example if a TPdfPageClass=class of TPdfClass is defined, then there could  
be a TPdfPages.AddPage overloaded with an extra argument  
PageClass:TPdfPageClass, and this could be used for implementing  
additional primitives? what you hink?


Regards.

Jesus Reyes A.

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


Re: [Lazarus] Merge request

2016-03-31 Thread Jesus Reyes A.
On Thu, 31 Mar 2016 11:45:48 -0600, Ondrej Pokorny   
wrote:



On 31.03.2016 12:59, Gabor Boros wrote:
Please merge 52063, 52029, 51980, 51918, 51914 revisions (grid fixes)  
from trunk to fixes_1_6.


Please add them into http://wiki.freepascal.org/Lazarus_1.6_fixes_branch  
section Merge requests/Submitted by others.


Ondrej


I marked some reports with a LazTarget 1.6.2 those should be merged to  
1.6.2 as their fixes have high probability to be harmless or they fix  
regressions, the ones marked with LazTarget 1.8 should be thoroughly  
tested in 1.7.0 before they can be merged. Well, I know this can't be  
objectively evaluated so give them a couple of weeks in the wild at least.


Jesus Reyes A.

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


Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Jesus Reyes A.
On Tue, 08 Mar 2016 08:01:10 -0600, Ondrej Pokorny   
wrote:



On 08.03.2016 14:15, Michael Van Canneyt wrote:

Well. You take yourself as a reference I think.


I don't think Jesus' idea wasn't really serious :)



Partly... I was aware there is no support in Lazarus for something like  
this.



Some contra's:
1.) Lazarus IDE doesn't have an API for that. I don't think anybody has  
time/will to make it - it could be pretty/unnecessarily complex to  
support it in every IDE dialog.
2.) No Lazarus function is called this way. It doesn't make sense if  
Code Creation is the only function taking advantage of it.
3.) I don't know any desktop application that works like this (except  
the TotalCommander mouse right click).


(1) is already a reason big enough for me.


Indeed.

Jesus Reyes A

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


Re: [Lazarus] Ann: class code creation

2016-03-07 Thread Jesus Reyes A.
En Mon, 07 Mar 2016 21:21:03 -0600, Ondrej Pokorny   
escribió:



I don't think this is possible or reasonable.

On 08.03.2016 2:39, Dmitry Boyarintsev wrote:

procedure TClass.Test(y: integer);
begin
  x private|:= y;
end;


One problem is that CodeTools need valid syntax in front of y to  
evaluate the type of y correctly (the type that x gets).



Eventually people will know the dialog well, so selecting the needed  
item in the dialog might be painful.


Then we should do some kind of fast select possibility in the dialog.  
 From my point of view, typing "x private" is more paintful than writing  
just "x" and then selecting the section with key up/down from the  
dialog. If you add only private variables, you can make it the default  
choice (in Options->Code tools->Code creation) and then the dialog  
doesn't pop-up.


Ondrej


Some crazy idea:

Detect the shortcut being pressed and then start a timer, if the user  
releases the shortcut before the timer triggers, then the user wants to  
use the previous selection (in this case the private section for example)  
and then no dialog is needed, if there is no previous selection or the  
timer triggers then show the dialog. The timer interval would need to be a  
setting so it can be adjusted by the end user. :)


Jesus Reyes A.

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


Re: [Lazarus] PDF generator

2016-03-05 Thread Jesus Reyes A.
En Sat, 05 Mar 2016 11:27:24 -0600, Michael Van Canneyt  
 escribió:



Hi,

I have committed a PDF generator to FPC Subversion: fcl-pdf.

Why a new pascal PDF generator ? Mainly because the existing ones  
written in Object Pascal suffer from
several disadvantages: - Font support usually incomplete or downright  
buggy.

- Dependency on a GUI (LCL, VCL, Windows).
The latter is important because the PDFs must be generated on a headless  
(no

display) webserver.

So, the fcl-pdf package contains a PDF generating unit fppdf that does  
not depend

on any external libraries or GUI system.

The PDF generator has the following features:
- Support for basic shapes.
- Support for basic line styles.
- Dictionary support.
- Multi-page PDF.
- Image support.
- TTF Font support.
- Font embedding.
- Unicode font support.
- Stream Compression.
- Image embedding.
- Several paper types.
- Portrait/Landscape.
- Support for multiple measurement units.
- Rotation matrix system.
- PDF creator information.
- The generated PDF passes several PDF validators.

The library is based on a library that came with FPGUI, with a feature  
set

which came closest to what I desired. It was completed for the company I
work for by Graeme Geldenhuys, and is heavily unit tested.

It is not yet feature-complete, but the above should be ample for most
applications.

In the near future, I expect to commit a reporting engine which,  
likewise, does not need a GUI (but can use one) and uses the PDF  
generator as one possible backend.


Todo:
- Implement TFPCustomCanvas descendent (TPDFCanvas) that draws on a PDF.
   (should allow easy integration in LCL) - Partial embedding of  
(unicode) fonts (only used glyphs) for smaller PDFs.
- On windows (possibly mac), allow to use native font mechanisms for  
extracting info from TTF files.

- Reduce memory usage by streaming finished pages to file.

Optionally:
- PDF Forms ?
- Archive format ?
- Signatures ?

Enjoy,

I would welcome additional tests/demos, suggestions, bugreports,  
improvements or patches.


Michael.



Great, thank you!

Jesus Reyes A.

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


Re: [Lazarus] Project Groups error - "Invalid floating point operation"

2016-02-25 Thread Jesus Reyes A.
En Thu, 25 Feb 2016 09:28:47 -0600, Graeme Geldenhuys  
 escribió:



On 2016-02-25 15:13, Mattias Gaertner wrote:

Yes. There seems to be a bug in the IDE menu merging code. It happens
only with some combinations of installed packages.


Thanks. Reading old messages from Michael van Canneyt I tried what he
suggested, but uninstalling the DataDict packages, but that meant I get
an "Exception" error at start. So a slight change.  I then, as a test,
backed up my ~/.lazarus/ profile directory and started a completely new
one. With the last executable giving me the "Exception" message, using a
brand new profile, the IDE started up without problems.

So it seems like configuration settings could also play a roll in this
issue.

I'll step by step add my custom configuration settings back in and see
what happens.

Regards,
  - Graeme -



The combination of packages that triggers this problem is  
lazdatadict+lazprojectgroups,
the problem appears only when the most recent project groups list is empty  
(this is when the MRPG submenu is hidden). The problem is an inconsistency  
on the counts of menu items between some internal list and the physical  
"project" menu items.


The issue has already a report:  
http://bugs.freepascal.org/view.php?id=29675


For myself I fixed the problem here but it has a side effect that prevents  
me committing the patch, the main menu appears inverted: Help, Windows,  
Tools, etc... Search, Edit, Files.  :)


Jesus Reyes A.

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


Re: [Lazarus] StringGrid1.LoadFromCSVFile problem

2015-10-22 Thread Jesus Reyes A.
On Thu, 22 Oct 2015 12:13:17 -0500, fecske fecske   
wrote:



I like to use the StringGrid1.LoadFromCSVFile() function.
It works but also randomly ​set to a last line of strange characters

..
In the CSV file normail view are not these characters. I checked csv  
files in hex viewer and  are not these >characters.


I did a test, I wrote a Delphi code in a delphi IDE with unique function  
and stringgrid, and  are not these >characters.too.

I use the same csv files.

What's wrong in the LoadFromCSVFile() function?

Please help me?


What Lazarus version/revision do you use?. Please attach a sample csv file.

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


Re: [Lazarus] laz report crash IDE on startup with builded Option -dDisableWrapperFunctions

2015-09-20 Thread Jesus Reyes A.
En Sun, 20 Sep 2015 10:43:30 -0500, FreeMan   
escribió:



Hi Jesus,
I get this error, not while make or building lazarus in terminal. In  
terminal, download svn lazarus, then make, then run lazbuild, every  
think is normal, when I try run IDE, then crash. I sended bash script, I  
run this script then rebuild lazarus from terminal, now working normal.  
I'm not test other os.

Thank you



I always had the .sh file, I probably added it locally and forgot to  
commit it. It's done in r49855.


Anyway there seems to be a compiler error under OSX that sometimes it  
fails to link in the .res files, it sometimes happen here when I modify  
LazReport (when I forgot to clean it first) and recompile Lazarus. I was  
not able to reproduce it in a simpler project so I have not reported it.


Jesus Reyes A.




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


Re: [Lazarus] laz report crash IDE on startup with builded Option -dDisableWrapperFunctions

2015-09-20 Thread Jesus Reyes
It happens here too, only under OS X.

Recompiling LazReport clean (LazReport package More>>Recompile clean) and then 
recompiling Lazarus fix it for me.

Jesus Reyes A.


El dom 20-sep-15, FreeMan  escribió:

 crashed. I get This lines from terminal.
 /opt/lazarus/components/lazreport/source/lr_desgn.pas   line
 8146
 
 [FORMS.PP] ExceptionOccurred
    Sender=EResNotFound
    Exception=Resource "lrd_ins_fields" not
 found
    Stack trace:
    $0001000BF3B1
    $0001000BF5E1
    $00010101CD81
    $00010101D026
 TApplication.HandleException Resource "lrd_ins_fields" not
 found
    Stack trace:
    $0001000BF3B1
    $0001000BF5E1
    $00010101CD81
    $00010101D026
 Exception at 0001000BF3B1: EResNotFound:
 Resource "lrd_ins_fields" not found.
 
 --

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


Re: [Lazarus] LazReport bug?

2015-09-07 Thread Jesus Reyes A.
En Mon, 07 Sep 2015 14:25:52 -0500, Craig Goodyear   
escribió:


I have recently upgraded from Lazarus 1.2 to Lazarus 1.4.2. Compiling a  
program with version 1.4.2 breaks a report written with version 1.2. One  
of field names in the sql statement that LazReport uses is name.


With the new version, the name of the object placed on the report is  
shown instead of the value of the name field from the sql statement.


Has the new version of LazReport reserved the word name to refer to the  
name of report objects, or is this a bug in LazReport?




Yes. At some point, the published properties of objects started to become  
available in scripts. It appears that 1.2 version already included that  
functionality, probably there were some bugs that prevented resolving the  
'name' property properly in 1.2 but was fixed later in the 1.4 version.


Jesus Reyes A.

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


Re: [Lazarus] Printing BitMap on OSX crashes

2015-07-31 Thread Jesus Reyes A.
En Fri, 31 Jul 2015 21:09:51 -0500, Martin Grajcar   
escribió:



Hi Jesus,



On Wed, Jul 1, 2015 at 10:52 PM, Jesus Reyes A.   
wrote:
On Tue, 30 Jun 2015 05:55:43 -0500, Martin Grajcar  
 wrote:



Hello,

apologies for reposting, but I can't see in the archives (and have  
received no answer).


Are attachments forbidden here? I'm given you a link instead:
https://dl.dropboxusercontent.com/u/4971686/bitmap-crash.demo.zip

Regards, Martin.

On Thu, Jun 25, 2015 at 10:57 AM, Martin Grajcar  
 wrote:
My trivial Lazarus 1.4 application (and also our real application)  
crash whenever it prints a TBitMap on MAC. It happens in  
_platform_memmove$VARIANT>>>>$sse4 it tries to execute MOVDQA

and I thought it was an alignment problem, but it isn't.

I'm attaching my rather confusing demo. It does nothing but printing  
and seems to work fine on Linux, but crashes on OSX. Commenting out  
the StretchDraw >>>>prevents the crash. I have currently no access to  
the MAC, so I apologize for not including a minimal example.




I can reproduce it, and although the AV is easily fixed it seems  
printing bitmaps under Mac OS X it currently broken (loading a bitmap  
from a file doesn't produce AV >>but it not working anyway). I'm sure  
it used to work because I have PDF file generated using TPrinter and  
CUPS-PDF at some point.


I haven't a chance to try it yet. Just in case it's non exactly trivial,  
how can the AV be fixed? I was only accessing the MAC over a bad  
connection, which made pretty >everything complicated.


I'm also sure it used to work.


Please submit a report so it wont be forgotten.


http://mantis.freepascal.org/view.php?id=28455
Regards, Martin.




The problem occurs because the bitmap is being freed before  
Printer.EndDoc. It is at this point that the bitmap data is used, but  
because it was already freed an AV occurs. I have actually fixed the  
problem, but in my current implementation resources are only be freed at  
program end. Which is not good if somebody are printing a lot. So I have  
not committed the fix, I have another plan and will try again soon.


In the mean time, the workaround it's easy (this is not the fix I  
mentioned before which would patch the LCL+Printer support). Just create  
the bitmap before Print.BeginDoc and free it after Print.EndDoc. That  
should work.


Jesus Reyes A.

--
Usando el cliente de correo de Opera: http://www.opera.com/mail/--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] lazreport: how to use global report variables

2015-07-01 Thread Jesus Reyes A.
En Wed, 01 Jul 2015 17:52:57 -0500, Graeme Geldenhuys  
 escribió:




On 2015-07-01 21:47, Jesus Reyes A. wrote:


Those are not global variables. They are report variables.


In the context of a report, they are the same thing to me. You define a
variable via the Report GUI Designer (I still don't know how to do it
from code), that variable is then available for use anywhere in your
report. ie: gloabal ;-)


:)
Yes, you can consider them as global if you so desire. However they exists  
only in your report, where they were defined. The frVariables list however  
can be used by n-number of reports in your application. This is why I  
think of them as "global"






I think the easier way to modify global variables is through the
frVariables object
ej.

frVariables['HideKlas'] := 1;


I'll take a look at that, thanks.


It seems possible to have report and global variables named the same,  
however I have not investigated who takes precedence, I would guess report  
variables are found first, but I'm not sure TBH.






But in LazReport this TStrings list functionality is not used.


Huh? You lot me there. So if they are not used, why do those properties
still exist in TfrReport?


They are not specific to LazReport, this is basic functionality of every  
TStringList, just because they descend from TStrings. Values and Names are  
public properties of TStrings, how can one hide those properties in a  
instance of TStringList?, you can't, so LazReport also can't. :D





I was not able to find a Report.Scripts property or field, maybe you  
mean

Report.Script?


Sorry, it was a typo. I meant Report.Script.

As far as I understand, LazReport is based on some open source version
of FastReport. Due to the lack of documentation (or updated
documentation) of LazReport, I looked at the documentation for
FastReport and tried to use some if what it suggests. But it seems much
of it doesn't translate to LazReport.


Yes, probably, however one could find that they have also many things on  
common.




Here is the URL of FastReport I looked at.

https://www.fast-report.com/documentation/ProgMan/index.html?adding_a_variable.htm

I worked through the whole "Working with a list of variables" section.



frxReport1.Variables['My Variable 1'] := 10; and likewise
Variable := frxReport1.Variables.Add and
Variable := frxReport1.Variables.Insert(1);

Wouldn't work on LazReport as here frxReport1.Variables is just a mere  
mortal TStringList which already have a default property: Strings[]  
indexed by integer, This part is in LazReport a little mess :), I think  
FastReport guys noted this and they fixed the situation in FastReport.




Regards,
  - Graeme -




--
Usando el cliente de correo de Opera: http://www.opera.com/mail/

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


Re: [Lazarus] Where to find latest documentation on LazReport

2015-07-01 Thread Jesus Reyes A.
En Tue, 30 Jun 2015 07:51:05 -0500, Graeme Geldenhuys  
 escribió:



Hi,

I've found the fr_eng.pdf included with Lazarus, but it is dated 1999
(in the pdf text). I'm hoping LazReport has improved since then ,
and newer documentation is available somewhere.

Any links would be much appreciated.  Or is that fr_eng.pdf really the
latest documentation?

Regards,
  - Graeme -



It is.

Some information is being added to the wiki:

http://wiki.lazarus.freepascal.org/LazReport_Documentation
http://wiki.lazarus.freepascal.org/LazReport_Tutorial

It's an slow moving attempt :(

Jesus Reyes A.

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


Re: [Lazarus] Printing BitMap on OSX crashes

2015-07-01 Thread Jesus Reyes A.
On Tue, 30 Jun 2015 05:55:43 -0500, Martin Grajcar   
wrote:



Hello,

apologies for reposting, but I can't see in the archives (and have  
received no answer).


Are attachments forbidden here? I'm given you a link instead:
https://dl.dropboxusercontent.com/u/4971686/bitmap-crash.demo.zip

Regards, Martin.

On Thu, Jun 25, 2015 at 10:57 AM, Martin Grajcar   
wrote:
My trivial Lazarus 1.4 application (and also our real application)  
crash whenever it prints a TBitMap on MAC. It >>happens in  
_platform_memmove$VARIANT$sse4 it tries to execute MOVDQA

and I thought it was an alignment problem, but it isn't.

I'm attaching my rather confusing demo. It does nothing but printing  
and seems to work fine on Linux, but crashes >>on OSX. Commenting out  
the StretchDraw prevents the crash. I have currently no access to the  
MAC, so I apologize >>for not including a minimal example.





I can reproduce it, and although the AV is easily fixed it seems printing  
bitmaps under Mac OS X it currently broken (loading a bitmap from a file  
doesn't produce AV but it not working anyway). I'm sure it used to work  
because I have PDF file generated using TPrinter and CUPS-PDF at some  
point.


Please submit a report so it wont be forgotten.

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


Re: [Lazarus] lazreport: how to use global report variables

2015-07-01 Thread Jesus Reyes A.
On Tue, 30 Jun 2015 10:35:54 -0500, Graeme Geldenhuys  
 wrote:



On 2015-06-30 14:03, Graeme Geldenhuys wrote:
I've used File -> Variable List to define a new variable (just the  
name).



Digging deeper into the LazReport code, I finally found the solution.

Even though you setup a variable, you must not refer to it via the
Scripts.Values[] or Variables.Values[] properties. Go figure!

Instead you use the Values.FindVariables() method.

  FRPrint.Values.FindVariable('HideKlas').Field := '1';



Those are not global variables. They are report variables.

I think the easier way to modify global variables is through the  
frVariables object

ej.

frVariables['HideKlas'] := 1;




For more details of what I've done, see the Lazarus Forum post.
  http://forum.lazarus.freepascal.org/index.php/topic,28922.0.html


Now this begs the question... What the hell does Scripts.Values[] and
Variables.Values[] actually do?


They do the same thing they do for any TStrings list, ie. Assign values to  
supposedly existing "names" , for they to work you have to have a list  
like:


name1=value1
name2=value2
etc.

But in LazReport this TStrings list functionality is not used.

Report.Variables holds the list of variables and variables categories that  
you have defined in the Report (usually using the report designer gui).  
Variables categories can only be used as distinctive tags for a group of  
variables, and I guess that is the reason why there are a Values object  
too, which btw has a list of only variables.


I was not able to find a Report.Scripts property or field, maybe you mean  
Report.Script? in that case supposedly it holds the script to be run as  
"BeforePrint" script.


Jesus Reyes A.

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


Re: [Lazarus] PowerPDF PDF level

2015-06-23 Thread Jesus Reyes A.
On Tue, 23 Jun 2015 04:57:44 -0500, Marc Santhoff   
wrote:



Hi,

can someone please tell me what version of PDF documents PowerPDF
supports?

The docs in question are mostly 1.4, some rare 1.5, but who knows.

TIA,
Marc



PowerPDF writes 1.2 version documents.

Jesus Reyes A.

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


Re: [Lazarus] Dropdown in stringgrid ?

2015-06-08 Thread Jesus Reyes A.
En Mon, 08 Jun 2015 06:03:28 -0500, Koenraad Lelong  
 escribió:

So you want the picklist only in the first row. Then use something like:

// use grid's OnSelectEditor
procedure TForm1.StringGrid1SelectEditor(Sender: TObject; aCol, aRow:
Integer;
   var Editor: TWinControl);
begin
   if aRow=StringGrid1.fixedRows then begin
 Editor := StringGrid1.EditorByStyle(cbsPickList);
 // fill the picklist with field list
 TPickListCellEditor(Editor).Items.CommaText :=
'Field1,Field2,Field3,etc';
 // or TPickListCellEditor(Editor).Items.Assign(FieldList)
 // or etc
   end else
 Editor := nil; // readonly the rest of rows (or select another  
editor)

end;

Hi,

It's almost what I want. Your code makes the second row behave like a  
picklist (1 fixed row : row #0 is fixed), so I subtracted 1 from  
StringGrid1.fixedRows but no luck ;-)I tried a few things, but I can't  
let the cells of the fixed row to behave like a picklist. Am I still  
missing something ?


Anyway, thanks very much already.



Can't you set FixedRows:=0?, if you do that what problems do you see in  
your program?


Jesus Reyes A.


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


Re: [Lazarus] Dropdown in stringgrid ?

2015-06-05 Thread Jesus Reyes A.
En Fri, 05 Jun 2015 05:55:51 -0500, Koenraad Lelong  
 escribió:



Op 03-06-15 om 01:19 schreef Jesus Reyes A.:


In the grid such combobox is called a picklist.

1. Select the grid
2. In the Object Inspector select the columns property and click the
"..." button.
3. Add some custom columns
4. Select the column where you wish to add a pick list
5. In the Object Inspector change the ButtonStyle to cbsPickList
6. In the Object Inspector select the PickList property and click the
"..." button.
7. Add all options you want to this list.
8. make sure the grid is editable.


Thanks, just tried this, but it's not what I need.

Like I said, I want to import a csv-file. Then, using the first row, I  
use a picklist of fieldnames to identify which column of the csv needs  
to go to which field in the database.

Maybe this clarifies it better :
---
| Field2 | Field1 || Field3 |||  <---  
picklist (Field1, Field2, Field3, blank)

---
|Col0Row1|Col1Row1|Col2Row1|Col3Row1|Col4Row1|Col5Row1|
|Col0Row2|Col1Row2|Col2Row2|Col3Row2|Col4Row2|Col5Row2|
etc.

This means column0 should got to Field2 of the database, column1 should  
got to Field1 of the database and column3 should got to Field3 of the  
database. The rest of the columns are not needed in the database.


Koenraad.



So you want the picklist only in the first row. Then use something like:

// use grid's OnSelectEditor
procedure TForm1.StringGrid1SelectEditor(Sender: TObject; aCol, aRow:  
Integer;

  var Editor: TWinControl);
begin
  if aRow=StringGrid1.fixedRows then begin
Editor := StringGrid1.EditorByStyle(cbsPickList);
// fill the picklist with field list
TPickListCellEditor(Editor).Items.CommaText :=  
'Field1,Field2,Field3,etc';

// or TPickListCellEditor(Editor).Items.Assign(FieldList)
// or etc
  end else
Editor := nil; // readonly the rest of rows (or select another editor)
end;

// use grid's OnPickListSelect
procedure TForm1.StringGrid1PickListSelect(Sender: TObject);
begin
  // make something with picklist itemindex, the current grid column is  
given by StringGrid1.Col

end;

Jesus Reyes A.

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


Re: [Lazarus] Dropdown in stringgrid ?

2015-06-02 Thread Jesus Reyes A.
En Tue, 02 Jun 2015 06:01:05 -0500, Koenraad Lelong  
 escribió:



Hi,

I'm trying to make a "universal importer".
I have a database I want to populate/modify with data from a csv-file.  
The column order of the csv-file cannot be imposed. So I have to have a  
way to say which column of the csv-file is which field in the database.


I have a commercial application that has something like a stringgrid but  
the first row has dropdown's with possible field-names. I was trying to  
mimic this, more or less, but had issues.


Is this possible someway ? Any hints ?

Koenraad



In the grid such combobox is called a picklist.

1. Select the grid
2. In the Object Inspector select the columns property and click the "..."  
button.

3. Add some custom columns
4. Select the column where you wish to add a pick list
5. In the Object Inspector change the ButtonStyle to cbsPickList
6. In the Object Inspector select the PickList property and click the  
"..." button.

7. Add all options you want to this list.
8. make sure the grid is editable.

Jesus Reyes A.

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


Re: [Lazarus] LazReport Questions

2015-05-27 Thread Jesus Reyes A.

En Mon, 25 May 2015 21:39:41 -0500, steveg  escribió:


Thank you Michael.

I have then following problems currently -

1:
I am placing a subreport in a Group footer (to run a charges query for  
each client in group break)
It would appear that the subreport is run 'after' accessing all other  
fields in the footer, no matter what it is named, or where it is  
placed.  I would like to be able to specify when it runs in relation to  
the other fields (to be able to use it for further calculations).

Is this at all possible ?


Is not possible in current implementation. Name or Position (x,y) have no
effect, however "z-order" (relative position between objects) might help.
It even seems that as soon a subreport is found any remaining object is  
skipped.




2:
All objects seem to be accessed in the order they are saved in the lrf  
file, not by Name (alpha) or position - this makes it problematic when  
using them for calculations.
Is it possible to have the running report fill in the fields by alpha  
name position instead ?


Not in the current implementation.



3:
Deleting an object from a report (memo / band / subreport) will often  
cause the program to abort.
I haven't yet been able to conclude precisely what its related to, but  
still watching.

Does anybody else have this issue ?



I haven't seen it. Feel free to submit a bug report with a sample project.

Jesus Reyes A.

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


Re: [Lazarus] TStringGrid.OnSelectEditor

2015-05-14 Thread Jesus Reyes A.
En Wed, 13 May 2015 19:48:56 -0500, Vojtěch Čihák   
escribió:




Hi,


I got troubles with TStringGrid. When I set:


goAlwaysShowEditor:=False;

goEditing:=True;


OnSelectEditor is triggered always when I select any cell, even if  
editor (built-in or custom) is not shown yet.


When I click the cell for the second time, editor is shown and  
OnSelectEditor is triggered again.



I guess it's a bug, after all there are other events for selecting cell  
(OnSelection, OnSelectCell).



Is it by design or should I report?


Thanks, V.


P.S.:

When options are:

goAlwaysShowEditor:=True;

goEditing:=True;


OR


goAlwaysShowEditor:=False;

goEditing:=False;


OnSelectEditor works as expected.


I think is not a bug (at least that kind of bug that is against the  
documentation).
But I see no reason why it should work the way it does now, please check  
r49016


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


Re: [Lazarus] Processing TCoolBar child by IDE

2015-05-11 Thread Jesus Reyes A.

En Mon, 11 May 2015 16:25:50 -0500, Juha Manninen
 escribió:


On Tue, May 12, 2015 at 12:21 AM, Jesus Reyes  wrote:

TBH, I don't know if they are "completly" broken,


One more thought: There is an installation package for Mac OSX, built
by Mattias. He was able to compile generics on Mac.
Can it depend on compiler options?

Juha




I tried with the released version and it works
So it must be some flag that makes the difference.

The question now is if one should trust 2.6.4 when compiling generics code.
IMO It is still confusing ... to use or not use...

At least the weird situation of how was possible to have a release with
this
compiler and the current code in Lazarus is solved.

Jesus Reyes A.

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


Re: [Lazarus] Processing TCoolBar child by IDE

2015-05-11 Thread Jesus Reyes A.
En Mon, 11 May 2015 16:25:50 -0500, Juha Manninen  
 escribió:



On Tue, May 12, 2015 at 12:21 AM, Jesus Reyes  wrote:

TBH, I don't know if they are "completly" broken,


One more thought: There is an installation package for Mac OSX, built
by Mattias. He was able to compile generics on Mac.
Can it depend on compiler options?

Juha



I tried with the released FPC version 2.6.4 and it works :P
So it must be some flag that makes the difference.

The question now is if one should trust 2.6.4 when compiling generics code.
IMO It is still confusing ... to use or not use...

At least the weird situation of how was possible to have a release with  
this

compiler and the current code in Lazarus is solved.

Jesus Reyes A.

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


Re: [Lazarus] Processing TCoolBar child by IDE

2015-05-11 Thread Jesus Reyes
En Mon, 11 May 2015 16:25:50 -0500, Juha Manninen  
 escribió:



On Tue, May 12, 2015 at 12:21 AM, Jesus Reyes  wrote:

TBH, I don't know if they are "completly" broken,


One more thought: There is an installation package for Mac OSX, built
by Mattias. He was able to compile generics on Mac.
Can it depend on compiler options?

Juha



It could be, I will test and comment back later.

Jesus Reyes A.

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


Re: [Lazarus] Processing TCoolBar child by IDE

2015-05-11 Thread Jesus Reyes
En Mon, 11 May 2015 16:18:18 -0500, Juha Manninen  
 escribió:



Why did the problem come up now? As I wrote I have used generics in
many places for years. For example in component palette interface code
a generics map made the code much simpler. I don't want to change it
to something complex with typecasts.

Juha



I'm sorry to be the killjoy, but what should one do?, remain silent? :)

As I said, everything else may be working fine and some advanced features  
are the only affected, what is OK and what is not or what is advanced and  
what is not is something to be tested or read somewhere if that is  
documented.


As I detected the problem in my PC, I offer my help to test anything you  
have in mind :)


Jesus Reyes A.

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


Re: [Lazarus] Processing TCoolBar child by IDE

2015-05-11 Thread Jesus Reyes
En Mon, 11 May 2015 16:10:06 -0500, Juha Manninen  
 escribió:




In fact recompiling 1.4 on Mac using 2.6.X failed here :(.


Do you mean generics on Mac are broken? Strange. It does not sound
like a platform dependent feature.

Juha


TBH, I don't know if they are "completly" broken, I expressed my surprise  
too that it worked on other OS, and I don't have any other information  
apart from Sven word that 2.6.X is not guaranteed to work with all  
generics features, specially the one mentioned here.


Jesus Reyes A.


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


Re: [Lazarus] Processing TCoolBar child by IDE

2015-05-11 Thread Jesus Reyes
En Mon, 11 May 2015 15:23:55 -0500, Vojtěch Čihák   
escribió:




Now you surprised me. I completely forgot I used generics, I had to look  
to old sources


because I wasn't sure whether it came from me or from someone else.


Anyway, FPC 2.6.4 is not able to compile it? You are the first who say  
it.



I guess replacing generics with TFPList shouldn't be difficult.


V.


Yes I'm sure.
I'm also surprised, seems that nobody noticed.
In reality, I should have tested before but the fact that it worked  on  
every other OS with 2.6.X is a little confusing and unexpected, maybe that  
is why nobody noticed in the RC's series.



...
Compiling buttonpanel.pas
Compiling extctrls.pp
Compiling popupnotifier.pas
Assembling (pipe) units/i386-darwin/popupnotifier.s
extctrls.pp(1251,58) Error: Illegal expression
extctrls.pp(1251,58) Error: Error in type definition
extctrls.pp(1251,58) Fatal: Syntax error, ">" expected but "" found
Fatal: Compilation aborted
make[1]: *** [alllclunits.ppu] Error 1
make: *** [lazbuild] Error 2


And I can reproduce it with the attached file. The same compiles fine  
under Linux with fpc 2.6.X
But anyway, Sven has confirmed that 2.6.X is not guaranteed to work with  
all generics features, specially

like the one tested here.

$ /Users/prog/fpcbin32_265/bin/fpc test1.pas
Free Pascal Compiler version 2.6.5 [2015/05/07] for i386
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Darwin for i386
Compiling test1.pas
test1.pas(9,50) Error: Illegal expression
test1.pas(9,50) Error: Error in type definition
test1.pas(9,50) Fatal: Syntax error, ">" expected but "" found
Fatal: Compilation aborted


Jesus Reyes A.

test1.pas
Description: Binary data
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Processing TCoolBar child by IDE

2015-05-11 Thread Jesus Reyes
En Mon, 11 May 2015 09:18:01 -0500, Vojtěch Čihák   
escribió:




Hi,


developing TCoolBar wasn't easy, one must deal with LCL austosizing  
mechanism, which is very sophisticated.


I know that in design-time is not band-height recalculated immediately.  
The reason is mainly I wanted to do CoolBar


efficient and avoid redundant recalculation (LCL triggers many resize  
events).



I understand you, it would be nice to have it perfect (panel will resize  
band and band will resize panel).


However, I wouldn't like to make big changes to design of TCoolBar, I  
happy it works and is stable :-).





Any change that TCtrlBands  can be re-implemented to not use generics?,  
while they apparently work fine on FPC trunk, they are not guaranteed to  
work on FPC 2.6.X. (specially advanced features like the one in r 45860)  
and 1.4 was apparently released with this changes.


In fact recompiling 1.4 on Mac using 2.6.X failed here :(.

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


Re: [Lazarus] Strange behavior of AutoSizeColumn in StringGrid

2015-05-06 Thread Jesus Reyes A.
On Wed, 06 May 2015 04:15:43 -0500, Valdas Jankūnas   
wrote:



2015.05.06 01:52, Jesus Reyes rašė:

If that is the intended behaviour (Multiline title property is a  
contribution, Werner?)
then it's OK to me, in that case please try the attached patch and  
write back your results,

here I tested under Windows and it seems to work fine.



tested on Linux: AutosizeColumn[s] stops working. But if I add line  
"aRect := Rect(0, 0, High(integer), High(integer));" before  
"DrawText..." then it works, also bug is gone.




I'm sorry for my previous two messages. I hope this time it will go ok.
the following is what I replied in both cases.
- - - - - - - - - -

Weird, now I have tested in both Linux and Mac and it works fine
without your change..

Anybody else?

Jesus Reyes A.

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


Re: [Lazarus] Strange behavior of AutoSizeColumn in StringGrid

2015-05-06 Thread Jesus Reyes
>2015.05.06 01:52, Jesus Reyes ra

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


Re: [Lazarus] Strange behavior of AutoSizeColumn in StringGrid

2015-05-06 Thread Jesus Reyes
>2015.05.06 01:52, Jesus Reyes ra

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


Re: [Lazarus] Strange behavior of AutoSizeColumn in StringGrid

2015-05-05 Thread Jesus Reyes
El mar 5-may-15, Valdas Jankūnas  escribió:

>  Asunto: [Lazarus] Strange behavior of AutoSizeColumn in StringGrid
>  A: "General mailing list" 
>  Fecha: martes, 5 de mayo de 2015, 14:43
>  
>  Hello,
>  
>  situation: GridColumn.Multiline is TRUE and one of
>  StringGrid's cell has 
>  multiline text. If I perform StringGrid.AutosizeColumn[s]
>  then column 
>  width become like all text of cell was in single line
>  (attached test 
>  project: try to press button several times).
>  
>    Is this a Bug?
>  

Well, apparently it could be a bug with a side effect :).

It seems the Multiline property is a Column's Title property not a column 
property
however it is treated as if it is a column property, something that should only 
affect
the title cell but it actually affects the whole column. That's the side effect.

If that is the intended behaviour (Multiline title property is a contribution, 
Werner?) 
then it's OK to me, in that case please try the attached patch and write back 
your results,
here I tested under Windows and it seems to work fine.

Jesus Reyes A.

autosizemultiline.diff
Description: Binary data
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus Release Candidate 1 of 1.4

2015-02-18 Thread Jesus Reyes
En Tue, 17 Feb 2015 05:00:50 -0600, Luca Olivetti   
escribió:



Oh, and I have a one line patch to dbgrids.pas, but Jesus didn't
acknowledge it yet:

http://bugs.freepascal.org/view.php?id=27232

Bye


I'm sorry, I will take a look shortly.

Jesus Reyes A.

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


Re: [Lazarus] patch for lazreport (TfrPictureView.getBlob)

2014-12-01 Thread Jesus Reyes
Because you are getting the image data from a different source than the dataset 
itself, traditionally you do this in the event OnEnterRect which exists for 
this kind of situations, see for an example the Thumbnails Report in the 
lazreport/samples/editor sample, I quote here the relevant part:

procedure TfrmMain.TheReportEnterRect(Memo: TStringList; View: TfrView);
begin
  if (FImageList<>nil) and (View.Name='thumbnail') then begin
TFrPictureView(View).Picture.LoadFromFile(FImageList[FImageListIndex]);
Inc(FImageListIndex);
  end;
end;

In your case you could probably do something like this:

if View is TfrPictureView then begin
  TfrPictureView(View).Picture.LoadFromFile(
'test' + myQuery.FieldByName('Test_Int').asString+'.bmp')
end;

Which looks more simply than your proposed solution.

Regards.

Jesus Reyes A.


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


Re: [Lazarus] Pochecker (was Fuzzy traslations ignored)

2014-10-09 Thread Jesus Reyes
If I understand correctly, the error here is that some tools cannot easily edit 
.po files and instead want .pot files?
or what?


If the concern is that we don't follow what gettext docs say, should we be 
worried also that we don't use .mo files?


If I remember correctly, one of the reasons (but not the only) to use .po files 
directly (without .mo conversion) was because any text editor could be used to 
edit them, but text editors usually don't mind what extension a text file has 
(even, it could be argued if .txt extension should be used, but not please :)).


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


[Lazarus] (no subject)

2014-08-27 Thread Jesus Reyes
Hello,

Has anybody noticed that you can't get an annotated view of a file in ViewVC?

Every time it results in "Error occurred while calculating annotation data.", 
however there is no problem doing it the command line: svn blame afile works.

Regards.

Jesus Reyes A.


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


Re: [Lazarus] LazReport: TfrReport.LoadFromFile question

2014-08-25 Thread Jesus Reyes
Please file a bug report, at least the unexistant .lrf case should trigger an 
exception.

Jesus Reyes A.



El Domingo, 24 de agosto, 2014 16:56:44, Bart  escribió:
 


Hi,

TfrReport.LoadFromFile does not raise an exception (or return ay other
indication of error) if the file does not exist and the filename has
the .lrf extension.
If the filename has another extension the code results in a dialog
'Unsupported FRF format'.
This to me is even more bothersome, I cannot trap this in code at all,
nor can I suppress the dialog.

Similar to other components that have a LoadFromFile (TMemo, TSynEdit,
TStringGrid to name a few), I would expect the LoadFromFile to raise
an exception in both cases.

Before I file this in the bigtracjker, I ask here.
Maybe this is by design (compatibility with Delphi perhaps)?

Bart

--
___
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] Lazreport of master-detail

2014-06-26 Thread Jesus Reyes


> El Jueves, 26 de junio, 2014 3:08:23, Koenraad Lelong 
>  escribió:
...
> Hi,
> 
> Since I did not find a way to backtrace in Lazarus, I did it via 
> gdb-commandline. This is what I get (Windows XP) :
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x004036bb in SYSTEM_FORWARDS_SSE_3 ()
> (gdb) bt
> #0  0x004036bb in SYSTEM_FORWARDS_SSE_3 ()
> #1  0x005dc7a4 in 
> BUFDATASET_TCUSTOMBUFDATASET_$__CURRENTRECORDTOBUFFER$PCHAR
>      ()
> #2  0x0009b908 in ?? ()
> #3  0x00594cee in DB_TDATASET_$__GETPRIORRECORD$$BOOLEAN ()
> #4  0x00596fa7 in DB_TDATASET_$__RESYNC$TRESYNCMODE ()
> #5  0x0059692e in DB_TDATASET_$__GOTOBOOKMARK$POINTER ()
> #6  0x0001 in ?? ()
> #7  0x0007da50 in ?? ()
> #8  0x005c677a in RESTOREBOOKMARKS (parentfp=0x260f1e8) at lr_class.pas:7171
> #9  0x005c5ecb in TFRPAGE__FORMPAGE (this=)
>      at lr_class.pas:7438


...

The problem here is sqldb bookmark handling on detail datasets. In some 
circumstances it's broken, see bug reports 
http://bugs.freepascal.org/view.php?id=26132 and 
http://bugs.freepascal.org/view.php?id=26146

LazReport backup datasets current positions before the report is processed and 
then it tries to restore them when done. 

It does this because sometimes the datasets are linked to visual components 
which, in the end, would show incorrect "current" records. The implemented 
solution is by using a notification, when LazReport is about to backup the 
bookmarks, it triggers an event which on return instruct LazReport to do the 
backup/restore bookmark action or not. 

If "not backup/restore bookmarks" is (most of the time) the expected behavior, 
we can replace the current solution and implement a LazReport option, 
roDontBackupBookmarks enabled by default. So it doesnt backup/restore the 
bookmarks automatically.

Suggestions are welcomed.

Jesus Reyes A.


> 
> Since it's not my application that's behaving bad (AFAICT) I'm going 
> to 
> try to reproduce this with a "public" database. Then I'll write a 
> bug-report.
> 
> 
> Koenraad.
> 

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


Re: [Lazarus] New Messages window

2014-06-11 Thread Jesus Reyes
Right click on gutter, over a break point causes AV. Reproduced in windows and 
linux.

TApplication.HandleException Access violation
  Stack trace:
  $0857DC5E  TMESSAGESFRAME__SOURCEEDITORPOPUP,  line 3503 of etmessageframe.pas
  $0857E413  TMESSAGESVIEW__SOURCEEDITORPOPUP,  line 174 of etmessageswnd.pas
  $08533229  TSOURCENOTEBOOK__SRCPOPUPMENUPOPUP,  line 6429 of sourceeditor.pp
  $08241078  TPOPUPMENU__DOPOPUP,  line 37 of ./include/popupmenu.inc
  $082412AD  TPOPUPMENU__POPUP,  line 74 of ./include/popupmenu.inc
  $08241248  TPOPUPMENU__POPUP,  line 66 of ./include/popupmenu.inc
  $0852DE54  TSOURCEEDITOR__EDITORCHANGEUPDATING,  line 5104 of sourceeditor.pp
  $08724C68  TCUSTOMSYNEDIT__SETUPDATESTATE,  line 2195 of synedit.pp
  $08725315  TCUSTOMSYNEDIT__DODECPAINTLOCK,  line 2290 of synedit.pp
  $0814922B  TMETHODLIST__CALLNOTIFYEVENTS,  line 237 of lazmethodlist.pas
  $0878C20B  TSYNEDITSTRINGLIST__SENDNOTIFICATION,  line 1541 of 
synedittextbuffer.pp
  $0878A1E4  TSYNEDITSTRINGLIST__SETUPDATESTATE,  line 1247 of 
synedittextbuffer.pp
  $08804103  TSYNEDITSTRINGS__ENDUPDATE,  line 971 of lazsynedittext.pas
  $08724B21  TCUSTOMSYNEDIT__DECPAINTLOCK,  line 2170 of synedit.pp
  $087299EB  TCUSTOMSYNEDIT__MOUSEUP,  line 3644 of synedit.pp
  $0822A2FD  TCONTROL__DOMOUSEUP,  line 2156 of ./include/control.inc
  $0822AD98  TCONTROL__WMRBUTTONUP,  line 2621 of ./include/control.inc

Jesus Reyes A.

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


Re: [Lazarus] LazReport & Database

2014-03-11 Thread Jesus Reyes
> Jesus Reyes  wrote:

> 
>>  This is basically to Mattias, is it possible to register at design time 
> data modules so they appear in FindGlobalComponentList? any other solution?
> 
> FindGlobalComponentList is for the currently running application - the
> IDE itself.
> 
> Properties in the OI use the property editors. A TComponent property
> uses the TComponentPropertyEditor, which allows to select type
> compatible components from any open designer form including datamodules.
> 
> What property does not work?
> Is this a problem in the OI or in LazReport?
> 
> 
> Mattias


Was a problem in LazReport, is now fixed, thanks.

Jesus Reyes A.

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


Re: [Lazarus] LazReport & Database

2014-03-10 Thread Jesus Reyes
> With a new project, last week I tried to do this again. First with 

> Lazarus 1.08, today with Lazarus 1.2 (downloaded and installed this 
> morning). Still the same problem.
> I looked in the bugtracker. There is a request for a new sample-project. 
> Unfortunately I lost my password and the email-address is not valid anymore.
> The bugtracker states :
>>  You need to first link TfrDBDataSet to a TDbf (which could be in a 
> TDatamodule) and then link the TfrDBDataSet to the TfrReport via the Dataset 
> property.

> When you use the query on the same form as the report, this is *not* 

> needed. And adding a TfrDBDataSet and connecting it to the query on the 
> datamodule does not work.
> 


In your report you wrote that setting up the connection in code works, that 
means it's a problem at runtime, the response in note 72299 address the problem 
in that case, and as it written it works if you link TfrDbDataset etc. 

But now things are clearer as you say the problem is at design time, and yes, 
the issue can be reproduced. The problem here is LazReport (in form1) can't get 
an instance to Datamodule1.Dbf1 at Lazarus design time. At design time, the 
object inspector knows how to get an instance to a component residing in a 
external form/datamodule but LazReport designer at Lazarus design time doesn't 
know.

This is basically to Mattias, is it possible to register at design time data 
modules so they appear in FindGlobalComponentList? any other solution?

Jesus Reyes A.

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


Re: [Lazarus] How to color a field in a LazReport ?

2014-03-10 Thread Jesus Reyes


> El Lunes, 10 de marzo, 2014 9:10:39, Koenraad Lelong 
>  escribió:
> > Hi,
> 
> I'm trying to make the background of dbfield in a LazReport different.
> I tried using the userds example, but it does not work.
> This is what I wrote :

Have you tried

> 
> procedure TDataModule1.frReport1EnterRect(Memo: TStringList; View: TfrView);
> begin
> 
    if Dataset.FieldByName('VERSCHIL').asFloat<0.0 then
       View.FillColor := clRed
    else
       View.FillColor := clWhite;
> end;
>

?

Another way is, as shown in UserDs example, using a Script, You can make a 
script var 'Negative', which value is updated in OnGetValue, just like 
FNegative below, the difference would be that 'Negative' is a script var and in 
your example FNegative is some data module field or property. In the UserDS 
sample that would be something similar to variable 'I', for example. 

  
> procedure TDataModule1.frReport1GetValue(const ParName: String;
>    var ParValue: Variant);
> begin
> 
> Append(OutFile);
> writeln(OutFile,ParName);
> CloseFile(OutFile);
> if ParName='qrySamenVatting."VERSCHIL"' then
>    FNegative:=qrySamenVattingVERSCHIL.AsFloat<0.0
> else
>    FNegative:=false;
> end;


Used that way, the memo field's script would be something like:

Begin
  if Negative then
    FillColor := clRed
  else
    FillColor := clWhite;
End

> 
> This colors the wrong field. After some debugging I found EnterRect is 
> fired before GetValue. So, how can I modify the color based on the value ?
> 
> 
> Koenraad.
> 
> --
> ___
> 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] Suggestion on DBGrid

2014-03-08 Thread Jesus Reyes





> El Sábado, 8 de marzo, 2014 6:02:01, FreeMan  
> escribió:
> > Hello,
> In lazarus/lcl/dbgrids.pas,  TDBGridOption set  add item 
> "dgNextRowonEnter" and "dgNextRowonEnterOnLastColumn"
> TCustomDBGrid.KeyDown(...
> line: 2172
>              if (dgNextRowonEnter in Options)then begin
>                GetDeltaMoveNext(ssShift in Shift, DeltaCol, DeltaRow, 
> AutoAdvance);
>                MoveSel(True);
>              end;
> when RowSelected, enter is always moveto nextrow.
> "dgNextRowonEnterOnLastColumn" some times usefull, dataset's 
> autoedit, 
> but I don't want to new row.
> I wrote here, what you are thing about this? if its usefull I wanna add 
> to bugtracker for suggestion. or team add quickly :)
> Thank you


AutoAdvance works on pressing ENTER (or TAB), in a DbGrid with 
AutoAdvance:=aaDown and while editing you press the ENTER key, the next row 
will be selected, that seems to be what your dbNextRowOnEnter will do. About 
dNextRowOnEnterOnLastColumn, it seems to be the same as 
AutoAdvance:=aaRightDown.

I don't think adding duplicate of existing functionality would be a good idea.


Jesus Reyes A.

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


Re: [Lazarus] clicking a dbgrid's column title does not trigger OnEnter event as with Delphi

2014-02-12 Thread Jesus Reyes
One reason would be that Lazarus DbGrid it's not a Delphi DbGrid clone.

Without more information one can only speculate: OnEnter should be triggered in 
case the grid has not the focus, if it already has the focus, I don't see why 
OnEnter should be triggered on column click.


If you explain what you want to do, probably somebody could give you some 
alternative.

Jesus Reyes A.



El Miércoles, 12 de febrero, 2014 18:07:05, Alejandro Gonzalo 
 escribió:
 
It does in Delphi!
>I have Laz 1.0.4 for Win7 64 bit.  Has this been fixed in a later version?  Or 
>is there some reason this is different from Delphi?
>
>
>A. G.
>--
>___
>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] Optimize DBGrid speed

2014-01-08 Thread Jesus Reyes





> I'm sorry, I seldom check the gmail account, now I checked and there is your 
> msg. If somebody want to write me, please use jesusrmx at yahoo.com
> 
> Thanks.
> 
> Jesus Reyes A.  
> 

Oops, sorry again. It is yahoo.com.mx

Jesus Reyes A.

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


Re: [Lazarus] Optimize DBGrid speed

2014-01-08 Thread Jesus Reyes
El Miércoles, 8 de enero, 2014 2:41:07, Petr Kristan  
escribió:

On Mon, Jan 06, 2014 at 03:21:56PM +0200, Juha Manninen wrote:
>> On Mon, Jan 6, 2014 at 2:29 PM, Petr Kristan  wrote:
>> > I'am trying to minimize whole DBGrid redraw. Where I can discuss my
>> > steps to avoid my pointless work.
>> >
>> > Most of code what I plan to change was commited by jesus.
>> 
>> The choices are this list or private mails with Jesus (jesus...@gmail.com).
>> It depends on how interesting the discussion is for other people.
>> (See the related thread about private communication :)
>> 
>> You should send a private mail in any case because he may not notice this.
>I tried it, but no response till now.
>


I'm sorry, I seldom check the gmail account, now I checked and there is your 
msg. If somebody want to write me, please use jesusrmx at yahoo.com

Thanks.

Jesus Reyes A.  

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


Re: [Lazarus] DB aware components

2013-09-17 Thread Jesus Reyes A.
En Mon, 16 Sep 2013 04:12:31 -0500, Mattias Gaertner  
 escribió:




Maybe a result of Juha's change:
http://wiki.freepascal.org/Lazarus_1.2.0_release_notes#TComponentPropertyEditor_behavior_was_changed

Mattias


Strange, is this the way it works in Delphi? Why not invent something  
specifically for ActiveControl instead?


Jesus Reyes A.

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


Re: [Lazarus] Regressions in GTK2 interface ?

2013-05-13 Thread Jesus Reyes


--- El lun 13-may-13, Juha Manninen  escribió:

> De: Juha Manninen 
> Asunto: Re: [Lazarus] Regressions in GTK2 interface ?
> A: "Lazarus mailing list" 
> Fecha: lunes, 13 de mayo de 2013, 5:24
> On 5/13/13, Mattias Gaertner 
> wrote:
> > I can not get menu icons under Ubuntu, even if I want,
> which I don't.
> 
> Menu icons are good. Why would somebody not want them?
> 
> Anyway, it seems other GTK apps like Gimp respect a setting
> :
>   "Show icons in GTK menus"
> in KDE control center. Lazarus does not. Something is
> different.
> 
> Juha


Here, kubuntu 13.04 64bit, Lazarus show icons only when "Show icons in GTK 
buttons" is checked in "gtk applications style" (my translation from spanish), 
it ignores "Show icons in GTK menus" setting :D

Jesus Reyes A.

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


Re: [Lazarus] How to create a listbox that can be shifted

2013-04-24 Thread Jesus Reyes


--- El mié 24-abr-13, Jürgen Hestermann  escribió:

> Still I am wondering why nobody seems to miss a horizontal
> shift for TListBox and TStringGrid (especially because a
> slider is shown for TStringGrid but does not work). Are
> these bugs which nobody discovered since years? I can't
> believe it.
> 

Do you know if is there a bug report about it?, if not, please feel free to 
submit one (I'm talking about the TStringGrid).

Jesus Reyes A.

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


Re: [Lazarus] Combobox on Mac doesn't show any items

2013-04-18 Thread Jesus Reyes


--- El jue 18-abr-13, Mattias Gaertner  escribió:
[...]
> > I think i have found a bug in Carbon widget set with
> comboboxes.
> >
> > After a change from revision 40683 to 40684no items are
> any longer added
> > to a combobox in the carbon widget set. Please see the
> two
> > images, one showing 40683, the other 40684.
> >
> > http://imagebin.org/254480
> > http://imagebin.org/254481
> >
> > Should i create a bug report for this?
> 
> Same in all comboboxes of the IDE.
> I reverted the change.
> 
> Jesus committed it and tried to fix duplicates. What
> duplicates?
> 
> Mattias
> 

Quick reaction, reverting fixes the problem when compiling with FPC 2.6.2 but 
broke it for FPC trunk.

To not repeat myself please read my note in  
http://bugs.freepascal.org/view.php?id=24059  I have been a little busy and the 
fix for carbon was delayed because it seemed to me that it will be a better fix 
to handle this in LCL package using build macros, defining globally a 
conditional, HAS_INHERITED_INSERTITEM for example, if fpc version is less than 
2.7.1 (it is needed at least for Carbon and Qt (and possible gtk2 too according 
to issue 0024154)).

If that is not a viable solution, I can fix it the same way than for Qt.

Jesus Reyes A.

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


Re: [Lazarus] Lazarus doesn't rebuild LCL if I change some include file

2013-04-13 Thread Jesus Reyes


--- El sáb 13-abr-13, Bart  escribió:

> De: Bart 
> Asunto: [Lazarus] Lazarus doesn't rebuild LCL if I change some include file
> A: "Lazarus mailing list" 
> Fecha: sábado, 13 de abril de 2013, 10:34
> Hi,
> 
> Lazarus stopped to rebuild the LCL if I change an
> includefile (that
> belongs to the LCL).
> 
> Okay, that's not totally honest.
> I changed an LCL file to use an include file.
> If I change the main unitfile it rebuilds.
> If i change the include it doesn't.
> 
> (Took me a while to figure that out)
> 
> Is this expected behaviour, as in: you need to rebuild
> Lazarus so it
> recognizes the includefile-changes?

Is the include file part of the LCL package?, it seems the IDE monitors files 
that are included in the package, if it's not included, it's not monitored.

Jesus Reyes A.

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


Re: [Lazarus] OT: beginner question about best way to develop

2013-04-05 Thread Jesus Reyes


--- El vie 5-abr-13, Graeme Geldenhuys  escribió:

> De: Graeme Geldenhuys 
> On 2013-04-05 16:07, Lubos Pintes
> wrote:
> > svn diff >patch.txt
> > However, my test patch contains files I never touched,
> and I don't 
> > understand why.
> 
> New Lazarus revisions sometimes triggers rebuilding of
> translation files
> (the *.po files).
> 
> To fix your issue. Simply specify the exact file, in the
> 'svn diff'

> generate patch
> files off your local commits (with 'git format-patch
> origin/upstream').
>  The Lazarus wiki has more details on the Git mirror
> repositories and
> work-flows.

However, the translation maintainer has expressed many times before that it 
prefers full .po files instead of diffs.

Jesus Reyes A.

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


Re: [Lazarus] Maintainers: packages without description: please add them

2013-03-02 Thread Jesus Reyes


--- El vie 1-mar-13, Reinier Olislagers  escribió:

> 
> lazreportpdfexport
> Enables PDF export for lazreport (requires LazReport and
> PowerPDF)
> 
> lr_add_function
> ?
> Additional functions for lazreport (requires LazReport)
> 
> lr_codereport_pkg
> ?
> 
> lr_dialogdesign
> ?
> 
> lr_sqldb
> ?
> 
> lr_tdbf
> DBF database access component for lazreport (requires
> LazReport)
> 
> lr_zeosdb
> Zeos database access component for lazreport (requires
> LazReport)
> 

Updated description on LazReport addon packages in r40462

Jesus Reyes A.

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


Re: [Lazarus] LazReport Band.name patch

2013-02-24 Thread Jesus Reyes


--- El jue 21-feb-13, Giuliano Colla  escribió:

> 
> I've tested a different approach, i.e. not *setting* the
> Band name, but just *getting* Band name from BandView, (a
> Name property in TfrBand which just returns the name of the
> corresponding Bandview, i.e. View.Name). It doesn't produce
> side effects, because when the BandView name is set the
> corresponding Band object doesn't yet exist.
> 
> There are two solutions:
> 1) I send you the new patch.
> 2) We leave things as they are, but the examples and the
> documentation are modified to make it clear that
> TfrBand.Name is always empty, and that one must use
> TfrBand.View.Name to obtain a meaningful information.
> 
> You're the boss, so it's up to you to decide.
> 
> Giuliano
> 

Yes, please send the patch.

Jesus Reyes A.

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


Re: [Lazarus] LazReport Band.name patch

2013-02-02 Thread Jesus Reyes


--- El sáb 2-feb-13, Giuliano Colla  escribió:

> De: Giuliano Colla 
> Asunto: LazReport Band.name patch
> A: lazarus@lists.lazarus.freepascal.org
> Cc: "Jesus Reyes" 
> Fecha: sábado, 2 de febrero de 2013, 8:32
> While implementing an application
> which uses LazReport, trying to take advantage of
> OnBeginBand I discovered that Band.Name is never set and is
> left as an empty string.
> This can be annoying if you have more than one Band of the
> same type, so that Band.Typ is not enough to tell the right
> band.
> Here attached two patches which for me fixed the issue, one,
> an svn diff, for the svn version 2.4, and the other, a plain
> diff, for the current Lazarus release (1.0.4) version, i.e.
> 2.3.
> Maybe it can be done much better, but just in case...
> 
> Giuliano
> 
> 

Thanks, applied in trunk (r40127). It's too late for including in next release 
(1.0.6) will have to wait 1.0.8

Jesus Reyes A.

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


Re: [Lazarus] compiling PowerPDF on win32

2013-01-30 Thread Jesus Reyes


--- El mié 30-ene-13, silvioprog  escribió:

De: silvioprog 
Asunto: Re: [Lazarus] compiling PowerPDF on win32
A: "Lazarus mailing list" 
Fecha: miércoles, 30 de enero de 2013, 5:01

2013/1/30 Michael Van Canneyt 


On Wed, 30 Jan 2013, silvioprog wrote:


2013/1/30 Tobias Diekershoff 

      Dear list,

What exactly have you changed?, I took your code, put it in a new 'program' 
project (so no LCL dependency) added powerpdf requirement, compiled and it 
worked without changes?? PowerPDF has been always be able to work in 
console mode programs 
 :)
. Or perhaps console programs not always can be a cgi program? this I don't 
know.


Perfectly. IMHO, PowerPDF is well modeled, separated by layers. My changes uses 
pure FCL. :)


Interesting.



Do you think the basics could be included in the standard FPC distribution ?



Michael.
I don't know, a part of PowerPDF do not requires LCL a part it does, how good 
would it be splitting it? just because a part of it is supposed to work in the 
Lazarus IDE I prefer to have it in Lazarus rather than in FPC. It is not 
currently in Lazarus because, on contrary to the guys of FastReport, Inc. in 
the case of LazReport, the original author never replied to the petition to 
change PowerPDF licence to modified LGPL.
There are some things to be improved in PowerPDF:
. Native support to PNG images; (I'm working on this)

. Use a new version of PDF (at least 1.4);. FlateDecode support; (I'm studying 
this right now). Removes LCL dependences; (I'm studying this right now)

Great, FlatDecode is already supported though, looking forward your 
improvements.
I was thinking of creating a fork and work on it, but if these new changes can 
be implemented PowerPDF and distributed in FPC, I would be very happy. :)


Well, if you plan to work on PowerPDF and change it in a way that it would 
serve only to your purposes, you can do it of course, if not, why don't ask for 
permissions to work directly on the ccr repository?

Jesus Reyes A.

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


Re: [Lazarus] TStringGrid.AutoEdit and options

2013-01-27 Thread Jesus Reyes


--- El dom 27-ene-13, Martin  escribió:

> De: Martin 
> Asunto: Re: [Lazarus] TStringGrid.AutoEdit and options
> A: "Lazarus mailing list" 
> Fecha: domingo, 27 de enero de 2013, 5:54
> On 27/01/2013 11:50, Martin wrote:
> > TStringGrid has:
> > - property AutoEdit:Boolean
> > - Options eoGoEdit
> > - Options eoAlwaysShowEditor
> >
> > I figured some behavioural differences with the
> options.
> >
> > But I can set AutoEdit True/False nothing changes. What
> does it do? Or 
> > what Should it do?
> >
> >
> > Laz 1.1 SVN from 26th Jan / fpc 2.6.0 / Win Vista 32
> bit
> >
> 
> There also is a none public property FastEditing: Boolean
> 
> So there are 16 different settings. How to they all differ?

goEditing: makes the grid editable or not (some will say it's equivalent to a 
readonly property)

goAlwaysShowEditor: if the grid is editable as its name say it will make the 
editor always visible, no effect if the grid is not editable.

as for AutoEdit, normally if the grid is editable clicking a selected cell will 
popup the cell editor, that's for AutoEdit=true and is what delphi stringgrid 
does, if you set AutoEdit=false editor will not pop up on clicking a selected 
cell, I forgot the reason this was added but as the Lazarus stringgrid allows 
range selection on editable grids, this may help in this case.

Jesus Reyes A.

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


Re: [Lazarus] LazReport Images and Unicode

2013-01-16 Thread Jesus Reyes


--- El mié 16-ene-13, Jesus Reyes  escribió:

> There are at least two solutions, according to bug report 
> http://bugs.freepascal.org/view.php?id=15161 using Qt
> interface should work. The other solution is exporting pages
> as images with Image Exporter, that I can confirm it does
> ok, see LazReport/source/addons/imgexport/lr_extexp.lpk
> 

Forgot to say, the Image exporter has another html exporter (appear as "HTML 
(div-based)" on export list) that do include images and Chinese text

Jesus Reyes A.

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


Re: [Lazarus] LazReport Images and Unicode

2013-01-16 Thread Jesus Reyes


--- El lun 14-ene-13, Giuliano Colla  escribió:

> 2) Report printout shows the Image, but skips Chinese
> characters.
>

That's correct, TPostscriptCanvas do not support all unicode, Latin and 
Cyrillic should be fine though.
 
> 3) Pdf export shows the image, but replaces Chinese
> characters with question marks. I understand that PowerPdf
> doesn't support Unicode, but changing the font encoding from
> Unicode to Big5 doesn't help.

That's correct, PowerPdf is limited to Latin scripts.

> 
> 4) Html export shows the Chinese characters, but doesn't
> show the image.
> 

Yes, it doesn't export images. I think an option can be added to html exporter 
so it can export images too.

> 5) Text export shows the Chinese characters, but obviously
> doesn't show the image.

That's correct.

> 
> Is there a way to get a printout which properly reproduces
> the Report preview?
> 
> Can someone point me in the right direction?
> 
> Giuliano
>

There are at least two solutions, according to bug report 
http://bugs.freepascal.org/view.php?id=15161 using Qt interface should work. 
The other solution is exporting pages as images with Image Exporter, that I can 
confirm it does ok, see LazReport/source/addons/imgexport/lr_extexp.lpk

There is another possibility, for the future, time ago petr kristan made a 
CairoCanvas object that can be used instead of TPostscriptPrinterCanvas. After 
I fixed some things I made it work again but showing Chinese text and images 
was unsuccessful. It currently uses plain cairo to show text, I will try to 
improve it.

Jesus Reyes A.



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

2013-01-08 Thread Jesus Reyes


--- El lun 7-ene-13, Marcos Douglas  escribió:

> De: Marcos Douglas 
> Asunto: Re: [Lazarus] LazReport: printing on the next page, using stretch and 
> breaked band
> A: "Lazarus mailing list" 
> Fecha: lunes, 7 de enero de 2013, 16:04
> On Mon, Jan 7, 2013 at 6:25 PM, Jesus
> Reyes 
> wrote:
> >
> >
> > --- El lun 7-ene-13, Marcos Douglas 
> escribió:
> >>
> >> Jesus,
> >>
> >> Do you need more information or tests to finish
> this bug?
> >>
> >> Best regards,
> >> Marcos Douglas
> >>
> >
> > No, I'm in the process of testing the fix, will commit
> it soon.
> >
> > Jesus Reyes A.
> 
> Ok, thank you.
> 
> Marcos Douglas
> 

Fix commited, please test.

Jesus Reyes A.

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

2013-01-07 Thread Jesus Reyes


--- El lun 7-ene-13, Marcos Douglas  escribió:
> 
> Jesus,
> 
> Do you need more information or tests to finish this bug?
> 
> Best regards,
> Marcos Douglas
> 

No, I'm in the process of testing the fix, will commit it soon.

Jesus Reyes A.

--
___
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-15 Thread Jesus Reyes


--- El sáb 15-dic-12, Marcos Douglas  escribió:

> De: Marcos Douglas 
> Asunto: Re: [Lazarus] LazReport: printing on the next page, using stretch and 
> breaked band
> A: "Waldo Kitty" , "Lazarus mailing list" 
> 
> Fecha: sábado, 15 de diciembre de 2012, 9:25
> On Sat, Dec 15, 2012 at 1:09 AM,
> waldo kitty 
> wrote:
> > 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 ;)
> 
> You probably right... well, I need this, urgently... but
> you're right. Thanks.
> 
> Marcos Douglas
> 

There is no sample attached to bug report, please give something that you can 
reproduce yourself.

Jesus Reyes A.

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


Re: [Lazarus] TlrCodeReport failed to compile (win7 64 bit)

2012-12-07 Thread Jesus Reyes


--- El jue 6-dic-12, Alejandro Gonzalo  escribió:

> De: Alejandro Gonzalo 
> Asunto: [Lazarus] TlrCodeReport failed to compile (win7 64 bit)
> A: "Lazarus mailing list" 
> Fecha: jueves, 6 de diciembre de 2012, 18:18
> Is there a fix?  Is Laz 1.06 being
> released soon?  thanks.
>  
> A. G.
> 

The problem is lrcodereport using some properties not merged on previous 
releases. The changes on revisions 36694 and 36995 should fix this problem. 
This revisions are on the queue for merging in version 1.0.6, which I don't 
know with enough precision when it will be released. 

Note this changes are still not tested by me against Lazarus fixes. Will do 
ASAP, if you like to know when they are tested, Take a look at 
http://wiki.lazarus.freepascal.org/Lazarus_1.0_fixes_branch I will update it 
when done.

Jesus Reyes A.


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


Re: [Lazarus] Checkbox value in TDrawGrid

2012-10-19 Thread Jesus Reyes


--- El vie 19-oct-12, Leonardo M. Ramé  escribió:

> De: Leonardo M. Ramé 
> Asunto: [Lazarus] Checkbox value in TDrawGrid
> A: "Lazarus mailing list" 
> Fecha: viernes, 19 de octubre de 2012, 15:08
> Hi, is there a method to set/get the
> value of a checkbox in a TDrawGrid,
> when the column's buttonStyle was declared as
> cbsCheclBoxColumn?.
> 

Since r39142 DrawGrid have the events OnGetCheckboxState and OnSetCheckboxState 
previously available only in StringGrid.


Jesus Reyes A.



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


Re: [Lazarus] Patch for Grids.pas - Adds soVisibleOnly to SaveOptions

2012-10-16 Thread Jesus Reyes

>- adds soVisibleOnly to SaveOptions
>- with soVisibleOnly saves only visible columns
-> without (default) it works as before


I think using some SaveOptions options only for XML and some only for CSV might 
cause confusion.

The problem with SaveOptions is that it's supposed to apply only to 
Save/LoadFromFile (I wish to have named SaveToCSVFile as ExportToCSVFile 
instead) visibility on CustomColumns should be preserved on saving/loading 
to/from a XML file (that by the way is missing), but it's ok to export only 
visble columns to  CSV file. So what about adding yet another parameter to CSV 
functions?,

Even, if more features continue to be added to CSV support, it may be better to 
move the whole CSV support out of grids unit and create a component or 
something.

What you think.

Jesus Reyes A.

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


Re: [Lazarus] Synchronize scrollposition of two stringgrids

2012-10-15 Thread Jesus Reyes
>I have two stringgrids with exactly the same columns, basically something like 
>Excel autofilter.

>Does anybody have an idea how to change the scrollposition of a stringgrid 
>depending on the scrollpos of the other?



One way would be using OnSelection event and try something like:

sg1.LeftCol := sg2.LeftCol;
sg1.TopRow:=sg2.TopRow;

sg1 will be synchronized to sg2.

That would give you row/col size granularity. For pixel granularity, without 
messing with grids internals, could be done using GetScrollInfo for both 
scrollbars on source grid and using SetScrollInfo for both scrollbars on target 
grid. Not tried but should work :)

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


Re: [Lazarus] Enc: LazReport layout problems

2012-04-01 Thread Jesus Reyes


--- El sáb 31-mar-12, Daniel Simoes de Ameida  
escribió:

De: Daniel Simoes de Ameida 
Asunto: [Lazarus] Enc: LazReport layout problems
A: "Lazarus mailing list" 
Fecha: sábado, 31 de marzo de 2012, 11:41


Hi All,

Is any body else running in troubles with LazReport ?

We use LazReport to Print a Brazilian Document for Bank collection. I'm not 
sure on what revision (I'm investigating), but something has broken the Layout 
of documents...

Please see this image

Apparently,
 LazReport is not reading X,Y coordinates correctly..

The LazReport file of this Report can be found on this link

I appreciate any hints.
 []s Daniel

Conheça o Projeto ACBr - Automaçao Comercial Brasil
DJSystem a Loja Patrocinadora do ACBr
  

Since r36041 all stretchable objects that have stretched property enabled are 
unconditionally stretched (fix for issue 20988) and that included line objects 
which were always implicitly stretched, however line objects didn't have a 
published stretched property and they were always treated as if the stretched 
flag was set. That produced the extra long vertical lines seen in the screen 
shot.
There are two ways to fix the problem, either turn off stretched property on 
master data band, so all stretchable objects are not stretched, or update to 
r36497 or newer and set stretched=false on all line objects, this is easy to do 
by using the bonus feature "Select same class objects". It works by doing this:
-Select one line object -Right click the selection-Click the
"Select same class objects"
item
once all line objects are selected 
-right click on selection and uncheck "stretched" propertyor-press F11 and 
change stretched property to false.
Jesus Reyes A.--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How do use sockets?

2011-11-28 Thread Jesus Reyes


--- El dom 27-nov-11, Graeme Geldenhuys  escribió:

> > Is this the right SVN paths?
> > https://tiopf.svn.sourceforge.net/svnroot/tiopf/tiOPF2/Trunk 
> (source)
> 
> This is the correct path. The demo I was talking about is
> also under this URI.
> 
> The documentation describing most of Demo 18 can be found
> below. It
> was a presentation Peter H. gave in 2008 in Australia.
> 
>   
> http://tiopf.sourceforge.net/Doc/PersistingObjectsAndRelationships/SimpleCollection/index.shtml
> 
> 

The tiOPF Quick Start at 
http://tiopf.sourceforge.net/Doc/QuickStart/index.shtml is half written, do you 
have the missing part? or do you have some Lazarus oriented documentation that 
helps to learn how to use the framework?

A tutorial similar to the presentation in SimpleCollection link but oriented to 
Lazarus would be great.

Jesus Reyes A.

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


Re: [Lazarus] no lazutils in 0.9.30.2

2011-11-15 Thread Jesus Reyes


--- El mar 15-nov-11, Felipe Monteiro de Carvalho 
 escribió:

> De: Felipe Monteiro de Carvalho 
> Asunto: Re: [Lazarus] no lazutils in 0.9.30.2
> A: "Lazarus mailing list" 
> Fecha: martes, 15 de noviembre de 2011, 7:08
> In Lazarus 0.9.30.2 or inferior you
> can use the UTF-8 routines from
> the unit LCLProc which is inside the LCL.
> 
> In 0.9.31+ they are all still there, but are now call
> LazUtils to do
> the real work, so code which uses LCLProc is compatible
> with a wide
> range of Lazarus versions.
> 
> -- 
> Felipe Monteiro de Carvalho
> 

Something related to Lasutils, it seems that all windows snaphots that use 
0.9.31 and fpc 2.5.1 are broken since r33116 or r32982, this problem it seems, 
not fixed by r33538 (bug report http://bugs.freepascal.org/view.php?id=20668).

The problem is that Wide2AnsiMove should convert from widestring to ansi, but 
the conversion is conditionated by PASWSTRING_SUPPORT_NONUTF8_ANSISTRING which 
is undefined by default, as result, in UTF8ToAnsi that does a 
UTF8->UTF16->UTF8->Ansi doesn't work as the last step is not done :D. 

As result UTF8toAnsi does only UTF8->UTF16->UTF8, and this function is used by 
lazarus to convert a UTF8 path to ansi in order to save configuration files, in 
localized windows version like spanish where the config path is like: 
c:\Documents and Settings\user\Configuración local\Datos de programa\lazarus it 
fails as it tries the UTF8 version of the path. As said, this occurs for 2.5.1 
and 0.9.31.

BTW, what strange conversion UTF8->UTF16->UTF8->Ansi too many steps.

Jesus Reyes A.





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


Re: [Lazarus] TStringGrid.AutoSizeColumns leads to temporary ghost columns

2011-10-23 Thread Jesus Reyes


--- El dom 23-oct-11, Jürgen Hestermann  escribió:

> De: Jürgen Hestermann 
> Asunto: Re: [Lazarus] TStringGrid.AutoSizeColumns leads to temporary ghost 
> columns
> A: "Lazarus mailing list" 
> Fecha: domingo, 23 de octubre de 2011, 9:54
> cobines schrieb:
> > If you have a way to reproduce you should create a
> small project and
> > make a report to the bugtracker.
> >   
> I have narrowed it down as far as I could now.
> 
> My form contains a simple TStringGrid.
> ColCount is 3 and RowCount is 1 on startup (in object
> inspector).
> On Click the procedure "Start" is launched:

[snip]

> 
> Anybody else who can reproduce it with the code above?
> 
> 

fixed in r33058
please test.

Jesus Reyes A.

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


Re: [Lazarus] Should StringGrid1.Clear clear the fixed rows / columns?

2011-08-01 Thread Jesus Reyes


--- El lun 1-ago-11, John Repucci  escribió:

De: John Repucci 
Asunto: Re: [Lazarus] Should StringGrid1.Clear clear the fixed rows / columns?
A: lazarus@lists.lazarus.freepascal.org
Fecha: lunes, 1 de agosto de 2011, 16:14


From: Jesus Reyes 





... Delphi grids do not implement a clear method :D so this is not a 
compatibility problem, or is it?.


The add-on component VirtualStringView/Tree does implment a clear method that 
does not delete the headers.
Lazarus grids never meant to be compatible with virtualstringview/tree.


I can envision cases where I would like a completely empty SG and cases where I 
would like the fixed rows / columns to survive.

ex 1: Instead of creating a 2nd SG with a completely different header structure 
and purpose, wipe the original, add in the desired new fixed cells and start to 
fill it.
you can do this after grid.clear, or simply grid.rowcount := grid.fixedrows and 
then change the columns titles
ex: 2: (my current case...) Load in data, process it and then I need to purge 
the data, so I clear the SG and load in more data.
you can do this with grid.rowcount := grid.fixedrows (which is btw unsupported 
in delphi AFAIK), no need to use clear method

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


Re: [Lazarus] Should StringGrid1.Clear clear the fixed rows / columns?

2011-08-01 Thread Jesus Reyes


--- El lun 1-ago-11, Alexander Klenin  escribió:

> De: Alexander Klenin 
> Asunto: Re: [Lazarus] Should StringGrid1.Clear clear the fixed rows / columns?
> A: "Lazarus mailing list" 
> Fecha: lunes, 1 de agosto de 2011, 2:25
> On Mon, Aug 1, 2011 at 18:13, Graeme
> Geldenhuys 
> wrote:
> > On 08/01/2011 03:10 AM, John Repucci wrote:
> >> I have a fixed row in my SG with the titles for
> the columns, but when I
> >> do a SG.clear, the fixed rows are deleted.
> >
> > I have raised that issue too. I believe what you have
> to do, is set the
> > RowCount property to equal FixedRowCount - instead of
> calling Clear.
> >
> > That kind of defeats the purpose of Clear, but hey
> it's Delphi
> > compatible, so who cares. ;-)
> >

I do care :).

Well I don't in this case as Delphi grids do not implement a clear method :D so 
this is not a compatibility problem, or is it?.

IIRC the problem you had with clear method is that after the clear you wanted 
the grid remembered your (fixed)cols/(fixed)rows layout. That was not planned 
for a cleared grid, because AFAIK, clear means dump everything, for example for 
a listbox means remove the items, not empty the items, then why should it 
remember it? however it seemed a good to have feature and I implemented it.

However, now you seem to suggest that calling clear should only mean clear the 
non fixed cells?, in this situation, if somebody has a grid with 2 fixed rows 
and 1 fixed column which was setup at design time with right titles, what 
should happen on grid.clear?, delete columns or rows? or just the non-fixed 
cells? At least I never seen a grid with just fixed cols/rows and no normal 
cells.

That is why "clear" is supposed to remove cols/rows and "clean" only cell 
content. Before anything, Delphi grids do not implement (that I know) a clean 
method, so this is not (or, not everything is) a compatibility problem :D

> 
> Adding optional parameter "AClearFixed: Boolean = true" to
> Clear
> may help without comprimising compatibility

That would solve a nonexistent problem, no need to implement something to 
remedy it.

> 
> -- 
> Alexander S. Klenin
> 

Jesus Reyes A.

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


Re: [Lazarus] TStringGrid - ColResize on FixedCols (or Freeze Pane on ordinary columns)

2011-07-02 Thread Jesus Reyes


--- El vie 1-jul-11, Alexsander Rosa  escribió:

De: Alexsander Rosa 
Asunto: Re: [Lazarus] TStringGrid - ColResize on FixedCols (or Freeze Pane on 
ordinary columns)
A: "Lazarus mailing list" 
Fecha: viernes, 1 de julio de 2011, 7:44

"Freeze pane" is an expression from Excel spreadsheet: you "freeze" a few 
columns (usually with identification data) and scroll the rest. In TStringGrid 
it's done with FixedCols: they remain fixed (frozen) and the rest of the 
columns can be scrolled. This part is fine, the "freeze pane" feature is there. 
However, in TStringGrid the fixed columns can't be manually resized even when 
you set goColumnResize to true. I wish there were an option like 
"goFixedColsResize" or something.



Implemented goFixedColSizing in r31521, please test.
Jesus Reyes A.--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compile and Build menu entries, Run- or Project-menu?

2011-06-23 Thread Jesus Reyes


--- El jue 23-jun-11, Hans-Peter Diettrich  escribió:
> > I like the new order because I never use "Build"
> myself. I hit "Run" and the project is built automatically.
> > Why would someone want to build a project without
> running it?
> 
> A clean build can fix errors caused by malfunction in the
> automatisms.
> 

I frequently crosscompile from linux 64 to win32 x86, even if I want to run it, 
it wouldn't work.

Jesus Reyes A.

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


Re: [Lazarus] Compile and Build menu entries, Run- or Project-menu?

2011-06-23 Thread Jesus Reyes


--- El jue 23-jun-11, zeljko  escribió:

De: zeljko 
Asunto: Re: [Lazarus] Compile and Build menu entries, Run- or Project-menu?
A: "Lazarus mailing list" 
Fecha: jueves, 23 de junio de 2011, 11:02



#yiv1518935690 p, #yiv1518935690 li {white-space:pre-wrap;}
 
On Thursday 23 of June 2011 16:21:34 michael.vancann...@wisa.be wrote:
> On Thu, 23 Jun 2011, Juha Manninen wrote:
> > Hi
> > 
> > I knew I would get in trouble when I started to change the menu
> > structure. In some places the structure was clearly wrong but in some
> > others it is a matter of opinion and habbit.
> > 
> > This one is a matter of opinion and habbit.
> > I like the new order because I never use "Build" myself. I hit "Run" and
> > the project is built automatically.
> > Why would someone want to build a project without running it? Running is
> > the ultimate goal, right?
> 
> Huh ?
> 
> I do build all the time, to check whether my code compiles.
> It is very seldom that I do run.
> Depending on the project, I even never hit run.


Me neither ... I use Run rarely .. prefer debugging from console :)
So must used by me is Compile (I use Build when I touch some of my packages or 
changed lazarus production version).


zeljko


For me "Run" is the menu where "Compile" commands are. Menus are most of time 
accessed by mouse, and for that "Run" commands on main toolbar are accessed 
quickly, but there are no "Compile" commands on toolbar (hint). 

Given that many people see the "Run" menu where "Compile" commands are, I 
wonder if we should rename it to "Compile", or even doing some justice to 
"Compile & Run" ;)

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


Re: [Lazarus] TDBGrid vertical scrolling for sequenced datasets

2011-06-22 Thread Jesus Reyes


--- El mié 22-jun-11, Max Vlasov  escribió:

As I suppose looking at the sources, this is because TDBGrid does many things 
itself and don't want some of TCustomGrid functionality working. Neverthelesss 
sometimes TCustomGrid.UpdateScrollbarPos is called where ScrollBarPosition uses 
calculated zero position regardless of the TDBGrid own state. 



Should I feel a report?

Thanks

Max Vlasov


Yes please.
Jesus Reyes A.--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compile and Build menu entries, Run- or Project-menu?

2011-06-20 Thread Jesus Reyes


--- El lun 20-jun-11, michael.vancann...@wisa.be > 
> On Mon, 20 Jun 2011, Mattias Gaertner wrote:
> > On Mon, 20 Jun 2011 13:45:08 +0200 (CEST) michael.vancann...@wisa.be wrote:
> >> On Mon, 20 Jun 2011, Juha Manninen wrote:
> >>
> >>> I changed the Run menu item order based on
> issue:
> >>> 19580: The run menu does not have run as first
> entry
> >>>
> >>> I would need your opinions about if Compile
> and Build menu entries should be
> >>> moved from Run- to Project-menu.
> >>
> >> No, please keep them in 'Run'. This is delphi compatible.

IMO

Then we need to define clearly what is our goal, are we (by default) trying to 
replicate delphi menu layout?, if yes then we can talk about "compatibility" 
and lets change the whole layout once for all so we can start getting used to 
it, if not, then this is non sense. 

If the argument is better functionality then go for it, but in absence of 
better arguments I prefer to not move the menu layout until some mechanism for 
personalization is invented and integrated by default.

Jesus Reyes A.

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


Re: [Lazarus] LazReport localiation issue

2011-06-11 Thread Jesus Reyes


--- El sáb 11-jun-11, Igor Paliychuk  escribió:

De: Igor Paliychuk 
Asunto: [Lazarus] LazReport localiation issue
A: "Lazarus mailing list" 
Fecha: sábado, 11 de junio de 2011, 9:35

I'm translating LazReport and got next issue: some paper names include ? 
symbols. Screenshot attached. They are also present in english version

This seems a problem in Printer4Lazarus package it uses ansi printer functions 
to return the printer list. I will take a look.

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


Re: [Lazarus] Sorting StringGrid by column click

2011-05-13 Thread Jesus Reyes


--- El vie 13-may-11, Alexander Klenin  escribió:

> De: Alexander Klenin 
> Asunto: Re: [Lazarus] Sorting StringGrid by column click
> A: "Lazarus mailing list" 
> Fecha: viernes, 13 de mayo de 2011, 8:43
> On Sat, May 14, 2011 at 00:26, Juha
> (gmail) 
> wrote:
> > Which way is better? I think the Descending-sort code
> is always identical:
> >    if SortOrder=soDescending then
> >      result:=-result;
> > and it could be better if users don't need to worry
> about it.
> 
> Of course.
> 

I think if the user don't need to worry then the built-in string ascending 
sorting should be fine, in all other cases, i.e. custom sorting, the user needs 
to take care of doing it correctly, that includes planing the sort order.

Jesus Reyes A.


> 

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


Re: [Lazarus] Sorting StringGrid by column click

2011-05-13 Thread Jesus Reyes


--- El vie 13-may-11, Juha (gmail)  escribió:

> 
> And now I realized the result could be negated based on
> SortOrder after 
> calling OnCompareCells instead of letting the user take
> care of it, like this:
> 
> function TCustomGrid.DoCompareCells(Acol, ARow, Bcol, BRow:
> Integer): Integer;
> begin
>   result := 0;
>   if Assigned(OnCompareCells) then begin
>     OnCompareCells(Self, ACol, ARow, BCol, BRow,
> FSortOrder, Result);
>     if SortOrder=soDescending then
>       result:=-result;
>   end;
> end;
> 
> Which way is better? I think the Descending-sort code is
> always identical:
>     if SortOrder=soDescending then
>       result:=-result;
> and it could be better if users don't need to worry about
> it.
> 
> Juha


At first sight it seems to be a good idea however by doing this, we couldn't 
say the grid support "custom" sorting but "limited custom" sorting 
capabilities, because it's based on the interpretation of the SortOrder 
property. 

Because how would one sort multiple columns with different Sorting orders, for 
example one column sorting alphabetically in ascending order while at the same 
time another column, say a rate column, in descending order, the same for 
dates, numbers, etc.

Jesus Reyes A.

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


Re: [Lazarus] Sorting StringGrid by column click

2011-05-13 Thread Jesus Reyes


--- El vie 13-may-11, Juha (gmail)  escribió:

> De: Juha (gmail) 
> Asunto: Re: [Lazarus] Sorting StringGrid by column click
> A: "Lazarus mailing list" 
> Fecha: viernes, 13 de mayo de 2011, 5:46
> Jesus Reyes kirjoitti torstai, 12.
> toukokuuta 2011 22:33:50:
> > Just let's not forget that this is a generic *string*
> grid, why users
> > should expect it to sort numbers when the grid is
> specifically made to
> > hold strings?
> 
> Yes. If some columns could be defined to hold numbers and
> then sorted 
> accordingly, should we implement validity and integrity
> checks, too? We would 
> basically create a database.
> 
> 
> > Appart from strings, the grid already supports Custom
> Sorting, so it can
> > sort any way the user wants, even numbers. Just write
> an handler for
> > OnCompareCells, this is even documented:
> > http://wiki.lazarus.freepascal.org/Grids_Reference_Page#Sorting_Columns_or
> > _Rows
> 
> Yes and Custom Sorting can be used also when automatic
> column sorting is 
> enabled through ColumnClickSorts property.
> I realized SortOrder support for custom sorting is now
> important because 
> column clicking automatically switches SortOrder. I added
> the parameter to 
> TOnCompareCells. It breaks old code but the fix is easy and
> there is no Delphi 
> compat issue because Delphi doesn't have such event.
> 

I'm sorry this patch must be reverted, there is no reason to send SortOrder as 
parameter when SortOrder is a grid's public property.

And as you said it unnecessarily breaks code, for example semaphore grid which 
is included with Lazarus which by the way has exteneded sorting capabilities.

> I will return to Alexander's ideas of sort images later.
> The current code 
> however is usable in every use case, including numeric
> custom sort and also 
> user defined sort glyps (by not enabling
> ColumnClickSorts).

I'm sorry I still have to review the code been too busy lately, but I was 
thinking that maybe we don't need default icons for ordering direction, first 
we need to check if the lcl do not use some similar resources, if it doesn't, I 
think as a default we could just draw it ourselves.

> 
> Juha
> 

Jesus Reyes A.

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


Re: [Lazarus] Sorting StringGrid by column click

2011-05-12 Thread Jesus Reyes


--- El jue 12-may-11, Alexander Klenin  escribió:

> De: Alexander Klenin 
> Asunto: Re: [Lazarus] Sorting StringGrid by column click
> A: "Lazarus mailing list" 
> Fecha: jueves, 12 de mayo de 2011, 7:45
> On Thu, May 12, 2011 at 23:37,
> Hans-Peter Diettrich
> 
> wrote:
> > Alexander Klenin schrieb:
> >
> >> BTW, I agree with the commenter in Mantis who said
> that sorting type
> >> is a required
> >> requisite. Sorting numeric columns as strings is
> not merely useless, but
> >> subtly
> >> dangerous, since it may deceive user with
> incorrect results.
> >
> > A CustomSort method would be the way to go.
> >
> 
> That is true (although, of course, it should be an event,
> not method),
> but at least numeric sort should IMHO be supported by
> default,
> since otherwise there is a high probability of user
> confusion.
> 
> -- 
> Alexander S. Klenin

Just let's not forget that this is a generic *string* grid, why users should 
expect it to sort numbers when the grid is specifically made to hold strings?

Appart from strings, the grid already supports Custom Sorting, so it can sort 
any way the user wants, even numbers. Just write an handler for OnCompareCells, 
this is even documented: 
http://wiki.lazarus.freepascal.org/Grids_Reference_Page#Sorting_Columns_or_Rows

Jesus Reyes A.

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


Re: [Lazarus] The TDefaulComponentEditor again

2011-03-22 Thread Jesus Reyes


--- El mar 22-mar-11, Jesus Reyes  escribió:
> 
> I forgot:
> 
> Lazarus 0.9.31 r29983M FPC 2.5.1 x86_64-linux-gtk 2
> 
> Jesus Reyes A.
> 

A little update, r29981 works fine while r29982 and r29983 not.

Jeus Reyes A.


  

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


Re: [Lazarus] The TDefaulComponentEditor again

2011-03-22 Thread Jesus Reyes


--- El mar 22-mar-11, Jesus Reyes  escribió:

> De: Jesus Reyes 
> Asunto: Re: [Lazarus] The TDefaulComponentEditor again
> A: "Lazarus mailing list" 
> Fecha: martes, 22 de marzo de 2011, 14:34
> 
> 

I forgot:

Lazarus 0.9.31 r29983M FPC 2.5.1 x86_64-linux-gtk 2

Jesus Reyes A.


  

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


Re: [Lazarus] The TDefaulComponentEditor again

2011-03-22 Thread Jesus Reyes


--- El mar 22-mar-11, silvioprog  escribió:

> De: silvioprog 
> Asunto: Re: [Lazarus] The TDefaulComponentEditor again
> A: "Lazarus mailing list" 
> Fecha: martes, 22 de marzo de 2011, 13:05
> 2011/3/22 Mattias Gaertner :
> > What error message do you see in the message window,
> which is normally
> > below the source editor?
> 
> Please, see here:
> 
> http://imagebin.org/144356
> 
> > Mattias
> 
> Thx.
> 


seems the same, here while creating a OnKeyDown handler for a form:


 TOICustomPropertyGrid.DoCallEdit for TMethodPropertyEditor 
Edit=True  
TEventsCodeTool.PublishedMethodExists method not found FormKeyDown  
   

Breakpoint 1, fpc_raiseexception (OBJ=0x7fffebf4a440, ANADDR=0xae6ce2, 
AFRAME=0x7fffbfd0) at ../inc/except.inc:195
195   fpc_Raiseexception:=nil;  
  
(gdb) bt
  
#0  fpc_raiseexception (OBJ=0x7fffebf4a440, ANADDR=0xae6ce2, 
AFRAME=0x7fffbfd0) at ../inc/except.inc:195  
#1  0x00ae6cf8 in RAISEEXCEPTIONINSTANCE (this=0x7fffed8debd0, 
THEEXCEPTION=0x7fffebf4a440, CLEARNICEPOS=true)
at customcodetool.pas:  
  
#2  0x00ae6d59 in RAISEEXCEPTIONCLASS (this=0x7fffed8debd0, 
AMESSAGE=0x7fffed866950 'Clase TEventsCodeTool no encontrada', 
EXCEPTIONCLASS=0x1bc7800, CLEARNICEPOS=true) at customcodetool.pas:2230 
   
#3  0x00ae199d in RAISEEXCEPTION (this=0x7fffed8debd0, 
AMESSAGE=0x7fffed866950 'Clase TEventsCodeTool no encontrada', CLEARNICEPOS=
true) at customcodetool.pas:423 
   
#4  0x00ae1a3e in RAISEEXCEPTIONFMT (this=0x7fffed8debd0, 
AMESSAGE=0x7fffeda0cfd0 'Clase %s no encontrada', ARGS=..., highARGS=0,  
CLEARNICEPOS=true) at customcodetool.pas:429
   
#5  0x00b4b6be in RAISECLASSNOTFOUND (parentfp=0x7fffc140) at 
pascalreadertool.pas:1574
#6  0x00b4b672 in FINDCLASSNODEININTERFACE (this=0x7fffed8debd0, 
ACLASSNAME=0x7fffebf4a410 'TEventsCodeTool', IGNOREFORWARDS=true, 
IGNORENONFORWARDS=false, ERRORONNOTFOUND=true) at pascalreadertool.pas:1591 
   
#7  0x00ab0d6d in CREATEMETHOD (this=0x7fffed8debd0, 
ACLASSNAME=0x7fffebf4a3d0 'TfrmMain', AMETHODNAME=0x7fffebf4a390 'FormKeyDown', 
ATYPEINFO=0x18a0c88, APROPERTYUNITNAME=0x7fffebf4a350 'unitmain', 
APROPERTYPATH=0x7fffec8c4a90 'TfrmMain.OnKeyDown', SOURCECHANGECACHE=  
0x77febcc0, USETYPEINFOFORPARAMETERS=false, SECTION=PCSPUBLISHED, 
CALLANCESTORMETHOD=0x0) at eventcodetool.pas:795   
#8  0x00aa31e3 in CREATEPUBLISHEDMETHOD (this=0x77ff21e0, 
CODE=0x7fffecdd4680, ACLASSNAME=0x7fffebf4a3d0 'TfrmMain', 
NEWMETHODNAME=0x7fffebf4a390 'FormKeyDown', ATYPEINFO=0x18a0c88, 
USETYPEINFOFORPARAMETERS=false, APROPERTYUNITNAME=  
0x7fffebf4a350 'unitmain', APROPERTYPATH=0x7fffec8c4a90 
'TfrmMain.OnKeyDown', CALLANCESTORMETHOD=0x0) at codetoolmanager.pas:3344   
 
#9  0x006ef73d in ONPROPHOOKCREATEMETHOD (this=0x70cc3cc0, 
AMETHODNAME=..., ATYPEINFO=0x18a0c88, APERSISTENT=0x7fffed8d0df0, 
APROPERTYPATH=0x7fffec8c4a90 'TfrmMain.OnKeyDown') at main.pp:17242 
 
#10 0x00a742d3 in CREATEMETHOD (this=0x7fffed89dae0, NAME=..., 
ATYPEINFO=0x18a0c88, APERSISTENT=0x7fffed8d0df0, APROPERTYPATH=   
0x7fffec8c4a90 'TfrmMain.OnKeyDown') at propedits.pp:5099   
 
#11 0x00a70eaa in SETVALUE (this=0x7fffec8b6140, 
NEWVALUE=0x7fffec822790 'FormKeyDown') at propedits.pp:4047 

#12 0x00a6ff01 in EDIT (this=0x7fffec8b6140) at propedits.pp:3845   
 
#13 0x00a2b998 in DOCALLEDIT (this=0x7fffeda86a50, EDIT=OIQEEDIT) at 
objectinspector.pp:1349
#14 0x00a2c187 in VALUEBUTTONCLICK (this=0x7fffeda86a50, 
SENDER=0x7fffeda88230) at objectinspector.pp:1483
#15 0x008262c1 in CLICK (this=0x7fffeda88230) at 
include/control.inc:2286


Jesus Reyes A.


  

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


Re: [Lazarus] the new menu "source"

2011-03-16 Thread Jesus Reyes


--- El mié 16-mar-11, Juha Manninen  escribió:

> De: Juha Manninen 
> Asunto: Re: [Lazarus] the new menu "source"
> A: "Lazarus mailing list" 
> Fecha: miércoles, 16 de marzo de 2011, 4:56
> Martin kirjoitti lauantai 12
> maaliskuu 2011 03:06:48:
> > I'd still say indent should go back, but not a big
> issue.
> 
> I moved items in main menu some more.
> I also added Source sub-menu to the editor's popup menu and
> reorganized the 
> items as in main menu. IMO It is quite good now.
> 
> Delphi 2009 has about the same number of menu items as
> Lazarus now.
> The biggest difference is now the Source menu which Delphi
> doesn't have.
> Source menu is implemented by some other IDEs and was
> suggested for Lazarus by 
> Mattias. It seems to be a useful menu, although often it is
> difficult to tell if 
> an item belongs to Edit, Source or Refactor menu.

Having "source" and "refactor" menus is IMO too much, why not insert Refactor 
menu as a submenu of Source menu.

Taking a look at the sub-menus refactor menu offer, most useful actions are the 
first three, which can be invoked by shortcut (and that is probably what 
everybody does while editing the code). So why it needs such prominent place in 
Main menu?

Another drawback is that refactor translates to refactorización in spanish, too 
long word and when you don't have a wide monitor or simply don't want IDE main 
form maximized, every pixel counts.

> 
> Eclipse has Source menu but otherwise I would not follow
> many or their 
> inventions. For example they have Run -> External Tools.
> It is logical somehow 
> but not intuitive. It takes time to find it.
> Then they have Window -> Preferences. Why Window?
> Some of their GUI design looks odd and shows it is made by
> different people 
> with different ideas. That is a problem with any open
> source project of course.
> 

Jesus Reyes A.


  

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


Re: [Lazarus] Reading result of a Firebird stored-procedure

2011-03-07 Thread Jesus Reyes


--- El lun 7-mar-11, Koenraad Lelong  escribió:

> De: Koenraad Lelong 
> Asunto: [Lazarus] Reading result of a Firebird stored-procedure
> A: "Lazarus mailing list" 
> Fecha: lunes, 7 de marzo de 2011, 10:24
> Hi,
> 
> I have a stored-procedure in Firebird, to generate a
> primary key :
> CREATE PROCEDURE GEN_STA_NR
> RETURNS (
>     STA_NR Integer )
> AS
> begin
>  STA_NR=gen_id(StaffelNr_GEN, 1);
> end^
> 
> How do I get the result ?

beside to the answers you already obtained, it seems in order a stored 
procedure return something you must call SUSPEND for each record.

Jesus Reyes A.


  

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


Re: [Lazarus] LazReport troubles

2010-12-08 Thread Jesus Reyes


--- El mar 7-dic-10, Alexander du Plessis  escribió:

De: Alexander du Plessis 
Asunto: [Lazarus] LazReport troubles
A: "Lazarus Mailing list" 
Fecha: martes, 7 de diciembre de 2010, 23:53

I recently upgraded my Lazarus to 27041.  I have an application using 
LazReport.  The application worked fine before the upgrade and showed the 
Preview of the report to perfection.  Since the upgrade, It only flashes the 
message box that it is preparing the report and no Preview is forthcoming, It 
just does not exist or is completely invisible.  When using the report 
designer, and one calls the preview via the designer, the report preview is 
visible with data etc.  I run Lazarus/FPC on a XP box.
27041it is already old, and there have been many changes in lazreport since 
then

My problem is thus: When calling the report preview from code, I get nothing. 
When calling the preview via the designer it is visible and correct.

strange...
Would my problems magically disappear  if I upgrade to a later svn version or 
is there other problems related to this matter?


just try one snapshot on a different Lazarus directory, if problem persist and 
you want to be sure your project runs fine in the upcoming 0.9.30 release, 
please submit a bug report with information how to reproduce the problem.
Kind regards.

Alex du Plessis 

Jesus Reyes A.



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


  1   2   >