Re: [Lazarus] Ok I give up!

2013-03-07 Thread waldo kitty

On 3/5/2013 13:01, Jürgen Hestermann wrote:

I just recently installed a snapshot version of Lazarus on Windows (I cannot 
copy
the version number from the "about" window because I cannot select text. Why?).


right click on the help window where the graphic is ;)


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


Re: [Lazarus] Ok I give up!

2013-03-05 Thread stdreamer

On 5/3/2013 8:01 μμ, Jürgen Hestermann wrote:

Am 2013-03-05 13:57, schrieb Reinier Olislagers:
 > Please don't post this kind of stuff. Instead help make Lazarus better
 > by raising bug reports with concrete issues and preferably patches.

Sorry if I am as frustrated too. But mostly when I pointed to whatever
issue either noone was interested or even worse, someone trys to
convince me
that the bug is not a bug. So even those who try to help are repelled.


 > On Windows, the installer just *works* and gives you help out of the
 > box, since about Laz 1.0.
 > No idea about Linux as I don't use the package manager versions.

I just recently installed a snapshot version of Lazarus on Windows (I
cannot copy
the version number from the "about" window because I cannot select text.
Why?).


Just right click any where on the version tab and use the popup menu to 
copy.



(again I could not copy/paste but had to cumbersome retype the window text):


Yeah I miss that too.


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


Re: [Lazarus] Ok I give up!

2013-03-05 Thread Jürgen Hestermann

Am 2013-03-05 13:57, schrieb Reinier Olislagers:
> Please don't post this kind of stuff. Instead help make Lazarus better
> by raising bug reports with concrete issues and preferably patches.

Sorry if I am as frustrated too. But mostly when I pointed to whatever
issue either noone was interested or even worse, someone trys to convince me
that the bug is not a bug. So even those who try to help are repelled.


> On Windows, the installer just *works* and gives you help out of the
> box, since about Laz 1.0.
> No idea about Linux as I don't use the package manager versions.

I just recently installed a snapshot version of Lazarus on Windows (I cannot 
copy
the version number from the "about" window because I cannot select text. Why?).
This version uninstalled the previous version before installing the new one.
So I would expect it should work "out of the box".
Still, if I put the cursor on "if" or any other keyword and type F1 I get (again
I could not copy/paste but had to cumbersome retype the window text):

A help database was found for th
Help keyword "FPCKeyword_if" not found.




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


Re: [Lazarus] Ok I give up!

2013-03-05 Thread Reinier Olislagers
On 5-3-2013 15:08, appjaws wrote:
> On 05/03/13 12:50, Reinier Olislagers wrote:
> 
>>>
>>> Is F1 the only way to access the integrated help?
>> Yep. Do note that you need to put the cursor on a keyword (e.g. begin,
>> or for or while...).
> 
> Maaaybe I have the wrong expectations with regard to the Help system.
> If I press F1 with begin clicked I do get the help viewer - I've never
> done this before.
> I was working on the assumption that if the cursor was over a component
> on the tool bar and them F1 was pressed I would see help about that
> component.
I agree, see this bug that I posted:
http://bugs.freepascal.org/view.php?id=23410
No context-sensitive help for control on form

> So question How do I obtain help on a component?
Place your cursor on a component name (e.g. TIBConnection for a Firebird
conection) *in the source code editor* after e.g. dropping the component
on a form.

Things like TIBConnection, grids and probably a lot more are included in
the help file - just not accessible via F1 if you have a component
selected on the form.

Apart from that, there's a lot of information on the wiki, e.g. the
LazActivex component is nicely documented there.
> 
> Sorry for all the confusion, I told you that it was probably me being
> silly and not understanding the basics.
No problem - glad we worked it out in the end (though I'm still a bit
curious about these lhelped permissions for root)

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


Re: [Lazarus] Ok I give up!

2013-03-05 Thread appjaws

On 05/03/13 12:50, Reinier Olislagers wrote:



Is F1 the only way to access the integrated help?

Yep. Do note that you need to put the cursor on a keyword (e.g. begin,
or for or while...).


Maaaybe I have the wrong expectations with regard to the Help system.
If I press F1 with begin clicked I do get the help viewer - I've never 
done this before.
I was working on the assumption that if the cursor was over a component 
on the tool bar and them F1 was pressed I would see help about that 
component.  This is why I have been saying that F1 does not work for me.

So question How do I obtain help on a component?

Sorry for all the confusion, I told you that it was probably me being 
silly and not understanding the basics.

regards
Paul

--
---This message has been sent using Thunderbird on kubuntu---

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


Re: [Lazarus] Ok I give up!

2013-03-05 Thread Reinier Olislagers
On 5-3-2013 13:45, Jürgen Hestermann wrote:
> 
> Am 2013-03-05 13:29, schrieb appjaws:
>> Is F1 the only way to access the integrated help?
>> 
>> Why is this so difficult? Why isn't it automatically installed
>> when Lazarus is installed?
>> 
>> Any other ideas? regards frustrated Paul
>> 
> Yes, I feel the same. I used TurboPascal and Delphi over decades and 
> there was no hassle with installing/copying/configuring the help. 
> This should be part of the installation routine (even snapshots).
> 
> But it seems that those who have the knowledge to change this are not
> willing to do so and those who are willing don't have the knowledge.

Please don't post this kind of stuff. Instead help make Lazarus better
by raising bug reports with concrete issues and preferably patches.

On Windows, the installer just *works* and gives you help out of the
box, since about Laz 1.0.
No idea about Linux as I don't use the package manager versions.

With Mattias' help I just submitted a patch today to add an (offline)
help menu item to show the built-in(!) chm help, and helped streamline
the wiki article on help.

If you don't like the installer/package manager way, try running fpcup
which Ludo Brands and I wrote to get and install FPC 2.6.x/trunk and
Lazarus 1.x...trunk as well as documentation.

You might see why I personnally not very impressed with your message;
from a Lazarus project perspective I think meaningful bug reports
(including Paul's very comprehensive posts about what's going on with
his system) and patches count for a lot more than complaining.

Thanks,
Reinier

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


Re: [Lazarus] Ok I give up!

2013-03-05 Thread Reinier Olislagers
On 5-3-2013 13:29, appjaws wrote:
> On 04/03/13 18:20, Reinier Olislagers wrote:
>> On 4-3-2013 16:54, appjaws wrote:
>>> On 04/03/13 11:28, Reinier Olislagers wrote:
 On 4-3-2013 12:21, appjaws wrote:
> On 02/03/13 17:21, Reinier Olislagers wrote:
>> On 2-3-2013 17:41, appjaws wrote:
>>> Any ideas on the built in help, I'm using linux with lazarus
>>> 1.0.6 and
>>> fpc 2.6.0

>>> HelpEXE :- /usr/share/lazarus/1.0.6/components/chmhelp/lhelp/lhelp
>> That looks good.
Well, is there an lhelp executable there with correct permissions?
(see below)
>>
>>> HelpFilesPath :- /usr/share/lazarus/1.0.6/docs/chm/


>> Hope with this you can get it going!
> Viewers section


> CHM Help Viewer
> HelpExe := /usr/share/lazarus/1.0.6/components/chmhelp/lhelp/lhelp
See above; make sure there's an lhelp executable there
If not, run Lazarus as root, open the lhelp project there, compile, check.

An additional troubleshooting step: you can run lhelp stand alone as
your regular user and try to open the chms in the path mentioned above.

>
> Well it still does not work, I thought it might be a permissions problem
> because /home/paul/,config/lhelp had permissions set to root, but even
> running lazarus as root didn't solve the problem, F1 will not work.
Mmmm, no idea what /home/paul/,config/lhelp is (perhaps you meant
.config but still
Could well be the settings for lhelp.
It's in your directory, I'd fix the permissions anyway with
chown --recursive paul:paul /home/paul/.config/lhelp/* (or whatever the
actual command is, this is more a guess)


> This is /home/paul/,config/lhelp/ihelp-.conf
> 
> 
> 
>   
> 
> 
> 
> 
>   
>   
>   
> 
> 
> 
> 
> 
> 
>   
>   
> 
>   
> 
> 
> 
> Is F1 the only way to access the integrated help?
Yep. Do note that you need to put the cursor on a keyword (e.g. begin,
or for or while...).
> 
> Why is this so difficult?
Don't know, but the fact that config files in your home directory are
owned(?) by root is an indicator that you did something you're not
supposed to do.

> Why isn't it automatically installed when Lazarus is installed?
Answered that question earlier...

> Any other ideas?
The easy but drastic option: remove Lazarus, including config files
(aptitude purge lazarus fpc... or something on Debian)
Manually ensure all trace is removed in /home/paul/.config (or ,config):
lazarus, fpc, lhelp
Reinstall.

> regards
> frustrated Paul
I understand. It *shouldn't* be that hard.

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


Re: [Lazarus] Ok I give up!

2013-03-05 Thread Jürgen Hestermann


Am 2013-03-05 13:29, schrieb appjaws:

Is F1 the only way to access the integrated help?

Why is this so difficult?
Why isn't it automatically installed when Lazarus is installed?

Any other ideas?
regards
frustrated Paul


Yes, I feel the same.
I used TurboPascal and Delphi over decades and there was no hassle with 
installing/copying/configuring the help.
This should be part of the installation routine (even snapshots).

But it seems that those who have the knowledge to change this are not willing
to do so and those who are willing don't have the knowledge.

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


Re: [Lazarus] Ok I give up!

2013-03-05 Thread appjaws

On 04/03/13 18:20, Reinier Olislagers wrote:

On 4-3-2013 16:54, appjaws wrote:

On 04/03/13 11:28, Reinier Olislagers wrote:

On 4-3-2013 12:21, appjaws wrote:

On 02/03/13 17:21, Reinier Olislagers wrote:

On 2-3-2013 17:41, appjaws wrote:

Any ideas on the built in help, I'm using linux with lazarus 1.0.6 and
fpc 2.6.0



/usr/share/lazarus/1.06  is where the components docs etc are installed.

I hope you mean this is the directory where Lazarus is installed (where
the lazarus and startlazarus executables are)


Yes that is correct.




HelpEXE :- /usr/share/lazarus/1.0.6/components/chmhelp/lhelp/lhelp

That looks good.


HelpFilesPath :- /usr/share/lazarus/1.0.6/docs/chm/

That looks good. Do you have
fcl.chm  lazutils.chm  lcl.chm  prog.chm  ref.chm  rtl.chm  toc.chm
user.chm in there?


Yes all correct.



As far as I can tell everything seems to be in the correct place and
referenced correctly.

I don't know. You haven't told us your tools/options/help/help options
settings. Following the instructions in the wiki (with everything in the
chm directory mentioned above), CHM Help Viewer's HelpFilesPath
should be empty.
Likewise the various Help Databases settings should be unchanged from a
default install (mostly empty).

Hope with this you can get it going!

Viewers section
HTML Browser
AutoRegister := False
BrowserParms := %s
BrowserPath := ''
Name := ''
Tag := 0

CHM Help Viewer
HelpExe := /usr/share/lazarus/1.0.6/components/chmhelp/lhelp/lhelp
HelpExeParm := ''
HelpFilePath := ''
HelpLabel := lazhelp
Name := ''
Tag := 0
Databases section
StartPage
AutoRegister := False
BaseURL := ''
KeywordPrefix := ''
Name := ''
Tag := 0
RTLUnits
AutoRegister := False
BaseURL := ''
KeywordPrefix := ''
Name := ''
Tag := 0
FCLUnits
AutoRegister := False
BaseURL := ''
KeywordPrefix := ''
Name := ''
Tag := 0
FreePascal Compiler messages
AdditionsFile := ''
AutoRegister := False
BaseURL := ''
FPCTranslationFile := ''
KeywordPrefix := ''
Name := ''
Tag := 0
FPC Language Reference
Name := ''
Tag := 0
LCL - Lazarus Component Librart
AutoRegister := False
BaseURL := ''
KeywordPrefix := ''
Name := ''
Tag := 0
FreePascal Compiler directives
Name := ''
Tag := 0
External Help
Name := ''
Tag := 0

Well it still does not work, I thought it might be a permissions problem 
because /home/paul/,config/lhelp had permissions set to root, but even 
running lazarus as root didn't solve the problem, F1 will not work.


This is /home/paul/,config/lhelp/ihelp-.conf



  




  
  
  






  
  

  



Is F1 the only way to access the integrated help?

Why is this so difficult?
Why isn't it automatically installed when Lazarus is installed?

Any other ideas?
regards
frustrated Paul

--
---This message has been sent using Thunderbird on kubuntu---

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


Re: [Lazarus] Ok I give up!

2013-03-04 Thread Reinier Olislagers
On 4-3-2013 16:54, appjaws wrote:
> On 04/03/13 11:28, Reinier Olislagers wrote:
>> On 4-3-2013 12:21, appjaws wrote:
>>> On 02/03/13 17:21, Reinier Olislagers wrote:
 On 2-3-2013 17:41, appjaws wrote:
> Any ideas on the built in help, I'm using linux with lazarus 1.0.6 and
> fpc 2.6.0
> 
>>> Finally, built in help is a nice aid: with your cursor on TMemo,
>>> press
>>> F1 and you'll see properties and methods that are available.
>
>I don't think my built in help is working, F1 does nothing.
>How do I enable built in help?

 Well, did you read the wiki article I posted the link for? What
 happened?
>>>
>>> Help is installed in Install/Uninstall Packaged ChmHelpPkg 0.1 is on the
>>> installed side.  However, F1 is not working, when I look at Tools,
>>> Options, Key Mapping, Help menu commands, Context sensitive help [F1] is
>>> shown but F1 does not do anything so I tried to change the key using the
>>> edit button but the new key was not displayed alongside the entry (Where
>>> [F1] was) and the new key did not work.
>> Perhaps it's not the key mapping that's wrong?
>>
>>> The next entry 'Edit context sensitive help [Ctrl+Shift+F1] does work.
>>> So I am baffled as to what to try next.
>>
>> ... Try reading the next section & checking the settings & chm files are
>> okay instead of just the part about the key mappings.
>>
> 
> Thank you for the reply,
> I have followed the 'installing_Help_in_the_IDE document and  F1 still
> does not work.
> /usr/share/lazarus/1.06  is where the components docs etc are installed.
I hope you mean this is the directory where Lazarus is installed (where
the lazarus and startlazarus executables are)

> /usr/lib64/fpc/2.6.0 is where pascal is installed/
Thanks, but fairly irrelevant unless you have chm/html help files and
want to fiddle with things...

> HelpEXE :- /usr/share/lazarus/1.0.6/components/chmhelp/lhelp/lhelp
That looks good.

> HelpFilesPath :- /usr/share/lazarus/1.0.6/docs/chm/
That looks good. Do you have
fcl.chm  lazutils.chm  lcl.chm  prog.chm  ref.chm  rtl.chm  toc.chm
user.chm
in there?
If not, download the chm documentation from sourceforge and unpack the
chms there (see the wiki article)
> fpc docs :- /usr/share/doc/fp-docs/$(FPCVER)
Again, irrelevant

> As far as I can tell everything seems to be in the correct place and
> referenced correctly.
I don't know. You haven't told us your tools/options/help/help options
settings. Following the instructions in the wiki (with everything in the
chm directory mentioned above), CHM Help Viewer's HelpFilesPath
should be empty.
Likewise the various Help Databases settings should be unchanged from a
default install (mostly empty).

Hope with this you can get it going!

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


Re: [Lazarus] Ok I give up!

2013-03-04 Thread appjaws

On 04/03/13 11:28, Reinier Olislagers wrote:

On 4-3-2013 12:21, appjaws wrote:

On 02/03/13 17:21, Reinier Olislagers wrote:

On 2-3-2013 17:41, appjaws wrote:

Any ideas on the built in help, I'm using linux with lazarus 1.0.6 and
fpc 2.6.0


Finally, built in help is a nice aid: with your cursor on TMemo, press
F1 and you'll see properties and methods that are available.


   I don't think my built in help is working, F1 does nothing.
   How do I enable built in help?


Well, did you read the wiki article I posted the link for? What happened?


Help is installed in Install/Uninstall Packaged ChmHelpPkg 0.1 is on the
installed side.  However, F1 is not working, when I look at Tools,
Options, Key Mapping, Help menu commands, Context sensitive help [F1] is
shown but F1 does not do anything so I tried to change the key using the
edit button but the new key was not displayed alongside the entry (Where
[F1] was) and the new key did not work.

Perhaps it's not the key mapping that's wrong?


The next entry 'Edit context sensitive help [Ctrl+Shift+F1] does work.
So I am baffled as to what to try next.


... Try reading the next section & checking the settings & chm files are
okay instead of just the part about the key mappings.



Thank you for the reply,
I have followed the 'installing_Help_in_the_IDE document and  F1 still 
does not work.

/usr/share/lazarus/1.06  is where the components docs etc are installed.
/usr/lib64/fpc/2.6.0 is where pascal is installed/
HelpEXE :- /usr/share/lazarus/1.0.6/components/chmhelp/lhelp/lhelp
HelpFilesPath :- /usr/share/lazarus/1.0.6/docs/chm/
fpc docs :- /usr/share/doc/fp-docs/$(FPCVER)

As far as I can tell everything seems to be in the correct place and 
referenced correctly.


Any other ideas?
regards
Paul
--
---This message has been sent using Thunderbird on kubuntu---

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


Re: [Lazarus] Ok I give up!

2013-03-04 Thread Reinier Olislagers
On 4-3-2013 12:21, appjaws wrote:
> On 02/03/13 17:21, Reinier Olislagers wrote:
>> On 2-3-2013 17:41, appjaws wrote:
>>> Any ideas on the built in help, I'm using linux with lazarus 1.0.6 and
>>> fpc 2.6.0
>>> 
> Finally, built in help is a nice aid: with your cursor on TMemo, press
> F1 and you'll see properties and methods that are available.
>>>
>>>   I don't think my built in help is working, F1 does nothing.
>>>   How do I enable built in help?
>>
>> Well, did you read the wiki article I posted the link for? What happened?
> 
> Help is installed in Install/Uninstall Packaged ChmHelpPkg 0.1 is on the
> installed side.  However, F1 is not working, when I look at Tools,
> Options, Key Mapping, Help menu commands, Context sensitive help [F1] is
> shown but F1 does not do anything so I tried to change the key using the
> edit button but the new key was not displayed alongside the entry (Where
> [F1] was) and the new key did not work.
Perhaps it's not the key mapping that's wrong?

> The next entry 'Edit context sensitive help [Ctrl+Shift+F1] does work.
> So I am baffled as to what to try next.

... Try reading the next section & checking the settings & chm files are
okay instead of just the part about the key mappings.


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


Re: [Lazarus] Ok I give up!

2013-03-04 Thread appjaws

On 02/03/13 17:21, Reinier Olislagers wrote:

On 2-3-2013 17:41, appjaws wrote:

Any ideas on the built in help, I'm using linux with lazarus 1.0.6 and
fpc 2.6.0


Finally, built in help is a nice aid: with your cursor on TMemo, press
F1 and you'll see properties and methods that are available.


  I don't think my built in help is working, F1 does nothing.
  How do I enable built in help?


Well, did you read the wiki article I posted the link for? What happened?


Help is installed in Install/Uninstall Packaged ChmHelpPkg 0.1 is on the 
installed side.  However, F1 is not working, when I look at Tools, 
Options, Key Mapping, Help menu commands, Context sensitive help [F1] is 
shown but F1 does not do anything so I tried to change the key using the 
edit button but the new key was not displayed alongside the entry (Where 
[F1] was) and the new key did not work.

The next entry 'Edit context sensitive help [Ctrl+Shift+F1] does work.
So I am baffled as to what to try next.

I do now have my file procedures working and even have the clipboard 
working.Thank you to all who helped.


Paul

--
---This message has been sent using Thunderbird on kubuntu---

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


Re: [Lazarus] Ok I give up!

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 10:34:05 +0100
Kostas Michalopoulos  wrote:

> Do SaveToFile/LoadFromFile handle Unicode/UTF8 properly? The TStrings stuff
> is in LCL which AFAIK doesn't use UTF8.

The content is loaded correctly, but the Filename passed to
SaveToFile/LoadFromFile must be system encoding.
Maybe you can use TStringListUTF8 instead.

Mattias

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


Re: [Lazarus] Ok I give up!

2013-03-04 Thread Kostas Michalopoulos
Do SaveToFile/LoadFromFile handle Unicode/UTF8 properly? The TStrings stuff
is in LCL which AFAIK doesn't use UTF8.


On Sun, Mar 3, 2013 at 3:14 AM, waldo kitty  wrote:

> On 3/2/2013 13:20, Mark Morgan Lloyd wrote:
>
>> Note that if you download the helpfiles manually, you might have to be
>> careful
>> of exactly where you put them: it's easy to have a situation you've
>> unpacked
>> them in a slightly different directory from where lhelp expects.
>>
>
> agreed... and if following the given instructions, things do work but
> files are not where they should apparently be...
>
> by that i mean that chm files are placed in html directory instead of chm
> directory or whatever the instructions call for... it was something i
> noticed a while back but never followed up on...
>
>
>
> --
> __**_
> 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] Ok I give up!

2013-03-02 Thread waldo kitty

On 3/2/2013 13:20, Mark Morgan Lloyd wrote:

Note that if you download the helpfiles manually, you might have to be careful
of exactly where you put them: it's easy to have a situation you've unpacked
them in a slightly different directory from where lhelp expects.


agreed... and if following the given instructions, things do work but files are 
not where they should apparently be...


by that i mean that chm files are placed in html directory instead of chm 
directory or whatever the instructions call for... it was something i noticed a 
while back but never followed up on...



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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Flávio Etrusco
On Sat, Mar 2, 2013 at 11:36 AM, Hans-Peter Diettrich
 wrote:
> Reinier Olislagers schrieb:
>
>
>>> What is *not* clear, to the OP and many other users, that the required
>>> functionality is *not* found directly in TMemo, but resides in a
>>> property (.Lines) of it. In such cases code completion is of little help
>>> :-(
>>
>>
>> True, but what other suggestion do you have apart from the ones already
>> posted?
>
>
> Only the obvious one: add the frequently used TStrings methods also to
> TMemo. Either explicitly or in some more elegant way.
>
> E.g. the IStrings interface could be added to TMemo, implemented by Lines.
> That's the usual workaround for the lack of multiple inheritance, which here
> and in other list based controls would be the intuitive way for having both
> the list and control methods and properties in the class.
>
> DoDi
>

I might be wrong, but I guess it won't be very long before name
clashes occur and this comfort and discoverability becomes a mess of
confusing and ugly identifiers.
IMO the correct fix, if it's indeed missing, would be documentation
for TMemo wrt common usage.

-Flávio

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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Mark Morgan Lloyd

appjaws wrote:

On 02/03/13 17:21, Reinier Olislagers wrote:

On 2-3-2013 17:41, appjaws wrote:

Any ideas on the built in help, I'm using linux with lazarus 1.0.6 and
fpc 2.6.0


Finally, built in help is a nice aid: with your cursor on TMemo, press
F1 and you'll see properties and methods that are available.


  I don't think my built in help is working, F1 does nothing.
  How do I enable built in help?


Well, did you read the wiki article I posted the link for? What happened?



Yes thank you I will have a go tomorrow.
Paul


Note that if you download the helpfiles manually, you might have to be 
careful of exactly where you put them: it's easy to have a situation 
you've unpacked them in a slightly different directory from where lhelp 
expects.


--
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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread appjaws

On 02/03/13 17:21, Reinier Olislagers wrote:

On 2-3-2013 17:41, appjaws wrote:

Any ideas on the built in help, I'm using linux with lazarus 1.0.6 and
fpc 2.6.0


Finally, built in help is a nice aid: with your cursor on TMemo, press
F1 and you'll see properties and methods that are available.


  I don't think my built in help is working, F1 does nothing.
  How do I enable built in help?


Well, did you read the wiki article I posted the link for? What happened?


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


Yes thank you I will have a go tomorrow.
Paul
--
---This message has been sent using Thunderbird on kubuntu---

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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Reinier Olislagers
On 2-3-2013 17:41, appjaws wrote:
> Any ideas on the built in help, I'm using linux with lazarus 1.0.6 and
> fpc 2.6.0
> 
>>> Finally, built in help is a nice aid: with your cursor on TMemo, press
>>> F1 and you'll see properties and methods that are available.
> 
>  I don't think my built in help is working, F1 does nothing.
>  How do I enable built in help?

Well, did you read the wiki article I posted the link for? What happened?


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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Reinier Olislagers
Hi Paul,

I'm going to respond to the list as well so they know what's going on.

On 2-3-2013 17:35, Paul wrote:
> Thank you  Reinier for your offer to look at my code.I am new to Lazarus
> and am working through some delphi books to try and learn, but this has
> got me stumped.
> I tried a new form with Memo1 and used your code and it worked and the
> file was written to.


Normally it would be easier to send/upload both the .lfm and the .pas
file for the form - or better the entire project (easy via
project/publish project, then zip up the result - then you only include
relevant source files)

Also, saying what Lazarus version you're using normally helps...

That said, look at e.g.:
procedure TmpCut;
begin
  MemoCallNote.Lines.SaveToFile(MyTempFile);
  MemoCallNote.Clear;
end;

This is a regular procedure, not part of your form (the TFormCall object).
Without further changes, this code knows nothing about TFormCall,
including its MemoCallNote object. That's where the invalid qualifier
problems come from.

The easiest way to fix this is to move TmpCut to the private part of the
form:
interface
...
type

  { TFormCall }
  TFormCall = class(TForm)
...
  private
{ private declarations }
procedure TmpCut;
...
this declares a procedure TmpCut as part of the form... and it has
access to form properties etc.

However, you'll need to modify the procedure body from
procedure TmpCut;
to
procedure TFormCall.TmpCut;
to match the declaration above.

Note: all of this typed by hand, hope I did it ok.

Hope this is clear & it works for you.


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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread waldo kitty

On 3/2/2013 07:54, Hans-Peter Diettrich wrote:

What is *not* clear, to the OP and many other users, that the required
functionality is *not* found directly in TMemo, but resides in a property
(.Lines) of it. In such cases code completion is of little help :-(


this is what i was going to write but you said it better than i could have... 
this has been the biggest problem i've faced in trying to move to this 
environment as well as learning the new routines and capabilities... it seems 
like every time i start digging about for a way to do something, i find that 
another of my self-built library tools i've used for years is already 
included... it seems that the more i dig, the less i need my own tools...


but back to the above, yes... i wanted to do something similar as the OP, too... 
you'd think that memo.savetofile and memo.loadfromfile would be a natural thing 
and it would automatically do what needed to be done...


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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Martin

On 02/03/2013 13:49, appjaws wrote:

On 02/03/13 12:16, Reinier Olislagers wrote:

On 2-3-2013 13:05, appjaws wrote:

Hi,
How do you write the contents of a Memo to a file and read back into a
Memo?

Memo1.Lines.SaveToFile
Memo1.Lines.LoadFromFile


I tried the following line but I just get an error message :-
Call.pas(87,17) Error: Illegal qualifier

MemoCallNote.Lines.SaveToFile ('/home/paul/tmpinfo/MyTempFile.txt');


"MemoCallNote.Lines" is a TMemo on your form ( TForm1 )?

The above line of code is in a function or procedure that BELONGS to 
TForm1 ?


That is a function or procedure like this
procedure TForm1.somename;
?

If it is in a function or procedure that does NOT have the name of 
TForm1 in it, then it will not work.


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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread leledumbo
> I don't think my built in help is working, F1 does nothing. 
  How do I enable built in help? 

http://wiki.freepascal.org/Installing_Help_in_the_IDE



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Ok-I-give-up-tp4029554p4029579.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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread appjaws
Any ideas on the built in help, I'm using linux with lazarus 1.0.6 and 
fpc 2.6.0



Finally, built in help is a nice aid: with your cursor on TMemo, press
F1 and you'll see properties and methods that are available.


 I don't think my built in help is working, F1 does nothing.
 How do I enable built in help?

 Thank you to all who responded
 Paul



--
---This message has been sent using Thunderbird on kubuntu---

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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Juha Manninen
On Sat, Mar 2, 2013 at 4:38 PM, Hans-Peter Diettrich
 wrote:
>> Code completion finds the Lines property without problems.
>
> How is this helpful in finding the property, which finally implements Clear
> or some other task?

First you find Lines, then you find Clear. It is very helpful. :)

Your idea of using interface for method delegation is actually good.
It is actually the only elegant way to duplicate those methods on
TMemo.
I like the idea of extending LCL components instead of only imitating
VCL like a monkey ... which brings us to FireMonkey ... Delphi itself
moved to a more modern library design already.

Using interfaces in a library requires proper design and thinking.
Interfaces must be created for core functionality and injected to many
classes. It is certainly doable. Java did it.
Lots of effort is required to do it properly though.


Regards,
Juha

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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Sven Barth

On 02.03.2013 15:57, Leonardo M. Ramé wrote:

On 2013-03-02 13:49:48 +, appjaws wrote:

On 02/03/13 12:16, Reinier Olislagers wrote:

On 2-3-2013 13:05, appjaws wrote:

Hi,
How do you write the contents of a Memo to a file and read back into a
Memo?


MemoCallNote.Lines.SaveToFile ('/home/paul/tmpinfo/MyTempFile.txt');



Is there a space between SaveToFile and the opening parentheses?. Try
removing it.




This should not make a difference...

Regards,
Sven

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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Hans-Peter Diettrich

Juha Manninen schrieb:

On Sat, Mar 2, 2013 at 2:54 PM, Hans-Peter Diettrich
 wrote:

What is *not* clear, to the OP and many other users, that the required
functionality is *not* found directly in TMemo, but resides in a property
(.Lines) of it. In such cases code completion is of little help :-(


Code completion finds the Lines property without problems.


How is this helpful in finding the property, which finally implements 
Clear or some other task?


DoDi


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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Hans-Peter Diettrich

Reinier Olislagers schrieb:


What is *not* clear, to the OP and many other users, that the required
functionality is *not* found directly in TMemo, but resides in a
property (.Lines) of it. In such cases code completion is of little help
:-(


True, but what other suggestion do you have apart from the ones already
posted?


Only the obvious one: add the frequently used TStrings methods also to 
TMemo. Either explicitly or in some more elegant way.


E.g. the IStrings interface could be added to TMemo, implemented by 
Lines. That's the usual workaround for the lack of multiple inheritance, 
which here and in other list based controls would be the intuitive way 
for having both the list and control methods and properties in the class.


DoDi


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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Leonardo M . Ramé
On 2013-03-02 13:49:48 +, appjaws wrote:
> On 02/03/13 12:16, Reinier Olislagers wrote:
> >On 2-3-2013 13:05, appjaws wrote:
> >>Hi,
> >>How do you write the contents of a Memo to a file and read back into a
> >>Memo?
> 
> MemoCallNote.Lines.SaveToFile ('/home/paul/tmpinfo/MyTempFile.txt');
> 

Is there a space between SaveToFile and the opening parentheses?. Try
removing it.


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

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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Reinier Olislagers
On 2-3-2013 14:49, appjaws wrote:
> On 02/03/13 12:16, Reinier Olislagers wrote:
>> On 2-3-2013 13:05, appjaws wrote:
>>> Hi,
>>> How do you write the contents of a Memo to a file and read back into a
>>> Memo?
>> Memo1.Lines.SaveToFile
>> Memo1.Lines.LoadFromFile
> 
> I tried the following line but I just get an error message :-
> Call.pas(87,17) Error: Illegal qualifier
> 
> MemoCallNote.Lines.SaveToFile ('/home/paul/tmpinfo/MyTempFile.txt');
So is MemoCallNote a TMemo? What text is exactly at line 87, position 17?

If I drop a memo and a button on a form and assign this to the button's
OnClick event:
procedure TForm1.Button1Click(Sender: TObject);
begin
  Memo1.Lines.SaveToFile('d:\cop\t\test.txt');
end;
... it works (on my windows machine - you'd obviously have to change the
path on Linux).

>>> Another thing how can I find out legal qualifiers i.e. Memo.Clear ,
>>> Memo.Text (both illegal). What is legal?
>> Type Memo. then press ctrl-space, then identifier completion will show
>> you legal qualifiers.
> 
> I didn't fine .Lines.SaveToFile?
But did you find Lines? After Lines, do the same for .SaveToFile

I'm starting to suspect that what you think is a memo may not actually
be a memo.

If you want to, you can upload your project as a zip somewhere and I'll
have a look...

>> Finally, built in help is a nice aid: with your cursor on TMemo, press
>> F1 and you'll see properties and methods that are available.
> 
> I don't think my built in help is working, F1 does nothing.
What version of Lazarus are you using - post 1.0 should have built in help.

> How do I enable built in help?
http://wiki.lazarus.freepascal.org/Installing_Help_in_the_IDE


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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread appjaws

On 02/03/13 12:16, Reinier Olislagers wrote:

On 2-3-2013 13:05, appjaws wrote:

Hi,
How do you write the contents of a Memo to a file and read back into a
Memo?

Memo1.Lines.SaveToFile
Memo1.Lines.LoadFromFile


I tried the following line but I just get an error message :-
Call.pas(87,17) Error: Illegal qualifier

MemoCallNote.Lines.SaveToFile ('/home/paul/tmpinfo/MyTempFile.txt');




Another thing how can I find out legal qualifiers i.e. Memo.Clear ,
Memo.Text (both illegal). What is legal?

Type Memo. then press ctrl-space, then identifier completion will show
you legal qualifiers.


I didn't fine .Lines.SaveToFile?



You can also go to the declaration of the tmemo (using alt-up) and see
the source code to inspect the properties/methods/functions but as
you'll see TMemo descends from TCustomMemo, probably inheriting some
properties etc, and the inheritance tree goes on up.

Finally, built in help is a nice aid: with your cursor on TMemo, press
F1 and you'll see properties and methods that are available.


I don't think my built in help is working, F1 does nothing.
How do I enable built in help?

Thank you to all who responded
Paul

--
---This message has been sent using Thunderbird on kubuntu---

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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Juha Manninen
On Sat, Mar 2, 2013 at 2:54 PM, Hans-Peter Diettrich
 wrote:
> What is *not* clear, to the OP and many other users, that the required
> functionality is *not* found directly in TMemo, but resides in a property
> (.Lines) of it. In such cases code completion is of little help :-(

Code completion finds the Lines property without problems.

Juha

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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Michael Van Canneyt



On Sat, 2 Mar 2013, Hans-Peter Diettrich wrote:


Juha Manninen schrieb:

On Sat, Mar 2, 2013 at 2:05 PM, appjaws  wrote:

Another thing how can I find out legal qualifiers i.e. Memo.Clear ,
Memo.Text (both illegal). What is legal?


See Memo.Lines.
It has Clear and Text and everything that TStrings supports.

How to find it? With a new component I usually look at its properties
in Object Inspector, and use the code completion feature of the IDE to
see available methods.
Usually their names are intuitive and self documenting. For example
Memo.Lines is pretty clear.


What is *not* clear, to the OP and many other users, that the required 
functionality is *not* found directly in TMemo, but resides in a property 
(.Lines) of it. In such cases code completion is of little help :-(


You must learn the LCL or VCL.

No amount of IDE help will ever take away that need.

Yes, you must still study. It is inevitable.

Luckily, there is a well-informed community which can provide answers quickly.

As again demonstrated by the answers today.

Michael.

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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Reinier Olislagers
On 2-3-2013 13:54, Hans-Peter Diettrich wrote:
> Juha Manninen schrieb:
>> On Sat, Mar 2, 2013 at 2:05 PM, appjaws  wrote:
>>> Another thing how can I find out legal qualifiers i.e. Memo.Clear ,
>>> Memo.Text (both illegal). What is legal?
>>
>> See Memo.Lines.
>> It has Clear and Text and everything that TStrings supports.
> 
> What is *not* clear, to the OP and many other users, that the required
> functionality is *not* found directly in TMemo, but resides in a
> property (.Lines) of it. In such cases code completion is of little help
> :-(

True, but what other suggestion do you have apart from the ones already
posted?


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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Hans-Peter Diettrich

Juha Manninen schrieb:

On Sat, Mar 2, 2013 at 2:05 PM, appjaws  wrote:

Another thing how can I find out legal qualifiers i.e. Memo.Clear ,
Memo.Text (both illegal). What is legal?


See Memo.Lines.
It has Clear and Text and everything that TStrings supports.

How to find it? With a new component I usually look at its properties
in Object Inspector, and use the code completion feature of the IDE to
see available methods.
Usually their names are intuitive and self documenting. For example
Memo.Lines is pretty clear.


What is *not* clear, to the OP and many other users, that the required 
functionality is *not* found directly in TMemo, but resides in a 
property (.Lines) of it. In such cases code completion is of little help :-(


DoDi


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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Juha Manninen
On Sat, Mar 2, 2013 at 2:05 PM, appjaws  wrote:
> Another thing how can I find out legal qualifiers i.e. Memo.Clear ,
> Memo.Text (both illegal). What is legal?

See Memo.Lines.
It has Clear and Text and everything that TStrings supports.

How to find it? With a new component I usually look at its properties
in Object Inspector, and use the code completion feature of the IDE to
see available methods.
Usually their names are intuitive and self documenting. For example
Memo.Lines is pretty clear.
If I don't find what I wanted then I must read documentation or use Google.

Regards,
Juha

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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Michael Van Canneyt



On Sat, 2 Mar 2013, appjaws wrote:


Hi,
How do you write the contents of a Memo to a file and read back into a Memo?
I have tried all sorts, I am using Lazarus 1.0.6 on linux.


Simple:

Memo1.Lines.SaveToFile('/home/yourname/yourfile.txt');

And

Memo1.Lines.LoadFromFile('/home/yourname/yourfile.txt');


How this started was because I wanted to write the content of my Memo to the 
clipboard and be able to paste it back in again, but I couldn't figure out 
how to do this in the linux version.
Another thing how can I find out legal qualifiers i.e. Memo.Clear , Memo.Text 
(both illegal). What is legal?


Again, simple:

1. use code completion. Type
Memo.
Normally, if you wait ater typing the dot, the list of available qualifiers 
will appear by itself after some time.


2. At least the published qualifiers are visible in the Object Inspector. 
They are accessible in code with exactly the same names.


Michael.

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


Re: [Lazarus] Ok I give up!

2013-03-02 Thread Reinier Olislagers
On 2-3-2013 13:05, appjaws wrote:
> Hi,
> How do you write the contents of a Memo to a file and read back into a
> Memo?
Memo1.Lines.SaveToFile
Memo1.Lines.LoadFromFile

> Another thing how can I find out legal qualifiers i.e. Memo.Clear ,
> Memo.Text (both illegal). What is legal?
Type Memo. then press ctrl-space, then identifier completion will show
you legal qualifiers.

You can also go to the declaration of the tmemo (using alt-up) and see
the source code to inspect the properties/methods/functions but as
you'll see TMemo descends from TCustomMemo, probably inheriting some
properties etc, and the inheritance tree goes on up.

Finally, built in help is a nice aid: with your cursor on TMemo, press
F1 and you'll see properties and methods that are available.

There are probably more ways...

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


[Lazarus] Ok I give up!

2013-03-02 Thread appjaws

Hi,
How do you write the contents of a Memo to a file and read back into a Memo?
I have tried all sorts, I am using Lazarus 1.0.6 on linux.
How this started was because I wanted to write the content of my Memo to 
the clipboard and be able to paste it back in again, but I couldn't 
figure out how to do this in the linux version.
Another thing how can I find out legal qualifiers i.e. Memo.Clear , 
Memo.Text (both illegal). What is legal?

Thank you for any help
Paul
--
---This message has been sent using Thunderbird on kubuntu---

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