Re: [ANN] The Gecko-Delphi Framework v1 beta released. (The breath of fresh air for Kylix)
From: KAMA Software (support_at_kamasoftware.com)
Date: 05/14/04
- Next message: Kevin Powick: "Re: Announce your products on DelphiNews.net"
- Previous message: Jim McKay: "Re: Any suggestions for a good Delphi book ?"
- In reply to: Alexander Adam: "Re: [ANN] The Gecko-Delphi Framework v1 beta released. (The breath of fresh air for Kylix)"
- Next in thread: Alexander Adam: "Re: [ANN] The Gecko-Delphi Framework v1 beta released. (The breath of fresh air for Kylix)"
- Reply: Alexander Adam: "Re: [ANN] The Gecko-Delphi Framework v1 beta released. (The breath of fresh air for Kylix)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 14 May 2004 19:19:03 +0400
Hello.
1. If you want to change the caption of the Form1 you can use this line of
code:
<tag oncommand="window.title=\"New Caption\""/>
2. If you need to get access to Delphi object from JavaScript you need
chooise the
other way.
To do it you must create a IMyForm1.idl interface. Build it by xpidl2pas
compiler.
Implement skeleton for interface IMyForm1 as wrapper for native Delphi
Form1.
TMyForm1 = class(TnsSupports, IMyForm1)
function Get_Caption : nsString;
procedure Set_Caption(const Value : nsString);
constructor Create(AOwner : TForm1);
end;
Implement the factory to create instance of object. Don't forget registr
one in GRE.
TMyFormFactory = class(TnsSupports, nsIFactory)
function CreateInstance(aOuter : nsISupportsH; const iid : TGUID; var
_result : Pointer): HRESULT;
end;
function TMyFormFactory.CreateInstance(aOuter : nsISupportsH; const iid :
TGUID; var _result : Pointer): HRESULT;
begin
_result := TnsSupports.Get_NSInterface(TMyForm1.Create(Form1),
IMyForm1);
end;
For now you can get access to Form1 from JavaScript.
function deplhiAccess()
{
Form1 = Components.classes[COMPONENT_MYFORM1_KEY].createInstance();
Form1 = Form1.QueryInterface(Components.Interfaces.IMyForm1);
Form1.Caption = "New Caption";
}
<tag oncommand="deplhiAccess()"/>
Don't try to build it directly. This is only idea and must be going to
debug!
"Alexander Adam" <nospam@please.com> wrote in message
news:40a41152$1@newsgroups.borland.com...
> hi,
>
> "KAMA Software" <support@kamasoftware.com> schrieb im Newsbeitrag
> news:40a10b0e@newsgroups.borland.com...
> > Hello.
> > Sorry for the delayed response. You can download a patch with
Gecko-Delphi
> > Framework dcu for Delphi 6 SP2 from our server.
> > Follow this link:
> > http://www.kamasoftware.com/beta/download/GDF_v1.0_D6_patch.zip
>
> thanks, works fine. any change to execute javascript in the xul form and
> access some delphi objects?
> something like <... oncommand="form1.caption = 'hi there'"/>
>
> thx
>
>
- Next message: Kevin Powick: "Re: Announce your products on DelphiNews.net"
- Previous message: Jim McKay: "Re: Any suggestions for a good Delphi book ?"
- In reply to: Alexander Adam: "Re: [ANN] The Gecko-Delphi Framework v1 beta released. (The breath of fresh air for Kylix)"
- Next in thread: Alexander Adam: "Re: [ANN] The Gecko-Delphi Framework v1 beta released. (The breath of fresh air for Kylix)"
- Reply: Alexander Adam: "Re: [ANN] The Gecko-Delphi Framework v1 beta released. (The breath of fresh air for Kylix)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|