Recent

Author Topic: Status of Gecko SDK Port  (Read 77234 times)

B4rr4cuda

  • Newbie
  • Posts: 1
Re: Status of Gecko SDK Port
« Reply #45 on: February 14, 2010, 11:44:55 pm »
Hello.
I've tried to find the problem with SIGFPE at application start on linux. During the experiments, I found that there is no crash if we manually create directory components in demo application's path and copy there compreg.dat from /opt/firefox/components dir.
Application still doesn't start but SIGFPE crash error disappears. May be this hint will help to find out real problem :\

Slavikk

  • New member
  • *
  • Posts: 5
    • http://www.bagirasoft.ru
Re: Status of Gecko SDK Port
« Reply #46 on: March 25, 2010, 12:45:18 pm »
Good morning.
How to save the page HTML (save as)? How to save an image from the page?
Thanks in advance.

XcanadamanX

  • Newbie
  • Posts: 1
Re: Status of Gecko SDK Port
« Reply #47 on: April 01, 2010, 12:01:54 am »
Hi im just wondering where we are supposed to put the files from XULRunner and which files we need. Thanks in advance!

edit: just read the wiki for the 50th time and seems that i finally read the one sentence i needed :p

edit2: ok i still cant get it to work. could someone write some complete instructions on where to put stuff? sorry for being a complete noob.
« Last Edit: April 01, 2010, 05:04:41 pm by XcanadamanX »

José Mejuto

  • Full Member
  • ***
  • Posts: 136
Re: Status of Gecko SDK Port
« Reply #48 on: May 28, 2010, 05:19:07 pm »
Hi im just wondering where we are supposed to put the files from XULRunner and which files we need. Thanks in advance!
edit: just read the wiki for the 50th time and seems that i finally read the one sentence i needed :p
edit2: ok i still cant get it to work. could someone write some complete instructions on where to put stuff? sorry for being a complete noob.

Hello,

Current state of GeckoPort can not run Gecko higher than 1.9.1.11 or use any FireFox >3.5 (FireFox not tested by me at all).

To run it in Windows, just decompress the XULRunner in the same application folder, so you get a "xulrunner" folder at your application level. If you have GRE paths defined (maybe FireFox or Mozilla defines some of them) they take preference, now I had changed it to take preference in local xulrunner, either in the same folder or in a xulrunner folder.

In Linux it does not compile right now due some Windows specific things that I'm changing step by step, but I lost near a week trying to understand why Gecko 1.9.2.x does not work with the "GeckoPort" and seems to be some kind of JavaScript problem, maybe related to the lack of a directory service or maybe some kind of bugs in the new JavaScript engine in 1.9.2.x.

Finally (on Windows) it works if this .js files from the xulrunner are removed:

Code: [Select]
nsFormAutoComplete.js
 nsHelperAppDlg.js
 nsProgressDialog.js
 nsSearchService.js
 nsUpdateService.js

And JavaScript is disabled, so it renders a page, but no JavaScript at all. Also recent Geckos have a lot of float point errors so your project must use "Set8087CW($133F)" to hide this errors as C programs do, but you lost some checks like overflow in Pascal code.

My goal now it to make it work with GTK2 using any Gecko that works fine on Windows but for such task I had changed some things here and there and now it only compiles in Windows, I hope only for a while.

ammari

  • New member
  • *
  • Posts: 6
Re: Status of Gecko SDK Port
« Reply #49 on: February 08, 2011, 11:35:19 pm »
Good morning.
How to save the page HTML (save as)? How to save an image from the page?
Thanks in advance.

hello
I work on the component gecko in Delphi and I also try how how to open, save and display the source code of an html page.
do you have answers
thank you

José Mejuto

  • Full Member
  • ***
  • Posts: 136
Re: Status of Gecko SDK Port
« Reply #50 on: February 10, 2011, 06:02:09 pm »
hello
I work on the component gecko in Delphi and I also try how how to open, save and display the source code of an html page.
do you have answers
thank you

Hello,

To save the html you must wait for the next update to the GeckoPort because the nsIDocumentEncoder is missing currently, I'm now implementing it. But take care that Gecko does not give you access to the raw html (or I had not found a way except using InputStreams to filter the data) but to the already parsed html which can be converted in a raw html using nsIDocumentEncoder.

I hope to get the next update ready for this weekend.

iannak

  • New member
  • *
  • Posts: 5
Re: Status of Gecko SDK Port
« Reply #51 on: February 28, 2011, 09:04:49 pm »
Hello.

I'm trying to print a page which is loaded in to the GeckoBrowser, but i can't find any way to do that. I found that there is an interface - nsIWebBrowserPrint- in the nsXPCOM.pas unit which has several methods (like Print, PrintPreview...) for printing, but they are not public.

Is there any way to use these methods from my program?

Thanks in advance.

ammari

  • New member
  • *
  • Posts: 6
Re: Status of Gecko SDK Port :designe mode
« Reply #52 on: March 01, 2011, 05:05:52 pm »
Hello.

I'm trying to print a page which is loaded in to the GeckoBrowser, but i can't find any way to do that. I found that there is an interface - nsIWebBrowserPrint- in the nsXPCOM.pas unit which has several methods (like Print, PrintPreview...) for printing, but they are not public.

Is there any way to use these methods from my program?

Thanks in advance.


hello
  I want to use the gecko to create an e psd html editor.
So I open the web page in a document that allows me to change the page loaded (gilisser and move images, add a table, add a html code ...).
Service: GeckoBrowser1.LoadURI (openDialog.FileName). loads the page in navigation mode.
I essey to enter Edit mode with the following code:
var
   ed: nsIDOMNSHTMLDocument;
   s: IInterfacedString;
   aa: nsIDOMHTMLIFrameElement;
/ / c: IInterfacedCString;
/ / aa: nsIDOMHTMLFrameElement;
begin
/ /
   s: = newstring ('on ');
   ed: = GeckoBrowser1.ContentWindow.GetDocument () as nsIDOMNSHTMLDocument;
   ed.SetDesignMode (s.AString);
  but this code does not allow me to change the wab page (it can just drag and drop images to the text but can not do anything).
So my question is: are what can go into edit mode which allows us to modify any page.
thank you

José Mejuto

  • Full Member
  • ***
  • Posts: 136
Re: Status of Gecko SDK Port
« Reply #53 on: March 04, 2011, 12:17:00 pm »
Hello.

I'm trying to print a page which is loaded in to the GeckoBrowser, but i can't find any way to do that. I found that there is an interface - nsIWebBrowserPrint- in the nsXPCOM.pas unit which has several methods (like Print, PrintPreview...) for printing, but they are not public.

Is there any way to use these methods from my program?

Thanks in advance.

Hello,

You can get the interface for printing casting the gecktobrowser control to a TCustomGeckoBrowser, and them you can access to the "GetWebBrowserPrint". Then you must implement the parameters to get a print.

I'll try to add a simple Print method to the GeckoBrowser. Advanced print should be implemented by each user.

ammari

  • New member
  • *
  • Posts: 6
comment récupérer les propriètés d'une image en gecko
« Reply #54 on: April 12, 2011, 11:03:15 am »
bonjour à tous
 j'utilise le gecko port pour faire éditeur html . pour l'instant j'arrive à ajouter des images , des tableaux , ajouter et supprimer des liens html dans la page web .
mais la chose qui me bloque actuellement est la récupération des propriétés de l’élément html sélectionné.(les propriété d'une image  ou d'un tableau par exemple).

Sel:=GeckoBrowser1.ContentWindow.GetSelection;
  Range:=Sel.GetRangeAt(0); // le premier élément selectioné

  // tout déselectionner
  sel.RemoveAllRanges();
  // supprimer le contenu de la sélection en cours du document
  range.deleteContents();

  // obtenir l'alocation de la sélection courante
  Container:=Range.StartContainer;
  ipos:=Range.startOffset;

  // faire une nouvelle Range pour la nouvelle sélection
  DocR:=mDocument as nsIDOMDocumentRange;
  Range:=DocR.CreateRange;

.........................je ne sais pas quoi faire après.

avez vous une piste pour résoudre ce problème.
 

ammari

  • New member
  • *
  • Posts: 6
Re: Status of Gecko SDK Port
« Reply #55 on: April 13, 2011, 11:56:44 am »
hello phil
I have the same problem with the "write ".
how to load HTML directly into geckobrowser?

ammari

  • New member
  • *
  • Posts: 6
Afficher le code html de la selection courante dans le geckobrowser
« Reply #56 on: April 18, 2011, 10:58:25 am »
hello
  I want to know how to retrieve the properties (the source, height, width ...) an image loaded with gecko (gecko sdk delphi). xpcom help. Here's the function Add:

procedure inserer_image()
var
ss,src,dest,dest1:string;
img,br: nsIDOMElement;
s1,s2: IInterfacedString;
EditorDocument: nsIDOMNSHTMLDocument;
begin

//Insérer un Elèment image
s1:=NewString('img');
img:=mDocument.CreateElement(s1.AString);
//border


s1:=NewString('border');
s2:=NewString(FormValideEditionImage.Edit_LargeurBordure.text);
img.SetAttribute(s1.AString,s2.AString);

//
s1:=NewString('src');
s2:=NewString('file:///'+c:/image.png);
img.SetAttribute(s1.AString,s2.AString);
......
InsertNode(img);
end;

procedure TForm6.InsertNode(const aInsertNode: nsIDOMElement);
var
mDocument: nsIDOMDocument;
Sel: nsISelection;
Range: nsIDOMRange;
Container: nsIDOMNode;
DocR: nsIDOMDocumentRange;
iPos: PRUint32;
NodeValue: IInterfacedString;
AfterNode: nsIDOMNode;
BeforeNode: nsIDOMNode;
TextNode: nsIDOMNode;
TextBefore,TextAfter: WideString;
begin
// récupèrer la l'objet sélectioné
Sel:=GeckoBrowser1.ContentWindow.GetSelection;
Range:=Sel.GetRangeAt(0); // le premier élément selectioné

// tout déselectionner
sel.RemoveAllRanges();
// supprimer le contenu de la sélection en cours du document
range.deleteContents();

// obtenir l'alocation de la sélection courante
Container:=Range.StartContainer;
ipos:=Range.startOffset;

// faire une nouvelle Range pour la nouvelle sélection
DocR:=mDocument as nsIDOMDocumentRange;
Range:=DocR.CreateRange;

if (Container.NodeType=3) and (aInsertNode.NodeType=3) then
begin
// if we insert text in a textnode, do optimized insertion
NodeValue:=NewString;
aInsertNode.GetNodeValue(NodeValue.AString);
(Container as nsIDOMCharacterData).InsertData(iPos, NodeValue.AString);

// put cursor after inserted text
Range.SetEnd(Container, iPos+(aInsertNode as nsIDOMCharacterData).Length);
Range.SetStart(Container, iPos+(aInsertNode as nsIDOMCharacterData).Length);
....

....

// insert the 3 new nodes before the old one
Container.InsertBefore(AfterNode, TextNode);
Container.InsertBefore(aInsertNode, AfterNode);
Container.InsertBefore(BeforeNode, aInsertNode);

// remove the old node
Container.RemoveChild(TextNode);

end
else
begin
// else simply insert the node
AfterNode:=Container.ChildNodes.Item(ipos);
Container.InsertBefore(aInsertNode, AfterNode);
end;
Range.SetEnd(AfterNode, 0);
Range.SetStart(AfterNode, 0);
end;
Sel.AddRange(Range);
end;

I want to retrieve the html code of the image selected when I double click on the image.
        Have you a track to solve this problem (in Delphi or other programming language)
Thank you

 

TinyPortal © 2005-2018