Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
Using global objects in class methods |
Thu, Sep 17 2015 3:32 PM | Permanent Link |
Christian Kaufmann | Hi,
I have this code: class function TBSStorage.GetLocaleAsString(const AName: String; const ADefault: String = ''): String; begin if LocalStorage.Exists(AName) then Result := LocalStorage.Items[AName] else Result := ADefault; end; This worked fine in EWB 1. Now I get a compiler error: [Error] BSCore.wbs (215,19): Cannot access the Exists(AName) instance member from within a class method I'm not sure, what part of my code is not allowed anymore in EWB 2? cu Christian |
Fri, Sep 18 2015 6:20 AM | Permanent Link |
Matthew Jones | Christian Kaufmann wrote:
> > class function TBSStorage.GetLocaleAsString(const AName: String; > const ADefault: String = ''): String; begin > if LocalStorage.Exists(AName) > then Result := LocalStorage.Items[AName] > else Result := ADefault; > end; > I have similar code now, so my first thought is to make sure the unit that defines LocalStorage is included in your uses clause. -- Matthew Jones |
Fri, Sep 18 2015 10:23 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Christian,
<< This worked fine in EWB 1. Now I get a compiler error: >> It's a bug. I'll have a fix for this in 2.02. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Thursday, December 5, 2024 at 09:15 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |