Re: [lazarus] Introduction - NOTE FOR GRAHAM
Graeme Geldenhuys rašė: On 29/01/2008, A.J. Venter <[EMAIL PROTECTED]> wrote: Well I wasn't actually saying it would be the answer for you right now - but I wanted to fix the misconception - it is possible to use a custom theme for just your program, ship it with it etc. I understand that you can ship a custom theme (rc file or whatever) for GTK with your application. Somebody else told me that before. But I needed more flexibility by changing the appearance of a _single_ component on-demand (eg: TEdit's background to clError [yellow] when there was a validation issue). All this is water under the bridge for me now - we are already 2.5 years into development. Why to late to change GUI toolkits again. I implemented this in another way: when i need to show where user entered invalid data (f.e. TEdit) i simply draw animated frame around that control (for this i writted component "error shower": at startup they collect all TControl's with "error showing feature", and at runtime i tell for him where need error to show). P.S. sorry for bad English. -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: "cannot find -lGL" (OpenGLContext application)
[EMAIL PROTECTED] rašė: Quoting Marco Alvarado <[EMAIL PROTECTED]>: Oh look, I got the same error when compiling the TOpenGLContext example: "Compiling package LazOpenGLContext 0.0" completed /usr/bin/ld: cannot find -lGL testopenglcontext1.lpr(14,1) Error: Error while linking testopenglcontext1.lpr(14,1) Fatal: There were 1 errors compiling module, stopping What needs to be configured in order to get these applications running? I am just guessing; but it is not linking in the GL library. is it -LGL instead of -lGL?, also just try -L GL? I think that you are very close.. the next error should be; cannot find library GL The linux linker is very pedantic - keep trying First check if library "libGL" is installed: open console, execute "cd /usr/lib" to goto in that dir then execute "ls libGL*". If in output you see words like "libGL.so.1.0.9639" - library is installed, otherwise you need install this library. If library is installed but you not see "libGL.so" in "ls" output then you need make symlink from "libGL.so." (in my example "libGL.so.1.0.9639") to "libGL.so": execute in that dir command "sudo ln -s libGL.so. libGL.so". -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] FSAA with TCustomOpenGLControl
Mattias Gaertner rašė: is it possible turn on FSAA when using TCustomOpenGLControl? It is a normal opengl context, so I would guess: yes. But maybe it needs to be extended to use this attribute in the creation. Do you have an example how the FSAA is enabled? One example i found in Red Book. Code can be found on "ftp://ftp.sgi.com/opengl/opengl14.zip"; in file "multisamp.c". Another example i found in NeHe site at "http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=46";. First example talks about "glutInitDisplayMode (...GLUT_MULTISAMPLE)", another about recreating a window. And probably is not possible do this outside of TCustomOpenGLControl... -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] FSAA with TCustomOpenGLControl
Hi, is it possible turn on FSAA when using TCustomOpenGLControl? -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Color detector program
Graeme Geldenhuys rašė: Hi, I would like to implement a color detector program. ... Anybody working on something like this? I've seen loads of these applications for Windows, but I need something like that to work under Linux too. Any thoughts on how you would implement something like this? I guess looking at Felipe's magnifier application should yield some clues. My thoughts: first get desktop screenshoot and then get pixel color of that shot at mouse coordinates. Or look at GColor2 ("http://gcolor2.sourceforge.net/";) color picker sources. -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: XML and UTF-8
Vincent Snijders rašė: Valdas Jankūnas schreef: I realize if i want unicode support i must use units "Laz_DOM", "Laz_XMLRead", "Laz_XMLWrite" instead of FP "DOM", "XMLRead", XMLWrite". Which is contrary to what I would expect (although I think it may be true). The FP units use widestring internally, the Lazarus units ansistring, which may hold UTF-8 encoded strings. Did you use UTF8Decode / UTF8Encode when you passed your UTF8 encoded strings to the widestring properties of the FP units? Thanks for tip, UTF8Decode solved my problem. Vincent P.S. please remove the reply to header. ...done -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: XML and UTF-8
I realize if i want unicode support i must use units "Laz_DOM", "Laz_XMLRead", "Laz_XMLWrite" instead of FP "DOM", "XMLRead", XMLWrite". -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] XML and UTF-8
Hello, when i saving unicode text to file with TXMLConfig (from "Laz_XMLCfg") i get correct results (code below, first part), but if use TXMLDocument (secont part of code) i get messed unicode text in file. Why?? What i doing wrong? // code (on form placed two labels): unit Unit1; {$mode objfpc}{$H+} interface uses laz_xmlcfg, DOM, XMLRead, XMLWrite, Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls; type { TForm1 } TForm1 = class(TForm) Label1: TLabel; Label2: TLabel; procedure FormCreate(Sender: TObject); private { private declarations } public { public declarations } end; var Form1: TForm1; implementation { TForm1 } procedure TForm1.FormCreate(Sender: TObject); const FAILAS='testas.config'; SAKA='testas/eilute'; TESTAS='-ąčęėįšųūž-ĄČĘĖĮŠŲŪŽ-'; var xmlcfg: TXMLConfig; xml_doc: TXMLDocument; node_00, node_01: TDOMNode; begin DeleteFile(FAILAS); // using TXMLConfig = xmlcfg:=TXMLConfig.Create(FAILAS); xmlcfg.SetValue(SAKA, TESTAS); xmlcfg.Flush; xmlcfg.Free; // xmlcfg:=TXMLConfig.Create(FAILAS); Label1.Caption:='>'+xmlcfg.GetValue(SAKA, '')+'<'; xmlcfg.Free; // DeleteFile(FAILAS); // using TXMLDocument === xml_doc:=TXMLDocument.Create; node_00:=xml_doc.CreateElement('root'); xml_doc.AppendChild(node_00); node_00:=xml_doc.DocumentElement; node_01:=xml_doc.CreateElement('kitas_testas'); node_00.AppendChild(node_01); TDOMElement(node_01)['kita_eilute']:=TESTAS; WriteXMLFile(xml_doc, FAILAS); xml_doc.Free; // xml_doc:=TXMLDocument.Create; ReadXMLFile(xml_doc, FAILAS); node_00:=xml_doc.FindNode('root'); node_01:=node_00.FindNode('kitas_testas'); Label2.Caption:='>'+TDOMElement(node_01)['kita_eilute']+'<'; xml_doc.Free; end; initialization {$I unit1.lrs} end. -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Caption in CompilerOptions
Hi, in "Parsing" tab of Lazarus dialog Project->CompilerOptions is frame "Style: (-R)" with choices "Default", "Intel" and "AT&T". I think this frame name can be more informative if rename it to "Assembler style: (-R)" or "Assembler mode: (-R)". -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Speed
Now i write program, that program made extensive calculations. And i want write fast code. Question about executing speed: first code- function Calculate1: Extended; function SubCalculate: Extended; begin ... end; begin ... ..:=SubCalculate; ... end; second code- function SubCalculate: Extended; begin ... end; function Calculate2: Extended; begin ... ..:=SubCalculate; ... end; I think first code is faster than second, because in first code SubCalculate function is in calling function body? P.S. Where i can read tips about writing "speed" FP code? -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Win32 Lazarus IDE Set Breakpoint minor quibble
Micha Nelissen rašė: James Chandler Jr wrote: be to add just a few more pixels of white space to the left of lines in the source code panel. That would provide a bigger target to 'hit' the whitespace before the line, rather than accidentally clicking the gutter instead. The gutter width is configurable in editor options. Is that what you mean ? Micha First column of source editor is too close to right border of gutter. If i want select word that begins from first column (eg "function" or "procedure") or place text cursor before character at first column i must pay more attention otherwise i accidentally set breakpoint at this line. -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] scanline example didn't work after update to svn 12247
Mattias Gaertner rašė: The LCL TBitmap has no ScanLine property, because under Delphi its only purpose is fast direct access and this is not possible under all LCL platforms. But there is an alternative, which can be used in most cases. See lazarus/examples/scanline/. In file "unit.pas" of that example is written: // fill line with gray for i:=0 to (ImgWidth*4)-1 do PByte(LineStart)[i]:=0; // set red, green and blue to 128 (i.e. gray) I think in comments and in other places should be word "black" not "gray" or value should be "PByte...:=128" not "0"... -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Fpc 2.2.0 and Lazarus
Hi, it is recomended use fpc compiler version 2.2.0 with Lazarus (f.e. for reporting bugs)? ... now in kUbuntu 7.04 i use Lazarus latest svn compiled with fpc v2.2.0 and if lazarus compiled on GTK1 widgetset then code editor not handles UTF-8 text... -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Posting translation
Marc Weustink rašė: Valdas Jankūnas wrote: Hello, where i can send translated Lazarus files? "[EMAIL PROTECTED]" rejected my message. Did you read the reject message ? Please put the word patch in the subject ortherwise it gets rejected (to much spam) Not carefully.. my fault Yes, returned message has notify from SPAMBLOCK. -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Posting translation
Darius Blaszijk rašė: Have you tried zipping it? You can also add a report in the bugtracker and upload it there. Its zipped. Its big because i translated all .po files. (with 7z i get 90 KB) I see once message that there is 40 KB attachment limit, so i try send it to bugtracker .. -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Posting translation
Hello, where i can send translated Lazarus files? "[EMAIL PROTECTED]" rejected my message. P.S. attachment size on disk is 122.3 KB -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Problem in Lazarus i18n
Hi, there is problem in Lazarus .po files, f.e. in file "languages/lazaruside.po" is one section for Lazarus main menu: #: lazarusidestrconsts:lismenubuild msgid "Build" msgstr "" and another section for configuration dialog: #: lazarusidestrconsts:liscocallonbuild msgid "Build" msgstr "" Problem is that in English msgid have same word, but in other languages f.e Lithuanian there is different words, and now in Lazarus main menu i see wrong translation due dublicates. I think this need fix to be msgid fields have unique values. I suggesting swap msgid and comment values. -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Mailing List
12 12 rašė: ... Crystal. What about mail list archive? Where i can see last mailing list discussions? I tried to see page http://www.lazarus.freepascal.org/list_archives/lazarus/threads.html (Jan. 03, 2004 - Present) but i found opened page is too heavy-weight (about 2 megs) and i didn't found there last discussued threads which i read by email subscription. Try "http://www.mail-archive.com/lazarus@miraclec.com/"; -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Compiler options
Hi, i translating Lazarus to Lithuanian i have question: in dialog "Compiler options for project" tab "Code" box "Optimizations" is radiobox with caption "Level 3 (Level 2 + Uncertain) (-O3)", but PFC manual ("http://www.freepascal.org/docs-html/prog/progse49.html";) writes "Level 3 (-O3) equals level 2 optimizations plus some time-intensive optimizations.". And in this dialog also is checkbox "Uncertains optimizations". Maybe there are mistake in Lazarus with Level 3? -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] ERROR in LCL: obsolete call to CreateComponent in GTK1 & GTK2
Funky Beast rašė: Hi, Today I've updated lazarus to r11832 (havn't been updating since r11535). One of my project couldn't run. ... ERROR in LCL: obsolete call to CreateComponent Creating gdb catchable error: $080BBB08 RAISEGDBEXCEPTION, line 773 of lclproc.pas $081BA948 TGTKWIDGETSET__CREATECOMPONENT, line 5056 of /usr/local/fpcsvn/lazarus_Personal/lcl/interfaces/gtk/gtkobject.inc ... Maybe it helps resolve bug: in bug report "http://www.freepascal.org/mantis/view.php?id=9454"; in log i also see message "ERROR in LCL: obsolete call to CreateComponent". -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] KeyDown and KeyUp events
Mattias Gaertner rašė: The Gtk1 sends press and release events during pressing. The Gtk2 does it correct. I don't know, if there is an easy way to add a workaround for the gtk1 interface. First time i have idea, maybe it helps if KeyUpBeforeInterface occurs then get real key state, maybe with GetAsyncKeyState like in win, but i not found this function Lazarus... I think better leave these issue as is and write note in wiki about this keyboard behavior in GTK1. -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Guide lines in IDE form designer
Hi, when Component_A.Left=Component_B.Left then guide line is shown, but if Component_A.Right=Component_B.Left then guide line not appears. Its OK? -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Keyboard event handlig
Mattias Gaertner rašė: There in Lazarus is way to detect true OnKeyUp event when user really releases keyboard key?? The gtk1 sends 'release' and 'press' events on repeat. The gtk2 sends only 'press' events on repeat. So with the gtk2 interface the OnKeyUp works correct. Mattias Thanks for ansver -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Keyboard event handlig
>Razvan Adrian Bogdan rašė: You mean hook into the keyboard, this is easily done on windows by adding hooks in keyboard, mouse, etc. i don't know how it's done in X11 or GTK but they should also have something for global shortcuts. Using OnKeyPress events only works if your app has focus. Razvan > > I think implementing Keyboard hook in linux is not easy.. > > Thanks. There in Lazarus is way to detect true OnKeyUp event when user really releases keyboard key?? -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Keyboard event handlig
Razvan Adrian Bogdan rašė: You mean hook into the keyboard, this is easily done on windows by adding hooks in keyboard, mouse, etc. i don't know how it's done in X11 or GTK but they should also have something for global shortcuts. Using OnKeyPress events only works if your app has focus. Razvan I think implementing Keyboard hook in linux is not easy.. Thanks. -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Keyboard event handlig
Hi, how i can detect when user physically press or releases keyboard key? -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Shift state in Keyboard events
Hi, if i press _only_ Alt key then in OnKeyDown i get (ssAlt in Shift)=False and if i release that Alt key then in OnKeyUp i get (ssAlt in Shift)=True I think that is not correct, if i press Alt key (only, no combine wit other Keys) then i must get ssAlt in Shift. Or not? Ctrl and Shift works as expected. I work in Kubuntu 7.04 Linux with Lazarus svn 0.9.23. -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] About Real numbers and compiler
Hello, Say we have code: const CONSTANT=1; var number: Real; begin number:=2; number:=CONSTANT; Question is: FP compiler understands that number "2" and CONSTANT value must compiled as Real type, or compiler these numbers compiles as Integer, and to prevent in run-time Integer->Real conversions i must write "CONSTANT=Real(1)", "number:=Real(2)" or "...:=1.0" as i see in Java? -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] TSpeedButton bugs patch
Giuliano Colla rašė: It's soon explained. The patch reverts this portion of code to the situation which has been working for a long time (see rev. 10808 - ver. 0.9.22 - which btw already had the speedbutton.inc bug). Someone, with the good proposition to improve it, added an unnecessary modification of the destination rectangle. It's unnecessary, because previous calculations already center both glyph and text in the widget client area, and subsequently the resulting image is properly clipped against widget's client area. Unfortunately, he/she did it wrong. If you increment the Right property, and decrement the Left one, you decrease the rectangle area, up to make it negative. The same holds true for Top and Bottom. Removing the "improvement", Text and Glyph are properly positioned, properly centered, and properly clipped if they don't fit. It's easy to check just from the IDE. Im are that "improver" :) http://www.freepascal.org/mantis/view.php?id=8538 My fault, apologize. -- Valdas Jankūnas _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives