Re: [Lazarus] How to display html contents?

2015-05-09 Thread Giuliano Colla

Il 09/05/2015 00:02, Giuliano Colla ha scritto:

Is it a known issue or I'm doing something wrong?


By browsing the list I discovered it's a known issue:

http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Help-turbopower-ipro-anchors-td4041182.html#none

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


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


Re: [Lazarus] Google APIs

2015-05-09 Thread Michael Van Canneyt



On Fri, 8 May 2015, markbass72 wrote:

hi, I am very happy of the addition of this package, great work and, of 
course, thanks!


I can't compile due to following error

reggoogleapi.pp(14,3) Fatal: Cannot find restbase used by reggoogleapi of 
package lazgoogleapis.


fpc 2.6.5


You need FPC 3.1 for all this to work 'out of the box'.

But:

The code can be compiled with 2.6.4/2.6.4, but then you must copy the source 
files from
the FPC SVN repository to the lazarus component directory. 
You will also need to install the synapse package then.


I have updated the README.txt with the necessary instructions. 
I also did some fixes using some IFDEFS.


I will see about making a ZIP file available so people do not need access to 
FPC SVN.

Michael.

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


[Lazarus] How are TProcess.Input and TProcess.XtermProgram used?

2015-05-09 Thread vfclists .
 How are TProcess.Input and TProcess.XtermProgram used?

Is it possible to test if a program is waiting for input in order to send
it some input, such as keystrokes for instance?

Can the XTermProgram be popped up on the screen in order to view the
program output and interact with it as well?



-- 
Frank Church

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


Re: [Lazarus] How to display html contents?

2015-05-09 Thread Martin

Hi,

That was me asking the ipro question in the link below. I got it work 
but in my excitement forgot to update the mailing list with my progress! 
Sorry.


To get an anchor link to show correctly (e.g. 
somefile.html#readthisbit), I discovered you need to do the following - 
note the magic moment is at step 3.


1. Split the url/anchor and remove the # from the anchor value.
2. Pass the url only to your open html procedure.
3. Call Application.ProcessMessages;
4. Call .Scroll(hsaEnd) on the html panel
5. Call .MakeAnchorVisible(anchor value without #) on the html panel.

I am guessing that without Application.ProcessMessages; the code is 
trying to call MakeAnchorVisible before the opening of the html has 
completed and the anchor doesn't yet exist?? I am no expert on the inner 
workings although I have been looking at the source and understanding 
only very small parts of it.


I hope this helps? I am utterly astounded that I may have just helped 
someone for a change instead of it being me asking for help!! :-)


Rgds,

Martin Collins

On 09/05/15 10:47, Giuliano Colla wrote:

Il 09/05/2015 00:02, Giuliano Colla ha scritto:

Is it a known issue or I'm doing something wrong?


By browsing the list I discovered it's a known issue:

http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Help-turbopower-ipro-anchors-td4041182.html#none 



Giuliano




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


Re: [Lazarus] How to display html contents?

2015-05-09 Thread Martin
I should also let you know of something else I found out only recently 
about turbopoweripro - there are printing methods that are not exposed 
by default. They were quite clearly always there in the examples folder 
provided with lazarus svn and I should have looked before!


Go to Project  Project Options and click on Additions  Overrides. Add 
a Custom Option and enter -dHtml_Print (without quotes).


The example project shows to add these lines to your code:

under unit name -

{$define UsePreview}

in uses section -

{$ifdef UsePreview}
OsPrinters,
{$endif}

You now have access to new methods on the htmlpanel, e.g.

.PrintPreview;
.GetPrintPageCount;
.Print(1, PageCnt);

I have been playing with these but have discovered a known bug. When 
printing a file that spans multiple pages, the last line of any page is 
repeated as the first line of the next page.


If I find a workaround (or maybe even fix the source code - HA!), I will 
let you know.


Rgds,

Martin Collins


On 09/05/15 10:47, Giuliano Colla wrote:

Il 09/05/2015 00:02, Giuliano Colla ha scritto:

Is it a known issue or I'm doing something wrong?


By browsing the list I discovered it's a known issue:

http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Help-turbopower-ipro-anchors-td4041182.html#none 



Giuliano




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


Re: [Lazarus] How to display html contents?

2015-05-09 Thread vfclists .
On 6 May 2015 at 09:37, Giuliano Colla giuliano.co...@fastwebnet.it wrote:

 Hi all,

 I need to display some local html files in a Lazarus application, which
 must run under Linux.

 What's the best way to go?

 Thanks in advance for any hint.

 Giuliano

 --
 Giuliano Colla

 Project planning question: when it's 90% done, are we halfway or not yet?


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



If you are on Linux and you are okay with Qt you might consider the QT
webkit demo.

It will probably make things way easier for you. It might prove a nice way
to learn out to use the Qt 4.8.x series directly.

I tried the Internet Pro control first but realized that it would be more
difficult in the long term. If you are bold enough you might be able to
make it into a component.

It is available at http://users.telenet.be/Jan.Van.hijfte/qtforfpc/ file
name lclwebkit.zip

I just noticed http://sourceforge.net/projects/lazwebkit/ which is GTK2
compatible bit I haven't tried it yet..

-- 
Frank Church

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