[Lazarus] Double click is needed to select/deselect item's checkbox in listview with checkboxes
Hello I made some tests about issue 13932 http://bugs.freepascal.org/view.php?id=13932 - Windows XP - everything works ok - Windows Vista 32bit Home Premium - I need 2 or sometimes 4 clicks to change checkboxes state Can anyone acknowledge? I can't change issue status, and I don't want make duplicate one. Greetings Andrzej And3mD Kilijanski -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Double click is needed to select/deselect item's checkbox in listview with checkboxes
Yes, I can reproduce this here (under Vista). I didn't get the need for 4 clicks though And3mD wrote: Hello I made some tests about issue 13932 http://bugs.freepascal.org/view.php?id=13932 - Windows XP - everything works ok - Windows Vista 32bit Home Premium - I need 2 or sometimes 4 clicks to change checkboxes state Can anyone acknowledge? I can't change issue status, and I don't want make duplicate one. Greetings Andrzej And3mD Kilijanski -- ___ 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] Double click is needed to select/deselect item's checkbox in listview with checkboxes
You are right, I tested with another mouse, only double clicks needed to change checkboxes state. Hardware problem with 4 clicks :) Dnia 05-11-2009 o 21:13:21 Martin laza...@mfriebe.de napisał(a): Yes, I can reproduce this here (under Vista). I didn't get the need for 4 clicks though And3mD wrote: Hello I made some tests about issue 13932 http://bugs.freepascal.org/view.php?id=13932 - Windows XP - everything works ok - Windows Vista 32bit Home Premium - I need 2 or sometimes 4 clicks to change checkboxes state Can anyone acknowledge? I can't change issue status, and I don't want make duplicate one. Greetings Andrzej And3mD Kilijanski -- ___ 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] region [elastic tabs [Re: Auto indentation]]
Martin schrieb: For section heading {%region} {%endregion} is usefull = since it allows folding Such verbose formatting is unusable, for several reasons: - it is bound to an special editor - it is imposed on every user - it must be maintained manually - it is pure overhead DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Delphi editor clone
Martin schrieb: Please have a look at examples/dockmanager/elasticsite/SiteTest project. It demonstrates how docking could work in the Lazarus IDE, and how multiple editor windows could be implemented. Does not work with fpc trunk C:\lazarus_latest\examples\dockmanager\package\felasticsite.pas(106,35) Error: Can't take the address of constant expressions When a new FPC version imposes such restrictions, then it also should convert shortcuts like Inc and Dec into macros. While Inc and Dec were *introduced* into the language as optimization hints, for using according machine instructions, they *nowadays* are means to eliminate duplicate code (expressions). I know about the strange opinions of some FPC developers, which also require that Inc with an (small) negative amount should raise an overflow exception, only because an unsigned machine instruction would do so, on certain machines. Such argumentation is ridiculous, with regards to the Wirthian pragmas. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Auto indentation
Mattias Gaertner schrieb: With the new synedit OnPaste event I will try to fix the indent on paste. IMO you should rethink the handling of insertion/deletion. A single Replace(start, delta, text) method can handle every case, with positive deltas meaning insertion and negative deltas meaning deletion or substitution of text. This single method knows about the range of the affected text, as required for the handling of all related attributes (line count, cursor position, syntax highlighting, blocks, folding, formatting, bookmarks...). All related objects should implement the same method for dealing with updates. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Auto indentation
waldo kitty schrieb: for me, the TAB is to move from field to field in a spread sheet or database... that's the way i was taught and have worked for 30+ years... You should distinguish between updating text and navigation. Tab *characters* are inserted into the text, while the tab *key* is used to navigate in special document GUIs, with distinct fields. The text in an editor is not organized into fields, so that the tab key here can be used as it was before other GUIs have been invented. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] region [elastic tabs [Re: Auto indentation]]
Hans-Peter Diettrich wrote: Martin schrieb: For section heading {%region} {%endregion} is usefull = since it allows folding Such verbose formatting is unusable, for several reasons: - it is bound to an special editor - it is imposed on every user - it must be maintained manually - it is pure overhead So what did you mean, what are your ideas of folding? There are many possibilities, but most of them will be supported by very few editors, if any at all. A few ideas I had, but not all worth doing: - language specific folds (begin/end or open/close tags in xml) = existing for pascal - temporary folds: not bound to any content. They exist as long as the editor is open, (and would be a poor substitute for having 2 windows of the same content) They would work, by selecting any amount of lines, and fold them - folding any paragraph, (defined by at least one empty line in-between - folding by level of indent - folding by special comments (as you indicated ///) but that again is very editor specific. it is just a shorter notion of region. It could be configurable by specifing the pattern / and it has the advance of an automatic end at the next section / and they could be leveled (///, , /, ...) The /// are what you mentioned in your post. But (with the exception maybe of overhead) it has the same properties as region: - it is bound to an special editor (or a set of a few special editors) - it is imposed on every user (if it is not treated as editor specific directive it is a comment; so is {%region ...} ) - it must be maintained manually (except for the end of each block is found automatically, sometimes an advantage, sometimes a disadvantage) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Delphi editor clone
Hans-Peter Diettrich wrote: Martin schrieb: Please have a look at examples/dockmanager/elasticsite/SiteTest project. It demonstrates how docking could work in the Lazarus IDE, and how multiple editor windows could be implemented. Does not work with fpc trunk C:\lazarus_latest\examples\dockmanager\package\felasticsite.pas(106,35) Error: Can't take the address of constant expressions When a new FPC version imposes such restrictions, then it also should convert shortcuts like Inc and Dec into macros. While Inc and Dec were *introduced* into the language as optimization hints, for using according machine instructions, they *nowadays* are means to eliminate duplicate code (expressions). I know about the strange opinions of some FPC developers, which also require that Inc with an (small) negative amount should raise an overflow exception, only because an unsigned machine instruction would do so, on certain machines. Such argumentation is ridiculous, with regards to the Wirthian pragmas. All fine and good. But it doesn't help, unless you convince the fpc developers. Eventually the new Version of FPC will be used, and eventually all code has to be able to be compiled with it For the moment though, you are right. I can not really complain if it doesn't work for me, simple because I use an unreleased fpc version. do you think it will be fixed before release? Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Auto indentation
Hans-Peter Diettrich wrote: Mattias Gaertner schrieb: With the new synedit OnPaste event I will try to fix the indent on paste. IMO you should rethink the handling of insertion/deletion. A single Replace(start, delta, text) method can handle every case, with positive deltas meaning insertion and negative deltas meaning deletion or substitution of text. This single method knows about the range of the affected text, as required for the handling of all related attributes (line count, cursor position, syntax highlighting, blocks, folding, formatting, bookmarks...). All related objects should implement the same method for dealing with updates. Maybe you can elaborate in which context you the above statement should be interpreted? We are talking here about specifically selected (and selected only) events for which SynEdit is providing an interface for *external* components. This is the same as a buttons OnClick, or OnFoo event that allows code not known to the component to react to events occurring inside the component. Inside the IDE OnPaste is going to be used by codetools, but in user apps the programmer is free to use (and of course abuse) this on his/her terms. Codetools does not need to know every edit/modification of the text. In fact there are many edits/modifications that this part of codetool should not react to. Clipboard interaction (for an editor component) is a generic event that mat be of interest, in the same way as OnClick is on a button. - Internally SynEdit has a small set of methods through which *all* modifications to text are done. Agreed one would have been enough. But it is the same distinction has having 2 methods [cut and copy] or one [CutCopy(DeleteSelection:Boolean)]. They do however not move the caret. This would have meant to add special params. After all not every text modification moves the caret. They do provide hooks, that are used by other editor feature to react to the changes. I am aware that you (IIRC) prefer a micro-controller scenario. But for various features it is IMHO better to use generic hooks. Example: No micro controller is/should be needed to update bookmarks (Except for the controlling element in the bookmark manager). The bookmark manager hooks into synedit, observes any text change, and adjusts all bookmarks. This is actually a pre-condition for having the same content in multiply editor windows. Each SynEdit (using the same shared TextBuffer) can hook into the textbuffer and adjust to any change that happens. A single Replace(start, delta, text) method Can not deal (unless given a specialized argument) with the differentiation between smNormal and smColum. smColumn is very specific to Block-Selection and therefore translated there. the basic text modification only knows contineus/flowing text that can be edited/replaced. This again makes it a difference to an OnPaste event, which exposes the speciality of smColumn. something that does not exist in other edit actions. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Delphi editor clone
Martin schrieb: All fine and good. But it doesn't help, unless you convince the fpc developers. Right :-( Eventually the new Version of FPC will be used, and eventually all code has to be able to be compiled with it I have several suggestions: - apply the new rules only in $mode Delphi - use an (global) switch to treat Inc/Dec as macros or operators - introduce new Incr/Decr macros, to reduce required editing of legacy code For the moment though, you are right. I can not really complain if it doesn't work for me, simple because I use an unreleased fpc version. Can't you configure Lazarus to use the old fpc compiler? do you think it will be fixed before release? I'll have to get a SVN version of fpc, before I can start fixing my code... And if so, I only will replace Inc/Dec by my added Incr/Decr macros. You can do so yourself, already. Feel free to update my code accordingly :-) DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Auto indentation
And that's something *I* don't like. You never know which END belongs to wheach BEGIN. I always column align all ENDs to their corresponding BEGINs. You missed the second part of my argumentation. I'm thinking in the superior Modula syntax, that does not require begin-end pairs around statement sequences. I am not sure why you mention the Modula syntax. I thought we are talking about Pascal here. And Pascal requires the begin-end pairs (unless it is a single statement). And there is a logic behind it. I always see directly which block is related to the IF (WHILE, REPEAT, ...) statement: - if a then begin xx; yy; zz; end; a; b; c; - - if a then xx; a; b; c; - And if the statement or block is very short I can put the whole on one line: - if a then begin xx yy zz end; a; b; c; - - if a then xx; a; b; c; - I *never* put deeper level commands/blocks on the same column (including BEGIN/END) and I *always* align the BEGIN/ENDs. The BEGIN/ENDs delimit the block and are part of it so IMO they should be treated the same as all other commands of the block and be aligned with them. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Auto indentation
On Fri, Nov 6, 2009 at 07:18, Jürgen Hestermann juergen.hesterm...@gmx.de wrote: I *never* put deeper level commands/blocks on the same column Yes, that's one of the worst things one can do. (including BEGIN/END) and I *always* align the BEGIN/ENDs. Absolutely necessary, otherwise you get nice spaghetti :-) The BEGIN/ENDs delimit the block and are part of it so IMO they should be treated the same as all other commands of the block and be aligned with them. On the other hand, I think of BEGIN/END as other commands are INSIDE begin/end block, so I align begin/end with previous if/while/for/procedure/function, and indent commands inside the block. As of one-lines like: if (a b) then a := b; I NEVER use them. They could take up less space, but it is very easy to overlook them when you read lot of code. Moreover, having inner command on the new line adds up to the consistency of your code. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Delphi editor clone
On Fri, 06 Nov 2009 06:51:06 +0100 Hans-Peter Diettrich drdiettri...@aol.com wrote: I'll have to get a SVN version of fpc, before I can start fixing my code... And if so, I only will replace Inc/Dec by my added Incr/Decr macros. I don't think so, as the easydockmanager package does not compile with 2.5.1 either: /home/satan/pascal/lazarus/examples/dockmanager/package/fdockbook.pas(46,5) Error: Fields cannot appear after a method or property definition, start a new visibility section first Not a big problem, but one that has to be fixed, too. I thought that fields after method/property were disallowed since 2.4.0 but my memory must be playing tricks on me if it works for you. I will give your example another try when/if it compiles on 2.5.1, as I am too lazy to install an old fpc. R. -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] 32bit application in 64bit OS
Hello Lazarus mailing list! I need to solve communication between my application and PCSC-Lite running on 64bit machine, but loading 64bit *.so file doesn't work. How can I do this? Thanks for all ideas. -- Best regards, TRoland http://www.rotursoft.sk http://exekutor.rotursoft.sk -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Delphi editor clone
On Fri, 06 Nov 2009 07:51:38 +0100 Vincent Snijders vsnijd...@vodafonevast.nl wrote: What is on that line? dec(DragTarget.Left, w); w: integer; DragTarget: TControl; R. -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Delphi editor clone
On Thu, 05 Nov 2009 15:48:37 +0100 Hans-Peter Diettrich drdiettri...@aol.com wrote: Please have a look at examples/dockmanager/elasticsite/SiteTest project. I fixed the compilation under fpc 2.5.1, the wrong unit paths and added synedit dependency. I also added the lpl file, so that the package is found on first open. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Auto indentation
Martin schrieb: With the new synedit OnPaste event I will try to fix the indent on paste. IMO you should rethink the handling of insertion/deletion. A single Replace(start, delta, text) method can handle every case, with positive deltas meaning insertion and negative deltas meaning deletion or substitution of text. This single method knows about the range of the affected text, as required for the handling of all related attributes (line count, cursor position, syntax highlighting, blocks, folding, formatting, bookmarks...). All related objects should implement the same method for dealing with updates. Maybe you can elaborate in which context you the above statement should be interpreted? We are talking here about specifically selected (and selected only) events for which SynEdit is providing an interface for *external* components. And that interface IMO already is too bloated. What does any plug-in have to know about changes, other than the range affected? This is the same as a buttons OnClick, or OnFoo event that allows code not known to the component to react to events occurring inside the component. In contrast to other components, changes to an text have only one single effect - parts of the text are changed. It's unimportant what caused that change (keyboard, clipboard, file load...). Inside the IDE OnPaste is going to be used by codetools, but in user apps the programmer is free to use (and of course abuse) this on his/her terms. Codetools does not need to know every edit/modification of the text. In fact there are many edits/modifications that this part of codetool should not react to. It's up to every single tool to determine the impact of every modification. Clipboard interaction (for an editor component) is a generic event that mat be of interest, in the same way as OnClick is on a button. I see no need for special handling. Internally SynEdit has a small set of methods through which *all* modifications to text are done. Good. Agreed one would have been enough. But it is the same distinction has having 2 methods [cut and copy] or one [CutCopy(DeleteSelection:Boolean)]. That's a very different situation. Only Cut affects the text, no tool needs to know about a Copy. They do however not move the caret. This would have meant to add special params. The affected range is sufficient for the caret positioning management. After all not every text modification moves the caret. Right, when the caret is outside the modified range :-) They do provide hooks, that are used by other editor feature to react to the changes. IMO a single hook would be sufficient. What does it make a difference, whether some text is deleted by DelChar, DelBlock, Cut or any other editing procedure? I am aware that you (IIRC) prefer a micro-controller scenario. But for various features it is IMHO better to use generic hooks. Example: No micro controller is/should be needed to update bookmarks (Except for the controlling element in the bookmark manager). The bookmark manager hooks into synedit, observes any text change, and adjusts all bookmarks. That's my opinion as well - and it works with a single kind of notification. This is actually a pre-condition for having the same content in multiply editor windows. Each SynEdit (using the same shared TextBuffer) can hook into the textbuffer and adjust to any change that happens. ACK. A single Replace(start, delta, text) method Can not deal (unless given a specialized argument) with the differentiation between smNormal and smColum. smColumn is very specific to Block-Selection and therefore translated there. the basic text modification only knows contineus/flowing text that can be edited/replaced. This again makes it a difference to an OnPaste event, which exposes the speciality of smColumn. something that does not exist in other edit actions. Different how far? When a range of text is changed, it doesn't matter when some parts of it happen to stay unchanged. The *entire* range must be parsed again, tabs and bookmarks may need adjustment etc. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Auto indentation
Jürgen Hestermann schrieb: And that's something *I* don't like. You never know which END belongs to wheach BEGIN. I always column align all ENDs to their corresponding BEGINs. You missed the second part of my argumentation. I'm thinking in the superior Modula syntax, that does not require begin-end pairs around statement sequences. I am not sure why you mention the Modula syntax. I thought we are talking about Pascal here. And Pascal requires the begin-end pairs (unless it is a single statement). And there is a logic behind it. I always see directly which block is related to the IF (WHILE, REPEAT, ...) statement: - if a then begin xx; yy; zz; end; a; b; c; - - if a then xx; a; b; c; - The indentation allows to identify the block ranges, without any optical special search for BEGIN and END keywords - only the *formatter* must deal with the concrete syntax. And if the statement or block is very short I can put the whole on one line: - if a then begin xx yy zz end; That's questionable practice. It's impossible to set an breakpoint into the body of the conditional statement. I *never* put deeper level commands/blocks on the same column (including BEGIN/END) and I *always* align the BEGIN/ENDs. I align the *lines*, *containing* BEGIN/ENDs ;-) The BEGIN/ENDs delimit the block and are part of it so IMO they should be treated the same as all other commands of the block and be aligned with them. There exist substancially different opinions about the alignment of BEGIN/ENDs - should they align with their parent statement or be indented, and should their content be aligned or indented. As long as the extra-line blockers g cannot agree about the one and only acceptable solution, I feel free to ignore that debate and move the block delimiters to the next best place, saving one or more lines in my code with every single block. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] add font in TPdfDoc
is there anyone who has ever add custome font or windows font to create pdf file, i use pdfDoc, pdfFonts units to create pdf file, but i have some difficult to add another font like barcode font , pdfFont for default use Arial and times, cmiiw thanks -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] region [elastic tabs [Re: Auto indentation]]
Hans-Peter Diettrich wrote: Martin schrieb: For section heading {%region} {%endregion} is usefull = since it allows folding Such verbose formatting is unusable, for several reasons: I disagree... If the editor doesn't support it, it is simply two extra comments that will be ignore. Also for Form Designers like the one in fpGUI Toolkit, where it writes the form layout and design INSIDE the .pas file, the custom folding is very handy, because it hides the code parts that are normally not maintained by users. The option of folding on {%region} tags is also user selectable, so if you don't like folding, simple don't enable it. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus