Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 5 of 5 total |
Unable to see procedure in another unit |
Tue, Nov 10 2020 6:54 PM | Permanent Link |
KimHJ Comca Systems, Inc | I have spend the whole day on this and I can't find the problem.
I have a project with some forms and data units, the I added a unit for ServerRequest. Unit InfoRequest; interface uses WebCore, WebHTTP; type TUser = class(TPersistent) private FSuccess: Integer; FPhone: String; FAccount: String; FName: String; FBalance: String; FToken: String; published property success: Integer read FSuccess write FSuccess; property phone: String read FPhone write FPhone; property account: String read FAccount write FAccount; property name: String read FName write FName; property balance: String read FBalance write FBalance; property token: String read FToken write FToken; end; TSendToServer = class private procedure AddorderComplete(Request: TServerRequest); public procedure AddorderRequest(CSStoreId,jsonfile: String); end; var SendToServer: TSendToServer; implementation procedure TSendToServer.AddorderRequest(CSStoreId,jsonfile: String); I have InfoRequest in the Uses in another Unit and I have the InfoRequest in the project's contains, but none of the other units can see this unit and this unit can't see functions in other units. All the other units can see its other public functions. When I call SendToServer.AddorderRequest(CompanyID,JsonStr); I get "There is no fuction or procedure declaration that matches the AddorderRequest(CompanyID,JsonStr) reference" What is missing? I have five other project I made for awhile ago they all have units with no TForm with no problems seeing funtions. Thanks for any help recovering my memory. Kim |
Tue, Nov 10 2020 10:28 PM | Permanent Link |
Raul Team Elevate | On 11/10/2020 6:54 PM, KimHJ wrote:
> I have spend the whole day on this and I can't find the problem. > > I have a project with some forms and data units, the I added a unit for ServerRequest. > > I have InfoRequest in the Uses in another Unit and I have the InfoRequest in the project's contains, but none of the other units can see this unit and this unit can't see functions in other units. All the other units can see its other public functions. > > When I call SendToServer.AddorderRequest(CompanyID,JsonStr); I get "There is no fuction or procedure declaration that matches the AddorderRequest(CompanyID,JsonStr) reference" > > What is missing? This looks fine. I would guess that there is another SendToServer declared that is in scope and is not of TSendToServer type. Hence i would search all project files for SendToServer to make sure this is the only instance of this name declaration. Or just rename SendToServer in InfoRequest and if that works then you know it's variable name conflict. Raul |
Wed, Nov 11 2020 11:15 AM | Permanent Link |
KimHJ Comca Systems, Inc | Raul wrote:
>>I would guess that there is another SendToServer declared that is in >>scope and is not of TSendToServer type. >>Hence i would search all project files for SendToServer to make sure >>this is the only instance of this name declaration. >>Or just rename SendToServer in InfoRequest and if that works then you >>know it's variable name conflict. Thanks, I tried, but no luck. I created a new project and added all the units and it worked. The only thing I found when I created the new project was that the two DataUnit's I have in the project was saved to a diffrent folder. Kim |
Wed, Nov 11 2020 3:38 PM | Permanent Link |
Raul Team Elevate | On 11/11/2020 11:15 AM, KimHJ wrote:
> Thanks, I tried, but no luck. > I created a new project and added all the units and it worked. The only thing I found when I created the new project was that the two DataUnit's I have in the project was saved to a diffrent folder. What if you replace your AddOrderRequest call with code below - where does EWB throw an error now when compiling ? if assigned(SendToServer) then begin if (SendToServer Is TObject) then showmessage(SendToServer.Classname); SendToServer.AddOrderRequest(CompanyID,JsonStr); end; Raul |
Thu, Nov 12 2020 9:49 PM | Permanent Link |
KimHJ Comca Systems, Inc | Raul wrote:
>>What if you replace your AddOrderRequest call with code below - where >>does EWB throw an error now when compiling ? Thanks Raul, but I already deleted all the old files and it works now. Kim |
This web page was last updated on Thursday, March 28, 2024 at 08:36 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |