[Lazarus] taborder not respected
In Delphi, when a user clicks on the tab of a tabsheet, its control with taborder 0 becomes the activecontrol. But with Laz it's the pagecontrol! I'm using Laz 1.02 with Win7 64 bit. A. F. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] assigning OnKeyPress at runtime
I am using Laz 1.04 for Win 7 64 bit. I get error msg: Error: Incompatible types: got "Pointer" expected "" this is the procedure in a unit Implemetation section that I want to use for OnKeyPress (I also put the prototype in the Interface section): Procedure Rolodex(Sender: TObject; var Key: char); var myTable : TAdsTable; // I'm using Advantage Database Systems begin myTable:=TAdsTable(Form1.dbNavigator1.DataSource.Dataset); if ((myTable.State = dsBrowse) AND (Ord(Key) IN [32..126]) AND (myTable.indexname<>'')) then myTable.FindNearest([upcase(Key)]); end; I loop through the form's components (Temp := myForm.Components[i];): if ((Temp is TDBGrid) AND (TDBGrid(Temp).Parent = myPage)) then TDBGrid(Temp).OnKeyPress := @Rolodex; //get error this line, also without the @ This is in a separate unit not associated with a form but I assume that does not matter (the unit is in the main form's Uses list in the Implementation section). What did I leave out ? Any help will be greatly appreciated! A. G. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] TlrCodeReport failed to compile (win7 64 bit)
Is there a fix? Is Laz 1.06 being released soon? thanks. A. G. -- ___ 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)
2.60, Laz 1.04 - Original Message - > From: Mattias Gaertner > To: lazarus@lists.lazarus.freepascal.org > Cc: > Sent: Thursday, December 6, 2012 4:30 PM > Subject: Re: [Lazarus] TlrCodeReport failed to compile (win7 64 bit) > > On Thu, 6 Dec 2012 16:18:05 -0800 (PST) > Alejandro Gonzalo wrote: > >> Is there a fix? Is Laz 1.06 being released soon? thanks. > > What fpc version fails? > > Mattias > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Right clicking buttons - no OnClick event?
Probably to avoid interference with any Menu defined for the Form. A. G. - Original Message - > From: "Crone, Thomas J." > To: "Lazarus mailing list [lazarus@lists.lazarus.freepascal.org]" > > Cc: > Sent: Saturday, December 15, 2012 12:01 PM > Subject: [Lazarus] Right clicking buttons - no OnClick event? > > I'm using Lazarus IDE v1.0.2 on Windows 7. > > When I right click a button, I don't get an OnClick Event? > > Is this expected? If so, why? > > Tom Crone > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] free download of Marco Cantu's "Essential Delphi" for newbies
The link on his website doesn't seem to work, use this instead: http://www.computer-books.us/delphi_3.php It's elementary, suitable for those new to Delphi/Lazarus. He also has a free "Essential Pascal" pdf book. A. G. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] File|Close (ctrl-F4) saves WITHOUT confirm ...
even when Tools|Options|Environment|Desktop|AutoSave|Ask is checked. Please fix for 1.0.6. Please never save without confirm. Thank you. A. G. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Can't create calculated field
Try this: In the interface part of the form unit insert this prototype into the Private declarations: private { Private declarations } Procedure OnCalcFields(DataSet: TDataSet); // insert this Early in the implementation part insert the event procedure: Procedure TForm1.OnCalcFields(DataSet: TDataSet); begin SQLQuery1.FieldByName('calc').AsBoolean := true; end; Then after creating your "f" field: f.DataSet := SQLQuery1.FieldDefs.Dataset; SQLQuery1.OnCalcFields:=OnCalcFields; // insert this line Dealing with events without using the Object Inspector can be tricky! A. G. > > From: Krzysztof >To: Lazarus mailing list >Sent: Sunday, December 30, 2012 6:26 AM >Subject: [Lazarus] Can't create calculated field > > >Hi, > > >I have this code: > > > f := TField.Create(FDataList); > f.FieldName := 'calc'; > f.FieldKind := fkCalculated; > f.SetFieldType(ftBoolean); > f.DataSet := SQLQuery1.FieldDefs.Dataset; > > > > >procedure TForm1.OnCalc(DataSet: TDataSet); >begin > SQLQuery1.FieldByName('calc').AsBoolean := true; >end; > > >But I get error "Invalid type conversion to Boolean in field calc" > > >Regards >-- >___ >Lazarus mailing list >Lazarus@lists.lazarus.freepascal.org >http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Does dbGrid.AutoSizecolumns need to be in Form's OnResize event?
It seems to survive clicking the form's maximize/minimize button, but since AutoSizecolumns is a method not a property I thought I should verify that here. Also, is it still necessary to have the property dgAutoSizeColumns enabled? Thanks A. G.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] why can only 1 DataModule be auto-create?
If you try to move a second one to the auto-create side in Project Options:Forms it's impossible to make it stay there. This really isn't a problem, I can just leave it in the Available column and create it in code and it seems to work fine. I'm just wondering if this restrction of only 1 auto-create DataModule is intentional, and if so why. I'm using Laz version 1.0.4 with Win7 64 bit. Thanks; A. G.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] why can only 1 DataModule be auto-create?
Because of the direct replies I received, I see that I should clarify that DataModules after the first revert back to the Available column only after Compile, also that they do not appear in the project's .lpr file. A. G. > > From: Alejandro Gonzalo >To: Lazarus mailing list >Sent: Sunday, January 20, 2013 1:17 PM >Subject: [Lazarus] why can only 1 DataModule be auto-create? > > >If you try to move a second one to the auto-create side in Project >Options:Forms it's impossible to make it stay there. > >This really isn't a problem, I can just leave it in the Available column and >create it in code and it seems to work fine. I'm just wondering if this >restrction of only 1 auto-create DataModule is intentional, and if so why. >I'm using Laz version 1.0.4 with Win7 64 bit. Thanks; > >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
[Lazarus] Where is TlrCodeReport in Laz 1.0.6 for Win7 64 bit?
I can't find it in the list of packages, or under c:\lazarus\components A. G.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Where is TlrCodeReport in Laz 1.0.6 for Win7 64 bit?
Nevermind, I see it's now in the LazReport pallete. But where is samples or instructions on how to use it? > > From: Alejandro Gonzalo >To: Lazarus mailing list >Sent: Monday, February 4, 2013 1:26 PM >Subject: [Lazarus] Where is TlrCodeReport in Laz 1.0.6 for Win7 64 bit? > > >I can't find it in the list of packages, or under c:\lazarus\components > >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] Getting a Field list of a record
You could use a variants instead of records, an enumeration list could keep track of the "field names". Your user clause has to include variants. Here is part of a procedure I used for another purpose: var aRecord : variant; i : integer; begin for i := 0 to Dataset.FieldCount-1 do aRecord[i]:= Dataset.Fields[i].Value; A. G. > > From: Johann Spies >To: Lazarus mailing list >Sent: Thursday, February 14, 2013 3:00 AM >Subject: [Lazarus] Getting a Field list of a record > > >I see TDataset has a method to get a list of fields. Is there something >similar for type: record? > >Say for instance I want to check which fields of a record are empty, how can I >do it without having to specify each field manually? > >Another example: If I want to compare two records of the same type to >determine which fields differ. How do I do it and get only a list of the >fields involved? > >Regards >Johann > >-- >Because experiencing your loyal love is better than life itself, >my lips will praise you. (Psalm 63:3) > >-- >___ >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] Getting a Field list of a record
whoops, forgot you have to include this line before the "for" clause: aRecord:= VarArrayCreate([0, Dataset.FieldCount-1], varVariant); A. G; > > From: Alejandro Gonzalo >To: Lazarus mailing list >Sent: Saturday, February 16, 2013 4:09 PM >Subject: Re: [Lazarus] Getting a Field list of a record > > >You could use a variants instead of records, an enumeration list could keep >track of the "field names". >Your user clause has to include variants. Here is part of a procedure I used >for another purpose: > >var aRecord : variant; > i : integer; >begin >for i := 0 to Dataset.FieldCount-1 do > aRecord[i]:= Dataset.Fields[i].Value; > >A. G. > >> >> From: Johann Spies >>To: Lazarus mailing list >>Sent: Thursday, February 14, 2013 3:00 AM >>Subject: [Lazarus] Getting a Field list of a record >> >> >>I see TDataset has a method to get a list of fields. Is there something >>similar for type: record? >> >>Say for instance I want to check which fields of a record are empty, how can >>I do it without having to specify each field manually? >> >>Another example: If I want to compare two records of the same type to >>determine which fields differ. How do I do it and get only a list of the >>fields involved? >> >>Regards >>Johann >> >>-- >>Because experiencing your loyal love is better than life itself, >>my lips will praise you. (Psalm 63:3) >> >>-- >>___ >>Lazarus mailing list >>Lazarus@lists.lazarus.freepascal.org >>http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> >> >> >-- >___ >Lazarus mailing list >Lazarus@lists.lazarus.freepascal.org >http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to rename a Form
It's less confusing to always leave the main form name as Form1 (with its file name being specific to the project, I use the project name with a F appended at the end). This way when you click View Forms you always know which is the main form. A. G. > > From: Howard Page-Clark >To: lazarus@lists.lazarus.freepascal.org >Sent: Wednesday, February 20, 2013 1:18 PM >Subject: Re: [Lazarus] How to rename a Form > >On 20/02/13 9:05, Frédéric Loyer wrote: >> When I create a new application project, my program start with a Unit1 >> (I can easily rename), associated with a "Form1" I can't rename. >> >> How can I change the name of this "form" ? >In the Lazarus IDE, make sure the form is selected by clicking it, move focus >to the Object Inspector (F12), scroll down to the Name property (first column) >and change the "Form1" entry (second column) to whatever you prefer. > > >-- >___ >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] from hfiandor about Linear Programing
He may have to do it this way because of restrictions by his employer. He probably doesn't have internet access at home, few Cubans outside of the elite do. Let's give him the benefit of the doubt. A. G. > > From: Graeme Geldenhuys >To: lazarus@lists.lazarus.freepascal.org >Sent: Wednesday, February 20, 2013 8:26 AM >Subject: Re: [Lazarus] from hfiandor about Linear Programing > >Hi, > >Don't reply to another thread to start a new one. You screw with the >message thread hierarchy in the mailing list archives and in our email >clients, and people will probably miss your post if they were not >interested in the top most post (thread title). > >G. > > >On 2013-02-20 23:01, Héctor F. Fiandor Rosario wrote: >> Dear friends, >> >> I want to know if somebody have incursioned in Linear Programing with >> Lazarus, in special, the simplex revised method. >> >> thanks in advance, >> >> Ing. Héctor F. Fiandor Rosario >> hfian...@infomed.sld.cu > >-- >___ >Lazarus mailing list >Lazarus@lists.lazarus.freepascal.org >http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] DataSource State not always current
In Delphi 3.02 this ALWAYS works, but only sometimes with Laz 1.0.6 for Win7 64bit w/ADS database: with DBNavigator1.DataSource do if State in [dsEdit, dsInsert] then This can be fixed in Laz by adding a variable to the var section like so: myState : TDataSetState; And replacing the above with the following 2 lines: myState:=DBNavigator1.DataSource.State; with DBNavigator1.DataSource do if myState in [dsEdit, dsInsert] then A. G.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Opening a file with spaces in the filename (again)
If you only will be using Windows, you can use: ShellExecute(HWND(nil),nil,PChar('myFile.pdf'),PChar(''),nil ,1); You will need ShellAPI in the uses clause. A. G. > > From: John >To: Lazarus mailing list >Sent: Tuesday, March 5, 2013 3:23 PM >Subject: Re: [Lazarus] Opening a file with spaces in the filename (again) > >On 03/06/2013 04:49 AM, Bart wrote: >> On 3/5/13, John wrote: >> >>> I want to open a tiff file using what ever viewer the PC knows about >>> that can do it (it will be irfanview on the test PC). It seemed that >>> "OpenDocument" is the appropriate method. This works fine so long as >>> the path has no spaces, but OpenDocument calls OpenURL, and that >>> converts the spaces to %20 s >> In trunk it does not replace spaces with %20. >> This was reverted in r36934. >I see this in trunk, but not in release 1.0.6, which purports to be r40xxx ? >I upgraded when I saw the note about the reversion in the bug tracker. (I >usually work from trunk on my development PC, but I am doing this on a >separate PC, and wanted to keep the install as simple as possible). > >Anyway, I removed the clause that inserts the %20s, it all works fine, so I >can leave it at that for now. >(This, of course, is the joy of open source software!) > >However, I can't help thinking that the REAL problem is that probably there >were originally an OpenURL and an OpenDocument for a reason. OpenURL could be >optimised for URLs, OpenDocuments for file system documents. OpenDocument >could possibly look for a '://' and pass it off to OpenURL if it found one. > >(Sorry, it is hard to keep up a "conversation" from GMT+11) > >cheers, >John Sunderland > >-- >___ >Lazarus mailing list >Lazarus@lists.lazarus.freepascal.org >http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Tdbf replacement (Windows and Linux only)
Tdbf has been decremented because it is no longer maintained. Advantage TDataSet Descendent is a more powerful and flexible dbase format alternative. It accommodates Foxpro cdx as well as Clipper ntx memo and index file types. You can also use their proprietary Paradox-like format, it will be familiar to those who have used the Delphi BDE. The Local Server version is free, and some or all files can be on the network. You only need to buy the Client-Server version if you have large files and want only the relevant records to travel the network. I have used ADS for years - it is rock-solid, a joy to use, and continues to be maintained. It doesn't support Laz version 1.0.8 yet, you need to use 1.0.6 or earlier now. It has a forum for users to discuss and ask questions: http://devzone.advantagedatabase.com/forum Here's how to download and use ADS: http://wiki.lazarus.freepascal.org/Advantage_Database_Server A. G.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Tdbf replacement (Windows and Linux only)
probably just 2.6.0, 2.6.2 is probably the reason 1.0.8 dosn't work since it comes with it. I haven't tried 1.0.8 with FPC 2.6.0. A. G. > > From: Graeme Geldenhuys >To: lazarus@lists.lazarus.freepascal.org >Sent: Monday, March 25, 2013 4:12 PM >Subject: Re: [Lazarus] Tdbf replacement (Windows and Linux only) > >On 2013-03-25 21:39, Alejandro Gonzalo wrote: >> It doesn't support Laz version 1.0.8 yet, you need to use 1.0.6 or earlier >> now. > >The more important question is, what FPC version does it support? > > > >Regards, > - Graeme - > > >-- >___ >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] How to send Email from Lazarus program under Linux x86-64
What about webmail like Gmail? Anyway to use openurl to go to the webpage with the To, Subject, and perhaps Body already filled in? A. G. From: Donald Ziesig To: lazarus@lists.lazarus.freepascal.org Sent: Tuesday, March 26, 2013 11:27 AM Subject: Re: [Lazarus] How to send Email from Lazarus program under Linux x86-64 Just a word of thanks to all who helped me with this. Somehow I kept getting really old code from all of the links and none of it would compile in 64-bit mode, let alone run. I finally found the synapse svn website which had a massive tarball with almost everything from the beginning to really up-to-date code. The latest code compiled and started sending email immediately. Again, thanks to all who recognized that I was not getting the latest and pointed me in the right direction. Don Ziesig END OF THREAD! -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Packages
When you click on a package in the Installed list (in Install/Uninstall Packages) it should show which palette it's in. It does in Delphi. A. G.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Packages
Not me, I know NOTHING about Laz internals, I just use Laz to develop apps. Someone who does know could probably do this in minutes. And how would one go about learning the internals? It's important to make Laz easier for beginners, and it's not always obvious which palette a component is on as it is in Delphi. A. G. From: Mattias Gaertner To: lazarus@lists.lazarus.freepascal.org Sent: Monday, April 1, 2013 3:19 AM Subject: Re: [Lazarus] Packages On Sat, 30 Mar 2013 14:48:00 -0700 (PDT) Alejandro Gonzalo wrote: > When you click on a package in the Installed list (in Install/Uninstall > Packages) it should show which palette it's in. It does in Delphi. If you want to implement it and you need help, do not hesitate to ask. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Accessing freedb.org using Indy's TIdHTTP Get method
Using fpc's cddb unit I was able to form the freedb query string from the CD in my drive (for "The Great Bluesmen" it was : 2b10b215 21 150 12557 26267 48645 60997 77047 91730 103462 117580 129470 145975 160670 185985 199220 213447 228725 250610 270005 283037 292752 309990 4276). Using the instructions at http://staffwww.dcs.shef.ac.uk/people/D.Abbott/Library/freedb.howto1.06.txt I tried using the Get method of Indy's TIdHTTP component to go retrieve the album info, but I just get error messages (usually 500 Command syntax error: incorrect number of arguments). Could some kind person please give me a successful example of using TIdHttp.get (or the equivalent in Synapse) with freedb.org? Are there Properties I need to set? Thank you. A. G.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] TSpinEdit - a modest propoal
When ReadOnly is True the up/down buttons remain although they don't now do anything. In that case the number display are should instead occupy the entire component width. This way there would be a way to display a number directly without first converting to a string. Not a big thing but now is the time to do the little things. A. G.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Responsible of OvoPlayer...
try http://ovoplayer.altervista.org/ A. G. From: Liyuan Garcia Caballero To: lazarus@lists.lazarus.freepascal.org Sent: Friday, August 23, 2013 5:45 AM Subject: [Lazarus] Responsible of OvoPlayer... Hi team, Who is the responsible of OvoPlayer?. Please, can publish in other site, can't access to http://code.google.com/p/ovoplayer/from Cuba. Google say me: 403. That’s an error. Request not allowed from your country That’s all we know. Thanks -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Is there a rxdbgrid for the latest Lazarus? Is so, where?
Thanks. A. G.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] CopyFile in Windows
Just put Windows last in the uses clause. A..-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] how about a "HasProperty()" property?
For example, if you want to loop though components and set the dbNavigator's DataSource property to that of the component if it has a DataSource property (and of course is not a dbNavigator itself). It seems you can't do that by using the component's hierarchy. Is there someway else to do that? Components do seem to have HasHelp and HasParent properties already. Perhaps being able to test for the Palate that the component is on would work, is there a way to do that? Thanks. A. G. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Delphi incompatibility - hard cast
In Delphi this will work even if the Sender is not a TdbGrid, as long as it has a DataSource property: TdbGrid(Sender).datasource:=myDataSource; But it won't work in Lazarus if Sender is a different dbAware component., the compiler will complain it's not a dbGrid. Is there anyway to accomplish this same result in Lazarus, perhaps by using RTTI? Or is there a compiler directive to stop this check? An example would be great. Thanks. A. G.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Delphi incompatibility - hard cast
OK, how about a compiler switch (that can be turned on or off) that SEARCHES for the property (or event if defined in code and not by the Object Inspector)? It shouldn't be so difficult to deal with Sender (or components in a loop) where the exact Type is not known in advance, just the presence of a specific property or Event. If the switch can be turned Off again after the routine, the impact on performance shouldn't be a concern. Greater flexibility and ease of use, especially for newbies (RTTI is difficult and poorly documented) is needed if freepascal/Lazarus is to become universally adopted. Can there please be a discussion on this? Thanks! A. G. On Thursday, January 30, 2014 3:58 PM, Alejandro Gonzalo wrote: OK, how about a compiler switch (that can be turned on or off) that SEARCHES for the property (or event if defined in code and not by the Object Inspector)? It shouldn't be so difficult to deal with Sender (or components in a loop) where the exact Type is not known in advance, just the presence of a specific property or Event. If the switch can be turned Off again after the routine, the impact on performance shouldn't be a concern. Greater flexibility and ease of use, especially for newbies (RTTI is difficult and poorly documented) is needed if freepascal/Lazarus is to become universally adopted. Can there please be a discussion on this? Thanks! A. G. On Friday, January 17, 2014 6:22 PM, Hans-Peter Diettrich wrote: Alejandro Gonzalo schrieb: > In Delphi this will work even if the Sender is not a TdbGrid, as long as > it has a DataSource property: It only *happens* to work for you in Delphi. > TdbGrid(Sender).datasource:=myDataSource; This hack requires that Sender has a DataSource property in *exactly* the same place where it sits in TdbGrid. That's very unlikely for any other class. DoDi-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Delphi incompatibility - hard cast
Is there also a way of setting an event such as OnEnter for Sender or a Component in a loop (if the Event is defined in code and not with the Object Inspector)? Thank you. A. G. On Friday, January 31, 2014 12:19 AM, Michael Van Canneyt wrote: On Thu, 30 Jan 2014, Alejandro Gonzalo wrote: > OK, how about a compiler switch (that can be turned on or off) that SEARCHES > for the property (or event if defined > in code and not by the Object Inspector)? It shouldn't be so difficult to > deal with Sender (or components in a > loop) where the exact Type is not known in advance, just the presence of a > specific property or Event. If the > switch can be turned Off again after the routine, the impact on performance > shouldn't be a concern. Greater > flexibility and ease of use, especially for newbies (RTTI is difficult and > poorly documented) is needed if > freepascal/Lazarus is to become universally adopted. You just need to understand what you are doing, and use SetObjectProp(Sender,'Datasource',MyDataSource); that's all there is to it. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] clicking a dbgrid's column title does not trigger OnEnter event as with Delphi
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
Re: [Lazarus] clicking a dbgrid's column title does not trigger OnEnter event as with Delphi
I clicked on another component first to be sure the grid didn't have focus. OnEnter IS triggered by clicking on a grid cell, but not column header. Same for ActiveControl, which will break some code. A. G. On Wednesday, February 12, 2014 8:18 PM, Jesus Reyes wrote: 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] clicking a dbgrid's column title does not trigger OnEnter event as with Delphi
Why is there no interest in fixing this bug? There is a lot of code transferred from Delphi, and if you don't click on a column title during testing you won't know anything is wrong until a client screams at you. Sure, you can fix it with a SetFocus in the OnTitleClick event of the grid, but why should you have to remember? PLEASE fix in RC3! Thanks. A. G. On Thursday, February 13, 2014 1:02 PM, Alejandro Gonzalo wrote: I clicked on another component first to be sure the grid didn't have focus. OnEnter IS triggered by clicking on a grid cell, but not column header. Same for ActiveControl, which will break some code. A. G. On Wednesday, February 12, 2014 8:18 PM, Jesus Reyes wrote: 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-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] LazReport - access violation
I am using Laz 1.2 for Win32, with Advantage (http://devzone.advantagedatabase.com) for the database, Foxpro CDX format. Everything seems to go ok designing a report with LazReport until I include a memo field, then it crashes. Is there something special I have to do in LazReport to use a Foxpro style memo field? Thanks A. G.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] How to make link in IpHtmlPanel active?
My apologies if this is a stupid question, but how to you enable a user to go to an external website when they click on an underlined URL? C:\laz\components\turbopower_ipro Thanks. A. G.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazReport - access violation
UPDATE This only seems to happen when some records have a large entry in the memo field. The problem seems to be with the routine that calculates the field size but I don't know how to fix it. (This refers to LazReport crashing when a memo field is included in a report) A. G. On Wednesday, April 2, 2014 1:48 PM, Alejandro Gonzalo wrote: I am using Laz 1.2 for Win32, with Advantage (http://devzone.advantagedatabase.com) for the database, Foxpro CDX format. Everything seems to go ok designing a report with LazReport until I include a memo field, then it crashes. Is there something special I have to do in LazReport to use a Foxpro style memo field? Thanks 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] Radiogroup not updating clicked button when in non-visible TPageControl tab
Similarly if a TEdit or a TMemo have visible set to false, then PasteFromClipboard and CopyToClipboard fails. Fix this too please before 1.2.6 releases? Thanks. A. G. On Saturday, September 13, 2014 7:37 AM, zeljko wrote: On 09/13/2014 01:38 PM, Anthony Tekatch wrote: > Hello, > > I have a RadioGroup located on a PageControl tab that is sometimes made > invisible. If I update that RadioGroup ItemIndex programmatically when > that tab is invisible, then later make the tab visible and click on a > previously clicked (but not selected) radio button ... there is no > OnSelectionChanged (and also OnClick) event produced. > > I submitted bug 0026714 which includes a test application: >http://bugs.freepascal.org/view.php?id=26714 > > I am wondering if there is a simple workaround for this behavior, or is it > an actual bug? Issue is fixed (you can use lazarus trunk or wait for 1.2.6). zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] LazReport - Group bands
I only wanted a list of unique entries for a key field. So I selected the Group Header band and for Condition selected that key field. I then inserted a Rectangular Object on the band and for dbfField selected the same key field. But Preview showed only a blank page. What else do I have to do? Double karma for the best way to show the number of entries for each key field. Thanks. A. G. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazReport - Group bands
Since I only wanted a list of unique key fields, I didn't use a Master band. Is it mandatory to use one? A. G. On Wednesday, September 24, 2014 12:54 AM, Tony Whyman wrote: Alejandro, Group Headers do work - I use them myself. Looking at a known working report, the condition field in the group header is linked to field in the dataset used for the Master Data band. Maybe this is where your problem lies. Regards Tony Whyman MWA On 24/09/14 00:01, Alejandro Gonzalo wrote: I only wanted a list of unique entries for a key field. So I selected the Group Header band and for Condition selected that key field. I then inserted a Rectangular Object on the band and for dbfField selected the same key field. > >But Preview showed only a blank page. What else do I have to do? > > >Double karma for the best way to show the number of entries for each key field. > > >Thanks. > > > >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-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] LazReport - How to subtotal or total a CALCULATED field?
This doesn't work: [sum([dsbooks.."CTR"],MasterData11)] where CTR is the calculated field. Thanks. A. G. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus