Re: [lazarus] Serial comms, events and other stuff
L505 wrote: Try the ReadOnly property, set it to false Er, it seems to default to false; did you mean set it true? that would make sense. Yes.. sorry. Do the opposite of what I say. var CorrectAnswer: boolean; begin if Lars.Responds then CorrectAnswer:= not Lars.Answer; end; Excellent - good to see a sense of humour here. Does this also prevent me programmaticaly writing to the TMemo? Presumably not else it would be nought but a BOG label. Do you know where TMemo's methods are documented? Ian Ian _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] FPC question
On Fri, 21 Apr 2006 23:50:08 +0200 Graeme Geldenhuys [EMAIL PROTECTED] wrote: Thanks for the help! Any idea how to rename the title of a page? See the newly added tiOPF page. Currently the title is TiOPF and it should read tiOPF. I think MediaWiki automatically uppercases the first letter, I have no clue why though. This will probably need some PHP hacking to get right :-/. Micha _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Serial comms, events and other stuff
On Fri, 21 Apr 2006 22:28:54 +0100 Ian bell [EMAIL PROTECTED] wrote: 1. I am connecting to an external microcontoller development board by a serial interface. I need to be able to set this interface non blocking. I can see how to open the serial interface using the serial unit but it is not clear how to set it non blocking. Using BaseUnix, and fpfcntl (which is fcntl in unix) perhaps ? 2. I need to respond to the occurence of input on the serial port. This is trivial in Tcl - fileevent FileDescriptor FunctionName - how do I achieve this in fpc? Try http://wiki.lazarus.freepascal.org/index.php/Main_Loop_Hooks. Micha _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Serial comms, events and other stuff
Micha Nelissen wrote: On Fri, 21 Apr 2006 22:28:54 +0100 Ian bell [EMAIL PROTECTED] wrote: 1. I am connecting to an external microcontoller development board by a serial interface. I need to be able to set this interface non blocking. I can see how to open the serial interface using the serial unit but it is not clear how to set it non blocking. Using BaseUnix, and fpfcntl (which is fcntl in unix) perhaps ? I think I concluded that myself after some tracing through the source code. I can only find baseunix.ppu which is not plain text - is there some utility to view this? 2. I need to respond to the occurence of input on the serial port. This is trivial in Tcl - fileevent FileDescriptor FunctionName - how do I achieve this in fpc? Try http://wiki.lazarus.freepascal.org/index.php/Main_Loop_Hooks. I suspected as much; thanks for the confirmation. Ian _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Serial comms, events and other stuff
1. I am connecting to an external microcontoller development board by a serial interface. I need to be able to set this interface non blocking. I can see how to open the serial interface using the serial unit but it is not clear how to set it non blocking. why you MUST use non-blocking mode ? i use synaser and threads with 3 completely different serial communicating devices at time and havend any problems. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] FPC question
Micha Nelissen wrote: On Fri, 21 Apr 2006 23:50:08 +0200 Graeme Geldenhuys [EMAIL PROTECTED] wrote: Thanks for the help! Any idea how to rename the title of a page? See the newly added tiOPF page. Currently the title is TiOPF and it should read tiOPF. I think MediaWiki automatically uppercases the first letter, I have no clue why though. This will probably need some PHP hacking to get right :-/. It is possible, look for example here: http://forums.macrumors.com/showthread.php?t=167613 It also lists the drawbacks. I don't know in what version of mediawiki this was added and how to set this flag, so if anybody can dig up that information, please send it to me. Vincent _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] mantis 436
On Fri, 2006-04-21 at 20:24 +0200, [EMAIL PROTECTED] wrote: Can be closed http://www.lazarus.freepascal.org/mantis/view.php?id=436 Verified with 0.9.15. Done. As this is an imported issue, the reporter cannot close it. So I closed the issue. Matthijs -- Matthijs Willemstein [EMAIL PROTECTED] _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] language of version 0.9.14.1
On Sat, 2006-04-22 at 11:34 +0200, Wilfried Mestdagh wrote: How to upgrade and keep the English language in the IDE ? Go to environment - Environment Options - Desktop. You will see a combobox to select the language. Choose English, not Auto. Then restart Lazarus. Matthijs. -- Matthijs Willemstein [EMAIL PROTECTED] _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Serial comms, events and other stuff
On Sat, 22 Apr 2006 08:28:15 +0100 Ian bell [EMAIL PROTECTED] wrote: Using BaseUnix, and fpfcntl (which is fcntl in unix) perhaps ? I think I concluded that myself after some tracing through the source code. I can only find baseunix.ppu which is not plain text - is there some utility to view this? The source is in a unit called baseunix.pas, and is in the fpc source tree in the rtl/unix/ directory. Micha _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Patch
a little patch it removes a declared variable which is not used Index: F:/lazarus-svn/trunk/lcl/maps.pp === --- F:/lazarus-svn/trunk/lcl/maps.pp(revision 9158) +++ F:/lazarus-svn/trunk/lcl/maps.pp(working copy) @@ -533,8 +533,6 @@ begin raise EInvalidOperation.Create('Cannot move past end'); end; -var - Node: TAvgLvlTreeNode; begin if FInvalid then begin @@ -562,8 +560,6 @@ begin raise EInvalidOperation.Create('Cannot move before start'); end; -var - Node: TAvgLvlTreeNode; begin if FBOM then Error; FInvalid := False;
Re: [lazarus] FPC question
On 4/21/06, Graeme Geldenhuys [EMAIL PROTECTED] wrote: Any idea how to rename the title of a page? See the newly added tiOPF page. Currently the title is TiOPF and it should read tiOPF. Wikimedia automatically makes the first letter capitalized. If you read wikipedia often you will see many articles have notices saying that the first letter should not be capitalized but is, due to technical restrictions. This leads to the conclusion that only throught a hack on the software you may be able to create a non-capitalized title. It is probably easier to just use the title as it is and put a notice if you want to make it clear of the correct name. -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Codetools Defines
I extended the dialog to view the codetools directory values to show the templates and how they were parsed. This dialog is available via Source Editor - Right Mouse click - Unit Info - Show CodeTools Values or via Environment - Codetools Defines Editor - Tools - Open Preview Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] how tlabel works?
Well i have some issues with making tlabel work on wince. AS far as i debuged in wince i noticed drawing of label is from TCustomLabel.calcsize and not paint method(why?) And when my forms startsup i cant see any labels on it. but when i do call tcustomlabel.paint method it is drawed.and also with setting breakpoint i noticed the paint method is never called during drawing of form and application startup. I've added paint method to calcsize but again it seems to draw the label,but after that forms redraw itselves so it is repainted by form.and nothing again is visible. Any hints?and how repainting of labels are done? regards -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] how tlabel works?
On Sat, 22 Apr 2006 19:56:42 +0330 roozbeh gholizadeh [EMAIL PROTECTED] wrote: Well i have some issues with making tlabel work on wince. AS far as i debuged in wince i noticed drawing of label is from TCustomLabel.calcsize and not paint method(why?) TCustomLabel.CalcSize does not draw. It sets the DT_CalcRect flag to tell the interface to only calculate the size of the text. The label is painted in Paint. And when my forms startsup i cant see any labels on it. but when i do call tcustomlabel.paint method it is drawed.and also with setting breakpoint i noticed the paint method is never called during drawing of form and application startup. I've added paint method to calcsize but again it seems to draw the label,but after that forms redraw itselves so it is repainted by form.and nothing again is visible. Any hints?and how repainting of labels are done? TCustomLabel is a TGraphicControl which calls Paint in WMPaint. Check why the wince interface is not sending LM_PAINT messages. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Serial comms, events and other stuff
Excellent - good to see a sense of humour here. Does this also prevent me programmaticaly writing to the TMemo? Presumably not else it would be nought but a BOG label. The read-only property is from a User perspective.. user clicks on the edit widget and can't do anythin'. But the programmer can access the edit widget himself, even if read-only is on. Do you know where TMemo's methods are documented? The Delphi docs have pretty similar functionality.. Most of us have a copy of Delphi so we pull open the Delphi help files to look at - but if you don't have a Delphi CD there might be some Delphi docs online. If no docs for Delphi online, it means Lazarus team and users should start a documentation project real soon - as many users have asked for docs :(. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Serial comms, events and other stuff
The read-only property is from a User perspective.. user clicks on the edit widget and can't do anythin'. Can't write anything, I meant.. still can copy/paste, select things. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Serial comms, events and other stuff
L505 wrote: The read-only property is from a User perspective.. user clicks on the edit widget and can't do anythin'. Can't write anything, I meant.. still can copy/paste, select things. OK, will cut work? IAn _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] SQL error that shouldn't be.
Using TMySQL40Connection I tried to use the following query: SQLQuery1.sql.text:='SELECT organizations.name as org, tests.name as test '+ 'FROM tests INNER JOIN organizations '+ 'ON tests.organization=organizations.id '+ 'WHERE result''PASS'' '+ 'ORDER BY tests.name'; When I try open the query I received an error indicating that I had an error near INNER JOIN If I paste the query into the MySQL client it works. I also removed the word inner and tried it but received the same message except that it pointed to join instead of inner. Rewriting the query like below it worked: SQLQuery1.sql.text:='SELECT organizations.name as org, tests.name as test '+ 'FROM tests, organizations '+ 'WHERE tests.organization=organizations.id AND result''PASS'' '+ 'ORDER BY tests.name'; Is there some filtering of the SQL that might be corrupting my query? -- Jon Foster JF Possibilities, Inc. [EMAIL PROTECTED] 541-410-2760 Making computers work for you! _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Re: how tlabel works?
On Sat, 22 Apr 2006 20:17:13 +0330, Mattias Gaertner [EMAIL PROTECTED] wrote: TCustomLabel is a TGraphicControl which calls Paint in WMPaint. Check why the wince interface is not sending LM_PAINT messages. Mattias Well i checked everything...lm_paint message seems to be ok. but i came to this that while trying to draw label TWidgetSet.RectVisible returns false,becouse GetClipRGN(DC,ClipRGN) returns 0. i didnt find any call previous to selectcliprgn. i find out that is only called if doublebuffering is true,which is not.am i right or not? About doublebuffering i dont know much.should it also be activated on wince? -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] How does Lazarus request compile?
I had an interesting scenario recently where a form I was trying to compile kept coming up empty when I ran the program. The unit name was "unit1". I had placed several controls on the page and changed the caption. When the program ran it came up with the default empty window with the caption "Form1". I used "build all" to try to guarantee that it rebuilt my unit. I ended up discovering that there was a "unit1.pas" that was reachable in by my -Fu path. So the question is: How do you tell FPC to build the application? More specifically: Do you just pass the "*.lpr" project file to FPC and it does the project build from there? Do you compile the individual units? How does the project location get passed to FPC? What happens when project files exist outside of the directory where the "*.lpr" file is contained. If you want just tell me where in the source code to find the calls to FPC and I'll be happy to browse that. THX - Jon -- Jon Foster JF Possibilities, Inc. [EMAIL PROTECTED] 541-410-2760 Making computers work for you! _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Re: how tlabel works?
On Sat, 22 Apr 2006 21:33:43 +0330, roozbeh gholizadeh [EMAIL PROTECTED] wrote: On Sat, 22 Apr 2006 20:17:13 +0330, Mattias Gaertner [EMAIL PROTECTED] wrote: TCustomLabel is a TGraphicControl which calls Paint in WMPaint. Check why the wince interface is not sending LM_PAINT messages. Mattias Well i checked everything...lm_paint message seems to be ok. but i came to this that while trying to draw label TWidgetSet.RectVisible returns false,becouse GetClipRGN(DC,ClipRGN) returns 0. i didnt find any call previous to selectcliprgn. i find out that is only called if doublebuffering is true,which is not.am i right or not? About doublebuffering i dont know much.should it also be activated on wince? Well solvedwince rectvisible declerade in winceapi which uses winapi and now working ;) -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQL error that shouldn't be.
On Saturday 22 April 2006 11:01, Jon Foster wrote: Using TMySQL40Connection I tried to use the following query: SQLQuery1.sql.text:='SELECT organizations.name as org, tests.name as test '+ 'FROM tests INNER JOIN organizations '+ 'ON tests.organization=organizations.id '+ 'WHERE result''PASS'' '+ 'ORDER BY tests.name'; When I try open the query I received an error indicating that I had an error near INNER JOIN If I paste the query into the MySQL client it works. I also removed the word inner and tried it but received the same message except that it pointed to join instead of inner. Rewriting the query like below it worked: SQLQuery1.sql.text:='SELECT organizations.name as org, tests.name as test '+ 'FROM tests, organizations '+ 'WHERE tests.organization=organizations.id AND result''PASS'' '+ 'ORDER BY tests.name'; Is there some filtering of the SQL that might be corrupting my query? Try using sqlquery1.TEXT:='SELECT organizations.name as org, tests.name as test FROM tests, organizations WHERE tests.organization=organizations.id AND result' + Quotedstr('PASS') + 'ORDER BY tests.name'; Is 'result' in only one of the tables? John _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQL error that shouldn't be.
On Saturday 22 April 2006 11:38, johnf wrote: On Saturday 22 April 2006 11:01, Jon Foster wrote: Using TMySQL40Connection I tried to use the following query: SQLQuery1.sql.text:='SELECT organizations.name as org, tests.name as test '+ 'FROM tests INNER JOIN organizations '+ 'ON tests.organization=organizations.id '+ 'WHERE result''PASS'' '+ 'ORDER BY tests.name'; When I try open the query I received an error indicating that I had an error near INNER JOIN If I paste the query into the MySQL client it works. I also removed the word inner and tried it but received the same message except that it pointed to join instead of inner. Rewriting the query like below it worked: SQLQuery1.sql.text:='SELECT organizations.name as org, tests.name as test '+ 'FROM tests, organizations '+ 'WHERE tests.organization=organizations.id AND result''PASS'' '+ 'ORDER BY tests.name'; Is there some filtering of the SQL that might be corrupting my query? Try using sqlquery1.TEXT:='SELECT organizations.name as org, tests.name as test FROM tests, organizations WHERE tests.organization=organizations.id AND result' + Quotedstr('PASS') + 'ORDER BY tests.name'; Is 'result' in only one of the tables? John I thought about this a little more. I don't know much about MySQL but does it have a log. Check the log and see what your program is passing. John _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] FPC question
Vincent Snijders wrote: Micha Nelissen wrote: On Fri, 21 Apr 2006 23:50:08 +0200 Graeme Geldenhuys [EMAIL PROTECTED] wrote: Thanks for the help! Any idea how to rename the title of a page? See the newly added tiOPF page. Currently the title is TiOPF and it should read tiOPF. I think MediaWiki automatically uppercases the first letter, I have no clue why though. This will probably need some PHP hacking to get right :-/. It is possible, look for example here: http://forums.macrumors.com/showthread.php?t=167613 It also lists the drawbacks. I don't know in what version of mediawiki this was added and how to set this flag, so if anybody can dig up that information, please send it to me. Both Sven Heinig and Micha Nelissen told me that I need to set wgCapitalLinks to false. Thanks. I just made this change. Doing this means that some links will get broken, i.e. links that start with a lowercase character, for example if the History page is referenced like [[history]]. This will need to be replaced by [[History|history]]. If you find them, please fix them. Vincent. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] TComboBox OnChange when selecting
TComboBox does not fire an OnChange event in case an entry is selected in the drop down list that changes the entry in the edit. I think this should be fired, patch (one line only) attached. Index: customcombobox.inc === --- customcombobox.inc (revision 9159) +++ customcombobox.inc (working copy) @@ -851,6 +851,7 @@ begin if [csLoading,csDestroying,csDesigning]*ComponentState[] then exit; Select; + Change; end; {--
Re: [lazarus] DesignIntf and DesignEditors Units
On Sat, 22 Apr 2006 09:49:30 -1000 John Mitson [EMAIL PROTECTED] wrote: I am porting a Kylix component that I created to Lazarus that used DesignIntf and DesignEditor units. Does Lazarus have the equivalent units and if so what are they named. Add the IDEIntf package to your dependencies of your package. Many things of DesignEditor are in PropEdits and ComponentEditors. DesignIntf has no equivalent. What do you need from this unit? Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Can get Lazarus running anymore
Op zaterdag 22 april 2006 00:32, schreef Mattias Gaertner: On Fri, 21 Apr 2006 22:40:17 +0200 Rob [EMAIL PROTECTED] wrote: Lazarus closed itself with error message about an illegal or invalid floating point. Now when I try to restart Lazarus it immediately closes itself. The problem is probably with a font setting for the code editor. Does anybody know which file I can replace, delete or what to modify to solve this problem. (running on Linux SuSE 10.0). ~/.lazarus/editoroptions.xml Mattias Changed the size setting from 16 to 12 in the indicated file and Lazarus runs fine again. Thanks, Rob. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] DesignIntf and DesignEditors Units
Mattias Gaertner wrote: On Sat, 22 Apr 2006 09:49:30 -1000 John Mitson [EMAIL PROTECTED] wrote: I am porting a Kylix component that I created to Lazarus that used DesignIntf and DesignEditor units. Does Lazarus have the equivalent units and if so what are they named. Add the IDEIntf package to your dependencies of your package. Many things of DesignEditor are in PropEdits and ComponentEditors. DesignIntf has no equivalent. What do you need from this unit? Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives The component uses TIntegerProperty and TPropertyAttributes (see below): TCardValueProperty = class(TIntegerProperty) public function GetAttributes: TPropertyAttributes; override; function GetValue: string; override; procedure GetValues(Proc: TGetStrProc); override; procedure SetValue(const Value: string); override; end; _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Re: new patches
On Sun, 23 Apr 2006 01:37:01 +0330, roozbeh gholizadeh [EMAIL PROTECTED] wrote: Here is another patch. makes labels,brushes work. Well i forgot this patch for graphics.pp. it is related to a bug in fpc-which sometimes causes datatype misalignment,and becouse now labels are geting paint message,programs with labels without removal of packed record from ttextstyle will crash. that {$packrecords c} i dont know if yet needed but it as far as i remember i added that and fixed some other bugs but related to ttextstyle too but maybe with removal of packed record it might nomore be needed. on chat on irc ppl suggested there was no use for packing that record and it could be safely removed,anyway i have no opinion about that. Index: graphics.pp === --- graphics.pp (revision 9144) +++ graphics.pp (working copy) @@ -31,7 +31,11 @@ {$ASSERTIONS ON} {$endif} +{$IFDEF wince} +{$PACKRECORDS c} +{$ENDIF} + uses SysUtils, Types, Classes, Contnrs, FPCAdds, FPImage, FPReadPNG, FPWritePNG, FPReadBMP, FPWriteBMP, FPReadPNM, FPWritePNM, @@ -79,7 +83,8 @@ { Reflects text style when drawn in a rectangle } TTextLayout = (tlTop, tlCenter, tlBottom); - TTextStyle = packed record +// TTextStyle = packed record + TTextStyle = record Alignment : TAlignment; // TextRect Only: horizontal alignment Layout: TTextLayout; // TextRect Only: vertical alignment _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives