Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 4 of 4 total |
Missing something...? |
Tue, Dec 13 2011 9:42 AM | Permanent Link |
Robert Devine | If I create a form and implement one or more event handlers I can see
those handlers in the generated JavaScript. However, if I do something like the following, then the ShowTestMessage procedure is not visible in the generated Javascript. This also happens if I create a non-visual class and add some methods - there's no sign of them in the JS. Bug or am I missing something? Cheers, Bob TForm1 = class(TForm) Label1: TLabel; Button1: TButton; Edit1: TEdit; DataSet1: TDataSet; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } procedure ShowTestMessage; end; // -- The following handler is auto-generated. procedure TForm1.Button1Click(Sender: TObject); begin Edit1.Text := 'This is a test'; end; // -- The following procedure is hand-coded. procedure TForm1.ShowTestMessage; begin Edit1.Text := 'ShowTestMessage'; end; |
Tue, Dec 13 2011 10:07 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Bob,
<< If I create a form and implement one or more event handlers I can see those handlers in the generated JavaScript. However, if I do something like the following, then the ShowTestMessage procedure is not visible in the generated Javascript. This also happens if I create a non-visual class and add some methods - there's no sign of them in the JS. Bug or am I missing something? >> Are you actually calling the ShowTestMessage procedure anywhere in your application ? If not, then the compiler will remove it during the emitting stage. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Dec 13 2011 10:12 AM | Permanent Link |
Raul Team Elevate | You need to use it for it to be included - one of the benefits of EWB that Tim has listed is that only stuff that results in a valid codepath gets compiled into javascript - thus minimizing your JS file size. Do something like this and it should be included. procedure TForm1.Button1Click(Sender: TObject); begin Edit1.Text := 'This is a test'; ShowTestMessage; end; Raul On 12/13/2011 9:42 AM, Bob Devine wrote: > If I create a form and implement one or more event handlers I can see > those handlers in the generated JavaScript. However, if I do something > like the following, then the ShowTestMessage procedure is not visible in > the generated Javascript. > > This also happens if I create a non-visual class and add some methods - > there's no sign of them in the JS. Bug or am I missing something? > > Cheers, Bob > > > TForm1 = class(TForm) > Label1: TLabel; > Button1: TButton; > Edit1: TEdit; > DataSet1: TDataSet; > procedure Button1Click(Sender: TObject); > private > { Private declarations } > public > { Public declarations } > procedure ShowTestMessage; > end; > > > // -- The following handler is auto-generated. > procedure TForm1.Button1Click(Sender: TObject); > begin > Edit1.Text := 'This is a test'; > end; > > // -- The following procedure is hand-coded. > procedure TForm1.ShowTestMessage; > begin > Edit1.Text := 'ShowTestMessage'; > end; |
Tue, Dec 13 2011 10:28 AM | Permanent Link |
Robert Devine | Thanks Tim/Raul - I missed that.
Cheers, Bob On 13/12/2011 15:07, Tim Young [Elevate Software] wrote: > Bob, > > << If I create a form and implement one or more event handlers I can see > those handlers in the generated JavaScript. However, if I do something > like the following, then the ShowTestMessage procedure is not visible in > the generated Javascript. > > This also happens if I create a non-visual class and add some methods - > there's no sign of them in the JS. Bug or am I missing something? >> > > Are you actually calling the ShowTestMessage procedure anywhere in your > application ? If not, then the compiler will remove it during the > emitting stage. > |
This web page was last updated on Tuesday, May 7, 2024 at 06:25 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |