Re: [Lazarus] Ideas for improving lazarus.dci code templates
Zitat von Graeme Geldenhuys graemeg.li...@gmail.com: Hi, Over the years I have noticed some shortcomings in the lazarus.dci handling. Here are some of my ideas. Please comment on them before I create official feature requests in Mantis. * Lazarus should have seperate .dci files. One for custom user settings and one which contains the default .dci settings. That way if new default settings get applied to the lazarus.dci file, all users get it without the next Lazarus update. The lazarus.dci should live in the Lazarus install directory. Then we should have a user.dci in the profile directory. * If the user customizes an existing (default) code templates, they should be added to the user.dci file and override the default one. +1 for overriding. About the default file: The defaults are compiled into the IDE. The IDE has a 'secondary' config path, where pool admins and package maintainers can put default configs. A secondary config file is copied to the user's config directory, iff no user config exists. i.e. the configs are not merged. If no primary and no secondary config exists, the IDE uses its defaults. So there is already a chain of defaults. I think adding a further default file only complicates things and will not solve much. Why not use the same as for the highlighters and key mappings: The IDE first loads the defaults, then merges the user config (additions, replacements). Because you can not delete a default code template, a 'disable' option is needed. * This design which be extended even further to have language specific .dci files. Instead of lazarus.dci, rather have the following: - objectpascal.dci - java.dci - html.dci - javascript.dci etc... So as the IDE opens a file, lets say for example a index.html file, then the default code template for that file will be html.dci The synedit editor available on sourceforge already includes a lot of language specific dci files. I post those to mantis if needed. Ok. Add an extra .dci for all languages (copyright templates, todo comments, ...). * Why doesn't the default lazarus.dci contain a repeat...until' code template. I always add it myself though. Name? rep? The templates use the first unique prefix, so 're' will automatically work. * Maybe project specific code templates could also be an option. I'm not sure is this is really relevant, but it might be handy. For example, I develop many tiOPF (Object Persistent Framework) applications. I have a lot of code templates for such projects. But if I work on a quick console application, those code templates are not needed. Some maybe Lazarus Packages or Project Options could contain an entry for project or packages specific code templates. Project Options is probably the better option. IMO this is only useful for power power users. Your thought? Any new suggestions? Mattias -- Powered by NetMail ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Live Templates
Zitat von Lee Jenkins l...@datatrakpos.com: Graeme's recent post made me wonder if there is been work or talk of work on implementing Live Templates like Delphi has? Yes. 1. Lazarus will not support the Delphi syntax, because Lazarus already supports code macros. There are already some code macros using the codetools. 2. auto complete without pressing a short cut already works for return, space and word end. Some code macros are needed to fine tune adding text if parts of the template already exists (for example auto complete 'begin' after pressing return). But this is stuff for another thread. 3. templates with parameters: editing the parameters directly in the source editor (synedit) without a dialog. synedit needs a further edit mode for marking and editing several places in parallel. Martin has already implemented marking several places. I guess he can also create a plugin/extension/mechanism for the needed edit mode. When this is done, I will be glad to implement the rest. This edit mode is also needed for in situ rename. I imagine that that kind of behavior is a bit of work to implement. Yes, but I bet Martin has already some ideas for synedit. Mattias -- Powered by NetMail ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] pascal calling convention and code tools problem
Zitat von Bogusław Brandys bran...@o2.pl: I'm not sure if that was reported , but if I declare : function DoPascalCall(xa, xs, ys, xe, ye,ze, Tolerance : Integer) : Boolean;pascal; it break code tool , it doesn't allow to use class completion (Ctrl+shift+C) error is : pstestsimple.pas(28,90) Error: zamiast: : znaleziono: ; which means that instead of : : found ; I didn't know that pascal is allowed for methods. I added it to the list. Use svn r19850. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Packages and file loading
Zitat von Lord Satan reimg...@web.de: On Thu, 7 May 2009 23:09:01 +0200 Mattias Gaertner nc-gaert...@netcologne.de wrote: There is one: $PkgDir(asmodaypkg) Since when? Since 19th sept 2006. See history of http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames I will test which of your proposed solutions is the best for me. Thanks for having pity with me and answering my question. Iblis ;) Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Code tooltips
Zitat von Lord Satan reimg...@web.de: Hi developers, it is nice that Lazarus respects the theme for tooltips. But it is not really acceptable if I cannot read them anymore. See attached screenshots. Some recent FPC 2.3.1 and some recent Lazarus, both from svn. Ubuntu 9.04 64-bit, GTK2 Should I create a bug report? I improved a few things. Please test with 19853. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Debian Cross Compile
Zitat von Osvaldo Filho arquivos...@gmail.com: When i compile lazarus, install component for exemplo, i dont need write access to /usr/share/lazarus. The lazarus use my directory ~/.lazarus; When i compile win32 packages, for cross compile, did i need write access to /usr/share/lazarus or /usr/lib/fpc etc ? You need to compile the LCL, SynEdit, codetools, IDEIntf for win32. The IDE can not yet compile the LCL to ~/.lazarus. So this step must be done as root. But only once. The other packages and projects are compiled to ~/.lazarus. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] IDE UI consolidation (was: Re: lfm as pascal)
Zitat von Graeme Geldenhuys graemeg.li...@gmail.com: On Wed, May 6, 2009 at 2:44 AM, Alexander Klenin kle...@gmail.com wrote: FWIW, I often use Quick search (Ctrl+E) for code navigation, How does quick search work? I highlighted an identifier I want to seach for, pressed Ctrl+E. It showed seaching in the editor status bar, but nothing further. Sometimes it highlights a whole bunch of stuff like the letter e. I'm a bit lost. :-( Ctrl+e is in incremental find. It searches while you type. see here http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools#Incremental_Search I think that while Lazarus IDE has many great features, they are not well I just think many of those feature are silently added with nobody knowing. Well, they were added experimentally, then matured gradually over time. Hence the reason I started the following wiki page to advertise those cool features and visually see what they do. http://wiki.lazarus.freepascal.org/New_IDE_features_since a common UI, thus giving greater exposure to all included features. The wiki pages is trying to give greater exposure as well - visually with animation. :) 1) Find procedure should be merged into Code explorer I don't know Find procedure where is that? I used the filter in key mappings and found find procedure definition and find procedure method using the age old Ctrl+shift+Up/Down. I would have expected everybody to know the latter key mapping - it's what makes the Lazarus and Delphi IDE such a pleasure compared to other programming editors. It's called 'procedure list' and its default key is Alt-G, which does not work on all widgetsets. 2) Find in files, Messages and Code observer should be merged together, with interface most resembling Find in files I can't see how these can be combined. They are totally different features. Maybe the result windows could be docked though. All floating windows should be dockable. We have already a docking manager. The missing part is to finish the save/restore of the layout. 3) Unit list (Ctrl+F12) should be merged into Project Inspector I guess, but I simply have the project Inspector window always open. So I simply click a unit to open it. As Paul suggested. I think docking is the key here... it will make many feature or windows more manageable. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] OT, search and highlight[Re: IDE UI consolidation (was: Re: lfm as pascal)]
Zitat von Martin Friebe laza...@mfriebe.de: Graeme Geldenhuys wrote: On Wed, May 6, 2009 at 2:44 AM, Alexander Klenin kle...@gmail.com wrote: FWIW, I often use Quick search (Ctrl+E) for code navigation, How does quick search work? I highlighted an identifier I want to seach for, pressed Ctrl+E. It showed seaching in the editor status bar, but nothing further. Sometimes it highlights a whole bunch of stuff like the letter e. I'm a bit lost. :-( Highlight (as in block-selection) and then search for it = use ctrl-f Quick search (or incremental search) (ctrl-e) means you start the search with an empty search-term, then as you type the editor searches for whatever fragment you typed ctrtl-e = status-bar displays searching b = status bar displays b / editor goes to the next b (b is highlighted, all other occurrences are highlighted in yellow) e = status bar shows be / editor goes to next be f = bef = backspace = be editor returns to be g, i, n = begin - while in quicksearch, pressing F3 or ctrl-e again = jump to the next search result of the same term - start quick search with ctrl-e, ctrl-e = resume with last search term Please add this to the wiki. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] IDE UI consolidation (was: Re: lfm as pascal)
Zitat von Graeme Geldenhuys graemeg.li...@gmail.com: 2009/5/6 Mattias Gärtner nc-gaert...@netcologne.de: It's called 'procedure list' and its default key is Alt-G, which does not work on all widgetsets. Do you mean the shortcut doesn't work or the actual procedure List dialog doesn't work on all widgetsets? Alt-G does not work. With other short cuts it works. Since I switched from GTK1 to GTK2, procedure list doesn't work as well. I think it's due to a bug in GTK2 listview, but I haven't investigated further. To reproduce: * Alt-G (or whatever your shortcut is - mine is always different) to open Procedure List. * Start typing partial method name. * Now press Down Arrow. This should put focus in first item in listview, but it doesn't. :-( This used to work under GTK1. Other differences between Procedure List and Code Explorer. * Procedure List jumps to Implementation section. Code Explorer to Interface section. Yes. And this is needed. Maybe jumping to implementation can be added with a modifier key. And an option can be added to toggle With/Without modifier and Interface/Implementation. * Procedure list can filter by Class, non-class or All methods. I don't think Code Explorer can. Very easy to implement. Make a proposal for the gui. * Procedure List can filter by method starting with text or method containing text. Not sure what Code Explorer does. containing * Procedure List, when launched puts focus where it must be - in the filter edit box. Code Explorer - I have no idea where the focus is, I think the treeview (filter box might be a better idea). Patch is welcome. * In procedure list, when you press Enter to jump to a method, Procedure List closes and gets out of the way. Code Explorer hangs around taking up screen space. code explorer is a floating window, normally visible all the time and placed left or right of the source editor. So yes, there are plenty to discuss before any merge is to be considered. Please. All floating windows should be dockable. We have already a docking Excellent! Can we enable docking already in Lazarus - even though it isn't saved and restored between sessions? 1. afaik dragdrop docking does not work on gtk. Only docking via menu item. 2. docking without restore is as useful as a lazarus without projects. Maybe some predefined sets can be added until someone finishes the restore of one of the docking managers. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] OT, search and highlight[Re: IDE UI consolidation (was: Re: lfm as pascal)]
Zitat von Flávio Etrusco flavio.etru...@gmail.com: [...] Quick Search would be something that Lazarus seems to still be missing: search the identifier under the caret. Like in Visual Studio: Ctrl+F3 to search forwared and Ctrl+Shift+F3 backwards. Or with Experts: Ctrl+Alt+Down and Ctrl+Alt+Up. I've always intended to implement this, but... .. but it was already there: http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools#Find_next_.2F_previous_word_occurrence Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] OT, search and highlight[Re: IDE UI consolidation (was: Re: lfm as pascal)]
Zitat von Graeme Geldenhuys graemeg.li...@gmail.com: [...] Or with Experts: Ctrl+Alt+Down and Ctrl+Alt+Up. I've always intended to implement this, but... Me too! :) I used to use that a lot in Delphi 7 + GExperts. Ctrl+Alt+Up/Down is often used in linux for desktop switching. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] IDE UI consolidation (was: Re: lfm as pascal)
Zitat von Hans-Peter Diettrich drdiettri...@aol.com: Martin Friebe schrieb: 2) Find in files, Messages and Code observer should be merged together, with interface most resembling Find in files IMHO, this (point 2) would be even more a specialization. Also I can't see how those 3 relate at all. They can use the same Search Results window for their output. That window will know what to do (show related place in source code) when an entry is clicked. I don't see how. Find in files shows simple text and identifier occurences. Find in Files and Find identifier references already use the same window. Messages shows several types of messages from compiler, make, codetools and allows to quick fix these. It is planned to allow filtering and sorting. Code observer shows places that might be interesting for code tools. It is planned to add a second treeview to the code explorer as gui for the codetools. Code explorer has lots of short items (more height than width), the other two need more width than height. I see no problem to page-dock messages and find in files, but implementation and usage are too different to marry them. Anyway, for that lets wait for docking. Some notes on docking: The Messages and Search Results can be docked to the IDE main window, eventually by default. The docking of forms is unsupported on many platforms, due to the different management of controls (widgetset) and windows (window manager). So all dockable windows should contain one single component for their entire content. (or the forms should float as clients of a floating form). This requirement lead me to another suggestion: When one or more forms are docked into another window, their UI (menus, toolbars...) could be added to the dock host form's UI. Just an idea... AFAIK merging menus is a very old Delphi feature. There are some starts in the LCL already. what about: - keybard layouts? - Menu layouts? Some visual design for toolbars (and menus) would be nice, as in the Delphi IDE window (configure by dragdrop from the list of available options to a toolbar). Wishlist: http://wiki.lazarus.freepascal.org/Feature_Ideas Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] IDE UI consolidation (was: Re: lfm as pascal)
Zitat von Bogusław Brandys bran...@o2.pl: Graeme Geldenhuys wrote: On Wed, May 6, 2009 at 12:28 PM, Martin Friebe laza...@mfriebe.de wrote: 1) Find procedure should be merged into Code explorer Ok by me. (I never used it :) ) It's partly there anyway. Lets discuss it first - I use procedure list a *lot*. And at the moment it's behaviour is different to code explorer. Regards, - Graeme - Yes.I agree.+1 vote for Graeme :-) In fact we see here old problem of two rights - both groups are right , partially. The code explorer has just starting to get interesting. I don't think it will become a quick search tool. More a gui for exploring and refactoring. While it would be nice to have as many nice features placed in one Code explorer as possible - that WILL double windows, because someone not using docking (due to limited free memory for example) will find faster to use Ctrl+F12 to show not bloated window with unit names then bloated code explorer. The code explorer does not eat much memory as it only shows the content of one unit. I plan more tools like the code browser - that scans whole source trees and need two or three hundred megabytes. But these tools will not be invoked by default and they share the same memory. So what would show Ctrl+F12 shortcut in such case ? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Invalid component names
Zitat von Hans-Peter Diettrich drdiettri...@aol.com: Vincent Snijders schrieb: Exactly this code will cause an exception, when the procedure is called more than once - as I need it to create multiple floating controls. Why do you want to give the controls names? Names are convenient to identify floating windows (label title bars) or docked controls (dock header label), and are required for the de/serialization of docking layouts. But you are right in so far, as dynamically created controls are of little use in the recreation of a docking layout. In this case the names should be hardwired somehow, so that the appropriate controls can be created from the stored layout. I'll have to re-think this issue in the implementation of multiple editor windows and the related forms. Then e.g. the code explorer windows etc. must be linked to the edit control in their dock site, regardless of their name in creation order. Welcome to the complex world of layout restoration. ;) Just an idea: The anchor docking manager has one component per docked control. It allows to set a unique name and will use by default the component name. The manager will resolve conflicts by appending a number. The user can set the name via the designer and a translated name for i18n. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Figures in code explorer
Zitat von Martin Friebe laza...@mfriebe.de: [...] So the code explorer can scan for lines 'do' and 'then' lines where the following line is indented less or equal. Of course some programmers will switch off the equal. while a nice idea, even this is not that easy ~~if a = 1 then ~~begin // if it should be on it's own line end; 1) the begin is *or* is not expected to be intended, so the rule above should carter for that? Yes, a begin block is the exception - at least for some people. 2) the end should be aligned with the start of the line, that did have the begin ~~if (a = 1) and // some very long condition or comment ~(b=2) then writeln; Imho is correctly indented, because the then is already moved in. (in fact the 2nd condition line(5) is intended more (aligns the ( ) than the writeln line(4)) Yes, that's why the indentation of the 'do' and 'then' must be taken from the 'if', 'while', 'for', 'with'. if a = 1 then b:=2; writeln(b); Here the following token 'b' is on the same line. So the code observer will not list them. if a = 1 then b:=2; writeln(b); dito. the line continues behind the then = no indent is expected. if a = 1 then b:=2 else writeln(b); = I had no idea what indent was expected here? It should be listed because it is doubtful. But this is another rule: Check for 'else' followed by a token on the next line. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Special colors
Zitat von Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com: Hello, About clNone and clDefault clNone seams to mean black, is that it? No. System colors are context sensitive. clNone can mean transparent or default. clDefault would be to use the standard widgetset color, is that the intention? If yes, is it followed? Yes, if you replace 'color' with 'drawing'. I don't know if it is supported everywhere. Probably there are some places without default. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Modified .po files after each build
Zitat von Alexander Klenin kle...@gmail.com: 2009/4/15 Mattias Gärtner nc-gaert...@netcologne.de: Zitat von Alexander Klenin kle...@gmail.com: Additionally, many makefiles also get modified. Can you both provide more details to reproduce? Hm, I did a clean rebuild if recent SVN and now only two makefiles changed: components/sqldb/Makefile components/sqldb/Makefile.fpc Diffs attached. Thanks. The order of IDE packages has changed and so has the order of unit search paths. I updated the Makefile. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Modified .po files after each build
Zitat von Alexander Klenin kle...@gmail.com: On Wed, Apr 15, 2009 at 00:18, Graeme Geldenhuys graemeg.li...@gmail.com wrote: Hi, Recently it started to happen that every time I build Lazarus IDE after a clean checkout, after the build I have many modified .po files. Yes, this bothers me too. Additionally, many makefiles aloso get modified. These are separated things. Can you both provide more details to reproduce? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Large program size - 1.8 MB for empty GUI project
Zitat von Alexander Klenin kle...@gmail.com: On Wed, Apr 8, 2009 at 18:36, Mattias Gaertner nc-gaert...@netcologne.de wrote: In order to break the circles, you must first find them. Move all uses to the interface section and FPC will find them for you. As I already written some time ago, the solution is to introduce a hint/warning for the circular dependencies in implementation sections. This hint should probably be disabled by default, for compatibility reasons. Yes, a hint would be nice. But a hint won't be enough. It would go unnoticed too easy. Circles should not be created accidentally, because it takes extra time to break them afterwards. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Hints usability (was: Re: Large program size - 1.8 MB for empty GUI project)
Zitat von Alexander Klenin kle...@gmail.com: 2009/4/9 Mattias Gärtner nc-gaert...@netcologne.de: As I already written some time ago, the solution is to introduce a hint/warning for the circular dependencies in implementation sections. This hint should probably be disabled by default, for compatibility reasons. Yes, a hint would be nice. But a hint won't be enough. It would go unnoticed too easy. This is another important problem. Easily unnoticed hints are just useless. There are two related causes here: 1) The message window interface of Lazarus is currently very weak. (And it hides most of the hints by default, which I consider a bug in design). What hints are hidden? This interface is one thing I think is worth borrowing from Visual Studio. Can you give more details for the people who don't know VS? 2) The compiler produces _many_ extraneous hints, which is very harmful -- it is impossible to produce hints-free code, so new hints has much more chances to go unnoticed. True. First point is IMO of patches welcome category (and perhaps I will provide some, but don't count on that), but the second one is more fundamental. There are two main sources of harmful hints now: 1) Parameter unused. This is by far the main culprit. There are many cases when parameters are unused deliberately -- e.g. basic implementations of virtual functions, most events etc. OTOH, the hint is not _entirely_ useless and can in some rare cases point to a real bugs. The solution is to enable per-variable hint suppression. It is done in C/C++ by omitting variable name, but I think a better way would be a compiler directive. I see two variants: a) procedure TMyForm.Button1Click(ASender {$UNUSED}: TObject); b) procedure TMyForm.Button1Click(ASender: TObject); {$UNUSED ASender} The first one is slightly messy in case of many unused arguments, while the second one avoids duplicating their names, so I am not sure which is better. Implementing either of them will fix the problem. That's pretty much what I purposed a long time ago. I even implemented it once via IDE directives. But the code gets ugly and it worked only in lazarus. A compiler solution with some synedit sugar might improve this. 2) Uninitialized variable for auto-initialized strings. See http://bugs.freepascal.org/view.php?id=0013341 and http://bugs.freepascal.org/view.php?id=13370. Both issues were resolved as won't fix which IMHO was done without considering full picture. ... or because they considered an even bigger picture than you. Here is my argument: There are two possible approaches to non-initialized warning: a) Do not guarantee anything about non-initialized variables, complain on their usage. This is C/C++ route. It is not entirely consistent there as well (global variables of simple types are still auto-initialized to zero), but that is their problem. b) Makes some guarantees about variable initialization and complain only for the variables which are not initialized automatically. This is Object Pascal/Delphi route. It does not warn about global variables, object fields, strings and interfaces since they are guaranteed to be auto-initialized in a consistent way (and programmers rely on that). FPC seems to take the third route -- it inconsistently warns[1] about globals, strings and interfaces but not object fields. This is the worst of both worlds and should be fixed one way or another. Compatibility and language tradition dictate retaining auto-initialization, but I am not principle opposed to removing it -- this, however, should be a loudly declared lack of feature/incompatibility and have a good reason. Wrong list. Lazarus will not change the compiler. [1] FPC issues this warning even in Delphi mode, which is an outright bug. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] OT: Namespaces?
Zitat von Hans-Peter Diettrich drdiettri...@aol.com: Mattias Gärtner schrieb: why aliases units names are required? E.g. when you have multiple third-party units of the same name. Isn't that already supported by the 'in' modifier? For example: uses unit1, unit1B in '../test/unit1'; Heureka :-) While Delphi 7 requires that the unit name matches the file name, even when using IN, and AFAIR allows for IN only in the project file (*.DPR), FPC imposes no such restrictions. Now we can go on-topic: While FPC already supports true unit alias, FPC supports unit alias in a unit, but it does not support two different ppu with the same name. At least 2.2.3 does not. You will get linker errors, because identifiers of the second unit1 have still the same prefix. It is probably a bug, that FPC does not check and gives an error in this case. Lazarus (code completion...) cannot handle unit1B in your example :-( Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Large program size - 1.8 MB for empty GUI project
Zitat von Alexander Klenin kle...@gmail.com: On 2009-04-03, Marc Weustink marc.weust...@cuperus.nl wrote: Alexey S. Smirnov wrote: SmartLink problem is quite simple. It seems that all units, mentioned in Interface-Uses section will be fully linked. Only units mentioned in Implementation-Uses section can be checked during SmartLink. So, to enhance linking process and to reduce binary size we shell check all Interface sections of all LCL units to reduce units list. We have all units listed in the interface section to avoid unit circles. This is needed since the compiler will fail to compile the LCL sooner or later if there are to many circles. I strongly agree with Alexey here. The bug in FPC should be fixed and Lazarus source updated to remove unnecessary units from 'uses' clauses. Not so much for executable size, but for mantainabilty of the source. Yes. Avoid uses sections in implementations. This golden rule is true since the start of FPC. Using implementation uses sections is asking for trouble. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] OT: Namespaces?
Zitat von Marco van de Voort mar...@stack.nl: On Tue, Apr 07, 2009 at 11:36:43AM +0200, Mattias G?rtner wrote: Now we can go on-topic: While FPC already supports true unit alias, FPC supports unit alias in a unit, but it does not support two different ppu with the same name. At least 2.2.3 does not. You will get linker errors, because identifiers of the second unit1 have still the same prefix. It is probably a bug, that FPC does not check and gives an error in this case. Isn't the ..IN.. syntax is more created to correct case differences between unitname and filename ? From Delphi pov I don't see why that should matter. AFAIK under Delphi the 'in' modifier has two purposes: - mark the unit as part of the project - use a unit from a directory which can not be added to the unit search path, because there is a duplicate. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Large program size - 1.8 MB for empty GUI project
Zitat von Alexander Klenin kle...@gmail.com: On 2009-04-07, Mattias Gärtner nc-gaert...@netcologne.de wrote: I strongly agree with Alexey here. The bug in FPC should be fixed and Lazarus source updated to remove unnecessary units from 'uses' clauses. Not so much for executable size, but for mantainabilty of the source. Yes. Avoid uses sections in implementations. This golden rule is true since the start of FPC. Using implementation uses sections is asking for trouble. Eh... you mean 'no'? Because I argue _for_ 'uses' sections in implementation. Oops. Sorry, then I misunderstood you. Uses sections in implementation sections are buggy as long as I know fpc. The problems are known but apparently too hard to track and fix. The bugs appear at random and with various degrees depending on platform and fpc version. In some years you think the bugs are fixed, and then they come back. You have been warned: Don't use the imp sections. I thought this was known: http://wiki.lazarus.freepascal.org/DesignGuidelines Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] ide enhancement - method or cursor location belongs to what class?
Zitat von Alexander Klenin kle...@gmail.com: On Fri, Apr 3, 2009 at 00:13, Graeme Geldenhuys graemeg.li...@gmail.com wrote: On Thu, Apr 2, 2009 at 12:28 PM, Mattias Gaertner nc-gaert...@netcologne.de wrote: Code explorer can follow the cursor. Can you explain how? I tried all the settings in Code Explorer and nothing allows the following the cursor behaviour. Perhaps Mattias wanted to say that Code Explorer _could_ be made to follow cursor? Yes. The problem is speed. When you are typing you change the source and the unit has to to be parsed all over. So this should only happen when the IDE is really idle. We need a timer that starts on idle and is stopped on any user input. Maybe TIdleTimer can be extended. FWIW, I have many ideas for Code Explorer, and perhaps will even implement some of them -- but for now, my hands are full. Highlighting current cursor position is one of those. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] speed of SynEdit [Re: Wiki pages suggestion - feature comparison]
Zitat von Hans-Peter Diettrich drdiettri...@aol.com: Mattias Gaertner schrieb: At the moment the fpdoc editor is updated on idle in several steps. Maybe the update should be started after a short delay. Maybe. I'd suggest an thread, but I dunno about platform issues with threads. Threads work on all platforms (at least where the IDE runs). The problem is that many tools access the codetools (almost every file access and search). You need critical sections at a lot of places. Or you start a second thread with their own sources/caches. I also had an crash of lazde, caused by an formatting error in the text. Bugreport submitted. Thanks. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Wiki pages suggestion - feature comparison
Zitat von Graeme Geldenhuys graemeg.li...@gmail.com: Hi, Is there already a wiki pages that lists features that Lazarus has, but Delphi doesn't? Or features that Lazarus had way before Delphi did? Almost any wiki page mentioning Delphi mentions features that Delphi doesn't: Linux, OS X, WinCE ... support. I always get told that Lazarus is light years behind Delphi. I always disagree, but would like to point them to a web page to list those items. eg: * Lazarus has much better Packages than Delphi's dumb packages. * Lazarus has much better alignment properties * Lazarus had visual alignment queues in the form designer before Delphi did * LCL's TStringGrid is *much* better that VCL's equivalent. * Free Pascal generics before Delphi did. * smarter use of include files. * Free Pascal compiler modes feature. etc... I think you get the idea. I guess the right place is near here: http://wiki.lazarus.freepascal.org/Lazarus_For_Delphi_Users#The_biggest_differences Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Define Symbols in SynEdit
Zitat von saeka saeka...@gmail.com: Hello, developers. SynEdit.pp source code has a lot of 'SYN_MBCSSUPPORT','SYN_LAZARUS'. It seems to be SynEdit was compiled by defines SYN_MBCSSUPPORT originaly but now, that is undefined by SYN_LAZARUS.$B!!(B(in SynEdit.inc) SYN_MBCSSUPPORT is defined by supporting MultiByteCharacterSystem on FarEastAsian Windows, but MBCS is not equal to UNICODE. Now, SynEdit in Lazarus is working at UNICODE, ( Its very nice for us.) and SynEdit in Lazarus is highly customized for Lazarus and FreePascal. I have created patch on released version 0.9.16-0.9.24 to Japanese Community in which enabling SYN_MBCSSUPPORT. (http://sourceforge.jp/projects/freepascaljp/releases/?package_id=5278) Now, that is not smart way after 0.9.26, I think. In Unicode, no additional defines needed in handling character. How about delete symbols, and delete IFDEF codings , if it will not be used in the future ? (SYN_MBCSSUPPORT, SYN_LAZARUS, and defines about delphi version) They were kept to eventually merge the changes to synedit. But the differences became too big, so it makes no sense anymore to use syn_lazarus. They can be removed. Martin already started to clean up the code. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 0.9.27 rest unit1.lrs on windows desktop whensave new Application
Zitat von ÷ÌÁÄÉÍÉÒ óÒÅÄÎÉÈ cobalt...@mail.ru: Suppose, it's because of shortcut to Lazarus does not contain Work Directory, and it became Desktop. From this point i think, that write to, or read from somefile does not good. Good practice is to specify FULL path to file any time. The IDE will cut any full path automatically. [...] Steps to reproduce: Start Lazarus. Menu File-New...- Application then Menu File-Save All, save all files to new created directory Look at desktop and find out unit1.lrs If i add one more forms to project, then for each unit will be unitN.lrs on Desktop Are these created already before saving or after you saved the new unit? The .lrs files should be put into the same directory as the .ppu files (the unit output directory). This has been changed recently. Where are the .ppu files created, when you compile? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to query Enabled/Disabled component state?
Zitat von Graeme Geldenhuys graemeg.li...@gmail.com: Hi, Something weird I just noticed. I have not tested this under Delphi 7, but I have tested it with Lazarus GTK1 and GTK2 widget set. See attached image to help explain If I do Panel1.Enabled = False, all components are disabled (visually). This is what I expected. But if I now query Edit1.Enabled, it returns True. Also if I query CheckBox2.Enabled it also returns True. Is this a bug? For some reason I expected all child components to be Enabled = False, because that's what they are. Once Panel1 is disabled, I cannot set focus or interact with any child components. They are even painted in disabled state. How do I pragmatically detect if a component is really enabled or disabled? Seems that the logical way of quering the component's Enabled property gives false information. Most LCL properties are relative. Left is relative to Parent, Visible hides all childs too, etc. As Michael said: Use CanFocus, which uses IsControlVisible and parent enabled. Use IsControlVisible to check whether a control is visible on the form. It checks parents and things like multi pages. It does not check whether the control is clipped. There are almost always exceptions to the rules. It depends on what you want to achieve. Where is a good place to document this? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Docking and Layout managers
Zitat von Hans-Peter Diettrich drdiettri...@aol.com: Mattias Gaertner schrieb: I'd suggest a layout layer, between TControl and TWinControl, dealing with child controls (e.g. TContainerControl). As Paul pointed out, a TWinControl uses system resources (handles), which are not required for layout (and docking) managers. TWinControl has childs, TControl has not. This is usually tested with if AControl is TWinControl then If a TContainerControl that is not a TWinControl has childs this test will break. It only won't work if the old checks are used together with the new controls. Maybe I misunderstood your proposal. What parts of TWinControl should be moved to TContainerControl? Do you want to move the ControlCount and Controls properties to TContainerControl? What about TControl.Parent? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] ideintf path to executable
Zitat von Leslie Kaye les.k...@couchmansfarm.plus.com: Johannes Müller wrote: div class=moz-text-flowed style=font-family: -moz-fixedHi, I wrote an IDE-plugin but i have a small problem to determine the path to the compiled executable. I found the propertys in ideintf to geht the path of the project-files. But how can I get the path, were the compiled executable of the active project is stored? ExtractFilePath(Application.ExeName); ? He meant the executable path of the current project at design time. See here http://wiki.lazarus.freepascal.org/Extending_the_IDE#The_executable_.2F_target_file_name_of_a_project Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] [*] --Re: Unicode data
Zitat von theo x...@theo.ch: Please apply the attached patch for ide/charactermapdlg.pas Applied. Thanks. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Docking and Layout managers
Zitat von Hans-Peter Diettrich drdiettri...@aol.com: Mattias Gärtner schrieb: Maybe I misunderstood your proposal. What parts of TWinControl should be moved to TContainerControl? Do you want to move the ControlCount and Controls properties to TContainerControl? Yes, all the child control related stuff. I'd move that into the LayoutManager, and redirect all related methods and properties to that helper object. Then the LayoutManager is as exchangable as the DockManager. What about TControl.Parent? It will be of type TContainerControl, of course. I admit that the tests for TWinControl have to be revised accordingly, but there remains more to do. E.g. it's nonsense when TWinControl redirects docking and other messages to TControl, which then again delegates the job back to its own TWinControl parent. All that docking and child control handling stuff should be entirely removed from TControl, and also from TWinControl, and instead should be moved into the layout and docking helper objects. I'm just about to find all that stuff, and to implement a direct connection between e.g. TDragManager, TDockPerformer, and the DockManager. The legacy interface of all classes can survive that update, the revised methods only will redirect the tasks immediately to the final worker object. These are highly desireable changes, regardless of whether we introduce a new layout layer class or not. We might use conditional compilation, so that in case of trouble the old class tree remains intact, for debugging and as a last resort in case of trouble with legacy code. IMO we should cut some of the old trees, in order to see the wood for trees again. First of all: Yes, that would be better from object oriented point of view. But: At least 90% of TWinControl is about its child controls. The rest is mostly key, mouse and focus handling. I guestimate, TContainerControl will have about 1-3kloc code, 500loc will stay in TWinControl and the remaining 4-6kloc will go to the new docking/layout classes. There is no question, that such a big change is Delphi incompatible. The question is how much: - A lot of code (outside the LCL) relies on the fact, that AControl.Parent is a TWinControl and has a handle (exact: can have a handle). The compiler will not find all places that needs to be fixed. For example: procedure RecursiveCall(AWinControl: TWinControl); begin for i:=0 to ControlCount-1 do if Controls[i] is TWinControl then RecursiveCall(TWinControl(Controls[i])); end; This recursive call won't find all children anymore. So all users have to check every place manually, where TWinControl is used and maybe replace it with TContainerControl. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Vote for Property Editors to stay on top
Zitat von Leslie Kaye les.k...@couchmansfarm.plus.com: I write to canvas your support for the idea that property editors should stay on top. In Delphi property editors stay on top so that for instance you can have an ActionList editor open and continue to work on the source code editor underneath. In Lazarus property editors are initially shown but soon become buried under other IDE windows so that either they are difficult to find or you forget them all together. regards Leslie Example for Collection Editors: code should be modified in /lazarus/ideintf/propedits.pp class function TCollectionPropertyEditor.ShowCollectionEditor( ACollection: TCollection; OwnerPersistent: TPersistent; const PropName: String): TCustomForm; begin { // proposed code removed if CollectionForm = nil then CollectionForm := TCollectionPropertyEditorForm.Create(Application); CollectionForm.SetCollection(ACollection, OwnerPersistent, PropName); CollectionForm.EnsureVisible; } // end code removed // proposed new code if CollectionForm = nil then begin Application.CreateForm(TCollectionPropertyEditorForm, CollectionForm); CollectionForm.FormStyle := fsStayOnTop; end; CollectionForm.SetCollection(ACollection, OwnerPersistent, PropName); CollectionForm.Show; // end new code Result := CollectionForm; end; Note: Please remember that the concept of fsStayOnTop is windows specific. fsStayOnTop is very annoying under X, because it stays on top of everything. Gladfully fsStayOnTop only works if BorderStyle=bsNone under X. Mac OS X knows more window modes than windows and X together. Eventually we need some TCustomForm properties to get the whole range of possibilities of all platforms instead of only the few winapi modes. Maybe this behavior should be configurable and the default should depend on the platform. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Free Open Source Diagram Components for Lazarus?
Zitat von t...@free.fr: Hello, Thanks for the links. Obviously, Python is not our answer!!! However, it does mean people feel free to port the code. The next questions: - How many people would be interested in porting StarUML to Lazarus? We probably would need several people to do the port, probably at first to Lazarus/Windows, then to other OSes - Would the Lazarus project care to host a porting project like this one? Because I want to use it in the IDE, I need a FPC solution, with a GPL compatible license, for example by porting some Delphi code. Seeing the other solutions, I wonder why you want to start from scratch. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] report a bug
Zitat von Héctor Fiandor Rosario hfian...@infomed.sld.cu: in the 0.9.27 with FPC 2.2.3 the component palette is not completed (TImages and others are in fault) There is no TImages. There is a TImage under additional and a TImageList under common controls. 0.9.27 r18462 fpc 2.2.3 linux gtk2. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] is it me or a bug that i ve been fighting?
Zitat von waldo kitty wkitt...@windstream.net: Martin Friebe wrote: Anyway, unless you are willing to spent time on debugging the issue your self, and go into the depth of the Connector code, this will probably be of little help. i've finally been able to work out the following... MySQLConnection: TMySQL50Connection; TMySQL50Connection = Class(TConnectionName); TConnectionName = class (TSQLConnection) TSQLConnection = class (TDatabase) TDatabase = class(TCustomConnection) TCustomConnection = class(TComponent) TComponent = class(TPersistent,IUnknown,IInterfaceComponentReference) TPersistent = class(TObject) it works out that MySQLConnection.Close is TCustomConnection.Close but if i hover the mouse over Close in Procedure Close; in the public section of the TCustomConnection definition stuffs, the editor wants to point to the textfile close routine Close(var t:Text); which definitely isn't the same thing :( The hint window shows the next declaration. For example: MySQL50Connection.Close; When the mouse is over 'Close' it will show TCustomConnection.Close, because TConnectionName and TSQLConnection don't have a 'Close'. When the mouse is already over a declaration, then it shows the next declaration with this name, so you can see what this declaration hides. For example when the mouse is over the procedure Close; of TCustomConnection then it will show the 'Close' procedure of the system unit. and with all of the searching i've done, i still don't see anything that indicates where i can actually lay eyes on the code for TCustomConnection.Close Move editor cursor over 'procedure Close;' of TCustomConnection and press Ctrl+Shift+Down. It will take you to procedure TCustomConnection.Close; begin Connected := False; end; Do Ctrl+Click on 'Connected' and it will jump to property Connected: Boolean read GetConnected write SetConnected; Do Ctrl+Click on 'SetConnected' and it will jump to procedure SetConnected (Value : boolean); virtual; Since this is a virtual method it might be overloaded. But in this case it isn't. So press Ctrl+Shift+Down to jump to the method body. And so forth ... nor do i see anything indicating that it is assigned to another routine going by another name :? now i know why i much prefer the old-style procedural coding methods :P If you get the stack backtrace you can mail it and hope some one knows about... i still don't know what this involves :( http://wiki.lazarus.freepascal.org/Creating_a_Backtrace_with_GDB Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Can a frame be registered into the component pallette?
Zitat von Funky Beast funkybe...@pacific.net.sg: Hi, May I know if i can register a frame that I designed into the component pallette? No. You must manually add your package to the project, then you can select your frame. If it can, I would like to know if I include the component icon using the same process as any other kind of components. Eventually. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] File encoding changing silently
Zitat von Gabor Boros gaborbo...@yahoo.com: Hi, I am fighting with an ansi/unicode/utf8 problem and during this war observed a strange thing for me about file encoding. When a new project created the encoding is CP1250 (from File Setting/Encoding ) for me. That's wrong. It should be UTF-8. (Unless you are using some other templates.) I fixed one place in r18166. Please test. Then saved the project the encoding is CP1250 in File Setting/Encoding. But when reopen the project (with or without close Lazarus) Encoding displays UTF8. Is it normal? Lazarus convert encoding automatically or new files created with UTF8 but File Setting/Encoding display wrong value? The IDE guesses the encoding on loading. Normal pascal units contain only ASCII characters, where CP1250 and UTF-8 are the same. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] File encoding changing silently
Zitat von Gabor Boros gaborbo...@yahoo.com: I discovered next things. Created new project and encoding is UTF8. It is good. But set encoding to CP1250 and go into File Settings/Encoding no check appears before any item. Are you sure? Is there a menu item with a bracket? But this problem showed only once. Second problem. The files created with UTF8 now. Right. But if set Encoding to CP1250 (after pressed Change file) File Settings/Encoding displays good CP1250 value but if reopen the project the File Settings/Encoding displays UTF-8 again. Are there any CP1250 characters in the file? The IDE does not save the information about the encoding. It only saves the text in the encoding. If the file contains only ASCII characters, then setting CP1250 as encoding has no effect. You can add {%encoding CP1250} as the first line. BTW, why do you want to use CP1250 as encoding instead of UTF-8? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] about gif images
Zitat von Graeme Geldenhuys graemeg.li...@gmail.com: On Sat, Dec 20, 2008 at 4:07 PM, Mattias Gaertner nc-gaert...@netcologne.de wrote: Do you have a fpimage reader for gif? No, fpGUI Toolkit only supports a limited BMP format at the moment. I'll start work on fpimage support in the new year. I just sent a gif reader based on Laurent's to Michael VC. It needs to be extended to read multiple images and the animation attributes. [...] Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] flickering on statusbar panel
Zitat von Andrea Mauri andrea.mauri...@gmail.com: Yes, but the flickering remains both with DoubleBuffered:= True and DoubleBuffered:= False. The only difference is that using DoubleBuffered:= True the statusbar seems to be repainted faster. TWinControl.DoubleBuffered can only fix the flickering when repainting the same (erasing plus painting the same content as the last time). It can not fix the flickering when the text on the statusbar changes. To fix this flickering your painting must be in sync with your monitor. See the vertical sync option for your graphic card. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] The Data-Model for SynEdit / The Data Model for Lazarus [Code Structure / SourceEdit and SyneEdit]
Zitat von Martin Friebe laza...@mfriebe.de: [...] But for Lazarus a benefit could be, that such a model could also contain data, on top of the information hold for synEdit. The Lfm (FormDesigner) info could become part of this. What has synedit to do with the form designer? I'm not sure how synedit should handle the unit concept. The lfm is associated with the unit. A unit has a starting file (e.g. unit1.pas) and an arbitrary list of include files, plus the po file of the project/package, the fpdoc xml file and .res files. Each of them work together and need very different code. The it would only need an appropriate serialize class to save all of them. This may simplify the current implementation (even so I admit much based on assumption on fragmented knowledge) which has to retrieve this info from the various components. (the need for the source-editor or main ide to fetch the text from SynEdit) synedit is the 'lines' view of the sources. Most of the lazarus code don't work with lines, but with whole files or absolute positions. The Model could also carry callback lists, so the anybody who needs to know that it was loaded or saved could register a callback Model.AddOnSerailizedCallback( AMethod ) AMethod may be called with the reason, why serialization took place (e.g saved to file) Just starting some basic thought on it. It will be a very long way, and a very long time before any of this goes into implementation. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] The Data-Model for SynEdit / The Data Model for Lazarus [Code Structure / SourceEdit and SyneEdit]
Zitat von Martin Friebe laza...@mfriebe.de: Mattias Gärtner wrote: Zitat von Martin Friebe laza...@mfriebe.de: [...] But for Lazarus a benefit could be, that such a model could also contain data, on top of the information hold for synEdit. The Lfm (FormDesigner) info could become part of this. What has synedit to do with the form designer? I'm not sure how synedit should handle the unit concept. The lfm is associated with the unit. A unit has a starting file (e.g. unit1.pas) and an arbitrary list of include files, plus the po file of the project/package, the fpdoc xml file and .res files. Each of them work together and need very different code. The other way round. Synedit has no interest in the other structures. But the IDE may have an interest in a structure holding the combined data. As I said, I have not looked at how this is currently handled. Or if there is a common DataStructure for a pascal Unit. There is no single data structure that holds all data of one unit. I will inform my self (by reading up the source) when I have the time. There was a discussion between you and Paul on the dev-list: doable except one thing. I dont know where to hook before unit save event. We just dont have it. Moreover unit save is not that plain as one can expect. At least I expected sourceeditor have something like Save method. No, because the source editor is only one part of the IDE, so a save must be handled one level higher saving is not as plain as one can expect yes the Ide will or should have some structure holding the combined data. Sometimes only parts are known. The glue class is TUnitInfo. It does not hold all data, but with it you get to everywhere else. But at current it appears it has to go down to code-tools and/or SynEdit (or SynEdit via code-tools) to get the actual Text. Correct. The actual file content is in the codetools. The actual lines as seen in the source editor is in synedit. The codehelp can hold the xml nodes. The form designer holds the lfm as component. ... Synedits Data holding structure could either be more integrated into that IDE structure (if that is there, I will look for it later). Or It could be subclassed, extended and used for a higher purpose than just SynEdit. I will have to look at the current structures to see if that makes any sense at all. I just threw it in as an Idea, seeing if I get some feedback. The it would only need an appropriate serialize class to save all of them. This may simplify the current implementation (even so I admit much based on assumption on fragmented knowledge) which has to retrieve this info from the various components. (the need for the source-editor or main ide to fetch the text from SynEdit) synedit is the 'lines' view of the sources. Most of the lazarus code don't work with lines, but with whole files or absolute positions. So what if SynEdit could have a model (An object exposing it's data) in both ways? The codetools have that already. But for speed you have to optimize in one way or the other. You can not have both fast. This is not a proposal to throw over all the working code. This is first to see which directions make sense inside SynEdit, and maybe SourceEditor at some stage. Once that has developed into a more modular form, and gained the ability to provide that functionality, it can be reviewed, if any other code could benefit from it. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Code Structure / SourceEdit and SyneEdit [Re: Mouse Link in SynEdit (only link-able items)]
Zitat von Hans-Peter Diettrich drdiettri...@aol.com: Martin Friebe schrieb: Then how to you handle double width chars? This si one of the problems I still have to address. Even in a proportional font, some chars (Chinese, and other) have twice the width of a normal char. They will 2 positions in the grid. Actually it is the same issue as tabs. Are these characters inside the Unicode BMP? AFAIK: yes. All chinese characters are in some fonts double wide characters. [...] That's why keep both the characters and their text attributes in the line buffer, passed to the painter. I started with separate regions, describing the begin and length of tokens, selection etc., but it turned out that the handling of overlapping regions is accomplished easier by a direct mapping of the text attributes to every single character. The text attributes then can be used to e.g. determine, whether the mouse is over a (character in a) hyperlink. What means 'text attributes to every single character'? How much memory is needed for a 10mb text? [...] One such case is the docking manager, where I still don't see a chance to implement an different manager separately from Controls.pp. The anchor docking sample in fact lacks the drag-dock functionality, because the implementation would require access to and modification of the existing code base, hidden in the implementation section of Controls.pp. An extraction of the hidden classes leads to circular unit references all over, protected methods are inaccessible from other classes etc. The anchor docking lacks dd because my plan is: first finish the restore layout and get manual things stable. Then implement dd. But at the moment I have other priorities than docking. If the dd properties/methods are not sufficient in the LCL then they can be extended. [...] Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Code Structure / SourceEdit and SyneEdit [Re: Mouse Link in SynEdit (only link-able items)]
Zitat von Hans-Peter Diettrich drdiettri...@aol.com: Mattias Gärtner schrieb: Even in a proportional font, some chars (Chinese, and other) have twice the width of a normal char. They will 2 positions in the grid. Actually it is the same issue as tabs. Are these characters inside the Unicode BMP? AFAIK: yes. All chinese characters are in some fonts double wide characters. What double, 4 bytes or double display width? double display width. The font is called 'monospace' but has two different widths. chinese characters are twice the width as the other characters in the font. Double width on the display could be fixed by simply doubling their indicated width, if it applies to all characters in that codepage. Monospaced doesn't mean quadratic ;-) [...] What means 'text attributes to every single character'? How much memory is needed for a 10mb text? The text attributes only are stored in the line buffer of the line to be painted, nowhere else. ok [...] The anchor docking lacks dd because my plan is: first finish the restore layout and get manual things stable. Then implement dd. But at the moment I have other priorities than docking. Oh, that's you, too? :-) Yes, the world is small. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] csvexporter
Zitat von Andrea Mauri andrea.mauri...@gmail.com: Dear all, when I put a csvexporter on a form lazarus automatically adds to my project lazdbexport unit if I am under windows and fpccsvexport if I am under Linux. I didn't try cvsexporter myself. Correct me if I'm wrong: When you drop a cvsexporter component onto a form, the IDE adds a unit. And this unit is different on windows and linux? If yes, then yes, you have to do the below. So I have to do this: {$IFDEF WINDOWS} lazdbexport; {$ENDIF} {$IFDEF UNIX} fpcsvexport; {$ENDIF} Is it ok? ... although IMO the package should be restructured, so that the IFDEFs go into the package instead of to the using code. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Mouse Link in SynEdit (only link-able items)
Zitat von Alexander Klenin kle...@gmail.com: On Fri, Dec 12, 2008 at 02:12, Martin Friebe laza...@mfriebe.de wrote: Alexander Klenin wrote: So if you have time and expertise, please read the mail threads mentioned in the bug report and provide me with insight ;-) I'll look further into it. A few things: - GetHighlighterAttriAtRowColEx may not be the best idea. It can be quite useful to be able to click on words in comments to. (Which works at current). Indeed, I missed that. - The highlighter is overall not the best solution to find linkable text. Because even a valid bit of code, may be unresolvable to codetools. Another way would be to ask codetools them self. Similar like SynEdit calls SourceEditor, which calls SourceNoteBook and then MainIDE.OnSrcNoteBookClickLink line 2952 in ide/main.pp ( see also line 1778: SourceNotebook.OnClickLink := @OnSrcNoteBookClickLink; ) Now _that_ is what I wanted to hear when I started the original thread ;-) Good idea, I attached a new version of patch to the http://bugs.freepascal.org/view.php?id=12785. I should note that I was horrified by the amount of glue code needed to route an event through main form, source notebook, source editor and SynEdit. The IDE is structured in a hierarchy. mainide: the top level of the IDE and the central nerve system. Because of its size it's splitted into several units. This is the 'integrated' in IDE. It connects the various modules like debugger, package system, codetools, designer, etc. source notebook: the whole source editor source editor: one single editor (at the moment in the same unit with source notebook, but should eventually split up) synedit: visual control Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TBitmapCanvas public
Zitat von Paul Ishenin [EMAIL PROTECTED]: Coppola Ing. Salvatore пиÑеÑ: Coppola Ing. Salvatore wrote: Hi, can the TBitmapCanvas be declared public (I mean before implementation) in the unit Graphics? I assume is NOT! No, assume silence as nobody remember why it is so and nobody have time to look :( Because there was never a reason to make it public. Private things can be changed easier. Why should it be made public? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TBitmapCanvas public
Zitat von Coppola Ing. Salvatore [EMAIL PROTECTED]: [...] can the TBitmapCanvas be declared public (I mean before implementation) in the unit Graphics? [...] There are some Printer Preview such as PagePrinter based on Windows TMetafile and TMetafileCanvas. Replacing TMetafile with TBitmap and TMetafileCanvas with TBitmapCanvas with some little change they can works under Linux and other OS to. What TMetafile do you mean? There is none in the LCL. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] WinCE 2.2.3 Snapshot Problem
Zitat von Vincent Snijders [EMAIL PROTECTED]: 2008/12/9 [EMAIL PROTECTED]: Thanks Felipe That's exactly what it is. Is there a reason why fpc.exe can't be the default for snapshots? AFAIK, it is the default. At least not in the IDE sources. Now it is: r17757. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Environment options corrupted
Zitat von Tom Verhoeff [EMAIL PROTECTED]: We use Lazarus in our first year programming education (as an experiment). There are various issues that we encounter, some small, some bigger. OS? FPC Version? Laz Version? Here is one that I don't understand. We have had a few instances where a window consistently failed to show up: * Object Inspector * Messages In both cases, it turned out that the saved options were to blame. In one case, I advised to remove all user-specific Lazarus configuration files (including environmentoptions.xml). Restarting Lazarus, will apparently recreate default option settings. The window then did show up. In another case, I looked a little further and noticed that the window position for the Messages window had a very large Top coordinate (as saved in environmentoptions.xml). So, it probably did open, but outside the visible screen region. I edited the options xml file, restarted Lazarus, and the window appeared again. As you can immagine these are quite annoying experiences (not only for the students, but also for teachers). Questions: * How can a student easily overcome this situation? Is there e.g. a way to sanitize saved options? Note that finding the relevant file is not trivial (so it is harder for me explain manual santization in a FAQ). * How can this happen in the first place? Either by closing the IDE on a big screen resolution and opening it on a small one. OR because of a bug in the widgetset returning the wrong window coords. * What can be done to avoid this in the future? I added some checks so that the IDE applies some bounds to the restored windows positions, so that at least a portion of the window should be visible. r17758. We can not auto move the whole window onto the screen, because some people need negative coords. Our Lazarus FAQ: http://www.win.tue.nl/~wstomv/edu/lazarus/faq.html :) Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] First steps
Zitat von Hans-Peter Diettrich [EMAIL PROTECTED]: More topics: The form designer windows should be closed on start of the program - but I couldn't find an according option. Do you mean: Environment / Options / Environment / Form Editor / Auto create forms when opening a unit ? Docking should be handled properly in design state (Windows). It's unclear whether it should be possible to dock forms at design time, or whether it should be disabled at all. It seems to me that at design time only the default dock manager can be used, so that docking at design time doesn't make much sense? No docking at design time. What about the LazDoc programs? They don't compile at least since 0.9.26 :-( What lazdoc program does not compile? When I use the built-in FPDoc, how to publish the results? Do you mean, you want to see the fpdoc content without the IDE, for example as html or chm files? See the fpdoc documentation on the freepascal website. What about integrating lazde, at least a bigger GUI? The main purpose of the fpdoc editor in the IDE is for lazy programmers so that they at least write a short sentence for each element. It is not meant as a real help editor. That's the purpose of lazde. It's a pain to tab between abstract, inherited and detailed descriptions in FPDoc, in order to find out about missing documentation for an topic. Yes, buttons to jump to next/prev undocumented elements are not yet implemented. Feel free to create a feature request in the bug tracker. I'm also missing means to create and link kind of overviews. That one too. They are called 'topics' in fpdoc. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] First steps
Zitat von Hans-Peter Diettrich [EMAIL PROTECTED]: Mattias Gärtner schrieb: More topics: The form designer windows should be closed on start of the program - but I couldn't find an according option. Do you mean: Environment / Options / Environment / Form Editor / Auto create forms when opening a unit ? No. When a GUI program is started in the IDE, the designed forms stay on the desktop and are overlaid when the windows are created by the application. Moving the runtime form reveals the designtime form, what's very confusing. I see. At the moment there are only two choices: nothing, and hide all IDE windows. You want to hide only the designer forms. Probably the OI and the anchor editor should be hidden in that case too. Either the checkbox should be replaced with a radiogroup or with a checkgroup. What do others think? Docking should be handled properly in design state (Windows). It's unclear whether it should be possible to dock forms at design time, or whether it should be disabled at all. It seems to me that at design time only the default dock manager can be used, so that docking at design time doesn't make much sense? No docking at design time. Then it should be properly disabled. As a workaround I leave the designed mode as dmManual, and turn it into dmAutomatic in FormCreate - but that's not a solution to the problem. Docking should *not* work for components with csDesignTime - that means the LCL should prohibit it. Can you give some more details how to reproduce this bug? What about the LazDoc programs? They don't compile at least since 0.9.26 :-( What lazdoc program does not compile? Neither FPDoc nor lazde. Others untested... fpdoc is the command line utility of FPC. Maybe you mean fpdocupdater? When I use the built-in FPDoc, how to publish the results? Do you mean, you want to see the fpdoc content without the IDE, for example as html or chm files? I want others to see my updates, too. I'm not sure what you mean. If you share the sources with others then they have the fpdoc xml files too and so they can see your changes. What about integrating lazde, at least a bigger GUI? The main purpose of the fpdoc editor in the IDE is for lazy programmers so that they at least write a short sentence for each element. It is not meant as a real help editor. That's the purpose of lazde. Then please make it compile, or provide at least a working binary. Done in 17762. It's a pain to tab between abstract, inherited and detailed descriptions in FPDoc, in order to find out about missing documentation for an topic. Yes, buttons to jump to next/prev undocumented elements are not yet implemented. That's a minor feature, which I have just implemented in PasDoc. I can add such things to fpdoc/lazde, as soon as these compile. What I want is an instant overview of the amount of documentation for an identifier. I'm willing to improve the documentation (so that I get an overview myself ;-), but herefore I need somewhat comfortable tools. ;) Feel free to create a feature request in the bug tracker. Done. I'm also missing means to create and link kind of overviews. That one too. They are called 'topics' in fpdoc. Ah, thanks :-) DoDi ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus -- Powered by NetMail ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cross platform development (not compiling)
Zitat von Reenen Laurie [EMAIL PROTECTED]: When I work cross platform (develop at home on linux, and at work on windows), I have to have separate .lpi / lpr files for linux and windows... My assumption is that this line in the windows (lpi) version makes it not work: RunParams local FormatVersion Value=1/ LaunchingApplication PathPlusParams=/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)/ /local /RunParams Obviously that's not windows... Do all of you have to keep a project_win and project_lin .lpi and lpr ? No. I only have one lpi and lpr per project. But I don't use launching application. Maybe launchingapplication should be moved to lps? Marc can tell. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cross platform development (not compiling)
Zitat von Felipe Monteiro de Carvalho [EMAIL PROTECTED]: I think the solution would be having build modes, as already discussed and planned for 0.9.28. I also need this feature. build modes are only for compilation. Not for debugging. Maybe you want debug modes? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus on Mac OS 10.5, 10.4
Zitat von Geoffrey Barton [EMAIL PROTECTED]: How do I setup Lazarus so that programs compiled under OS 10.5 will also run on machines using 10.4? Compile the LCL with -dDisableCWString. You need the lazarus svn source code of 0.9.27. Reason: The current cwstrings unit, which is needed for non UTF-8 environments, links statically to a library version. I'm not sure where to put this on the wiki. My wishlist: The LCL needs a widestring manager linking dynamically and only be loaded if needed. And there should be no conversions if UTF-8 is already the system encoding. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus on Mac OS 10.5, 10.4
Zitat von Felipe Monteiro de Carvalho [EMAIL PROTECTED]: Oh, there is a lot more to it then that! To start with you need to link to the 10.4 framework and you need to have it installed in your computer (I think you probably have if you did a full XCode install). I would ask in Mac-Pascal mailling list if I were you (google). I installed the apple developer tools on a 10.5, installed laz and fpc and compiled lazarus without cwstring unit. The produced LCL applications run on 10.4 and 10.5. I didn't even alter the linker options or library paths as described in the wiki. So apparently a simple LCL app does not need much. Maybe some special controls need some special libs? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Curved text
Zitat von Michael Van Canneyt [EMAIL PROTECTED]: Hi, Does anyone by any chance have a routine to draw curved text ? aggpas has. I didn't use it yet with fpimage. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Where does Lazarus store/look for global settings/options?
Zitat von Luca Olivetti [EMAIL PROTECTED]: En/na Mattias Gaertner ha escrit: On Mon, 01 Dec 2008 14:45:55 +0100 Luca Olivetti [EMAIL PROTECTED] wrote: En/na Mattias Gaertner ha escrit: ;) Actually lazarus knows the paths to the packages inside the lazarus sources, because they have packager/globallinks/*.lpl files. When you setup a second config directory it needs to know the outside packages. Well, when I switched from svn to 0.9.28, and built it with lazbuild, I ended up with components and the lcl from svn instead of 0.9.28. This happens when you use only one config directory instead of two. Well, yes, but had I used a different config directory I would have had to manually reinstall the components. Yes. Two lazarus means more work. And less than twice the work. Besides, while switching from svn to a release isn't so common, upgrading from one version to the next is. The installation packages install Lazarus always in the same location. There was no need yet to auto update paths. Can you explain what the problem is when upgrading? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to unset bookmarks in the editor?
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: On Wed, Nov 26, 2008 at 11:19 AM, Mattias Gaertner Maybe you want to post your dvorak key mapping for laz somewhere. As my other post suggested. I am considering printing out my layout - so even I can remember everything. :-) If I decide to go through all that trouble, I will make it available on the Lazarus wiki somewhere. A function to print the current key mapping would be a great feature. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Where does Lazarus store/look for global settings/options?
Zitat von Tom Verhoeff [EMAIL PROTECTED]: On Mon, Nov 24, 2008 at 08:03:18PM +0100, Mattias Gaertner wrote: On Mon, 24 Nov 2008 18:04:38 +0100 Tom Verhoeff [EMAIL PROTECTED] wrote: Where do they go under Windows and Linux? Linux, BSD, Solaris: $HOME/.lazarus Windows: depends on the installation. I'm not sure if GetAppConfigDir depends on windows version. Maybe Vincent can tell. You can see the config directory, when starting the IDE on the console. Is it searched in only one location, or is there a sequence of locations that is tried? Hint: Use find declaration on GetAppConfigDir and see what it does. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Where does Lazarus store/look for global settings/options?
Zitat von Luca Olivetti [EMAIL PROTECTED]: En/na Mattias Gaertner ha escrit: IMO it should go to development documentation, because these files are almost only edited by the IDE itself. I never edited them myself manually. I would even say: If you need to edit/inspect them, then you found a bug. Then I found a bug ;-) I reported here before that, when switching lazarus version I ended up mixing bundled components from the old version to the new one, so I had to manually edit those files to fix the paths. What components, what paths? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to unset bookmarks in the editor?
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: On Tue, Nov 25, 2008 at 4:07 PM, Marc Weustink [EMAIL PROTECTED] wrote: I don't call it an issue. If I don't need a bookmark, I don't use it :) So it doesn't bother me that it is somewhere assigned. When I need it at another place, I jsut press ctrl+1 to set it there Well the problem is that I sometimes have a few bookmarks. They don't always start at 1. eg: 2, 4, 6 (I use Programmer Dvorak keyboard layout, and the numbers are not in sequence like Qwerty). Now if I mistakenly press Ctrl+Shift+1, it might jump to a totally unrelated unit - compared to what I am working with. This is very annoying - I already have to many units open at once. :-) Is the Ctrl+number a toggle feature like Delphi and it's just broken in Lazarus, or does Lazarus IDE work fundamentally different? It has never been a toggle, but I can see a use for it. Thanks Marc, I'll search the mailing list, but yes, there is a big benefit for toggling the bookmarks. There is also a big benefit in not having persistent bookmarks. Could somebody with the right knowledge of Lazarus IDE make these user selectable options? I would do it myself if I could, but I find it hard enough just to add IDE shortcuts to add-on I create - so I have no clue where to even start looking for Lazarus IDE keyboard behaviour code. Maybe the best solution for you Graeme is if the IDE automatically removes bookmarks if they are older than x hours. BTW, bookmarks are deleted, if you set another bookmark at the same line. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] WebLaz Question
Zitat von Lee Jenkins [EMAIL PROTECTED]: Joost van der Sluis wrote: Op dinsdag 18-11-2008 om 20:04 uur [tijdzone -0500], schreef Lee Jenkins: ABorka wrote: It might be that http://bugs.freepascal.org/view.php?id=12375 is not applied yet. Are you making a CGI program or Apache modules? Windows or Linux? Also make sure you include the proper httpd files from the fpc source folders (httpd22, httpd20) if it is apache module you do. Lee Jenkins wrote: Anyone using the WebLaz package? I can compile the demo but when get error when trying to load the datamodule for these demos. I have installed the weblaz.lpk. Hi it's CGI. Odd that everything compiles ok, but there is apparently no designer support for the datamodule for some reason. I was using powtils, but that doesn't seem to be supported any more. sigh Maybe its time that I start working with .net again for my web stuff :( I use Weblaz for all my web-stuff here. Also using CGI. What is the error you got? Joost No, no. Sorry I wasn't clear enough. Everything compiles and runs ok, at least as far as I can see. The problem is that it appears to be based on a TDataModule descendant and when I try to load it in the IDE, lazarus complains that there are still some packages required but doesn't tell me what they might be. :) What is the error message? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] WebLaz Question
Zitat von Lee Jenkins [EMAIL PROTECTED]: Lee Jenkins wrote: Joost van der Sluis wrote: Op dinsdag 18-11-2008 om 20:04 uur [tijdzone -0500], schreef Lee Jenkins: ABorka wrote: It might be that http://bugs.freepascal.org/view.php?id=12375 is not applied yet. Are you making a CGI program or Apache modules? Windows or Linux? Also make sure you include the proper httpd files from the fpc source folders (httpd22, httpd20) if it is apache module you do. Lee Jenkins wrote: Anyone using the WebLaz package? I can compile the demo but when get error when trying to load the datamodule for these demos. I have installed the weblaz.lpk. Hi it's CGI. Odd that everything compiles ok, but there is apparently no designer support for the datamodule for some reason. I was using powtils, but that doesn't seem to be supported any more. sigh Maybe its time that I start working with .net again for my web stuff :( I use Weblaz for all my web-stuff here. Also using CGI. What is the error you got? Joost No, no. Sorry I wasn't clear enough. Everything compiles and runs ok, at least as far as I can see. The problem is that it appears to be based on a TDataModule descendant and when I try to load it in the IDE, lazarus complains that there are still some packages required but doesn't tell me what they might be. :) As a follow up, the IDE shows a huge message box when this happens. If I say load anyway, it then gives me another dialog asking if I would like to load the web module (TDataModule descendant?) as a regular form. http://imagebin.org/31592 Also, has anyone done any more extensive sample than are located in the / The error message is for both: users of the package and the weblaz authors. For the users it is sufficient: Package needs installation...open forms...package weblaz. If you want to open the form in the IDE, you probably need to install weblaz, because weblaz is needed by your project and weblaz provides some IDE plugins. The weblaz author needs the information about the register procedure and the unit. Maybe the text can be changed to a short advice (install weblaz) and a paragraph Details. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Build number in my application
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: On Wed, Nov 19, 2008 at 3:07 PM, Henry Vermaak [EMAIL PROTECTED] wrote: before each compile, you can execute a program (see lazarus/tools/svn2revisioninc.pas) that puts the revision number in a revision.inc, or something. see the compilation tab of compiler options. you can obviously use this method in a Makefile, too (like lazarus does). I didn't know about the svn2revisioninc.pas file, but I did know about the 'compilation' tax I added a 'getrevision.sh' in the Execute Before Command edit box and checked Build and Compile. When I compile, Lazarus IDE crashed and closed without showing any error message. I then thought maybe Lazarus IDE can't find my 'getrevision.sh' script, so I added the following in the Command edit box: $(ProjPath)/getrevision.sh Again the same thing. When I compile Ctrl+F9 Lazarus IDE simply crashes and closes. :-( I can reproduce the bug under linux by creating an empty file with executable perms set. TProcess then forks a child process and for some reason the Halt of the child process is not invoked. Two instances of the IDE are running, playing havoc, resulting in a crash. I was not able to reproduce it in a simple example though. I have no clue what to search next. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] WebLaz Question
Zitat von Lee Jenkins [EMAIL PROTECTED]: Lee Jenkins wrote: Lee Jenkins wrote: Mattias Gärtner wrote: Also, has anyone done any more extensive sample than are located in the / The error message is for both: users of the package and the weblaz authors. For the users it is sufficient: Package needs installation...open forms...package weblaz. If you want to open the form in the IDE, you probably need to install weblaz, because weblaz is needed by your project and weblaz provides some IDE plugins. The weblaz author needs the information about the register procedure and the unit. Maybe the text can be changed to a short advice (install weblaz) and a paragraph Details. Mattias Thanks Mattias, Something is not right here. I have tried to install the package as well as a couple of others (like Zeos) in my lazarus installation which is 0.9.27 rev. 16975. But if I look at the Package Graph, weblaz and other packages that I thought I had installed are marked with a Green + (Plus sign) and State = Install on next start but that never happens. I have rebuilt the IDE several times, using different settings in the build such as building and cleaning all but the packages are never installed. Odd. I down graded to 0.9.25 and it seems to load the packages correctly. LOL. Except that many of the regular components like DBControls are now gone from the palette. If the rebuild of the IDE succeeded, then a new IDE executable was created. Maybe you started somehow the old executable. Do you use startlazarus to start the IDE or do you start ./lazarus directly? Where the new lazarus executable is created depends on whether you installed lazarus via package or as source in your home directory. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Changing the tab position in Lazarus editor?
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: Hi Is it possible to set the tab position of the Lazarus editor tabs? For example, I would like to move the tabs to the right, instead of the top. There is no official way, but you can fetch the source editor window, search the tnotebook and set the property. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] KOL CE
Zitat von Yury Sidorov [EMAIL PROTECTED]: From: Mattias Gärtner [EMAIL PROTECTED] Zitat von Vincent Snijders [EMAIL PROTECTED]: 2008/11/4 Kutlay Ozger [EMAIL PROTECTED]: Events doesn't working with KOL-CE. (http://wiki.freepascal.org/KOL-CE) I'm using Lazarus 0.9.26 and FPC 2.2.2, KOL CE 2.80.1 PS: I compiled Lazarus with -dDisableFakeMethods option. (plus clean up + Build All) Reported: http://bugs.freepascal.org/view.php?id=12248 Until Mattias has reviewed and applied the patch, you can apply it locally. I fixed it. But the old hack methods should not be used any longer. They will probably be removed in the next release. KOL should be fixed to work with the fake methods. I released KOL-CE 2.80.2 just now. DisableFakeMethods is not needed anymore. KOL-CE 2.80.2 will work with Lazarus 0.9.26 out of box. Yury Sidorov. Great. Thanks. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] KOL CE
Zitat von Vincent Snijders [EMAIL PROTECTED]: 2008/11/4 Kutlay Ozger [EMAIL PROTECTED]: Events doesn't working with KOL-CE. (http://wiki.freepascal.org/KOL-CE) I'm using Lazarus 0.9.26 and FPC 2.2.2, KOL CE 2.80.1 PS: I compiled Lazarus with -dDisableFakeMethods option. (plus clean up + Build All) Reported: http://bugs.freepascal.org/view.php?id=12248 Until Mattias has reviewed and applied the patch, you can apply it locally. I fixed it. But the old hack methods should not be used any longer. They will probably be removed in the next release. KOL should be fixed to work with the fake methods. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Initializing my App
Zitat von Felipe Monteiro de Carvalho [EMAIL PROTECTED]: On Tue, Oct 28, 2008 at 4:42 PM, Valdas Jankûnas [EMAIL PROTECTED] wrote: // when form appears procedure TfrMain.FormShow(Sender: TObject); const SHOWED_FIRST_TIME: Boolean=False; Does this work? If this was a variable this surely wouldn't work, because it's scope would be local to the procedure. scope lifetime afaik const are never on the stack. It should work. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Crash while Copy/Paste
Zitat von Sebastian Kraft [EMAIL PROTECTED]: Hello, since I upgraded to Ubuntu Intrepid last week Lazarus crashes during copy/paste with the following backtrace. Any Ideas? Can you try gdb, heaptrc and valgrind to get more information? I don't know when I will update to intrepid, so I can't say when I will be able to debug that myself. Mattias *** glibc detected *** /home/daseeb/devel/lazarus-svn64/lazarus: double free or corruption (out): 0x03196d40 *** === Backtrace: = /lib/libc.so.6[0x7f09c74e2938] /lib/libc.so.6(cfree+0x76)[0x7f09c74e4f86] /home/daseeb/devel/lazarus-svn64/lazarus[0x902c25] === Memory map: Regards, sebastian Attached the whole backtrace: *** glibc detected *** /home/daseeb/devel/lazarus-svn64/lazarus: double free or corruption (out): 0x03196d40 *** === Backtrace: = /lib/libc.so.6[0x7f09c74e2938] /lib/libc.so.6(cfree+0x76)[0x7f09c74e4f86] /home/daseeb/devel/lazarus-svn64/lazarus[0x902c25] === Memory map: 0040-00fa1000 r-xp 08:02 11485622 /home/daseeb/devel/lazarus-svn64/lazarus 011a1000-017f7000 rwxp 00ba1000 08:02 11485622 /home/daseeb/devel/lazarus-svn64/lazarus 017f7000-01841000 rwxp 017f7000 00:00 0 02e7-03498000 rwxp 02e7 00:00 0 [heap] 7f09bc00-7f09bc021000 rwxp 7f09bc00 00:00 0 7f09bc021000-7f09c000 ---p 7f09bc021000 00:00 0 7f09c14c7000-7f09c14dd000 r-xp 08:01 465097 /lib/libgcc_s.so.1 7f09c14dd000-7f09c16dd000 ---p 00016000 08:01 465097 /lib/libgcc_s.so.1 7f09c16dd000-7f09c16de000 r-xp 00016000 08:01 465097 /lib/libgcc_s.so.1 7f09c16de000-7f09c16df000 rwxp 00017000 08:01 465097 /lib/libgcc_s.so.1 7f09c16f9000-7f09c1721000 rwxp 7f09c16f9000 00:00 0 7f09c1721000-7f09c1781000 rwxs 00:09 42369046 /SYSV (deleted) 7f09c1781000-7f09c1a01000 rwxp 7f09c1781000 00:00 0 7f09c1a01000-7f09c1a1a000 r-xp 08:01 529441 /usr/share/fonts/type1/gsfonts/n022004l.pfb 7f09c1a1a000-7f09c1a92000 rwxp 7f09c1a1a000 00:00 0 7f09c1a92000-7f09c1a9a000 rwxp 7f09c1a92000 00:00 0 7f09c1a9a000-7f09c1ab2000 r-xp 08:01 529438 /usr/share/fonts/type1/gsfonts/n022003l.pfb 7f09c1ab2000-7f09c1dc2000 rwxp 7f09c1ab2000 00:00 0 7f09c1dc2000-7f09c1dc8000 r-xp 08:01 399724 /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so 7f09c1dc8000-7f09c1fc7000 ---p 6000 08:01 399724 /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so 7f09c1fc7000-7f09c1fc8000 r-xp 5000 08:01 399724 /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so 7f09c1fc8000-7f09c1fc9000 rwxp 6000 08:01 399724 /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so 7f09c1fc9000-7f09c210d000 rwxp 7f09c1fc9000 00:00 0 7f09c210d000-7f09c21a2000 r-xp 08:01 514478 /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf 7f09c21a2000-7f09c21a4000 r-xp 08:01 439865 /usr/lib/pango/1.6.0/modules/pango-basic-fc.so 7f09c21a4000-7f09c23a3000 ---p 2000 08:01 439865 /usr/lib/pango/1.6.0/modules/pango-basic-fc.so 7f09c23a3000-7f09c23a4000 r-xp 1000 08:01 439865 /usr/lib/pango/1.6.0/modules/pango-basic-fc.so 7f09c23a4000-7f09c23a5000 rwxp 2000 08:01 439865 /usr/lib/pango/1.6.0/modules/pango-basic-fc.so 7f09c23a5000-7f09c23ae000 r-xs 08:01 240981 /var/cache/fontconfig/945677eb7aeaf62f1d50efc3fb3ec7d8-x86-64.cache-2 7f09c23ae000-7f09c23b r-xs 08:01 240980 /var/cache/fontconfig/99e8ed0e538f840c565b6ed5dad60d56-x86-64.cache-2 7f09c23b-7f09c23b3000 r-xs 08:01 241878 /var/cache/fontconfig/e383d7ea5fbe662a33d9b44caf393297-x86-64.cache-2 7f09c23b3000-7f09c23b4000 r-xs 08:01 241853 /var/cache/fontconfig/fd9505950c048a77dc4b710eb6a628ed-x86-64.cache-2 7f09c23b4000-7f09c23b5000 r-xs 08:01 241825 /var/cache/fontconfig/a2ab74764b07279e7c36ddb1d302cf26-x86-64.cache-2 7f09c23b5000-7f09c23b6000 r-xs 08:01 240979 /var/cache/fontconfig/4c73fe0c47614734b17d736dbde7580a-x86-64.cache-2 7f09c23b6000-7f09c23b9000 r-xs 08:01 241818 /var/cache/fontconfig/646addb8444faa74ee138aa00ab0b6a0-x86-64.cache-2 7f09c23b9000-7f09c23bd000 r-xs 08:01 241738 /var/cache/fontconfig/a755afe4a08bf5b97852ceb7400b47bc-x86-64.cache-2 7f09c23bd000-7f09c23c6000 r-xs 08:01 241734 /var/cache/fontconfig/6d41288fd70b0be22e8c3a91e032eec0-x86-64.cache-2 7f09c23c6000-7f09c23c9000 r-xs 08:01 241681 /var/cache/fontconfig/de156ccd2eddbdc19d37a45b8b2aac9c-x86-64.cache-2 7f09c23c9000-7f09c23cb000 r-xs 08:01 241679 /var/cache/fontconfig/da1bd5ca8443ffe22927a23ce431d198-x86-64.cache-2 7f09c23cb000-7f09c23d6000 r-xs 08:01 241665 /var/cache/fontconfig/e3de0de479f42330eadf588a55fb5bf4-x86-64.cache-2 7f09c23d6000-7f09c23e5000 r-xs 08:01 241663 /var/cache/fontconfig/0f34bcd4b6ee430af32735b75db7f02b-x86-64.cache-2 7f09c23e5000-7f09c23e6000 r-xs 08:01 241611
Re: [Lazarus] Lazarus Custom Tools issue under Windows
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: On Tue, Oct 28, 2008 at 10:31 AM, Graeme Geldenhuys [EMAIL PROTECTED] wrote: [--- ExtToolDialog.pas line 335-} TheProcess.ShowWindow := swoHide; I found the culprit!!! Even when using TProcess, the above line causes the main form of fpGUI UI Designer not to display. Why is that line in there it the first place?? Plus it's a Windows only option. Lazarus shouldn't interfere with external tools behavior! AFAIK swoHide is needed to run tools hidden. For example compile scripts. I guess some further checkboxes are needed to control TProcess flags. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus on x86 Slackware 12.1
Zitat von Mark Morgan Lloyd [EMAIL PROTECTED]: Andrew Haines wrote: Try make LCL_PLATFORM=gtk2 Thanks Andrew, that's it. Don't need the original symlink either. At which point I really do have to wonder why this is necessary if gtk2 is now the default, and in any case where it's documented? For 0.9.26 and below gtk1 is the default. gtk2 became the default for 0.9.27. 0.9.27 is the development version. Most docs are about the released 0.9.26. Could a rule for help be grafted onto the makefile showing the important options and available targets? They are documented on the wiki pages about the various platforms/widgetsets. They also mention needed libraries and tools. The makefile would be a bad and uncommon place for this information. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Rotated text ?
Zitat von Felipe Monteiro de Carvalho [EMAIL PROTECTED]: On Fri, Oct 24, 2008 at 9:10 AM, Michael Van Canneyt [EMAIL PROTECTED] wrote: But what I meant: There is no property in the LCL that can be checked ? But you asked in a binary Did you mean at run-time? The usual way is with ifdefs, but that would be compile time. runtime in program: uses interfacebase; writeln(WidgetSet.ClassName); Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpmake build system in latest FPC
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: Is Lazarus going to switch to the fpmake build system? Henry Vermaak created an example for use with fpGUI - I could never get it working before. It seems quite impressive and is very customizable and all done in something I know - Object Pascal. I hope, yes. Michael VC tried to create a fpmake for the LCL. I don't know the state. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Where is form instance being NIL'ed
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: Hi, When a new form is created using Application.CreateForm(), the form's global instance variable is passed in as well. Now if that form's CloseAction = caFree, where is that instance variable assigned nil after it was freed? In fpGUI, the form is freed, but the global instance variable is still pointing to a now non-existing form. I need that instance variable to be nil. Any help you guys can offer? The variable pointer is not stored, so can not be set to nil by the LCL. Afaik it is the same with the VCL. Why not set it to nil in TForm.Destroy? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus questions (auto complete, searching, docking, edit height)
Zitat von Marius [EMAIL PROTECTED]: After release fpc 2.2.2, recent TFrame introduction and some spare time i'm gonna experiment some more. Compiling went very well and i had some quick looks today with a few simple projects. I have collected a few simple questions: Please create one thread per topic. -Is there an ide option to turn off the auto complete option of the comboboxes in both the find dialogs. I keep searching for the wrong text because of it ;) Would it be a problem if i adjusted it with a switch via the editor options? Standard will be autocomplete=true. IMO it would be more intuive, if there is a speedbutton to the right of the combobox to turn it on/off. -What are the thought on having a combined Find and Find in files dialog? How about a form with the findtext and replacetext on top and a pagecontrol below with two tabs for the standard and find in files? They have different sizes. The find dialog is small and is positioned, so that the current line is still visible. This is not possible with the find in files dialog. -Is it possible to turn on docking via the ide options? no Or is it still done via an include file? (i forgot which include file it was though). Would it be a problem if i introduced a switch in the editor options for this or is this unwanted? I know its still beta, but still i like it.. When it is finished, you can dock and the IDE stores the state. So that on next start it will restore the docking layout automatically. An option to turn it on/off is not needed. Maybe some common layouts will be available (e.g. undock all, dock like Delphi 7 or something like that). -Why is the default height of an edit these days 23 instead of 21, has this changed recently? The edit(s) looks kind of large and weird having that height. Is there any reason for this particulary height or is this an issue in my lazarus instalation? Set Edit1.AutoSize=true to get the default height of the current platform. -Would it be a problem to have a seperate IDE window for the structure view instead of a fixed one in the object inspector. IMO the current structure view is to small and it is also limiting the size of the object explorer. At the moment you can only use the splitter between to change the size. -I still see the same keyboard bugs in the objectinspector. Which ones? What is the best (and quickest) way to apply patches into lazarus these day's? Quick for you, or quick for the lazarus devels? A change to the keys/focusing of the OI must be tested on all platforms. Some platforms have restrictions, some have bugs. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus questions (auto complete, searching, docking, edit height)
Zitat von Michael Van Canneyt [EMAIL PROTECTED]: On Fri, 10 Oct 2008, John Stoneham wrote: 2008/10/10 Michael Van Canneyt [EMAIL PROTECTED] On Fri, 10 Oct 2008, John Stoneham wrote: On Fri, Oct 10, 2008 at 5:34 AM, Mattias Gärtner [EMAIL PROTECTED]wrote: Zitat von Marius [EMAIL PROTECTED]: -Would it be a problem to have a seperate IDE window for the structure view instead of a fixed one in the object inspector. IMO the current structure view is to small and it is also limiting the size of the object explorer. At the moment you can only use the splitter between to change the size. I too would like to have an option to separate the Object Inspector into two windows. My current project has over 700 objects on the main form, and having the tree-view of the objects share space with their Properties/Events is a real pain. Why not use the object drop-down instead of the treeview ? I never use the treevies ? Michael. ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus The dropdown list is even worse than the treeview when you have close to 1,000 objects on a form. Could be, I never had SO many objects :-) Maybe you should split the form up in frames, then ? Keep in mind, that some LCL algorithms are O(n^3). Many are O(n^2). 1000 controls on one form are slow. And difficult for the user. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] matching bracket problems (Carbon)
Zitat von Martin Friebe [EMAIL PROTECTED]: [] Hi John, can you run SynEdit with console output, or output to a logfile? And put some debugging in (and rebuild it)? If yes, try this [...] Also ensure you do not use code folding = there are a few cases where code folding may affect the calculation of the correct line number. I can reproduce the bracket highlight bug. The synedit code is correct. It is a bug in the carbon intf. Probably invalidaterect. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus questions (auto complete, searching, docking, edit height)
Zitat von John Stoneham [EMAIL PROTECTED]: 2008/10/10 Michael Van Canneyt [EMAIL PROTECTED] Could be, I never had SO many objects :-) Maybe you should split the form up in frames, then ? Michael. Bacially, the app is all about preferences, and is divided up with many tab pages and sub-pages and sub-tabs, so they all appear as belonging to the main form. When I started the project, TFrame wasn't available, and I haven't looked yet at trying to incorporate it. Better use a TTreeview or TTIPropertyGrid Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SynEdit: TSynPasSyn and keywords
Zitat von Alexander Klenin [EMAIL PROTECTED]: On Thu, Oct 9, 2008 at 03:50, Mattias Gärtner [EMAIL PROTECTED] wrote: Thanks. I added it with a small comment. Ok, but I do not quite understand the part of comment about 'end' keyword -- where can it be used as non-reserved? As label in asm. Also, the list was taken straight from the FPR Reference guide, so if it is incorrect, then the guide should be fixed too. The list correct, that each listed word can be a keyword. And yes, it is incorrect to not list the exceptions. Regarding the non-reserved keywords (called 'modifiers' in the Reference) I think it would be better to explicitly say the are not included, instead of only offering one example ('static'). BTW, 'static' seems to be unknown to FPC 2.2.2 is it new in 2.3 series? It's only available with the -St switch. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SynEdit: TSynPasSyn and keywords
Zitat von Alexander Klenin [EMAIL PROTECTED]: I noticed that FreePascal highlighter does not overload IsKeyword function. Thinking that it should be trivial to implement, I have taken a look at SynHighlighterPas unit. I found some code worthy of TheDailyWTF.com ;-) TSynPasSyn class have more than a hundred functions names Fun15 to Func191, each recognizing one or two keywords, called via a sort of hash table. So my question is -- how do I reuse them to create IsKeyword function? Or is it better to just create a separate keyword list, similar to e.g. SynHighlighterPython? Some words like 'end' depends on the context, if they are a keyword or an identifier. Please define IsKeyword. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SynEdit: TSynPasSyn and keywords
Zitat von Alexander Klenin [EMAIL PROTECTED]: On Wed, Oct 8, 2008 at 22:06, Mattias Gärtner [EMAIL PROTECTED] wrote: So my question is -- how do I reuse them to create IsKeyword function? Or is it better to just create a separate keyword list, similar to e.g. SynHighlighterPython? Some words like 'end' depends on the context, if they are a keyword or an identifier. Please define IsKeyword. Hm. This does not answer my question, so I suppose I have to decide myself ;-) This was the answer to your question. ;) Here is simplified patch, which ignores context-sensitive modifiers for now. Reserved word lists taken from FPC Reference Guide. Thanks. I added it with a small comment. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problem with editor
Zitat von Johann Spies [EMAIL PROTECTED]: I am a total newbie with Lazarus, but not to programming. I has been my hobby for years and I have at times played with Turbo Pascal, Dbase III+, Basic, Turbo Prolog, Python, Ruby, Ocaml and others. I have the following problem with Lazarus - illustrated by the following two lines. The first was entered using vim, the second (using the same keystrokes) using the Lazarus IDE. The second line would not compile. Button1.caption := 'Press again'; Button1.caption := ´Press again´; I would like to know where I can set the preferences of the editor to correct this. My first guess is, that you type the wrong keys and vim is fixing this automatically and Lazarus does not. What OS, lazarus version, widget set, window manager, language, keyboard layout do you use? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] GTK2 is now the default widgetset
The default widgetset was changed from gtk1 to gtk2 on Linux, BSD, Sparc. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] GTK2 is now the default widgetset
Zitat von Michael Van Canneyt [EMAIL PROTECTED]: On Tue, 7 Oct 2008, Mattias Gärtner wrote: The default widgetset was changed from gtk1 to gtk2 on Linux, BSD, Sparc. Well, that will be an exciting update from SVN... Frames. GTK2 (still use GTK 1)... Does this mean that GTK 1 will not be maintained anymore ? 0.9.28 will still support gtk1, but gtk2 will be the default. Probably in practice: yes ? In practice it depends on the community. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Frames
The IDE now supports TFrame. See here for already working features: http://wiki.lazarus.freepascal.org/IDE_Development#Frames Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] GTK2 is now the default widgetset
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: On Tue, Oct 7, 2008 at 2:23 PM, Mattias Gärtner [EMAIL PROTECTED] wrote: The default widgetset was changed from gtk1 to gtk2 on Linux, BSD, Sparc. Does that mean the Editor speed issues has been resolved? Last time I tried Lazarus+GTK2 the editor did not feel nearly as fast as in GTK1. This was about a month or two ago. The speed of gtk1 and 2 differ widely. On some platforms the gtk2 is even faster than gtk1. It depends on your window manager, video driver and the gtk2 version. AFAIR gtk 2.12 fixed some issues. If all is sorted, congrats to all that helped to finally get the GTK2 widgetset up to scratch! Not all is sorted. That's why 0.9.26 is using gtk1. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Installing in MacOSX
Zitat von Bruno Chavez [EMAIL PROTECTED]: Hi! I downloaded the dmg distribution files of the FPC, FPC Source and Lazarus, in the MacOSX distribution. I installed the three files, but I cant execute the IDE, I don't know why, can you help me to do that??? Do you see an error message? What is your OS X version? How did you try to start the IDE? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] GTK2 is now the default widgetset
Zitat von Coppola Ing. Salvatore [EMAIL PROTECTED]: Mattias Gärtner wrote: The default widgetset was changed from gtk1 to gtk2 on Linux, BSD, Sparc. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus Thanks to all you. Failed to compile under Ubuntu: Free Pascal Compiler version 2.2.0 [2008/04/01] for x86_64 Copyright (c) 1993-2007 by Florian Klaempfl Target OS: Linux for x86-64 Compiling jitform.pas jitform.pas(100,38) Error: identifier idents no member SetDesignInstance SetDesignInstance was introduced with fpc 2.2.1 and is needed for designtime Frames (the mail thread subject is misleading). Can you use fpc 2.2.2? Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Question about debug evaluate/modify window
Zitat von Tom Verhoeff [EMAIL PROTECTED]: This repeats my earlier question, for which I got no replies yet, but I would still be interested in a response (it is relevant for use of Lazarus in our introductory programming course): (3) The debug window to evaluate/modify expressions/variables seems to have some limitations. I would like to have some confirmation that this is on purpose and not a bug for 0.9.24: (3a) The expression syntax is rather restrictive, e.g. 1+2 evaluates fine, but 1 + 2 (i.e. with spaces) does not. Some operators (notably div and mod) are not known. Can and will this be extended? (3b) The modify facility does not work at all. Is it planned to be make this work? Marc, our debugger expert, is currently on vacation. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Extending the editor's hinting functionality
Zitat von Tom Verhoeff [EMAIL PROTECTED]: I would like to throw up a suggestion for extending the editor's hinting functionality. We use Lazarus in a first-year introductory programming course. One of the rules in our coding standard is that every variable declaration needs to be accompanied by an explanatory comment. It would be nice if the editor could show the comment associated with the variable's declaration when you enter/point at an occurrence of that variable. This resembles the functionality where you get the routine prototype when entering/pointing at a routine invocation. Of course, this could apply to other names as well (constants, types, routines). In fact, for routines, the prototype only shows you the _syntactic_ specifics of that routine. _Semantic_ specifics are typically addressed in a comment. It might be necessary to use a special marker (cf. Javadoc) to help the editor recognize such comments-to-be-used-for-hinting. This functionality would further increase the value of adding comments to definitions and declarations. Implemented in svn 16843. For example: var i: integer; // comment starting in same line c: char; { long comment starting in next line} Comments in front are not yet implemented. By the way, I hired a student (Thorstin Crijns) to do some work on improving Lazarus for educational use. This should benefit all Lazarus users, both aspiring beginners and experienced users. Great. You'll be hearing more from Thorstin in the future. I have asked him to start with the built-in help facility and documentation. Other items on the list are the built-in debugger support, and template support. Editor features could be another thing, but he will need more help there. :) Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Exception when I change betwen forms
Zitat von Reenen Laurie [EMAIL PROTECTED]: You may need to post your application's .lpr as well... We don't know if the forms are created in there or not. I am not sure you can assign Appliction as the parent of a form... isn't it just null or self? Smarter people will know that... You confuse Parent and Owner. TForm2.Create(Application) sets the Owner, not the Parent. Using Application as Owner for forms is normal and allowed. As Parent it won't even compile, because TApplication is not a TWinControl. Owner = responsible for freeing component (can only be set at creation) Parent = visual parent (can be changed at any time) To debug an access violation, run the program in the debugger and create a backtrace. The wiki explains how. Mattias ie. Form2 := TForm2.Create (self); or Form2 := TForm2.Create (null); In the .lpr file the command is different too... Application.CreateForm (TForm2, Form2); Regards, -Reenen 2008/10/1 Usuario Anónimo [EMAIL PROTECTED] Sometimes in a simple applicattion whith a principal form and several secondary forms accesed by a TMainMenu I get the error: Access violation. Press Ok to ignore and risk data corruption. Press Cancel to kill the program. when I branch between forms. Anybody help me? My application: unit Unit1; {$mode objfpc}{$H+} interface uses Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Menus; type { TForm1 } TForm1 = class(TForm) MainMenu1: TMainMenu; MenuItem1: TMenuItem; MenuItem2: TMenuItem; MenuItem3: TMenuItem; MenuItem4: TMenuItem; procedure MenuItem1Click(Sender: TObject); procedure MenuItem2Click(Sender: TObject); procedure MenuItem3Click(Sender: TObject); private { private declarations } public { public declarations } end; var Form1: TForm1; implementation uses Unit2, Unit3, Unit4; { TForm1 } procedure TForm1.MenuItem1Click(Sender: TObject); begin Form2 := TForm2.Create (Application); try Form2.ShowModal; finally Form2.Free; end; end; procedure TForm1.MenuItem2Click(Sender: TObject); begin Form3 := TForm3.Create (Application); try Form3.ShowModal; finally Form3.Free; end; end; procedure TForm1.MenuItem3Click(Sender: TObject); begin Form4 := TForm4.Create (Application); try Form4.ShowModal; finally Form4.Free; end; end; initialization {$I unit1.lrs} end. Unit2.pas unit Unit2; {$mode objfpc}{$H+} interface uses Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Menus; type { TForm2 } TForm2 = class(TForm) MainMenu1: TMainMenu; MenuItem1: TMenuItem; procedure MenuItem1Click(Sender: TObject); private { private declarations } public { public declarations } end; var Form2: TForm2; implementation { TForm2 } procedure TForm2.MenuItem1Click(Sender: TObject); begin Close; end; initialization {$I unit2.lrs} end. Regards. ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus -- o__ ,_./ _ (_)_\(_)___ ...speed is good ___ I believe five out of four people have a problem with fractions. -- Powered by NetMail ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Event editing on ARM Linux
Zitat von Mark Morgan Lloyd [EMAIL PROTECTED]: 0.9.25 compiled for Linux on ARM (little-endian) appears to have a problem with the event editor. If I put a button on a form then double-click on the OnClick event I get a messagebox Unable to find method. Please fix the error shown in the message window. The message is Error: source not found: unit /usr/local/share/lazarus/lcl/units/arm-linux/stdctrls.ppu. I admit to being rather inexperienced on that particular platform but I think I've set it up the same as other systems. In particular I can specifically see lcl/stdctrls.pp. Irrespective of whether the problem has shown up it is impossible to exit without getting an access violation. Please test with svn r16827. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus addon - File Browser
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: Hi, I created a File Browser addon for Lazarus (thanks MvC for IDE integration). See attached screenshot. The last feature I need to add before I contribute the code, is drive letter support under Windows. I know how to find those, as I have done it before in fpGUI's File-Open Dialog. My problem is, how am I supposed to implement platform specific code in a Lazarus addon? Am I allowed to use IFDEFs? eg; {$IFDEF MSWINDOWS} get available drive letters... {$ELSE} return / ... {$ENDIF} Yes. [...] * Dialog position persistence via IDE (Environment Options | Windows tab) This is for windows only. For dialogs use: uses IDEWindowIntf; FormCreate IDEDialogLayoutList.ApplyLayout(Self); FormDestroy IDEDialogLayoutList.SaveLayout(Self); Make sure your dialog has a unique 'Name'. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Showmodal trouble
Zitat von Sebastian Kraft [EMAIL PROTECTED]: Hello, have some trouble with Form.ShowModal... Form1:= TForm1.create; Form1.ShowModal; Should bring Form1 to front, keep it on top of all other project forms and stay there until it is closed. Is this right? Yes. (Except other ShowModal forms.) But sometimes when I click on the Mainform behind Form1 Mainform comes to front and Form1 is hidden behind it I am using GTK2 widgetset from svn. Am I doing something wrong calling ShowModal? Or is it a bug? What window manager are you using? For example ubuntu with compiz has such a bug. This has nothing to do with the LCL or the gtk2, but compiz in general. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TMS component for lazarus released
Zitat von Michael Van Canneyt [EMAIL PROTECTED]: On Wed, 17 Sep 2008, Graeme Geldenhuys wrote: On 9/17/08, Michael Van Canneyt [EMAIL PROTECTED] wrote: It will not work, and never will for Lazarus as long as it works with recompiling the IDE. I told the TMS people so: there is currently no workable solution. As soon as someone recompiles the LCL, it's broken. Even if the trial is released (without source, only .ppu and .o files) for a specific version of Lazarus and FPC? You still need to recompile lazarus. It's enough that 1 file of the LCL is recompiled. eg; Trial only works with latest stable released versions of FPC (2.2.0) and Lazarus (0.9.24) If you use any other versions of FPC or Lazarus, you can't use the trial component. Could this work? I doubt it, since you must recompile lazarus, and chances that it recompiles an LCL file are very close to 1... The IDE does not recompile the LCL when installing a package. That's why 'unit interfaces not found' is a FAQ. Mattias ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus