Re: [lazarus] Rx components not compiling
Nataraj S Narayan ?: Hi When I try to compile Rx or RxNew compos on Lazarus latest svn and fpc 2.1.1 svn , I get this:- /root/lazarus/components/rx/apputils.pp(372,14) Error: identifier idents no member SetDesigning Should I go for fpc 2.0.4 ? i'm create path for fix --- apputils.pp (revision 10021) +++ apputils.pp (working copy) @@ -360,18 +360,8 @@ {$ENDIF} THackComponent = class(TComponent) - public -class procedure SetOtherDesigning(AComponent: TComponent; Value: Boolean); end; -{ THackComponent } - -class procedure THackComponent.SetOtherDesigning(AComponent: TComponent; - Value: Boolean); -begin - AComponent.SetDesigning(Value); -end; - procedure ReadFormPlacement(Form: TForm; IniFile: TCustomIniFile; const Section: string; LoadState, LoadPosition: Boolean); @@ -404,11 +394,11 @@ if (Position in [poScreenCenter , poDesktopCenter ]) and not (csDesigning in ComponentState) then begin -THackComponent.SetOtherDesigning(Form,True); +THackComponent(Form).SetDesigning(True); try Position := poDesigned; finally - THackComponent.SetOtherDesigning(Form,False); + THackComponent(Form).SetDesigning(False); end; end; end;
[lazarus] Lazarus Icons set-second draft
Here are revised and alternatives for new lazarus icon The set should be composed as follows: exeLazarus application icon lfmlazarus form lpilazarus project Info lprlazarus project file lpklazarus package file paspascal source file ppobject pascal unit incobject pascal include here are some .PNG files, (exe, lfm, lpk, lpr, inc) with truecolor icons in: 16x16, 32x32, 48x48 formats. The name should help in keep them in some order: EXT_vNN_XX.png, where EXT = file type; NN = version; XX = pixel size. to vincent: since the size of the zip file if not small, don't know if this message will appear in the list. So I also sent it to you directly. feel free to comment anything, the work is still in progress for any kind of refinement, bye tiziano _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus SVN #10034 dont start with FPC 2.1.1 SVN #4782
With today's SVN the problem is again here but this time there is a lot of terminal output after ./startlazarus: --- [WARNING] *** [WARNING] ** ** [WARNING] ** Multibyte character encodings (like UTF8) are not ** [WARNING] ** supported at the moment. ** [WARNING] ** For full keyboard event support, make sure that ** [WARNING] ** the LANG environment var has no UTF8 ** [WARNING] ** ** [WARNING] *** [FORMS.PP] ExceptionOccurred Sender=EAccessViolation Exception=Access violation Stack trace: $080E4D00 $08259381 INITPROPEDITS, line 5953 of propedits.pp $08259857 PROPEDITS_init, line 6032 of propedits.pp $08062534 TApplication.HandleException Access violation Stack trace: $080E4D00 $08259381 INITPROPEDITS, line 5953 of propedits.pp $08259857 PROPEDITS_init, line 6032 of propedits.pp $08062534 [FORMS.PP] ExceptionOccurred [FORMS.PP] ExceptionOccurred [FORMS.PP] ExceptionOccurred An unhandled exception occurred at $0805E52F : EAccessViolation : Access violation $0805E52F $08219506 $0805E532 $08062582 $08062835 $0805F55D $0805F949 $0805F55D $0805F949 $0805F55D $0805F949 $0805F55D $0805F949 $08259381 INITPROPEDITS, line 5953 of propedits.pp $08259857 PROPEDITS_init, line 6032 of propedits.pp $08062534 An unhandled exception occurred at $080EE2CD : EAccessViolation : Access violation $080EE2CD FREENODE, line 1073 of avglvltree.pas $080EE2D8 FREENODE, line 1073 of avglvltree.pas $080EE2A6 TAVGLVLTREE__FREEANDCLEAR, line 1082 of avglvltree.pas $081B04F2 TRESOURCECACHE__DESTROY, line 370 of lclrescache.pas $0805E532 $08062582 $08062835 $0805F949 $0805F55D $0805F949 $0805F55D $0805F949 $0805F55D $0805F949 $0805F55D $0805F949 $08259381 INITPROPEDITS, line 5953 of propedits.pp An unhandled exception occurred at $080B8B25 : EAccessViolation : Access violation $080B8B25 $08072AB0 TSCREEN__DESTROY, line 56 of ./include/screen.inc $0805E532 $080782EB FORMS_finalize, line 1755 of forms.pp $08062582 $08062835 $0805F949 $080628C7 $08063790 $080EE2D8 FREENODE, line 1073 of avglvltree.pas $080EE2A6 TAVGLVLTREE__FREEANDCLEAR, line 1082 of avglvltree.pas $081B04F2 TRESOURCECACHE__DESTROY, line 370 of lclrescache.pas $0805E532 $08062582 $08062835 $0805F949 $0805F55D An unhandled exception occurred at $08064994 : EAccessViolation : Access violation $08064994 $081BC55C DOFINALIZATION, line 415 of ./widgetset/wslclclasses.pp $081BC5C8 WSLCLCLASSES_finalize, line 433 of ./widgetset/wslclclasses.pp $08062582 $08062835 $0805F949 $080628C7 $08063790 $08072AB0 TSCREEN__DESTROY, line 56 of ./include/screen.inc $0805E532 $080782EB FORMS_finalize, line 1755 of forms.pp $08062582 $08062835 $0805F949 $080628C7 $08063790 $080EE2D8 FREENODE, line 1073 of avglvltree.pas An unhandled exception occurred at $0800 : EAccessViolation : Access violation $0800 $080CA655 $08062835 $0805F949 $080628C7 $08063790 $081BC55C DOFINALIZATION, line 415 of ./widgetset/wslclclasses.pp $081BC5C8 WSLCLCLASSES_finalize, line 433 of ./widgetset/wslclclasses.pp $08062582 $08062835 $0805F949 $080628C7 $08063790 $08072AB0 TSCREEN__DESTROY, line 56 of ./include/screen.inc $0805E532 $080782EB FORMS_finalize, line 1755 of forms.pp $08062582 Runtime error 217 at $0805F949 $0805F949 $0805F55D $0805F949 $0805F55D $0805F949 $0805F55D $0805F949 $0805F55D $0805F949 $08259381 INITPROPEDITS, line 5953 of propedits.pp [EMAIL PROTECTED] lazarus]# _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus Icons set-second draft
Adrian Maier ha scritto: feel free to comment anything, the work is still in progress for any kind of refinement, Hello Tiziano, Your email has reached the list, but with no attachements. yes, the first message was without attachment, so you can read it. The second message, with the attachment, didn't reach the list. bye tiziano _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus]
Am Mittwoch, 4. Oktober 2006 19:42 schrieb ArĂ Ricardo Ody: I tried to install Lazarus various times and always receive the message: error: The open of the package failed in the file /usr/lib/lazarus/lazarus:4523ed86: cpio: read The string before the word cpio modify each time I saw the error. I'd say, get a new HDD quickly, before yours die completely .. regards Burkhard _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Confused by component arrays
Felipe Monteiro de Carvalho wrote: Hello, I was implementing TMenu for Qt, when I got a little confused by component arrays. On the file menu.inc I see this: procedure TMenu.CreateHandle; var i: integer; begin FItems.Handle := TWSMenuClass(WidgetSetClass).CreateHandle(Self); // initiate creation of subitems // Note: FItems is a TMenuItem. Using HandleNeeded will create all subitems. for i:=0 to Items.Count-1 do if Items[i].Visible then Items[i].HandleNeeded; end; And here is how Items is declared on this class: FItems: TMenuItem; .. property Items: TMenuItem read FItems; My doubts are: 1 ) Can I just take a property and use it as an array like that?? No, you cant. Not just any property. Shouldn't that property be declared like this: property Items[Index: Integer]: TMenuItem read FItems; TMenuItem has a default Items[] property. So the code actually looks like: Items.Items[i] Since the second Items is default you may leave that one out. 2) And if it was declared like above, shouldn't FItems be an array of TMenuItem ? Are TComponent descendents naturally arrayable or something like that? No. Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Confused by component arrays
On Wed, 4 Oct 2006 23:33:48 -0300 Felipe Monteiro de Carvalho [EMAIL PROTECTED] wrote: Hello, I was implementing TMenu for Qt, when I got a little confused by component arrays. On the file menu.inc I see this: procedure TMenu.CreateHandle; var i: integer; begin FItems.Handle := TWSMenuClass(WidgetSetClass).CreateHandle(Self); // initiate creation of subitems // Note: FItems is a TMenuItem. Using HandleNeeded will create all subitems. for i:=0 to Items.Count-1 do if Items[i].Visible then Items[i].HandleNeeded; end; And here is how Items is declared on this class: FItems: TMenuItem; .. property Items: TMenuItem read FItems; My doubts are: 1 ) Can I just take a property and use it as an array like that?? Yes, because TMenuItem has a default property. Shouldn't that property be declared like this: property Items[Index: Integer]: TMenuItem read FItems; No, because TMenuItem has this already. 2) And if it was declared like above, shouldn't FItems be an array of TMenuItem ? No, why? Are TComponent descendents naturally arrayable or something like that? No. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Rx components not compiling
On Thu, 05 Oct 2006 10:53:08 +0400 Aleksey Lagunov [EMAIL PROTECTED] wrote: Nataraj S Narayan ?: Hi When I try to compile Rx or RxNew compos on Lazarus latest svn and fpc 2.1.1 svn , I get this:- /root/lazarus/components/rx/apputils.pp(372,14) Error: identifier idents no member SetDesigning Should I go for fpc 2.0.4 ? i'm create path for fix Thanks. Applied. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Need ideas: Visual Form inheritance
Mattias Gaertner wrote: On Wed, 04 Oct 2006 13:38:03 +0200 Marc Weustink [EMAIL PROTECTED] wrote: Mattias Gaertner wrote: On Wed, 04 Oct 2006 12:46:27 +0200 Marc Weustink [EMAIL PROTECTED] wrote: Mattias Gaertner wrote: On Wed, 04 Oct 2006 11:29:51 +0200 Marc Weustink [EMAIL PROTECTED] wrote: Mattias Gaertner wrote: On Wed, 4 Oct 2006 09:27:03 +0200 Graeme Geldenhuys [EMAIL PROTECTED] wrote: Changing a property can change various others as well. For example changing the Width can change child controls, siblings and parent. Yes, but applying this change to the child form should result in exactly the same consequences, unless the affected components were changed already... ? Michael. Mattias, This is where my implementation of the Observer using BeginUpdate and EndUpdate plays a roll. See the tiOPF code I sent you. Normally the Subject (FormA) would fire off the Notify method for every small change which could cause lots of screen redraws. BeginUpdate and EndUpdate allows you to make all those small changes and then fire off a single Notify call. BeginUpdate can only be called for the IDE tools (OI, AE, ...). The component editors will only call the Modified event. But there is a solution: We could call the update on Idle. Not really a nice option and hard to work with if some who knows future designer plugin needs the result of a modification (I'm just making things up here). Then the plugin can force an update. But... component editors call Modified. This Modified method can use Begin/EndModification. If this is passed to the derived form observer, it knows whan all modifications are done (and can update itself) Do you mean, all methods, that now call the Modified method should be changed to call Begin/EndModification? No, Modified needs to be modified :) procedure Modified; begin SendBeginModificationToAllBeginEndObeservers; SendModifiedNotificationToAllModifiedObeservers; SendEndModificationToAllBeginEndObeservers; end; But then Begin/End is useless, isn't it? The modification took place before 'Begin'. For example: NewToolButton.Parent:=CurToolBar; Modified; Indeed, I was more thinking of controls reacting on the ModifiedNotification which would trigger more modifications. In your example, an editor sets the Parent and calls Modified. Why would setting the parent trigger other code which will call Modified ? Afterall, Modified is a Designer/Editor method, and should/can not be called from the component itself. So I see no chain of modified there. There are some components, that call Modified. For example changing the PageIndex of a TNoteBook. But this is very rare and can be changed. Let's ignore these things. More important is that we don't have a working Begin/End enclosement. So, we can only react, but not prepare. Or in other words: Only a OnModified event, but no OnChanging. At the moment the solution is to swallow the bitter pill and implement a dynamic property propagation system. The more information the changer (e.g. OI) provides, the less the system will copy. The OI can call BeginUpdate/ChangeProperty/EndUpdate, while others can call Modified and the whole forms are scanned/copied. Whats wrong with adapting modified ? That is the difference of having one OnModified, or having observers which subscribe themselves to begen/end notifications Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Need ideas: Visual Form inheritance
On Thu, 05 Oct 2006 10:45:25 +0200 Marc Weustink [EMAIL PROTECTED] wrote: [...] Modified needs to be modified :) procedure Modified; begin SendBeginModificationToAllBeginEndObeservers; SendModifiedNotificationToAllModifiedObeservers; SendEndModificationToAllBeginEndObeservers; end; But then Begin/End is useless, isn't it? The modification took place before 'Begin'. For example: NewToolButton.Parent:=CurToolBar; Modified; Indeed, I was more thinking of controls reacting on the ModifiedNotification which would trigger more modifications. In your example, an editor sets the Parent and calls Modified. Why would setting the parent trigger other code which will call Modified ? Afterall, Modified is a Designer/Editor method, and should/can not be called from the component itself. So I see no chain of modified there. There are some components, that call Modified. For example changing the PageIndex of a TNoteBook. But this is very rare and can be changed. Let's ignore these things. More important is that we don't have a working Begin/End enclosement. So, we can only react, but not prepare. Or in other words: Only a OnModified event, but no OnChanging. At the moment the solution is to swallow the bitter pill and implement a dynamic property propagation system. The more information the changer (e.g. OI) provides, the less the system will copy. The OI can call BeginUpdate/ChangeProperty/EndUpdate, while others can call Modified and the whole forms are scanned/copied. Whats wrong with adapting modified ? That is the difference of having one OnModified, or having observers which subscribe themselves to begen/end notifications Begin/EndUpdate and notifications are a good idea and needed. I'm just unhappy, that there is no more elegant solution for copying the data to the descendants. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Serach Results Dialog
On Wed, 4 Oct 2006 11:41:39 +0200 Graeme Geldenhuys [EMAIL PROTECTED] wrote: He forgot to mention he uses Windows. Under GTK1 (Linux), there is a X button to close the tab. Under windows no such button exists, and no context popup menu with such a option. Now there is a close button. Mattias Graeme. On 04/10/06, Sam Washkansky [EMAIL PROTECTED] wrote: Does anyone know how to clear the tabs in the Search Results dialog? If you perform multiple searches, you land up with a bunch of tabs, one for each search. How do you close specific tabs, or all of them. Closing the windows doesn't do this... the next time you search for something, all the tabs are still there. It would be nice to have a way to either close a tab, or clear the results. -- Regards Sam Washkansky Tel:+27+823738257 email:[EMAIL PROTECTED] _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] How to debug when accessing database with sqldb
Hello, I'm using Sqldb to access a PostgreSQL database. Is it possible to find out easily what sql commands is sqldb generating and trying to execute ? I have a DBgrid which is associated to a table. After updating a row and executing query.ApplyUpdates , the program generates an exception : An error occurred while applying the updates in a query: preparation of query failed. (PostgreSQL: ERROR: syntax error at end of input at character 132). Enabling the statement logging in postgres doesn't help in this case, because the sql command is not recognised at all, and therefore it doesn't show up in the log. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Need ideas: Visual Form inheritance
Mattias Gaertner wrote: On Thu, 05 Oct 2006 10:45:25 +0200 Marc Weustink [EMAIL PROTECTED] wrote: [...] Modified needs to be modified :) procedure Modified; begin SendBeginModificationToAllBeginEndObeservers; SendModifiedNotificationToAllModifiedObeservers; SendEndModificationToAllBeginEndObeservers; end; But then Begin/End is useless, isn't it? The modification took place before 'Begin'. For example: NewToolButton.Parent:=CurToolBar; Modified; Indeed, I was more thinking of controls reacting on the ModifiedNotification which would trigger more modifications. In your example, an editor sets the Parent and calls Modified. Why would setting the parent trigger other code which will call Modified ? Afterall, Modified is a Designer/Editor method, and should/can not be called from the component itself. So I see no chain of modified there. There are some components, that call Modified. For example changing the PageIndex of a TNoteBook. But this is very rare and can be changed. Let's ignore these things. More important is that we don't have a working Begin/End enclosement. So, we can only react, but not prepare. Or in other words: Only a OnModified event, but no OnChanging. At the moment the solution is to swallow the bitter pill and implement a dynamic property propagation system. The more information the changer (e.g. OI) provides, the less the system will copy. The OI can call BeginUpdate/ChangeProperty/EndUpdate, while others can call Modified and the whole forms are scanned/copied. Whats wrong with adapting modified ? That is the difference of having one OnModified, or having observers which subscribe themselves to begen/end notifications Begin/EndUpdate and notifications are a good idea and needed. I'm just unhappy, that there is no more elegant solution for copying the data to the descendants. It may be the case, but, what would a elegant way help if it isn't used that often. I mean, you need this to be able to efficiently update descendant forms. How often will one edit ancestor while descendants are open. So question is, is the efford needed Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Need ideas: Visual Form inheritance
On Thu, 05 Oct 2006 11:50:03 +0200 Marc Weustink [EMAIL PROTECTED] wrote: Mattias Gaertner wrote: On Thu, 05 Oct 2006 10:45:25 +0200 Marc Weustink [EMAIL PROTECTED] wrote: [...] Modified needs to be modified :) procedure Modified; begin SendBeginModificationToAllBeginEndObeservers; SendModifiedNotificationToAllModifiedObeservers; SendEndModificationToAllBeginEndObeservers; end; But then Begin/End is useless, isn't it? The modification took place before 'Begin'. For example: NewToolButton.Parent:=CurToolBar; Modified; Indeed, I was more thinking of controls reacting on the ModifiedNotification which would trigger more modifications. In your example, an editor sets the Parent and calls Modified. Why would setting the parent trigger other code which will call Modified ? Afterall, Modified is a Designer/Editor method, and should/can not be called from the component itself. So I see no chain of modified there. There are some components, that call Modified. For example changing the PageIndex of a TNoteBook. But this is very rare and can be changed. Let's ignore these things. More important is that we don't have a working Begin/End enclosement. So, we can only react, but not prepare. Or in other words: Only a OnModified event, but no OnChanging. At the moment the solution is to swallow the bitter pill and implement a dynamic property propagation system. The more information the changer (e.g. OI) provides, the less the system will copy. The OI can call BeginUpdate/ChangeProperty/EndUpdate, while others can call Modified and the whole forms are scanned/copied. Whats wrong with adapting modified ? That is the difference of having one OnModified, or having observers which subscribe themselves to begen/end notifications Begin/EndUpdate and notifications are a good idea and needed. I'm just unhappy, that there is no more elegant solution for copying the data to the descendants. It may be the case, but, what would a elegant way help if it isn't used that often. I mean, you need this to be able to efficiently update descendant forms. How often will one edit ancestor while descendants are open. So question is, is the efford needed Don't forget: The default is to open the form when opening the unit. I disabled this 'feature' and I guess you too. And I know many users, who keep many units open. That's why I think, when people edit an ancestor at least one descendant will be open. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Need ideas: Visual Form inheritance
On 05/10/06, Mattias Gaertner [EMAIL PROTECTED] wrote: Don't forget: The default is to open the form when opening the unit. I disabled this 'feature' and I guess you too. I always found this annoying, but never knew you could change it's behaviour. Hey, maybe we should change the default to be off. F12 is just one keypress away when needed. Graeme. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Poll: Change default to not automatically open form when open unit
On 05/10/06, Mattias Gaertner [EMAIL PROTECTED] wrote: Don't forget: The default is to open the form when opening the unit. I disabled this 'feature' and I guess you too. I always found this annoying, but never knew you could change it's behaviour. Hey, maybe we should change the default to be off. F12 is just one keypress away when needed. What do others think? Should the feature be kept turned on as default for newbies, or should we turn it off as default? Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] test (please ignore)
-- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Poll: Change default to not automatically open form when open unit
Mattias Gaertner wrote: On 05/10/06, Mattias Gaertner [EMAIL PROTECTED] wrote: Don't forget: The default is to open the form when opening the unit. I disabled this 'feature' and I guess you too. I always found this annoying, but never knew you could change it's behaviour. Hey, maybe we should change the default to be off. F12 is just one keypress away when needed. What do others think? Should the feature be kept turned on as default for newbies, or should we turn it off as default? I think it should be turned on as default for newbies. Now, if they accidentally close the form and don't know how to open it again (F12), they can just restart Lazarus. Vincent _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Poll: Change default to not automatically open form when open unit
On Thursday 05 October 2006 12:33, Mattias Gaertner wrote: On 05/10/06, Mattias Gaertner [EMAIL PROTECTED] wrote: Don't forget: The default is to open the form when opening the unit. I disabled this 'feature' and I guess you too. I always found this annoying, but never knew you could change it's behaviour. Hey, maybe we should change the default to be off. F12 is just one keypress away when needed. What do others think? Should the feature be kept turned on as default for newbies, or should we turn it off as default? off as default, newbie can turn it on anytime ;) _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Poll: Change default to not automatically open form when open unit
On Thu, 5 Oct 2006, Vincent Snijders wrote: Mattias Gaertner wrote: On 05/10/06, Mattias Gaertner [EMAIL PROTECTED] wrote: Don't forget: The default is to open the form when opening the unit. I disabled this 'feature' and I guess you too. I always found this annoying, but never knew you could change it's behaviour. Hey, maybe we should change the default to be off. F12 is just one keypress away when needed. What do others think? Should the feature be kept turned on as default for newbies, or should we turn it off as default? I think it should be turned on as default for newbies. Now, if they accidentally close the form and don't know how to open it again (F12), they can just restart Lazarus. I agree with Vincent. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Poll: Change default to not automatically open form when open unit
zeljko wrote: On Thursday 05 October 2006 12:33, Mattias Gaertner wrote: On 05/10/06, Mattias Gaertner [EMAIL PROTECTED] wrote: Don't forget: The default is to open the form when opening the unit. I disabled this 'feature' and I guess you too. I always found this annoying, but never knew you could change it's behaviour. Hey, maybe we should change the default to be off. F12 is just one keypress away when needed. What do others think? Should the feature be kept turned on as default for newbies, or should we turn it off as default? off as default, newbie can turn it on anytime ;) How does the newbie know how to turn it on? Or for that matter, that it is configurable in the first place. Vincent _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Poll: Change default to not automatically open form when open unit
2006/10/5, Michael Van Canneyt [EMAIL PROTECTED]: On Thu, 5 Oct 2006, Vincent Snijders wrote: Mattias Gaertner wrote: On 05/10/06, Mattias Gaertner [EMAIL PROTECTED] wrote: Don't forget: The default is to open the form when opening the unit. I disabled this 'feature' and I guess you too. I always found this annoying, but never knew you could change it's behaviour. Hey, maybe we should change the default to be off. F12 is just one keypress away when needed. What do others think? Should the feature be kept turned on as default for newbies, or should we turn it off as default? I think it should be turned on as default for newbies. Now, if they accidentally close the form and don't know how to open it again (F12), they can just restart Lazarus. I agree with Vincent. I agree with Vincent too. (Then any experienced user can turn it off: it's only one click away.) -- Alexandre Leclerc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Poll: Change default to not automatically open form when open unit
On 05/10/06, Vincent Snijders [EMAIL PROTECTED] wrote: off as default, newbie can turn it on anytime ;) How does the newbie know how to turn it on? Or for that matter, that it is configurable in the first place. Vincent Now that I can adjust the behaviour myself and it stays that way in my settings, I really don't mind either way. To answer you question Vincent. There are many ways. Coming from Delphi they should know most of them. F12 View - Forms View - Toggle Forms/Units view Some or other time, they will have to use one of these. Forms can easily be hidden behind the editor. Regards, - Graeme - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Poll: Change default to not automatically open form when open unit
On 05/10/06, Ger Remmers [EMAIL PROTECTED] wrote: Some or other time, they will have to use one of these. Forms can easily be hidden behind the editor. Not nessesarily(sp) so. At least on the Linux taskbar you can find all open forms and there you can select anyone to come to the front. Ger If you use a taskbar in your window manager! After all, it is Linux. ;-) Graeme. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] how are interfaces / virtual functions handled internally
Hi I am working on a very huge object-system, that means, I will have thousands objects and more in the memory. I am now thinking on how to redrucing the needed memory for each object to a minimum. The base of all objects is abstract, that means, I could use an interface for it or an abstract class with virtual abstract functions. I will have much helper functions on each object (~ 30 at the moment), that don't need to be virtual, because they should always behave the same, they internally simply use the other virtual functions. I don't want them outside the abstract class or the interface, because I don't want to have a mixture between a procedural and an object-oriented code. But the count of virtual functions is also not very small (~ 10 - 20). If I have a TObject1 and a TObject2 which both implements the abstract class TBaseObject, then what exactly is saved internally by an instance of each class? Does they contain a full table for each virtual function (that means ~ 40 - 80 bytes only for this table) or does they simply have a reference to their implementor-class (this means 4 bytes)? I will have perhaps not more than 5 different implementor-classes, so if a virtual function table is saved for every object, this table would look mostly the same on all objects. If I use an interface instead of the abstract class, is it the same situation or is the virtual function handling different? But if I use an interface, where should I declare all my helper functions for the object? If I declare them all in the interface, the interface would be very huge. And if I don't want to define the helper functions again and again for each implementor (that means to recode always the same), I have to have an abstract class again because else there is no way to declare them elsewhere. I will have situations, where I want to create a huge amount of these objects, therefore it is important to save memory for each instance. Regards, Albert
Re: [lazarus] how are interfaces / virtual functions handled internally
On Thursday 05 October 2006 16:48, Albert Zeyer wrote: Hi I am working on a very huge object-system, that means, I will have thousands objects and more in the memory. I am now thinking on how to redrucing the needed memory for each object to a minimum. The base of all objects is abstract, that means, I could use an interface for it or an abstract class with virtual abstract functions. I will have much helper functions on each object (~ 30 at the moment), that don't need to be virtual, because they should always behave the same, they internally simply use the other virtual functions. I don't want them outside the abstract class or the interface, because I don't want to have a mixture between a procedural and an object-oriented code. But the count of virtual functions is also not very small (~ 10 - 20). If I have a TObject1 and a TObject2 which both implements the abstract class TBaseObject, then what exactly is saved internally by an instance of each class? Does they contain a full table for each virtual function (that means ~ 40 - 80 bytes only for this table) or does they simply have a reference to their implementor-class (this means 4 bytes)? They simply have a reference to the TClass. Interfaces are much like this, although not exactly (but they scale as O(1) instead of O(n), with n objects) I will have perhaps not more than 5 different implementor-classes, so if a virtual function table is saved for every object, this table would look mostly the same on all objects. It's only saved for every class. If I use an interface instead of the abstract class, is it the same situation or is the virtual function handling different? It's _almost_ the same. You don't need to worry about the difference, it's only important when programming the compiler. But if I use an interface, where should I declare all my helper functions for the object? If I declare them all in the interface, the interface would be very huge. You should make an extra interface, which can be accessed by QueryInterface(). Then, on implementations that support the helper functions, you return the helper interface. On other implementations, you return nil. And if I don't want to define the helper functions again and again for each implementor (that means to recode always the same), I have to have an abstract class again because else there is no way to declare them elsewhere. There are several ways that interfaces can help you there - one of them would be the IMPLEMENTS-keyword. I will have situations, where I want to create a huge amount of these objects, therefore it is important to save memory for each instance. You're not much worse off by using interfaces. A few thousand objects should take only a few KB more mem. I hope you're not THAT pressed for memory? :) -- Regards, Christian Iversen _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] How to debug when accessing database with sqldb
On 10/5/06, Joost van der Sluis [EMAIL PROTECTED] wrote: I'm using Sqldb to access a PostgreSQL database. Is it possible to find out easily what sql commands is sqldb generating and trying to execute ? I have a DBgrid which is associated to a table. After updating a row and executing query.ApplyUpdates , the program generates an exception : An error occurred while applying the updates in a query: preparation of query failed. (PostgreSQL: ERROR: syntax error at end of input at character 132). Enabling the statement logging in postgres doesn't help in this case, because the sql command is not recognised at all, and therefore it doesn't show up in the log. It's more then 132 characters long, so it should be in the log? The size is not important. I meant that i've configured postgres to write in the log all the queries that are executed, for debugging. Yet, the query which generates the error is not recognized as a query at all, and only the error appears in the log. Since it's with applyupdates. The SQL is probably parsed incorrectly. You can look what the updatequery.sql, modifyquery.sql etc. are. Maybe that that already reviels the problem. I'm afraid that i still don't understand how can I see those queries. What/where are the update.sql, modifyquery.sql that you are referring to? In the program i have the following variables: - Fconnection : tSQLConnection; - Ftransaction : tSQLTransaction; - query1: TSQLQuery; - ds1: TDatasource; - DBGrid1: TDBGrid; - DBNavigator1: TDBNavigator; The initialisation: CreateFConnection; CreateFTransaction; ds1.Enabled:=false; query1.Active:=false; Fconnection.Transaction:=Ftransaction; query1.DataBase:=Fconnection; query1.Transaction:=Ftransaction; query1.SQL.Clear; query1.SQL.Add('select DEN,CNP,C_FISCAL,LOC,REG_COM,JU,CONT,BANCA,ADR,COD_SOC from SOC_M'); query1.Active:=true; DBGrid1.DataSource:=ds1; ds1.DataSet:=query1; ds1.Enabled:=true; DBGrid1.Enabled:=true; The user updates some values in the grid, and then presses a button that does : query1.ApplyUpdates; --- the exception is generated here Ftransaction.CommitRetaining; I use identical code for other two tables - and updating works ! I have no idea what is different about this table. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Poll: Change default to not automatically open form when open unit
Vincent Snijders wrote: zeljko wrote: On Thursday 05 October 2006 12:33, Mattias Gaertner wrote: On 05/10/06, Mattias Gaertner [EMAIL PROTECTED] wrote: Don't forget: The default is to open the form when opening the unit. I disabled this 'feature' and I guess you too. I always found this annoying, but never knew you could change it's behaviour. Hey, maybe we should change the default to be off. F12 is just one keypress away when needed. What do others think? Should the feature be kept turned on as default for newbies, or should we turn it off as default? off as default, newbie can turn it on anytime ;) How does the newbie know how to turn it on? Or for that matter, that it is configurable in the first place. Vincent Yep, I agree. On by default. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives __ NOD32 1.1791 (20061005) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- Thomas Miller Chrome Portal Project Manager CPCUG Programmers SIG Chairperson (formally Delphi) Delphi Client/Server Certified Developer BSS Accounting Distribution Software BSS Enterprise Accounting FrameWork http://www.bss-software.com http://programmers.cpcug.org/ http://sourceforge.net/projects/chromeportal/ http://sourceforge.net/projects/uopl/ http://sourceforge.net/projects/dbexpressplus _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] How to debug when accessing database with sqldb
On Thu, 2006-10-05 at 17:19 -0400, Adrian Maier wrote: On 10/5/06, Joost van der Sluis [EMAIL PROTECTED] wrote: I'm using Sqldb to access a PostgreSQL database. Is it possible to find out easily what sql commands is sqldb generating and trying to execute ? I have a DBgrid which is associated to a table. After updating a row and executing query.ApplyUpdates , the program generates an exception : An error occurred while applying the updates in a query: preparation of query failed. (PostgreSQL: ERROR: syntax error at end of input at character 132). Enabling the statement logging in postgres doesn't help in this case, because the sql command is not recognised at all, and therefore it doesn't show up in the log. It's more then 132 characters long, so it should be in the log? The size is not important. I meant that i've configured postgres to write in the log all the queries that are executed, for debugging. Yet, the query which generates the error is not recognized as a query at all, and only the error appears in the log. Can't you specify to log all the commands which are sent? Since it's with applyupdates. The SQL is probably parsed incorrectly. You can look what the updatequery.sql, modifyquery.sql etc. are. Maybe that that already reviels the problem. I'm afraid that i still don't understand how can I see those queries. What/where are the update.sql, modifyquery.sql that you are referring to? Seems that they aren't public. What you could do: compile the sqldb-unit with debuginfo and place a breakpoint on line 1181. And then take a look at qry.sql.text. Or simply place a 'writeln(qry.sql.text);' on that line. Recompile fpc and try again... Joost _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] How to debug when accessing database with sqldb
On 10/5/06, Joost van der Sluis [EMAIL PROTECTED] wrote: On Thu, 2006-10-05 at 17:19 -0400, Adrian Maier wrote: On 10/5/06, Joost van der Sluis [EMAIL PROTECTED] wrote: I'm using Sqldb to access a PostgreSQL database. Is it possible to find out easily what sql commands is sqldb generating and trying to execute ? I have a DBgrid which is associated to a table. After updating a row and executing query.ApplyUpdates , the program generates an exception : An error occurred while applying the updates in a query: preparation of query failed. (PostgreSQL: ERROR: syntax error at end of input at character 132). Enabling the statement logging in postgres doesn't help in this case, because the sql command is not recognised at all, and therefore it doesn't show up in the log. It's more then 132 characters long, so it should be in the log? The size is not important. I meant that i've configured postgres to write in the log all the queries that are executed, for debugging. Yet, the query which generates the error is not recognized as a query at all, and only the error appears in the log. Can't you specify to log all the commands which are sent? This is precisely what I've tried. All the other statements are written in postgres's log, but the query we are talking about is not logged. Apparently it is very broken and parsing it fails at a very early stage , therefore PostgreSQL doesn't consider it to be a statement . Since it's with applyupdates. The SQL is probably parsed incorrectly. You can look what the updatequery.sql, modifyquery.sql etc. are. Maybe that that already reviels the problem. I'm afraid that i still don't understand how can I see those queries. What/where are the update.sql, modifyquery.sql that you are referring to? Seems that they aren't public. What you could do: compile the sqldb-unit with debuginfo and place a breakpoint on line 1181. And then take a look at qry.sql.text. Or simply place a 'writeln(qry.sql.text);' on that line. Recompile fpc and try again... I was hoping that recompiling sqldb wasn't neccessary . But if there's no other way ... Thanks Joost ! Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives