[Lazarus] Semi OT: Database-free application lecture

2013-02-25 Thread ik
Hello,

I gave today a lecture named database-free applications[1].
The lecture explain an idea of how to design complex systems and break
them apart etc...

The lecture is in English and so does my slide notes, and I think that
people here can enjoy the idea as well.

[1] https://github.com/ik5/database_free_application_lecture
Please note that it's only the sources, and you need also to use git
submodule to get the presentation system to work.

I hope this will help, and feel free to ask me questions in the
subject if you have any

Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] OT a bit - Planet Object Pascal

2013-02-13 Thread ik
Hello,

I'ved created an RSS aggregation site for Object Pascal related blogs:
http://planet.objpas.org/

This is a test run, and the look and feel will be changed in the feature.
If you have a blog or can provide RSS for FPC/Lazarus news please send
me an email with the feed details and I'll add you.

Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OT a bit - Planet Object Pascal

2013-02-13 Thread ik
On Wed, Feb 13, 2013 at 2:16 PM, Leonardo M. Ramé l.r...@griensu.com wrote:
 On 2013-02-13 13:34:03 +0200, ik wrote:
 Hello,

 I'ved created an RSS aggregation site for Object Pascal related blogs:
 http://planet.objpas.org/

 This is a test run, and the look and feel will be changed in the feature.
 If you have a blog or can provide RSS for FPC/Lazarus news please send
 me an email with the feed details and I'll add you.

 Ido


 Hi Ido, congrats for the site.

 Feel free to add mine:
 http://leonardorame.blogspot.com/feeds/posts/default

I'ved added you :)


 Regards,
 --
 Leonardo M. Ramé
 http://leonardorame.blogspot.com

Ido


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Unpack of PHP

2013-02-04 Thread ik
On Mon, Feb 4, 2013 at 1:34 PM, silvioprog silviop...@gmail.com wrote:
 Hello,

 In FPC, I'm trying to load a ASCII content and onvert it to integer, but,
 without success. In PHP I do it easily.

 I send two files in attached:

 1. php - demo in PHP working fine (the demo uses unpack function:
 http://www.php.net/manual/en/function.unpack.php);
 2. fpc - demo in FPC partially implemented;

 So, how to do it in FPC?

Take a look at my fp-msgpack[1] (I need to rewrite it, because the way
that array and maps works), but it does exactly what pack and upack
does.


 Thank you!

 ps. I tried the Unpack function of FPC, but I don't know how to use it.

 --
 Silvio Clécio
 My public projects - github.com/silvioprog

[1] https://github.com/ik5/fp-msgpack


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Split lazarus v0.0.0.1 build 2

2013-02-02 Thread ik
Hello,

I'm happy to announce that my Split Lazarus v0.0.0.1 build 2 is ready.
It's at this time very basic, and lack of real support of real editing
the same context.

I would be happy for tests etc, to let me know what they think, and
how to make the idea better.
Please note:
* I add two menu items to the Notebook right click editor
* You can also register shortcut keys for them, under 'Split View', at
the shortcut configuration frame that arrive part of the Options
window.

Code:
https://github.com/ik5/split_lazarus

Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Synedit free makes an access violation exception

2013-02-01 Thread ik
Helllo,

When trying to do SynEdit.free (and FreeAndNil), I have an access
violation exception.
I cant figure out why.
My code:
https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L174

Lazarus 1.1 r40111M FPC 2.6.0 x86_64-linux-gtk 2

Thanks,
Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Synedit free makes an access violation exception

2013-02-01 Thread ik
On Fri, Feb 1, 2013 at 8:13 PM, Martin laza...@mfriebe.de wrote:
 On 01/02/2013 17:47, ik wrote:

 Helllo,

 When trying to do SynEdit.free (and FreeAndNil), I have an access
 violation exception.
 I cant figure out why.
 My code:

 https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L174

 Lazarus 1.1 r40111M FPC 2.6.0 x86_64-linux-gtk 2

 Stacktrace?

TApplication.HandleException Access violation
  Stack trace:
  $009ECE9F
  $01523FC8 line 1092 of syneditmiscclasses.pp
  $0156808E line 762 of syngutterbase.pp
  $009ECEA2
  $01563812 line 181 of syngutter.pp
  $009ECEA2
  $009ECEA2
  $01BA0CAC line 228 of ../src/untlazsplitview_code.pas
  $01BA07DF line 257 of ../src/untlazsplitview_code.pas
  $01B9FB72 line 91 of ../src/untlazsplitview_code.pas
  $00FD835B line 581 of menuintf.pas
  $00FDEA94 line 1655 of menuintf.pas
  $00CD0400 line 83 of include/menuitem.inc
  $00CD0F7E line 278 of include/menuitem.inc
  $009ED3C9
  $00D78FDA line 3591 of gtk2/gtk2proc.inc
  $00E812EF line 142 of gtk2/gtk2wsmenus.pp


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Synedit free makes an access violation exception

2013-02-01 Thread ik
On Fri, Feb 1, 2013 at 10:12 PM, Martin laza...@mfriebe.de wrote:

 Well do you add, remove, create any gutterparts?

Assigned gutterparts, what is the proper action to free it ?



 On 01/02/2013 20:08, ik wrote:

 On Fri, Feb 1, 2013 at 8:13 PM, Martin laza...@mfriebe.de wrote:

 On 01/02/2013 17:47, ik wrote:

 Helllo,

 When trying to do SynEdit.free (and FreeAndNil), I have an access
 violation exception.
 I cant figure out why.
 My code:


 https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L174

 Lazarus 1.1 r40111M FPC 2.6.0 x86_64-linux-gtk 2

 Stacktrace?

 TApplication.HandleException Access violation
Stack trace:
$009ECE9F
$01523FC8 line 1092 of syneditmiscclasses.pp
$0156808E line 762 of syngutterbase.pp
$009ECEA2
$01563812 line 181 of syngutter.pp
$009ECEA2
$009ECEA2
$01BA0CAC line 228 of ../src/untlazsplitview_code.pas
$01BA07DF line 257 of ../src/untlazsplitview_code.pas
$01B9FB72 line 91 of ../src/untlazsplitview_code.pas
$00FD835B line 581 of menuintf.pas
$00FDEA94 line 1655 of menuintf.pas
$00CD0400 line 83 of include/menuitem.inc
$00CD0F7E line 278 of include/menuitem.inc
$009ED3C9
$00D78FDA line 3591 of gtk2/gtk2proc.inc
$00E812EF line 142 of gtk2/gtk2wsmenus.pp

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Synedit free makes an access violation exception

2013-02-01 Thread ik
On Fri, Feb 1, 2013 at 10:45 PM, Martin laza...@mfriebe.de wrote:
 On 01/02/2013 20:43, Martin wrote:


 I will have to debug that.

 It may be that Cutter.Assign is not working.
 It seems to only copy the pointers to the other edits gutter parts... And
 that is not right.



 If you whish to look (I dant know when I get to it). I THINK it may be this

 procedure TSynObjectList.Assign(Source: TPersistent);
 begin
   FList.Assign(TSynObjectList(Source).FList);
   DoChange(self);
 end;

 Flist is a tlist, so just pointer copy...

Thanks




 -

 in the IDE, you need to send each edit to EditorOptions
 (Refresh/REloud-EditorSetting. search SourceEditor

 of course, that actually requires a TSynSourceEditor... which is
 impossible for packages, because it is in the ide



 On 01/02/2013 20:22, ik wrote:

 On Fri, Feb 1, 2013 at 10:12 PM, Martin laza...@mfriebe.de wrote:

 Well do you add, remove, create any gutterparts?

 Assigned gutterparts, what is the proper action to free it ?


 On 01/02/2013 20:08, ik wrote:

 On Fri, Feb 1, 2013 at 8:13 PM, Martin laza...@mfriebe.de wrote:

 On 01/02/2013 17:47, ik wrote:

 Helllo,

 When trying to do SynEdit.free (and FreeAndNil), I have an access
 violation exception.
 I cant figure out why.
 My code:



 https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L174

 Lazarus 1.1 r40111M FPC 2.6.0 x86_64-linux-gtk 2

 Stacktrace?

 TApplication.HandleException Access violation
 Stack trace:
 $009ECE9F
 $01523FC8 line 1092 of syneditmiscclasses.pp
 $0156808E line 762 of syngutterbase.pp
 $009ECEA2
 $01563812 line 181 of syngutter.pp
 $009ECEA2
 $009ECEA2
 $01BA0CAC line 228 of ../src/untlazsplitview_code.pas
 $01BA07DF line 257 of ../src/untlazsplitview_code.pas
 $01B9FB72 line 91 of ../src/untlazsplitview_code.pas
 $00FD835B line 581 of menuintf.pas
 $00FDEA94 line 1655 of menuintf.pas
 $00CD0400 line 83 of include/menuitem.inc
 $00CD0F7E line 278 of include/menuitem.inc
 $009ED3C9
 $00D78FDA line 3591 of gtk2/gtk2proc.inc
 $00E812EF line 142 of gtk2/gtk2wsmenus.pp

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Class never seems to be initialized

2013-01-29 Thread ik
On Mon, Jan 28, 2013 at 11:29 PM, Martin laza...@mfriebe.de wrote:
 On 28/01/2013 21:04, ik wrote:

 Hello,

 I have a very weird problem:

 I have a class as a property of another class.
 I initialize it, but when checking if it was assigned, I get always
 false (both at:

 https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L189
 and
 https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L285)

 I can't figure out what am I missing or doing wrong.
 I tried at the beginning to use a record, and it was the same problem,
 so I moved to a class, because
 I thought it was a memory allocation issue, but the problem remains.


 Is it both time the same tab object?

Yes, it is, the same variable also that is passed to the methods as a parameter.

 Maybe debugln its address.

I'll try that, thanks



 Also, if you run in the debugger, you can set a watchpoint, after you
 initialized it, and the debugger will break, if it is modified.


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] finding the package of the unit

2013-01-28 Thread ik
Hello,

How can If find what is the package that the file
lazarusidestrconsts.pas belongs to ?
I need to use some of it's text with my plugins. Strings such as
srkmCatSrcNoteBook.

It looks like internal file of the IDE, but it contain a lot of text
that can be used with components and plugins in general that register
themselves to the IDE.

Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] finding the package of the unit

2013-01-28 Thread ik
On Mon, Jan 28, 2013 at 5:46 PM, ik ido...@gmail.com wrote:
 Hello,

 How can If find what is the package that the file
 lazarusidestrconsts.pas belongs to ?

Answering myself: ide.lpk
never forger to use grep lpk :)

 I need to use some of it's text with my plugins. Strings such as
 srkmCatSrcNoteBook.

 It looks like internal file of the IDE, but it contain a lot of text
 that can be used with components and plugins in general that register
 themselves to the IDE.

 Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] the options window crash

2013-01-28 Thread ik
Hello,

I'm trying to register a new section for the key shortcut option:
https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L42

Lazarus has the following exception because of it:
TApplication.HandleException Access violation
  Stack trace:
  $012F08AE line 3540 of keymapping.pp
  $01238DC8 line 370 of frames/editor_keymapping_options.pas
  $012C0664 line 349 of ideoptionsdlg.pas
  $012C071B line 355 of ideoptionsdlg.pas
  $012C071B line 355 of ideoptionsdlg.pas
  $012C0706 line 354 of ideoptionsdlg.pas
  $012C071B line 355 of ideoptionsdlg.pas
  $012C0453 line 366 of ideoptionsdlg.pas
  $012C0924 line 397 of ideoptionsdlg.pas
  $00A7789B line 4649 of main.pp
  $00FDD349 line 463 of lazideintf.pas
  $00A7731C line 4583 of main.pp
  $00FD4FD1 line 580 of menuintf.pas
  $00FDB724 line 1655 of menuintf.pas
  $00CCD000 line 83 of include/menuitem.inc
  $00CCDB7E line 278 of include/menuitem.inc
  $009EA139

Lazarus 1.1 r40007M FPC 2.6.0 x86_64-linux-gtk 2

What am I doing wrong here ?

Thanks,
Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] finding the package of the unit

2013-01-28 Thread ik
On Mon, Jan 28, 2013 at 6:04 PM, Martin laza...@mfriebe.de wrote:
 On 28/01/2013 15:58, Mattias Gaertner wrote:

 On Mon, 28 Jan 2013 17:50:47 +0200
 ik ido...@gmail.com wrote:

 On Mon, Jan 28, 2013 at 5:46 PM, ik ido...@gmail.com wrote:

 Hello,

 How can If find what is the package that the file
 lazarusidestrconsts.pas belongs to ?

 Context menu on editor tabs. See if it is in one of the packages tabs, or
 the project. Or if it was not added to either a package or project

 Answering myself: ide.lpk
 never forger to use grep lpk :)

 The ide.lpk is a debugging tool for the IDE.

 NEVER use it. It exists only so the debugger can have testcases.

Yes, I found out the hard way, it is registered as not to be installed.


 Maybe other testcase later.

 I need to use some of it's text with my plugins. Strings such as
 srkmCatSrcNoteBook.

 It looks like internal file of the IDE, but it contain a lot of text
 that can be used with components and plugins in general that register
 themselves to the IDE.

 Keep in mind that the translators had the IDE in mind.

 Maybe this unit can be moved to lazcontrols.


 IMHO: selected entries could be moved.

 some to ideintf maybe. some to lazcontrols, or lazutils?

I think that there is some sort of a mess, some sections exist under
ideintf and some under IDECommands.
Here are the strings at IDECommands:

const
  CommandCategoryToolMenuName = 'ToolMenu';
  CommandCategoryCustomName = 'Custom';
  CommandCategoryTextEditingName = 'text editing commands';
  CommandCategoryViewName = 'ViewMenu';
  CommandCategoryCodeTools = 'CodeTools';

I'm not sure if they are in use only with shortcuts or also menu items.



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] the options window crash

2013-01-28 Thread ik
On Mon, Jan 28, 2013 at 6:25 PM, Martin laza...@mfriebe.de wrote:

 IDECommandList.FindCategoryByName

 Have you registered it?

 look at EditorMacros, it does that

Thanks, Fixed it, and now it works properly :)




 On 28/01/2013 16:14, ik wrote:

 Hello,

 I'm trying to register a new section for the key shortcut option:

 https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L42

 Lazarus has the following exception because of it:
 TApplication.HandleException Access violation
Stack trace:
$012F08AE line 3540 of keymapping.pp
$01238DC8 line 370 of frames/editor_keymapping_options.pas
$012C0664 line 349 of ideoptionsdlg.pas
$012C071B line 355 of ideoptionsdlg.pas
$012C071B line 355 of ideoptionsdlg.pas
$012C0706 line 354 of ideoptionsdlg.pas
$012C071B line 355 of ideoptionsdlg.pas
$012C0453 line 366 of ideoptionsdlg.pas
$012C0924 line 397 of ideoptionsdlg.pas
$00A7789B line 4649 of main.pp
$00FDD349 line 463 of lazideintf.pas
$00A7731C line 4583 of main.pp
$00FD4FD1 line 580 of menuintf.pas
$00FDB724 line 1655 of menuintf.pas
$00CCD000 line 83 of include/menuitem.inc
$00CCDB7E line 278 of include/menuitem.inc
$009EA139

 Lazarus 1.1 r40007M FPC 2.6.0 x86_64-linux-gtk 2

 What am I doing wrong here ?

 Thanks,
 Ido

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] debugging a lazarus plugins

2013-01-28 Thread ik
On Mon, Jan 28, 2013 at 9:06 PM, Martin laza...@mfriebe.de wrote:
 On 28/01/2013 19:04, Martin wrote:

 On 28/01/2013 18:53, ik wrote:

 Hello,

 My plugins (https://github.com/ik5/split_lazarus) does almost all I
 want it to do, but not the way I want it to be made.
 What are the best ways to debug my code inside Lazarus ?


 Either debug the entire IDE (open ide/lazarus.lpi and hit F9),


 In which case, it may be helpful to use a 2nd primar-config-path, for diff
 window locations (or colors)... (I personally do not, I move them each time)

I'm not sure that I understand you





 or write a test case.

How can I write a test case for such thing ?
I mean, it uses internal IDE stuff ...




 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] finding the package of the unit

2013-01-28 Thread ik
On Mon, Jan 28, 2013 at 10:30 PM, Maxim Ganetsky gan...@narod.ru wrote:
 28.01.2013 19:46, ik пишет:

 Hello,

 How can If find what is the package that the file
 lazarusidestrconsts.pas belongs to ?
 I need to use some of it's text with my plugins. Strings such as
 srkmCatSrcNoteBook.


 It is category name. Why do you need to reuse it?

My plugins add itself to the editor tab menu, and I wanted to use the
same category for shortcuts, because it belongs there imho...



 It looks like internal file of the IDE, but it contain a lot of text
 that can be used with components and plugins in general that register
 themselves to the IDE.


 Can you give an example with use case?

 --
 Best regards,
  Maxim Ganetsky  mailto:gan...@narod.ru


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] debugging a lazarus plugins

2013-01-28 Thread ik
On Mon, Jan 28, 2013 at 10:22 PM, Martin laza...@mfriebe.de wrote:
 On 28/01/2013 19:15, ik wrote:

 On Mon, Jan 28, 2013 at 9:06 PM, Martin laza...@mfriebe.de wrote:

 On 28/01/2013 19:04, Martin wrote:

 On 28/01/2013 18:53, ik wrote:

 Hello,

 My plugins (https://github.com/ik5/split_lazarus) does almost all I
 want it to do, but not the way I want it to be made.
 What are the best ways to debug my code inside Lazarus ?

 Either debug the entire IDE (open ide/lazarus.lpi and hit F9),


 In which case, it may be helpful to use a 2nd primar-config-path, for
 diff
 window locations (or colors)... (I personally do not, I move them each
 time)

 I'm not sure that I understand you


 Well I just run the IDE in the debugger. That happens if I open
 ide/lazarus.lpi and hit F9

 But it has the danger of mixing up debuggee and debugger

 So if you use -pcp= in run params then you can save different window
 locations, or diff editor colrs, even diff config, and even load a diff
 lazarus.exe (as long as it is in sync with the ource you have open)

 As I said, I do not use -pcp, I just move the window, after the debuggee . I
 have 2 screens so enough space

Ended up using Debugln, and still can't figure out the problems I'm
having (a new question to the mailing list)



 or write a test case.

 How can I write a test case for such thing ?
 I mean, it uses internal IDE stuff ...


 The debugger has the same issue.

 That is where I use the ide.lpk
 You MUST rebuild the IDE from the tools menu, and then compile the test, if
 the test uses this package.

 You get real nasty errors, if you compile the test, and it tries to compile
 the package  Real nasty. ppu in wrong location. Only fix, by find and
 delete ppu


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] finding the package of the unit

2013-01-28 Thread ik
On Mon, Jan 28, 2013 at 10:57 PM, Maxim Ganetsky gan...@narod.ru wrote:
 29.01.2013 0:55, ik пишет:

 On Mon, Jan 28, 2013 at 10:30 PM, Maxim Ganetsky gan...@narod.ru wrote:

 28.01.2013 19:46, ik пишет:

 Hello,

 How can If find what is the package that the file
 lazarusidestrconsts.pas belongs to ?
 I need to use some of it's text with my plugins. Strings such as
 srkmCatSrcNoteBook.



 It is category name. Why do you need to reuse it?


 My plugins add itself to the editor tab menu, and I wanted to use the
 same category for shortcuts, because it belongs there imho...


 Do you really need category resource string to add shortcut there?

It's not mandatory, but note that when someone translate the IDE and
that string, it will display different string at the shortcut frame.



 --
 Best regards,
  Maxim Ganetsky  mailto:gan...@narod.ru

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Class never seems to be initialized

2013-01-28 Thread ik
Hello,

I have a very weird problem:

I have a class as a property of another class.
I initialize it, but when checking if it was assigned, I get always
false (both at:
https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L189
and 
https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L285)

I can't figure out what am I missing or doing wrong.
I tried at the beginning to use a record, and it was the same problem,
so I moved to a class, because
I thought it was a memory allocation issue, but the problem remains.

I'm using Lazarus 1.1 SVN Revision: 40007M with FPC 2.6.0 on Arch Linux x86_64

Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] finding the package of the unit

2013-01-28 Thread ik
On Mon, Jan 28, 2013 at 11:00 PM, Mattias Gaertner
nc-gaert...@netcologne.de wrote:
 On Mon, 28 Jan 2013 22:55:10 +0200
 ik ido...@gmail.com wrote:

 On Mon, Jan 28, 2013 at 10:30 PM, Maxim Ganetsky gan...@narod.ru wrote:
  28.01.2013 19:46, ik пишет:
 
  Hello,
 
  How can If find what is the package that the file
  lazarusidestrconsts.pas belongs to ?
  I need to use some of it's text with my plugins. Strings such as
  srkmCatSrcNoteBook.
 
 
  It is category name. Why do you need to reuse it?

 My plugins add itself to the editor tab menu, and I wanted to use the
 same category for shortcuts, because it belongs there imho...

 The srkmCatSrcNoteBook is the caption.
 To find the shortcut you need the name of the category.
 The name is 'SourceNotebook'.

   CmdCat:=IDECommandList.FindCategoryByName('SourceNotebook');

Thanks Mattias



 Mattias

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] finding the package of the unit

2013-01-28 Thread ik
On Mon, Jan 28, 2013 at 11:03 PM, Maxim Ganetsky gan...@narod.ru wrote:
 29.01.2013 0:59, ik пишет:

 On Mon, Jan 28, 2013 at 10:57 PM, Maxim Ganetsky gan...@narod.ru wrote:

 29.01.2013 0:55, ik пишет:

 On Mon, Jan 28, 2013 at 10:30 PM, Maxim Ganetsky gan...@narod.ru
 wrote:


 28.01.2013 19:46, ik пишет:

 Hello,

 How can If find what is the package that the file
 lazarusidestrconsts.pas belongs to ?
 I need to use some of it's text with my plugins. Strings such as
 srkmCatSrcNoteBook.




 It is category name. Why do you need to reuse it?



 My plugins add itself to the editor tab menu, and I wanted to use the
 same category for shortcuts, because it belongs there imho...



 Do you really need category resource string to add shortcut there?


 It's not mandatory, but note that when someone translate the IDE and
 that string, it will display different string at the shortcut frame.


 Which shortcut frame?

Of the IDE settings. I'll try what Mattias offered.



 --
 Best regards,
  Maxim Ganetsky  mailto:gan...@narod.ru

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] record literal in FPC?

2013-01-08 Thread ik
On Tue, Jan 8, 2013 at 5:30 PM, xrfang xrf...@gmail.com wrote:
 Hi,

 Is there record literal in FPC? e.g. normally, you do:

 var
cp : TPoint;

 cp.X := 0;
 cp.Y := 0;
 Edit1.CaretPos := cp;

 I would like to use literal directly, such as:

 Edit1.CaretPos := (X: 0, Y: 0);

 But the above syntax is wrong. Is there such thing exists?

no, but try the point function


 Thanks,
 Shannon

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Package does not use my register procedure in the unit

2013-01-07 Thread ik
On Mon, Jan 7, 2013 at 12:34 AM, Mattias Gaertner
nc-gaert...@netcologne.de wrote:
 On Sun, 6 Jan 2013 22:36:37 +0200
 ik ido...@gmail.com wrote:

 Hello,

 I'm creating mini tests to create at the end a split plugin for Lazarus.

 I started doing some experiment with menus[1], and display form, and
 the package does not seems to use my register unit.

 What am I missing or doing wrong ?

 Maybe this helps:
 http://wiki.lazarus.freepascal.org/Lazarus_Packages#The_Register_procedure

Thanks, it works :)



 [1] https://github.com/ik5/split_lazarus/tree/master/tests/ide_info


 Mattias

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Getting current active editor

2013-01-06 Thread ik
Hello,

On Extending the IDE wiki page, there are two methods for getting
information about SynEdit.
One is it's settings, and the other is it's syntax highlighter.

How can I know what is the current active editor that the user is using ?

Thanks,
Ido
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Package does not use my register procedure in the unit

2013-01-06 Thread ik
Hello,

I'm creating mini tests to create at the end a split plugin for Lazarus.

I started doing some experiment with menus[1], and display form, and
the package does not seems to use my register unit.

What am I missing or doing wrong ?

Thanks,
Ido

[1] https://github.com/ik5/split_lazarus/tree/master/tests/ide_info

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Registering menu item to Lazarus editor popup menu

2013-01-04 Thread ik
Hello,

I read the following
informationhttp://wiki.lazarus.freepascal.org/Extending_the_IDE#Menu_itemson
the wiki page, but it's not clear to me, how can I get the popup menu
of
the editor, and register there a new menu item.
Can you please explain how can I find it (object name, some sort of API
command etc...) ?

Thanks,
Ido
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Registering menu item to Lazarus editor popup menu

2013-01-04 Thread ik
On Fri, Jan 4, 2013 at 6:48 PM, ik ido...@gmail.com wrote:

 Hello,

 I read the following 
 informationhttp://wiki.lazarus.freepascal.org/Extending_the_IDE#Menu_itemson
  the wiki page, but it's not clear to me, how can I get the popup menu of
 the editor, and register there a new menu item.
 Can you please explain how can I find it (object name, some sort of API
 command etc...) ?


Answering myself: I need SourceTabMenuRoot :)



 Thanks,
 Ido


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New Lazarus User

2013-01-04 Thread ik
On Fri, Jan 4, 2013 at 9:05 PM, George R Smith geo...@grsmith.arcoxmail.com
 wrote:

   All,

 I just ordered my first all Ubuntu laptop and since I like Delphi I
 noticed Lazarus.

 Can Lazarus run and are people using Lazarus on Ubuntu 12.10 and does it
 use
 Wine.


Lazarus is a native application in Linux. You can choose the GTK(2) or Qt
execution, but it's native, not a hack with wine or anything like that.



 Thanks

 George



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Brook 1.0 - A new framework for web was born

2012-12-30 Thread ik
On Sat, Dec 15, 2012 at 5:23 AM, silvioprog silviop...@gmail.com wrote:
 Hello all,

Hi,


 More than 15,000 lines of source code, more than 90 test cases, more than
 one year of work. Today, a new framework for web development was born. It's
 name is Brook and its nice features are available for you.
 I thank the FPWeb, the Freespider, the Powtils, the ExtPascal, the CustCGI
 and the EazyCGI developers. I got inspiration in all of them and and still
 in Rails and Slim Framework.

 Special thanks, I drive to João Moraes, who gave me valuable advices to
 decoupling the code. Thanks for Luciano de Souza, responsible for the
 documentation and the name of methods and properties. Thanks also for Marcos
 Douglas, the author of Greyhound, project  wich started as an inspiration
 and finished as a valuable partner in the new web ways.

 Finally, I thank for the Free Pascal and Lazarus community for the precious
 tips and quick helps.

I placed cross site scripting as a content, and all of the examples
does not handle it at all.
I recommend both as a matter of documentation, and code itself, to use
escaping and unescaping of XML code as needed.


 I was thinking about what to write in the launching e-mail. But, there's no
 much to say. The site of Brook and its documentation will speak for me. So I
 present the Brook's house:

 http://brookframework.org

 Your visit will be appreciated.

 Their, you find the documentation, you find examples running online and you
 find also the hopeness this work will be very useful to the Free Pascal and
 Lazarus commoties.

 On Sunday, I am going to start my vacations. Thanks God. The work is ready
 and the conscious is quiet.

 Enjoy!

Looks very good work, thank you


 --
 Silvio Clécio
 My public projects - github.com/silvioprog


Ido

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] pointers in writing extension for Lazarus

2012-12-30 Thread ik
On Thu, Dec 6, 2012 at 4:14 AM, leledumbo leledumbo_c...@yahoo.co.id wrote:
 Can you please give me some pointers in the matter on how to start
 writing it, what should I be looking for etc... ?

 Maybe you can find something here:
 http://wiki.lazarus.freepascal.org/Extending_the_IDE


Sorry for the long time to replay, thank you. I'll take a look at both
this link and of Martin's replay.



 --
 View this message in context: 
 http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-pointers-in-writing-extension-for-Lazarus-tp4027965p4027983.html
 Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

Ido

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] pointers in writing extension for Lazarus

2012-12-05 Thread ik
Hello,

For a very long time now (7-8 years), that I wish to add Lazarus
possibility to split edit of my current edit (and other open files)
vertically and horizontally.
I understand that many people here don't like the idea, so I wish to
write an extension for, rather then adding it to the UI itself.

Can you please give me some pointers in the matter on how to start
writing it, what should I be looking for etc... ?

Thanks,
Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] returning the stop execution dialog

2012-11-02 Thread ik
On Fri, Nov 2, 2012 at 9:37 AM, Mark Morgan Lloyd
markmll.laza...@telemetry.co.uk wrote:
 ik wrote:

 Hello,

 After I executed a code from the IDE, I pressed by mistake on Do not
 show this dialog anymore, of the finish dialog.
 How can I make Lazarus to display it again (so it will be clearer when
 the execution ended) ?


 Try  Tools - Options - Debugger - General - Show message on stop

Thank you, that's it :)


 --
 Mark Morgan Lloyd
 markMLl .AT. telemetry.co .DOT. uk

 [Opinions above are the author's, not those of his employers or colleagues]


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] returning the stop execution dialog

2012-11-01 Thread ik
Hello,

After I executed a code from the IDE, I pressed by mistake on Do not
show this dialog anymore, of the finish dialog.
How can I make Lazarus to display it again (so it will be clearer when
the execution ended) ?

Thanks,
Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Displaying Xterm does not allow to debug

2012-11-01 Thread ik
Hello,

If I set in Run Parameters to display XTerm, Lazarus does not allow
me to debug the code.
For example setting a break point does not have an effect (but if you
do not display the terminal, then it does stop at the break point).

Is this a bug, or a feature ?

I'm using: Lazarus 1.1 r39183M FPC 2.6.0 x86_64-linux-gtk 2

Thanks,
Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Displaying Xterm does not allow to debug

2012-11-01 Thread ik
On Fri, Nov 2, 2012 at 2:56 AM, Martin laza...@mfriebe.de wrote:
 On 02/11/2012 00:34, ik wrote:

 Hello,

 If I set in Run Parameters to display XTerm, Lazarus does not allow
 me to debug the code.
 For example setting a break point does not have an effect (but if you
 do not display the terminal, then it does stop at the break point).

 Is this a bug, or a feature ?

 I'm using: Lazarus 1.1 r39183M FPC 2.6.0 x86_64-linux-gtk 2


 If you put xterm (or any other) in run params, then gdb gets to debug xterm,
 instead of your app (xterm forks a process for your app, and gdb does not
 follow that)

 1) If it is for the console only, the IDE (on linux) has a console window
 (view / debug windows) It does input to, focus it and type

That's what I need, thanks


 2) If you need to run it in xterm, you can start it outside the IDE, and
 attach (svn trunk only)

 3) No idea if it will work, never tried it is said to be limited to some
 platforms only. ( http://www.delorie.com/gnu/docs/gdb/gdb_26.html )
   set follow-fork-mode child
 you can put it in the debugger_startup_param (the OI grid on the debugger
 options page) using
   -ex 'set follow-fork-mode child'

 4) you can run a xterm, and get the pty for it. you can enter that pty on
 the debugger options (oi grid) ConsoleTty
 You should run something else in the xterm, so the shell is not reacting to
 keystrokes (input)




 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] sysenvapis.inc is missing few web browsers patch to solve it

2012-10-22 Thread ik
Hello,

sysenvapis.inc is missing few browsers, including debian/ubuntu way of
general execution.

I'm attaching a patch to add them.
I wrote also text based browsers, but commented them, because I'm not
sure if it's a good idea to add them.

Ido


sysenvapis.inc.patch.gz
Description: GNU Zip compressed data
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] OT: Enjoy this one. Was Re: Working with threads and GUI

2012-10-20 Thread ik
I created an example (for my blog), that laugh on how Hollywood
display brute forcing passwords:
https://github.com/ik5/blog-examples/tree/master/fpc/brute_force_hollywood

Thank for all of your help :)

Ido


On Thu, Oct 18, 2012 at 12:25 PM, Michael Schnell mschn...@lumino.de wrote:
 On 10/18/2012 11:59 AM, ik wrote:

 Thanks, I didn't know about it, and it might save me a thread.


 It's the portable of what Postmessage() is used for in Windows (so Delphi
 does not provide it).


 -Michael

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] VirtualTreeView bug

2012-10-19 Thread ik
On Fri, Oct 19, 2012 at 2:58 AM, luiz americo pereira camara
luiz...@oi.com.br wrote:


 2012/10/18 ik ido...@gmail.com


 I attched it to here, hopefully others might also see and might find
 that I do something wrong, if it's not a bug


 Replace Widestring references by String

Thanks, that solved it. When was it changed ?


 Luiz

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Can you reproduce the following Access Violation ?

2012-10-18 Thread ik
On Wed, Oct 17, 2012 at 10:42 PM, stdreamer stdrea...@freemail.gr wrote:
 On 17/10/2012 7:28 μμ, ik wrote:

 Hello,

 When I write something like so:

 -
 type
TForm1 = class(TForm);

TSomeClass = class
...
end;

TForm1 = class(TForm)
...
end;


 --

 If I try to rename a component in design time (Other then the form
 itself), it will throw at me Access Violation.

 I'm using: Lazarus 1.1 r39114M FPC 2.6.0 x86_64-linux-gtk 2

 Can you reproduce the following issue (So I could report a bug), or am
 I missing something here ?

 Thanks,
 Ido

 I am guessing that the 1st TForm1 declaration mend to be a forward
 declaration.
 In that case you have defined it wrong.
 Tform1 = class(Tform);
 is equal to
 TForm1 = class(TForm)
 end;
 and not a forward declaration. In your case you have 2 components defined
 with the same name in the same unit and probably creates conflicts.
 try to change the first declaration to
 TForm1 = class;
 and see what happens.

You are right :(
And I can't reproduce it again.






 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Working with threads and GUI

2012-10-18 Thread ik
On Thu, Oct 18, 2012 at 9:13 AM, Michael Schnell mschn...@lumino.de wrote:
 The LCL provides the function QueuAsyncCall() to have a thread execute a
 code snippet in the main thread and thus allow for GUI work.

 Other than TThread.Synchronize, this does not stall the thread until the
 main thread activity is finished (which can take forever), but the procedure
 only gets queued, the thread just continues and the queued procedure gets
 executed when the main thread has time to run it.

Thanks, I didn't know about it, and it might save me a thread.


 -Michael


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] VirtualTreeView bug

2012-10-18 Thread ik
Hello,

I'm trying to figure out why this keep on existing on VT from CCR
virtualtree-new .

The problem is that it display only the first char instead of the whole string.

My code:
--

type
  PTreeData = ^TTreeData;
  TTreeData = record
Column1,
Column2,
Column3  : String;
  end;


procedure TForm1.FormCreate ( Sender : TObject ) ;
var
  Column : TVirtualTreeColumn;
  i  : integer;
begin
  Randomize;
  VST.Header.Options := VST.Header.Options +[hoVisible];
  VST.Header.Style   := hsFlatButtons;
  for i := 1 to 3 do
begin
 Column := VST.Header.Columns.Add;
 Column.Text:= 'column #' + IntToStr(i);
 Column.Options := Column.Options + [coAllowClick, coResizable];
 Column.Width   := UTF8Length(Column.Text) + 100;
end;

  VST.TreeOptions.MiscOptions  := VST.TreeOptions.MiscOptions +
   [toEditable,toGridExtensions];
  VST.TreeOptions.SelectionOptions := VST.TreeOptions.SelectionOptions +
   [toExtendedFocus, toMultiSelect];

end;

procedure TForm1.btnAddRootClick ( Sender : TObject ) ;
Var
  Data  : PTreeData;
  XNode : PVirtualNode;
  Rand  : Integer;
begin
  Rand  := Random(99);
  XNode := VST.AddChild(nil);

  if VST.AbsoluteIndex(XNode)  -1 then
  Begin
   Data := VST.GetNodeData(XNode);
   Data^.Column1 := 'One ' + IntToStr(Rand);
   Data^.Column2 := 'Two ' + IntToStr(Rand + 10);
   Data^.Column3 := 'Three ' + IntToStr(Rand - 5);
  End;

end;

procedure TForm1.VSTChange ( Sender : TBaseVirtualTree; Node : PVirtualNode ) ;
begin
  VST.Refresh;
end;

procedure TForm1.VSTFocusChanged ( Sender : TBaseVirtualTree;
  Node : PVirtualNode; Column : TColumnIndex ) ;
begin
  VST.Refresh;
end;

procedure TForm1.VSTGetNodeDataSize ( Sender : TBaseVirtualTree;
  var NodeDataSize : Integer ) ;
begin
  NodeDataSize := SizeOf(TTreeData);
end;

procedure TForm1.VSTGetText ( Sender : TBaseVirtualTree; Node : PVirtualNode;
  Column : TColumnIndex; TextType : TVSTTextType; var CellText : WideString ) ;
var
  Data : PTreeData;
begin
  Data := VST.GetNodeData(Node);
  case Column of
0 : CellText := Data^.Column1;
1 : CellText := Data^.Column2;
2 : CellText := Data^.Column3;
  end;
end;

procedure TForm1.VSTNewText ( Sender : TBaseVirtualTree; Node : PVirtualNode;
  Column : TColumnIndex; NewText : WideString ) ;
var
  Data : PTreeData;
begin
  Data := VST.GetNodeData(Node);
  case Column of
0 : Data^.Column1 := NewText;
1 : Data^.Column2 := NewText;
2 : Data^.Column3 := NewText;
  end;
end;

...

-
Any ideas why it happens and how to solve this ?

Thanks,
Ido
attachment: vt.png--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Can you reproduce the following Access Violation ?

2012-10-17 Thread ik
On Wed, Oct 17, 2012 at 6:50 PM, Corpsman corps...@web.de wrote:
 if i write
 Type
   TForm1 = Class(TForm);

   TSomeClass = Class
   private
   public

   End;

   TForm1 = Class(TForm)
   private
 { private declarations }
   public
 { public declarations }
   End;

 set a Tbutton on the TForm1 and double click ( to create the OnClick Event )

 I get also the exception :

 The component editor of class TDefaultComponentEditor has created the
 error:
 Unable to create new method. Please fix the error shown in the message
 window, which is normally below the source editor.

 Lazarus 1.1 r39114M Free Pascal Compiler version 2.6.0-1 [2012/01/13] for
 i386

 Corpsman on Kubuntu 12.04

I have reported it: http://bugs.freepascal.org/view.php?id=23148




 On 10/17/2012 06:28 PM, ik wrote:

 Hello,

 When I write something like so:

 -
 type
TForm1 = class(TForm);

TSomeClass = class
...
end;

TForm1 = class(TForm)
...
end;


 --

 If I try to rename a component in design time (Other then the form
 itself), it will throw at me Access Violation.

 I'm using: Lazarus 1.1 r39114M FPC 2.6.0 x86_64-linux-gtk 2

 Can you reproduce the following issue (So I could report a bug), or am
 I missing something here ?

 Thanks,
 Ido

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



 --

 Auf meiner Homepage www.Corpsman.de ist immer was los, ständig wird sie
 aktualisiert und erweitert. Da ist für jeden was dabei.


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Working with threads and GUI

2012-10-17 Thread ik
Hello,

I'm writing an application that need to perform a counter on big
numbers (0..n).
I wish to display the counter on screen, but also allow to stop the
process itself.

At the moment I did something like:

for i := 0 to Number do
  begin
edtValue.text := IntToStr(Number);
application.processmessages;
sleep(200);
  end;

How can I use it under a thread that the view will be updated in the
form, but I could also cancel the action on a very long action ?

Thanks,
Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Debugging shared libraries

2012-09-19 Thread ik
On Wed, Sep 19, 2012 at 10:39 AM, Mark Morgan Lloyd
markmll.laza...@telemetry.co.uk wrote:
 Mark Morgan Lloyd wrote:

 I've developed a useful convention which allows me to either load a
 library on demand (via Dynlibs) or to link it statically. This combination
 allows me to use standard Lazarus debugging techniques to sort out most
 problems.

 However, yesterday's discussion about calling /from/ a dynamically-loaded
 library /into/ a program binary (other than the main program) raises an
 interesting question: can Lazarus+gdb be persuaded to trace into a shared
 library?


 Does anybody have any thoughts on this? Martin?

I haven't tried to do it with gdb, however, I'm a big fan of
printing stuff into log files with much verbose as possible to figure
out things.
I hardly use a debugger, and usually use this technique.



 --
 Mark Morgan Lloyd
 markMLl .AT. telemetry.co .DOT. uk

 [Opinions above are the author's, not those of his employers or colleagues]

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] TAChart and legend items

2012-09-17 Thread ik
Hello,

How can I make sure that the Legend of TAChart breaks each item to
it's own line ?
At the moment it seems like it just try to align everything into one line

Thanks,

Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TAChart and legend items

2012-09-17 Thread ik
On Mon, Sep 17, 2012 at 4:55 PM, ik ido...@gmail.com wrote:
 Hello,

 How can I make sure that the Legend of TAChart breaks each item to
 it's own line ?

Answering myself : the problem was that I added columncount of two

 At the moment it seems like it just try to align everything into one line

 Thanks,

 Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Process ID

2012-09-12 Thread ik
On Wed, Sep 12, 2012 at 7:22 PM, Ian Godman i...@gravytrain.co.uk wrote:
 You can use the ps command to list process status. Many option so try
 man ps or info ps for further information.

 To get process info for other users you need root privilege, sudo ps
 should do that.

pidof is much more effective for it.


 Also top will tell you the running processes and how much memory / cpu
 each is using. Use q to exit.


 Ian

 On 12/09/12 15:59, Antonio Fortuny wrote:
 Hi list.

 Which function to use in Linux (if any) to get the process ID of a
 running process which is not mine. GetProcessID retrieves my own process
 ID.
 I'm using OpenProcess in Win

 Antonio.



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Writing application that sends things into facebook

2012-09-04 Thread ik
On Tue, Sep 4, 2012 at 10:27 AM, Reinier Olislagers
reinierolislag...@gmail.com wrote:
 On 3-9-2012 16:53, Ludo Brands wrote:
 Start from here: http://developers.facebook.com/docs/reference/api/
 The authentication uses OAuth 2.0 which I'm not aware any
 implementation of. BigChimp and ludob created an OAuth 1.0a
 implementation in fpctwit, maybe you could take that as a
 base (though I'm not sure about the effort since I have no
 idea about the differences between 1.0a and 2.0).

 I have also written an Oauth2 implementation for the Google API (implemented
 most of the Google Calendar api). Oauth2 is designed to be easier than
 Oauth1 and supported by many more companies that all wanted their own thing
 in the standard. The result is a standard that is lacking portability and
 every Oauth2 implementation is different and needs coding from almost
 scratch. Very little in Oauth1 can be re-used in Oauth2. If interested I can
 sent you the Oauth2 implementation for Google using Synapse for the HTTP
 layer.
 Ludo,

 If you want to and your license allows it to, we can add your OAuth2
 code to my existing fpctwit repository (if possible perhaps rename it to
 fpcoauth) with some big caveats in the readme about oauth2 being not
 one standard but many etc...

At the moment my application is public domain, I might change it to
MIT/BSD license


 Regards,
 Reinier aka BigChimp


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] issues with Lazarus Qt

2012-09-04 Thread ik
Hello,

I'ved recently tried to use Lazarus 1.1 with Qt version.
While it looks native and really cool in my KDE, I had few issues with it:
1. Font rendering with TSynEdit - It had a lot of issues to display
the end of a char at the end of a word that after it there was
space, dot etc ...
2. The selecting of text in SynEdit, changes the length of the font.
So the text moving.
3. The Messeges window keep on disparaging
4. The menus are flickering, and even changing the focus of other windows
5. In the editor, CTRL+SHIFT+Space hint, go over the completion option

Before I'll start to report these as bugs, are these known issues ?

I'm using Arch Linux 64 bit with KDE 4.9.00 with Qt 4.8.2, FPC 2.6.0

Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] TPanel.ComponentCount

2012-09-04 Thread ik
Hello,

I'm trying to do the following code:

for i := 0 to vispan.ComponentCount -1 do
begin
  if vispan.Components[i] is TSpeedButton then
begin
  if Assigned(TSpeedButton(vispan.Components[i]).Action) then
TAction(TSpeedButton(vispan.Components[i]).Action).Enabled := True
  else
TSpeedButton(vispan.Components[i]).Enabled := True;
end;
end;

where vispan is a TPanel that get the current visible panel.
However, it seems that ComponentCount is 0, even though it has 7
components inside.
The components does see the TPanel as it's parent, and so does the navigator.

Is it a bug, or am I missing something here ?

Lazarus 1.1 r38512M FPC 2.6.0 x86_64-linux-gtk 2

Thanks,
Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TPanel.ComponentCount

2012-09-04 Thread ik
On Tue, Sep 4, 2012 at 10:58 PM, patspiper patspi...@gmail.com wrote:
 On 04/09/12 22:51, ik wrote:

 Hello,

 I'm trying to do the following code:

 for i := 0 to vispan.ComponentCount -1 do
  begin
if vispan.Components[i] is TSpeedButton then
  begin
if Assigned(TSpeedButton(vispan.Components[i]).Action) then
  TAction(TSpeedButton(vispan.Components[i]).Action).Enabled :=
 True
else
  TSpeedButton(vispan.Components[i]).Enabled := True;
  end;
  end;

 where vispan is a TPanel that get the current visible panel.
 However, it seems that ComponentCount is 0, even though it has 7
 components inside.
 The components does see the TPanel as it's parent, and so does the
 navigator.

 Is it a bug, or am I missing something here ?

 Lazarus 1.1 r38512M FPC 2.6.0 x86_64-linux-gtk 2

 Probably the form is the owner and not the panel.
The panel is the parent. I wrote the following code:
  ShowMessage('btnReloadQuotes.parent: ' + btnReloadQuotes.Parent.Name);

it does claim that the parent is the panel.


 Stephano

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TPanel.ComponentCount

2012-09-04 Thread ik
On Tue, Sep 4, 2012 at 11:06 PM, Flávio Etrusco
flavio.etru...@gmail.com wrote:
 On Tue, Sep 4, 2012 at 4:58 PM, patspiper patspi...@gmail.com wrote:
 On 04/09/12 22:51, ik wrote:

 Hello,

 I'm trying to do the following code:

 for i := 0 to vispan.ComponentCount -1 do
  begin
if vispan.Components[i] is TSpeedButton then
  begin
if Assigned(TSpeedButton(vispan.Components[i]).Action) then
  TAction(TSpeedButton(vispan.Components[i]).Action).Enabled :=
 True
else
  TSpeedButton(vispan.Components[i]).Enabled := True;
  end;
  end;

 where vispan is a TPanel that get the current visible panel.
 However, it seems that ComponentCount is 0, even though it has 7
 components inside.
 The components does see the TPanel as it's parent, and so does the
 navigator.

 Is it a bug, or am I missing something here ?

 Lazarus 1.1 r38512M FPC 2.6.0 x86_64-linux-gtk 2

 Probably the form is the owner and not the panel.

 Stephano

 Definetely.
 What you're missing is that Component* properties refer to
 owner(ship). You should use ControlCount and Controls properties
 instead.

Thank you, that works


 -Flávio

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Writing application that sends things into facebook

2012-09-03 Thread ik
Hello,

I have this hobby project:
https://github.com/ik5/display-quotes

And I wish to add it the ability to send random quote to facebook as well.
I never wrote an application for facebook, and I can only find
information about web based application that works both ways.

Does anyone here know of a good and up to date tutorial on how to do it,
or an open source application that I can learn from ?

Thanks,
Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Writing application that sends things into facebook

2012-09-03 Thread ik
On Mon, Sep 3, 2012 at 5:53 PM, Ludo Brands ludo.bra...@free.fr wrote:
 Start from here: http://developers.facebook.com/docs/reference/api/
 The authentication uses OAuth 2.0 which I'm not aware any
 implementation of. BigChimp and ludob created an OAuth 1.0a
 implementation in fpctwit, maybe you could take that as a
 base (though I'm not sure about the effort since I have no
 idea about the differences between 1.0a and 2.0).

 I have also written an Oauth2 implementation for the Google API (implemented
 most of the Google Calendar api). Oauth2 is designed to be easier than
 Oauth1 and supported by many more companies that all wanted their own thing
 in the standard. The result is a standard that is lacking portability and
 every Oauth2 implementation is different and needs coding from almost
 scratch. Very little in Oauth1 can be re-used in Oauth2. If interested I can
 sent you the Oauth2 implementation for Google using Synapse for the HTTP
 layer.

Where can I find your OAuth2  unit ?


 Ludo


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus 1.0 Release

2012-08-30 Thread ik
On Wed, Aug 29, 2012 at 8:51 PM, Mattias Gaertner
nc-gaert...@netcologne.de wrote:
 The Lazarus team is glad to announce the release of:

 Lazarus 1.0

 At this important stage the current team would like to thank all the past and 
 current people who were involved in getting us here.
 * Thanks also go to the FPC team for providing the compiler that makes it all 
 possible.
 * Special thanks go to the founders of the project who started Lazarus more 
 than a decade ago in 1999: Cliff Baeseman, Shane Miller and Michael A. Hess.
 * A history of developers involved can be found at 
 http://wiki.lazarus.freepascal.org/History. And a list of the many 
 contributors comes with the distribution.

 The release is available for download at the SourceForge download page:
 http://sourceforge.net/projects/lazarus/files/

 Choose your CPU, OS, distro and then the Lazarus 1.0 directory.

 Minimum requirements:
 Windows:   98, 2k, XP, Vista, 7, 32 or 64bit
 FreeBSD/Linux: gtk 2.8 or qt4.5, 32 or 64bit
 Mac OS X:  10.4, LCL only 32bit, non LCL apps can be 64bit

 This release has been built with fpc 2.6.0 (the former release 0.9.30.4 was 
 built with that too).

 The svn tag is
 http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_0

 The list of changes:
 http://wiki.lazarus.freepascal.org/Lazarus_1.0_release_notes

 For people who are blocked by SF, the Lazarus releases from sourceforge are 
 mirrored at:
 ftp://freepascal.dfmk.hu/pub/lazarus/releases/
 and later at (after some time for synchronization)
 http://michael-ep3.physik.uni-halle.de/Lazarus/releases/
 and
 http://mirrors.iwi.me/lazarus/


 Mattias



Great news!
Wrote a post about it
(http://idkn.wordpress.com/2012/08/30/lazarus-1-0/ - in Hebrew) :)

Thank you guys for your amazing work you do with the IDE

Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Policy regarding HTML messages

2012-08-26 Thread ik
On Sun, Aug 26, 2012 at 1:24 AM, Graeme Geldenhuys gra...@geldenhuys.co.uk
wrote:



 People that send multi-part HTML messages...just to list a few.

 ik ido...@gmail.com


I'm using web based email client (gmail) for malling lists, so I do
not suffer from the issue, but if most of you believe it should
text, I'll do my best to send them like so.

Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] LazFreeType and documentation

2012-08-25 Thread ik
On Sat, Aug 25, 2012 at 3:55 AM, leledumbo leledumbo_c...@yahoo.co.idwrote:

 Looks like there should be 2 files:
 - lazarus/lcl/lazfreetypeintfdrawer.pas
 - lazarus/components/lazutils/easylazfreetype.pas

 perhaps at the time the wiki was written, both files are merged as one, or
 the wiki contains typo.


The LazFreeType ib LazUtils is the implementation of freetype. The drawer,
is the LCL code that draw the FreeType.
The problem is that the drawer unit from the wiki does not exists, but
there is a file with similar name instead, but it's not the same.
I do not want to jump to any conclusion if the file name was renamed, or
maybe there is an error in the filename of the wiki.




 --
 View this message in context:
 http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-LazFreeType-and-documentation-tp4025913p4025920.html
 Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

 --


Ido

 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] LazFreeType and documentation

2012-08-25 Thread ik
On Sat, Aug 25, 2012 at 12:02 PM, felipemonteiro.carva...@gmail.com wrote:


 Em 25/08/2012, às 09:16, ik ido...@gmail.com escreveu:
  The LazFreeType ib LazUtils is the implementation of freetype. The
 drawer, is the LCL code that draw the FreeType.

 correct

  The problem is that the drawer unit from the wiki does not exists, but
 there is a file with similar name instead, but it's not the same.
  I do not want to jump to any conclusion if the file name was renamed, or
 maybe there is an error in the filename of the wiki.

 I changed my mind about the filename and forgot to update the wiki


I fixed the wiki



 Felipe


Ido


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] LazFreeType and documentation

2012-08-24 Thread ik
Hello,

I'm reading the changes of Lazarus 1.0 (and preparing a post about it as
well).
I read about LazFreeType.
On the wiki: http://wiki.lazarus.freepascal.org/LazFreeType it is written
about lazarus/lcl/easylazfreetypeintfdrawer.pas ,
yet the file itself (regardless of it's location does not exists anywhere .

I did found the following file: lazarus/lcl/lazfreetypeintfdrawer.pas
Is it the same file (that was renamed) ? If so I'll update the wiki
accordingly, but if not, what has changed ?

Thanks,
Ido
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Pointer woes when trying to port a Delphi program

2012-08-24 Thread ik
On Fri, Aug 24, 2012 at 10:22 PM, brian br...@meadows.pair.com wrote:

 Hi all,

 I'm trying to port a Delphi program to Lazarus, although I'm redoing the
 interface from scratch.

 Without getting into to much detail about what the program does, it needs
 an array of 72 buttons on the main screen, these buttons have their
 captions changed and are variously enabled and disabled as the program
 executes.

 Because of the underlying logic, it's easiest to manipulate these buttons
 as an array of pointers to the buttons (in fact two arrays, but that's not
 really relevant).

 So, I have

 Type
  TBtnPtr = ^TButton;
  TBtnArray = Array [1..36] of TBtnPtr;

 Var
  Buttons1, Buttons2 : TBtnArray;


 Then in a procedure called from the Form's OnCreate, I set the arrays up :-

 Buttons[1]^ := FirstButton;
 Buttons[2]^ := SecondButton;

 etc, etc.

 Everything compiles OK, but at runtime, the moment the program reaches
 that first assignment statement running interactively under GDB, I get an
 error Exception class External : SIGSEGV

 This is using SVN 38353M (downloaded and built this morning) with FPC
 2.6.0 on an AMD Phenom X4 box running Debian SID 64-bit, and generating a
 64 bit executable.

 I'm lost. This same code worked under Delphi 7. Can anyone give me a hint
 as to what I'm doing wrong? I wanted to create the buttons as design time
 so that I can set the initial layout, but if I need to create them
 dynamically I can do that.


It will not answer your question (there are few details that are missing
there), but I'ved wrote a component for Lazarus few years ago that provide
a grid of buttons:
https://github.com/ik5/linesip-components

It might be useful for your to try and use it instead, or at least learn
from it.



 Thanks

 Brian


Ido


 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] KZdesktop: tabbed IDE package

2012-07-24 Thread ik
On Wed, Jul 25, 2012 at 12:16 AM, waldo kitty wkitt...@windstream.netwrote:

 On 7/23/2012 18:05, Flávio Etrusco wrote:

 Am 23.07.2012 17:46, schrieb Reinier Olislagers:

 (...)

 There's a Lazarus package written by Raphaelz from the forum that
 implements a tabbed layout for Lazarus instead of the standard layout.


 Seems very interesting, thanks for sharing!


 On Mon, Jul 23, 2012 at 3:27 PM, John Landmesserjoh...@online.de
  wrote:

 .. a really bad name KZdesktop, isn't it?


 KZ doesn't ring a bell for me (and Google didn't help either), and


 google KZ abbreviation and then select the wikipedia page... third
 entry...


I guess not enough people know this: http://kzradio.net/ (Israeli Radio for
music only station).




  since the developer seems to be Brazilian he's probably unaware of any
 offensive meaning. Can somebody please enlighten me?


 agreed... i had to hunt for it too... it didn't strike me as offensive but
 rather a strange name for a layout manager for a programmer's editor
 tool... but it is the creator's baby and they can call it what they like :)


KZ it's his abbreviation for everything as I can see, like a signature.
It's very cool implementation, that I really hope to see in Lazarus 1.0.1
and beyond part as main stream option.




 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Ido
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] RE : Lazarus and Windows messages

2012-07-04 Thread ik
On Tue, Jul 3, 2012 at 10:12 AM, Ludo Brands ludo.bra...@free.fr wrote:


  It looks like the message never fires.

 Only few windows messages can be intercepted with the message directive.
 Inserting your own WndProc in the message chain is a solution:

 http://wiki.freepascal.org/Win32/64_Interface/ja#Processing_non-user_message
 s_in_your_window


There are few problems there that I found after a lot of testing.
For example WndProc that does not execute, also my own TApplication that
inherited from forms.TApplication did not got the message fires.

So, I'm going to use the Application.OnQuery... Instead and get over with it



 Ludo


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Lazarus and Windows messages

2012-07-02 Thread ik
Hello,

It's the first time that I use Lazarus with Windows, and almost 10 years
since I last developed to Windows.

I'm trying to capture the windows message WM_QUERYENDSESSION (that exists
on JwaWinUser).

I did something like this:

TForm1 = class(TForm)
...
private
  procedure WMQueryEndSession(var Msg : TLMessage); message
WM_QUERYENDSESSION
...

end;
...

procedure TForm1.WMQueryEndSession(var Msg : TLMessage);
begin
  case Msg.lParam of
 ENDSESSION_CLOSEAPP : ShowMessage('Closing Application'); // Added it
by hand -
http://msdn.microsoft.com/en-us/library/windows/desktop/aa376890%28v=vs.85%29.aspx
 ENDSESSION_CRITICAL : ShowMessage('Critical reason');
 ENDSESSION_LOGOFF : ShowMessage('Log off');
  end;
  Msg.Result := 1;
end;
...

It looks like the message never fires.

I'm using Windows 7 64 bit, Lazarus 0.9.30.4 FPC 2.6.0 i386

What am I missing or doing wrong ?

Thanks,
Ido
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus and Windows messages

2012-07-02 Thread ik
On Mon, Jul 2, 2012 at 10:16 PM, Mattias Gaertner nc-gaert...@netcologne.de
 wrote:

 On Mon, 2 Jul 2012 22:00:05 +0300
 ik ido...@gmail.com wrote:

  Hello,
 
  It's the first time that I use Lazarus with Windows, and almost 10 years
  since I last developed to Windows.
 
  I'm trying to capture the windows message WM_QUERYENDSESSION (that exists
  on JwaWinUser).
 
  I did something like this:
 
  TForm1 = class(TForm)
  ...
  private
procedure WMQueryEndSession(var Msg : TLMessage); message
  WM_QUERYENDSESSION

 Why not simply drop a ApplicationProperties onto the form and set the
 OnQueryEndSession event?


Because I must know when the log off, and do some tasks before I can end
the program. I must know that the endsession request was made because of
such request, and OnQueryEndSession does not contain such details as far as
i can see.



 Mattias


Ido



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] ./lcl/intfgraphics.pas and tiff

2012-06-04 Thread ik
Hello,

There are two issues at the moment I found with ./lcl/intfgraphics.pas :
1. Misspelled TTiffIDF to TTiffIFD
2. at line 635
procedure DoCreateImage(ImgFileDir: TTiffIDF); {$IF
FPC_FULLVERSION=20701}override;{$ENDIF}

FPC (from the latest svn revision - r21482), does not contain such method.

I can send a patch to fix the first problem, but I need to better
understand the need for the second one.
It might that the code was not yet been committed, or it was removed.

What should I do with the second fix ?

Thanks,
Ido
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] ./lcl/intfgraphics.pas and tiff

2012-06-04 Thread ik
On Mon, Jun 4, 2012 at 1:23 PM, ik ido...@gmail.com wrote:

 Hello,

 There are two issues at the moment I found with ./lcl/intfgraphics.pas :
 1. Misspelled TTiffIDF to TTiffIFD
 2. at line 635
 procedure DoCreateImage(ImgFileDir: TTiffIDF); {$IF
 FPC_FULLVERSION=20701}override;{$ENDIF}

 FPC (from the latest svn revision - r21482), does not contain such method.

 I can send a patch to fix the first problem, but I need to better
 understand the need for the second one.
 It might that the code was not yet been committed, or it was removed.

 What should I do with the second fix ?

 Thanks,
 Ido



Ignore it, the fpc tree had a commit, and even the first problem gone.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] crash on bootstrap

2012-06-02 Thread ik
On Sat, Jun 2, 2012 at 9:00 AM, leledumbo leledumbo_c...@yahoo.co.idwrote:

 Platform + OS + widgetset please...


Arch Linux, 64 bit, GTK 2



 --
 View this message in context:
 http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-crash-on-bootstrap-tp4024245p4024288.html
 Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] crash on bootstrap

2012-06-01 Thread ik
Hello,

After a very long time that I have not updated Lazarus, I finally have
(r37471). When using FPC 2.7 I get the following exception when it just
start to run:

[FORMS.PP] ExceptionOccurred
  Sender=EInvalidOp
  Exception=Invalid floating point operation
  Stack trace:
  $00A11EAE line 214 of imagelistcache.pas
  $0096F263 line 226 of include/buttonglyph.inc
  $00855D6B line 62 of include/graphic.inc
  $0085B836 line 401 of include/rasterimage.inc
  $0085D1DE line 39 of include/custombitmap.inc
  $0085A786 line 113 of include/rasterimage.inc
  $0085D40D line 68 of include/custombitmap.inc
  $0096E92D line 34 of include/buttonglyph.inc
  $0096D619 line 491 of buttons.pp
  $00971C14 line 981 of include/speedbutton.inc
  $00C0FF80 line 693 of componentpalette.pas
  $00C0E67D line 268 of componentpalette.pas
  $00C91D8C line 1698 of ../packager/pkgmanager.pas
  $00C8BE54 line 437 of ../packager/pkgmanager.pas
  $00B7A295 line 550 of componentreg.pas
  $00C0EECD line 419 of componentpalette.pas
  $00B7A80F line 652 of componentreg.pas

Does anyone else experience such problem ?

Thanks,
Ido
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] StrToDateTime question

2012-05-27 Thread ik
On Sun, May 27, 2012 at 2:26 AM, Doug Edmunds dougedmu...@gmail.com wrote:

 Hello,

 How do I convert a string in the format
 -mm-dd to a DateTime variable?

 StrToDateTime('2012-05-26', ); // what goes there?//


writeln(StrToDateTime('2012-05-26'));




 -dae



 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] make .NET and VBA people talk to a windows service

2012-05-14 Thread ik
Hello,

I need to write a data broker as a Windows service.
The problem is that .NET and VBA developers need to give me data, and be
able to receive answer from it.

What is the best way to do something like that in Windows ?

Thanks,

Ido
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Unicode text difference between source editor and other Edit controls on Windows

2012-04-24 Thread ik
On Wed, Apr 25, 2012 at 01:26, Juha Manninen juha.mannine...@gmail.com wrote:
 Partly related to issue
   21817: FileUtil.CopyFile would failed to work with Unicode Characters
 filename.
 http://bugs.freepascal.org/view.php?id=21817

 My tests failed when I copied the file name directly to source editor.
 They succeeded when I used a FileNameEdit to select the file name.
 Why does it happen?

NTFS and FAT works in a very wrong way. They have code pages for the
filename. so if you are using an Arabic filename for example, you must
first know if you are using code page for Arabic (and there is more
then one for Arabic afaik), or does it use UTF-8 or UTF-16 afaik.


 I remember I participated in a forum discussion about a similar issue. I can
 dig it out if needed.
 Then it happened on Linux, too. I piece of unicode text looked different on
 source editor compared to other places, including Kate editor (part of KDE).

In KDE you have also Okteka that is a hex editor, what are the
differences that you see there ?



 Juha


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Updates to Synedit and 64 bit have linking problems

2012-03-19 Thread ik
On Sun, Mar 18, 2012 at 15:36, Martin laza...@mfriebe.de wrote:
 On 18/03/2012 08:50, ik wrote:

 Hello,

 I tried to compile Lazarus today from svn (after two weeks of not
 updating it), and got the following error message:
 lazarus/components/synedit/synedithighlighterfoldbase.pas(722,13)
 Error: Asm: [movsxd mem64,reg32] invalid combination of opcode and
 operands

 It happens at lazarus/components/synedit/synedithighlighterfoldbase.pas
 Line 722 for the code of:

 Result := FoldBlockEndLevel(ALineIndex, AFilter) -
 FoldBlockMinLevel(ALineIndex, AFilter);

 I'm attaching patch to fix it.


 Seen the responses.

 Since it seems to affect the current release, I am willing ta apply a
 workaround patch, but:
 -  the workaround should be IFDEF to the affected Target CPU
 -  must have a comment:  Todo: workaround for bug x. Remove when 2.6.2
 is released

I'ved attached the the patch as you guided.





 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


synedithighlighterfoldbase.pas.patch.gz
Description: GNU Zip compressed data
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Updates to Synedit and 64 bit have linking problems

2012-03-19 Thread ik
On Tue, Mar 20, 2012 at 00:54, Martin laza...@mfriebe.de wrote:
 On 19/03/2012 16:27, ik wrote:

 On Sun, Mar 18, 2012 at 15:36, Martinlaza...@mfriebe.de  wrote:

 On 18/03/2012 08:50, ik wrote:
 Seen the responses.

 Since it seems to affect the current release, I am willing ta apply a
 workaround patch, but:
 -  the workaround should be IFDEF to the affected Target CPU
 -  must have a comment:  Todo: workaround for bug x. Remove when
 2.6.2
 is released

 I'ved attached the the patch as you guided.


 Applied.

 Changed and limited to CPU64

Thank you



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Updates to Synedit and 64 bit have linking problems

2012-03-18 Thread ik
Hello,

I tried to compile Lazarus today from svn (after two weeks of not
updating it), and got the following error message:
lazarus/components/synedit/synedithighlighterfoldbase.pas(722,13)
Error: Asm: [movsxd mem64,reg32] invalid combination of opcode and
operands

It happens at lazarus/components/synedit/synedithighlighterfoldbase.pas
Line 722 for the code of:

Result := FoldBlockEndLevel(ALineIndex, AFilter) -
FoldBlockMinLevel(ALineIndex, AFilter);

I'm attaching patch to fix it.

Ido


synedithighlighterfoldbase.pas.patch.gz
Description: GNU Zip compressed data
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Updates to Synedit and 64 bit have linking problems

2012-03-18 Thread ik
On Sun, Mar 18, 2012 at 12:08, Mattias Gaertner
nc-gaert...@netcologne.de wrote:
 On Sun, 18 Mar 2012 10:50:27 +0200
 ik ido...@gmail.com wrote:

 Hello,

 I tried to compile Lazarus today from svn (after two weeks of not
 updating it), and got the following error message:
 lazarus/components/synedit/synedithighlighterfoldbase.pas(722,13)
 Error: Asm: [movsxd mem64,reg32] invalid combination of opcode and
 operands

 It happens at lazarus/components/synedit/synedithighlighterfoldbase.pas
 Line 722 for the code of:

 Result := FoldBlockEndLevel(ALineIndex, AFilter) -
 FoldBlockMinLevel(ALineIndex, AFilter);

 It compiles here.
 What compiler version has problems with it?

2.6.0 x86_64



 I'm attaching patch to fix it.


 Mattias

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Project activity

2012-03-12 Thread ik
On Mon, Mar 12, 2012 at 12:45,  michael.vancann...@wisa.be wrote:


 On Mon, 12 Mar 2012, José Mejuto wrote:

 Hello Lazarus-List,

 Sunday, March 11, 2012, 7:54:47 PM, you wrote:

 Is there any package or something that add working in project time
 counters ? Something that shows the time spend in a project.

 MVC I have such a program, written in Lazarus.
 MVC It is not directly connected to a lazarus project.
 MVC It's a small app that sits in the tray, and can be used to manage
 project time.
 MVC If there is interest, I can donate it to the Lazarus community. It
 also serves
 MVC as a nice example of how to program Lazarus and tiOPF.

 It would be great if I can put an eye on it to decide if it matches my
 needs. I'm quite disorganizated in my project development as I need to
 jump from one to other several times each day and it is quite
 difficult to track the time consumed in each one.


 This is exactly the same reason why I developed the tool :-)

 It also keeps a todo list and a list of interruptions.
 (the helpdesk walks in and out of my office, which I started tracking to
 prove that this practice costs me 1.5 hours a day.)

 I posted the project at http://www.freepascal.org/~michael/timetrack.zip

 You'll need tiOPF and a database server.
 I use (and recommend) Firebird, but changing it to something else takes
 about 2 lines of code.

 The included time.sql file creates the database.

Thank you, I'll take a look at it :)


 Michael.
 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Project activity

2012-03-12 Thread ik
I'ved added it into a github project:
https://github.com/ik5/time-tracking

Ido

On Mon, Mar 12, 2012 at 13:40, ik ido...@gmail.com wrote:
 On Mon, Mar 12, 2012 at 12:45,  michael.vancann...@wisa.be wrote:


 On Mon, 12 Mar 2012, José Mejuto wrote:

 Hello Lazarus-List,

 Sunday, March 11, 2012, 7:54:47 PM, you wrote:

 Is there any package or something that add working in project time
 counters ? Something that shows the time spend in a project.

 MVC I have such a program, written in Lazarus.
 MVC It is not directly connected to a lazarus project.
 MVC It's a small app that sits in the tray, and can be used to manage
 project time.
 MVC If there is interest, I can donate it to the Lazarus community. It
 also serves
 MVC as a nice example of how to program Lazarus and tiOPF.

 It would be great if I can put an eye on it to decide if it matches my
 needs. I'm quite disorganizated in my project development as I need to
 jump from one to other several times each day and it is quite
 difficult to track the time consumed in each one.


 This is exactly the same reason why I developed the tool :-)

 It also keeps a todo list and a list of interruptions.
 (the helpdesk walks in and out of my office, which I started tracking to
 prove that this practice costs me 1.5 hours a day.)

 I posted the project at http://www.freepascal.org/~michael/timetrack.zip

 You'll need tiOPF and a database server.
 I use (and recommend) Firebird, but changing it to something else takes
 about 2 lines of code.

 The included time.sql file creates the database.

 Thank you, I'll take a look at it :)


 Michael.
 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Project activity

2012-03-11 Thread ik
On Sun, Mar 11, 2012 at 20:54, Michael Van Canneyt
mich...@freepascal.org wrote:


 On Sun, 11 Mar 2012, José Mejuto wrote:

 Hello Lazarus-List,

 Is there any package or something that add working in project time
 counters ? Something that shows the time spend in a project.


 I have such a program, written in Lazarus. It is not directly connected to a
 lazarus project.

 It's a small app that sits in the tray, and can be used to manage project
 time.
 If there is interest, I can donate it to the Lazarus community. It also
 serves
 as a nice example of how to program Lazarus and tiOPF.

I'm also looking for one.


 Michael.
 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread ik
On Mon, Feb 27, 2012 at 12:07, Mark Morgan Lloyd
markmll.laza...@telemetry.co.uk wrote:
 Henry Vermaak wrote:

 On 26/02/12 13:29, Mark Morgan Lloyd wrote:


 I've had this sort of requirement in the past, specifically when using
 libusb (i.e. the program needed sufficient privilege to grab the device).


 You need udev rules that set the user/group permissions for the devices
 that you use.  You don't need to run as root.


 I'd be happy to be proven wrong, but my understanding is that you do since
 there is one specific kernel call (in effect, telling the kernel to release
 an unrecognised device to an unprivileged program) that won't work
 otherwise.

Close, I'm using libraries that talk with kernel space, and require
root access to work, and it's not a GUI application.



 --
 Mark Morgan Lloyd
 markMLl .AT. telemetry.co .DOT. uk

 [Opinions above are the author's, not those of his employers or colleagues]

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread ik
On Sun, Feb 26, 2012 at 14:38, ik ido...@gmail.com wrote:
 Hello,

 I'm trying to debug a program that I'm writing with Lazarus, and it
 require root privileges, but I do not want Lazarus to run as root,
 only the program itself for debug.

 How can I do that ?

Working with gdbserver can solve this. I'll investigate this issue on
the weekend and might send a patch to lazarus to support it


 Thanks,
 Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread ik
On Mon, Feb 27, 2012 at 15:56, Mark Morgan Lloyd
markmll.laza...@telemetry.co.uk wrote:
 ik wrote:

 On Sun, Feb 26, 2012 at 14:38, ik ido...@gmail.com wrote:

 Hello,

 I'm trying to debug a program that I'm writing with Lazarus, and it
 require root privileges, but I do not want Lazarus to run as root,
 only the program itself for debug.

 How can I do that ?


 Working with gdbserver can solve this. I'll investigate this issue on
 the weekend and might send a patch to lazarus to support it


 If that would work then would accessing gdb via ssh be an alternative?

I don't think it's the same. But I guess it is :)



 --
 Mark Morgan Lloyd
 markMLl .AT. telemetry.co .DOT. uk

 [Opinions above are the author's, not those of his employers or colleagues]

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] run program in ide with sudo for debug purpose

2012-02-26 Thread ik
Hello,

I'm trying to debug a program that I'm writing with Lazarus, and it
require root privileges, but I do not want Lazarus to run as root,
only the program itself for debug.

How can I do that ?

Thanks,
Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-26 Thread ik
On Sun, Feb 26, 2012 at 15:05, zeljko zel...@holobit.net wrote:
 On Sunday 26 of February 2012 13:49:08 Martin wrote:

 On 26/02/2012 12:38, ik wrote:

  Hello,

 

  I'm trying to debug a program that I'm writing with Lazarus, and it

  require root privileges, but I do not want Lazarus to run as root,

  only the program itself for debug.

 

  How can I do that ?



 I have not tried it, but maybe if you replace /usr/bin/gdb (in the IDE

 opions dialog) with sudo /usr/bin/gdb ?



 Of course that affects all projects.


 Yes, but sudo can ask for password ,so he'll be stucked there I think.

Treid to use kdesu but got the following:

The debugger /usr/bin/kdesu /usr/bin/gdb
does not exist or is not executable.

See Tools - Options - Debugger options



 zeljko


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-26 Thread ik
On Sun, Feb 26, 2012 at 15:29, Mark Morgan Lloyd
markmll.laza...@telemetry.co.uk wrote:
 Martin wrote:

 On 26/02/2012 12:38, ik wrote:

 Hello,

 I'm trying to debug a program that I'm writing with Lazarus, and it
 require root privileges, but I do not want Lazarus to run as root,
 only the program itself for debug.

 How can I do that ?


 I have not tried it, but maybe if you replace /usr/bin/gdb (in the IDE
 opions dialog) with sudo /usr/bin/gdb ?

 Of course that affects all projects.

 But afaik you can't use a starter app , because then gdb will attempt to
 debug the starter app


 I've had this sort of requirement in the past, specifically when using
 libusb (i.e. the program needed sufficient privilege to grab the device).

 I wonder whether setting either Lazarus or gdb setuid root would help?

That's scars me a lot. Because it means that every program that is
using gdb can raise it's privileges to root.
I think that a better way, will be to set per project if the program
should have different privileges for running inside Lazarus, and if
so, then to use tools such as kdesu for example.


 --
 Mark Morgan Lloyd
 markMLl .AT. telemetry.co .DOT. uk

 [Opinions above are the author's, not those of his employers or colleagues]


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] OT: Amazing new development tools

2012-02-25 Thread ik
Hello,

I found the following amazing lecture that present a new idea of a
development tool, that I think will interest you all:

http://vimeo.com/36579366

Enjoy
Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Auto adding interface methods

2012-02-23 Thread ik
On Thu, Feb 23, 2012 at 10:57, Mattias Gaertner
nc-gaert...@netcologne.de wrote:
 On Thu, 23 Feb 2012 09:32:14 +0200
 ik ido...@gmail.com wrote:

 On Thu, Feb 23, 2012 at 00:45, Mattias Gaertner
 nc-gaert...@netcologne.de wrote:
  On Thu, 23 Feb 2012 00:26:32 +0200
  ik ido...@gmail.com wrote:
 
  On Thu, Feb 23, 2012 at 00:09, Mattias Gaertner
  nc-gaert...@netcologne.de wrote:
   On Wed, 22 Feb 2012 23:57:12 +0200
   ik ido...@gmail.com wrote:
  
   Hello,
  
   Is there a shortcut in Lazarus's editor for Adding all of the methods
   that are added to an interface ?
  
   No. There is already a feature request.
  
  
   Also, Is there a way to tell Lazarus to foreword the parent methods
   and property for the child's declaration ?
  
   Can you give an example?
 
  TParent = class
  private
    FBar : String;
    FBaz : integer;
  public
    procedure Foo;
 
    property Bar : String read FBar; write FBar;
  published
    property Baz : Integer read FBaz write FBaz
  end;
 
  TChild = class(TParent) // Let's say CTRL+SHIFT+C for example
  public
     property Bar; //Foreword from CTRL+SHIFT+C for example
  published
     property Baz; // ...
  end;
 
  The above has no effect.
  What do you want to achieve?

 That rather constantly doing copy paste of original properties and
 even methods to foreword to a new class, there will be a tool for
 that.
 With my Redis client, I have a basic class that contain such
 properties, and few classes that inherits them, and require to have
 the properties inside.
 It would be nice, but not a real demand to have such support.

 The CTRL+SHIFT+C is the tool for the job imho, because it completes
 code declarations, but as you discover, it does not do that at the
 time.
 I think that part of the interface inheritance feature that will or
 might be designed, it should support also this.

 I still don't see the point.
 The properties have the same visibility, type, getters and setters.
 I could understand the demand for a tool doing the opposite: to clean up
 such duplicate properties.
 Or a tool to raise the visibility of inherited properties.

In my knowledge in Pascal, if the child does not pass the parent
properties, then they are not visible in the child.
For example in the RTTI you will not see the published property
because it was not foreword to the child.


 Mattias

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Auto adding interface methods

2012-02-23 Thread ik
On Thu, Feb 23, 2012 at 11:27, Mattias Gaertner
nc-gaert...@netcologne.de wrote:
 On Thu, 23 Feb 2012 11:09:18 +0200
 ik ido...@gmail.com wrote:

[...]
 In my knowledge in Pascal, if the child does not pass the parent
 properties, then they are not visible in the child.
 For example in the RTTI you will not see the published property
 because it was not foreword to the child.

 No. In fact you can only raise the visibility of a property, never
 decrease it.

Wow, damm it's the second thing that I discover that what I think I
know, and what actually there are wrong.

Thanks to you and Sven as well for this, and the tool is useless.


 Mattias

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Auto adding interface methods

2012-02-22 Thread ik
Hello,

Is there a shortcut in Lazarus's editor for Adding all of the methods
that are added to an interface ?
Also, Is there a way to tell Lazarus to foreword the parent methods
and property for the child's declaration ?

Thanks,
Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Auto adding interface methods

2012-02-22 Thread ik
On Thu, Feb 23, 2012 at 00:09, Mattias Gaertner
nc-gaert...@netcologne.de wrote:
 On Wed, 22 Feb 2012 23:57:12 +0200
 ik ido...@gmail.com wrote:

 Hello,

 Is there a shortcut in Lazarus's editor for Adding all of the methods
 that are added to an interface ?

 No. There is already a feature request.


 Also, Is there a way to tell Lazarus to foreword the parent methods
 and property for the child's declaration ?

 Can you give an example?

TParent = class
private
  FBar : String;
  FBaz : integer;
public
  procedure Foo;

  property Bar : String read FBar; write FBar;
published
  property Baz : Integer read FBaz write FBaz
end;

TChild = class(TParent) // Let's say CTRL+SHIFT+C for example
public
   property Bar; //Foreword from CTRL+SHIFT+C for example
published
   property Baz; // ...
end;


 Mattias

Ido



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Auto adding interface methods

2012-02-22 Thread ik
On Thu, Feb 23, 2012 at 00:45, Mattias Gaertner
nc-gaert...@netcologne.de wrote:
 On Thu, 23 Feb 2012 00:26:32 +0200
 ik ido...@gmail.com wrote:

 On Thu, Feb 23, 2012 at 00:09, Mattias Gaertner
 nc-gaert...@netcologne.de wrote:
  On Wed, 22 Feb 2012 23:57:12 +0200
  ik ido...@gmail.com wrote:
 
  Hello,
 
  Is there a shortcut in Lazarus's editor for Adding all of the methods
  that are added to an interface ?
 
  No. There is already a feature request.
 
 
  Also, Is there a way to tell Lazarus to foreword the parent methods
  and property for the child's declaration ?
 
  Can you give an example?

 TParent = class
 private
   FBar : String;
   FBaz : integer;
 public
   procedure Foo;

   property Bar : String read FBar; write FBar;
 published
   property Baz : Integer read FBaz write FBaz
 end;

 TChild = class(TParent) // Let's say CTRL+SHIFT+C for example
 public
    property Bar; //Foreword from CTRL+SHIFT+C for example
 published
    property Baz; // ...
 end;

 The above has no effect.
 What do you want to achieve?

That rather constantly doing copy paste of original properties and
even methods to foreword to a new class, there will be a tool for
that.
With my Redis client, I have a basic class that contain such
properties, and few classes that inherits them, and require to have
the properties inside.
It would be nice, but not a real demand to have such support.

The CTRL+SHIFT+C is the tool for the job imho, because it completes
code declarations, but as you discover, it does not do that at the
time.
I think that part of the interface inheritance feature that will or
might be designed, it should support also this.

Thanks,


 Mattias

Ido

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] i'm looking for tips on debugging deep nested code with recursive functions

2012-02-15 Thread ik
Hello,

I have a code with a lot of loops and recursive calls.
Somewhere at the code, at some point, I think I have an Off By One or
something similar that happens that break my code.
The question is, how would you suggest to compile such complicated
calls to figure out where the problem/s exists ?

I'm using Lazarus 0.9.31 r35319M FPC 2.5.1 x86_64-linux-gtk 2 if that's helps

Thanks,
Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] i'm looking for tips on debugging deep nested code with recursive functions

2012-02-15 Thread ik
On Wed, Feb 15, 2012 at 13:59, Everton Vieira tonvie...@gmail.com wrote:
 Em 15/02/2012, às 09:49, ik escreveu:

 Hello,

 I have a code with a lot of loops and recursive calls.
 Somewhere at the code, at some point, I think I have an Off By One or
 something similar that happens that break my code.
 The question is, how would you suggest to compile such complicated
 calls to figure out where the problem/s exists ?

 For debug that, would be nice to make some log of the behavior of the app, 
 that i`ve been thinking this days, but in which doesn't get nothing at far as 
 usable. Well you can make a lot of debugln to monitor the behavior of it to 
 try to see where is the problem. But i`m freak sure is hard work.

I have a lot of prints on the screen (stderr even). but I just can't
figure out what am I missing. I know where it happens, and on what
level, but not why.



 I'm using Lazarus 0.9.31 r35319M FPC 2.5.1 x86_64-linux-gtk 2 if that's helps

 Thanks,
 Ido

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] i'm looking for tips on debugging deep nested code with recursive functions

2012-02-15 Thread ik
On Wed, Feb 15, 2012 at 14:19, ik ido...@gmail.com wrote:
 On Wed, Feb 15, 2012 at 13:59, Everton Vieira tonvie...@gmail.com wrote:
 Em 15/02/2012, às 09:49, ik escreveu:

 Hello,

 I have a code with a lot of loops and recursive calls.
 Somewhere at the code, at some point, I think I have an Off By One or
 something similar that happens that break my code.
 The question is, how would you suggest to compile such complicated
 calls to figure out where the problem/s exists ?

 For debug that, would be nice to make some log of the behavior of the app, 
 that i`ve been thinking this days, but in which doesn't get nothing at far 
 as usable. Well you can make a lot of debugln to monitor the behavior of it 
 to try to see where is the problem. But i`m freak sure is hard work.

 I have a lot of prints on the screen (stderr even). but I just can't
 figure out what am I missing. I know where it happens, and on what
 level, but not why.

Simple debug conditions works. found the reason, but not what cause it :)




 I'm using Lazarus 0.9.31 r35319M FPC 2.5.1 x86_64-linux-gtk 2 if that's 
 helps

 Thanks,
 Ido

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] i'm looking for tips on debugging deep nested code with recursive functions

2012-02-15 Thread ik
On Wed, Feb 15, 2012 at 16:45, Martin laza...@mfriebe.de wrote:
 On 15/02/2012 13:01, ik wrote:

 On Wed, Feb 15, 2012 at 14:19, ikido...@gmail.com  wrote:

 On Wed, Feb 15, 2012 at 13:59, Everton Vieiratonvie...@gmail.com
  wrote:

 Em 15/02/2012, às 09:49, ik escreveu:

 Hello,

 I have a code with a lot of loops and recursive calls.
 Somewhere at the code, at some point, I think I have an Off By One or
 something similar that happens that break my code.
 The question is, how would you suggest to compile such complicated
 calls to figure out where the problem/s exists ?

 For debug that, would be nice to make some log of the behavior of the
 app, that i`ve been thinking this days, but in which doesn't get nothing at
 far as usable. Well you can make a lot of debugln to monitor the behavior 
 of
 it to try to see where is the problem. But i`m freak sure is hard work.

 I have a lot of prints on the screen (stderr even). but I just can't
 figure out what am I missing. I know where it happens, and on what
 level, but not why.

 Simple debug conditions works. found the reason, but not what cause it :)


 If you know the variable, and where it first exists:

 trunk has watchpoints, so you can stop when the variable changes.

 Note depending on cpu, the number of watchpoints (and the possible size of
 value) vary.  he error is only given when trying to run/step.

Thanks. I finally figure out what happens. and It was off by 2 :)
I had an inc(Index, 2); without checking first if it required, and 99%
of the time it does, but 1% it does not, and that's the reason for the
bug.
I can dig now a hole to China :)



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Should the at word be painted as reserved word ?

2012-02-14 Thread ik
On Mon, Feb 13, 2012 at 19:30, Martin laza...@mfriebe.de wrote:

 On 13/02/2012 16:49, Martin wrote:

 On 13/02/2012 08:19, Hans-Peter Diettrich wrote:

 Martin schrieb:

 2. In declaration of external functions like the following

   procedure P; external 'someLib' name 'someName';
 the name is like a keyword. So it would be nice if it'll be in bold
 font.


 I have plans to make changes that could reduce those issues, but not
 very soon...


 Will it be possible to disable context sensitive processing, so that it
 can be turned off when it turns out to slow down or otherwise affect
 working with text? Here I mean some local shortcuts or flags, affecting
 only the currently edited file.


 They could be turned off for display.
 Turning them off for parsing, would add extra cod into the parser. So
 unless duplicating the entire parser it might not do much good.


 Ok, after some thought, it looks like:
 - do-able:   procedure P; external 'someLib' name 'someName';
 - not currently practicable: raise at

 The highlighter works linebased. After finishing a line, it may have to
 look at another line, maybe even other file. It must store the entire state
 at the end of the line. In fact it has to store and keep the entire state
 of the end of each single line.

 The highlighter does not go forward and backward. It scans one token at a
 time, then the next.

 This already leads to limitations: a class forward declaration ( TFoo =
 class;) is a foldable block, ending at the ; (but to notice this, you
 must put the ; ons a new line)

 ---
 As a general rule: If at was highlighted, then it should be consistent.
 In most cases (e.g. as long as on the same line) is *not* an acceptable
 solution.

 ---
 The amount of states between procedure and name is fairly limited (and
 also to some extend already stored, for other reasons).

 raise at can be complex

 at can be a clase name, or name of a constructor, or a function
 returning the object or class
  raise At.Create;
  raise Foo.At();
  raise At();
  raise At().Create;
  raise At.At.At.At;
 and with operator overloading, the object for the raise can be the
 result of an expression:
  Raise AFooException + At;

 So a full pascal expression parser would be needed. That is not the
 problem (could even be fast enough). But each possible state in an
 expression (before/after dot/operater // bracket nest-lvl ...) must be
 allowed to be stored. That explodes memory cost (storage capacity is needed
 *everywhere*, even if there is not a single raise at at all)
 Maybe it can be reduced, but it is probably a lot of work to implement...

 This may change in future. But not without major rework of the highlighter



Interesting. Thank you.
A whole rewrite like that, however allow you to also create support for
additional cases, but it's not that crucial to have it.


Ido





 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How about Ctrl+Shift+Alt+Space completes code with empty values.

2012-02-14 Thread ik
On Tue, Feb 14, 2012 at 19:43, Everton Vieira tonvie...@gmail.com wrote:

 How about Ctrl+Shift+Alt+Space completes the code with empty values.

 Like this:

 Trim();

 After Ctrl+Shift+Alt+Space inside that parentheses makes this:

 Trim('');

 Just, another idea. :)


Or the CTRL+SHIFT+C continue to complete code, on this cases as well :)



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] an application that dont work

2012-02-12 Thread ik
On Sun, Feb 12, 2012 at 18:01, Ing. Héctor F. Fiandor Rosario 
hfian...@infomed.sld.cu wrote:

 Dear friends:

 i have an unusual problem: i have prepared a simple application to edit a
 TDbf table.

 now i have two forms only and when i execute the exe file the first works
 well, but when i try to continue, then the second one appear and the
 application terminate in miliseconds.

 really, it is the first time i have this anormal behavior. I will
 appreciate any suggestion to solve this.


There might be two or three reasons for this that you can check very fast.
First try to open the project file and see how the Application.CreateForm
used. It might be the only answer you require.

If that is not the case, more details how you work can help us help you.



 thanks in advance,

 Ing. Héctor F. Fiandor Rosario
 hfian...@infomed.sld.cu


Ido


 --

 Este mensaje le ha llegado mediante el servicio de correo electronico que
 ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema
 Nacional de Salud. La persona que envia este correo asume el compromiso de
 usar el servicio a tales fines y cumplir con las regulaciones establecidas

 Infomed: http://www.sld.cu/

 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Should the at word be painted as reserved word ?

2012-02-12 Thread ik
Hello,

The Following code:

Raise Exception.Create('') at get_caller_frame(get_frame);

Does not paint the at code as reserve word.
It is not a reserved word according to the documentation, but on this
specific case, it act as one imho.

Do you think like me, that it should be painted on this case as a reserve
word ?

Ido
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] OT: Is there a Lazarus/FPC community in Australia ?

2012-02-11 Thread ik
Hello,

I'm interesting in knowing if there is an open source community in
Australia for FPC/Lazarus.
People who does lectures, meetings etc.. ?

Thanks,
Ido
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


  1   2   3   4   >