Cableguy Expert Licensed User Longtime User Nov 26, 2019 #1 In the app I'm working I have been "forced" to name my views with quite long names… not an issue... I add views and its declarations as I go along and need them... And then this happens… (all views are added using the designer ) Attachments upload_2019-11-26_22-16-29.png 1.2 KB · Views: 551 Last edited: Nov 26, 2019
In the app I'm working I have been "forced" to name my views with quite long names… not an issue... I add views and its declarations as I go along and need them... And then this happens… (all views are added using the designer )
agraham Expert Licensed User Longtime User Nov 27, 2019 #2 I have a feeling that I have seen this too last time I added a view to a layout in an existing project. It somehow rectified itself but I don't know what I did to make it so. B4A 9.50.
I have a feeling that I have seen this too last time I added a view to a layout in an existing project. It somehow rectified itself but I don't know what I did to make it so. B4A 9.50.
Cableguy Expert Licensed User Longtime User Nov 27, 2019 #3 agraham said: I have a feeling that I have seen this too last time I added a view to a layout in an existing project. It somehow rectified itself but I don't know what I did to make it so. B4A 9.50. Click to expand... I'm on 9.50 too
agraham said: I have a feeling that I have seen this too last time I added a view to a layout in an existing project. It somehow rectified itself but I don't know what I did to make it so. B4A 9.50. Click to expand... I'm on 9.50 too
Erel B4X founder Staff member Licensed User Longtime User Nov 27, 2019 #4 This warning happens when you forget to load the relevant layout file or when the compiler cannot know that you are loading the layout file.
This warning happens when you forget to load the relevant layout file or when the compiler cannot know that you are loading the layout file.
agraham Expert Licensed User Longtime User Nov 27, 2019 #5 Erel said: when the compiler cannot know that you are loading the layout file. Click to expand... Under what circumstance can this happen? If I remember correctly I ran the project OK. Opened the Designer on the .bal, added the view and saved it. However I think that I forgot to add the Globals declaration for the view in the Designer but then added it manually in the editor and the warning appeared. Would this cause it?
Erel said: when the compiler cannot know that you are loading the layout file. Click to expand... Under what circumstance can this happen? If I remember correctly I ran the project OK. Opened the Designer on the .bal, added the view and saved it. However I think that I forgot to add the Globals declaration for the view in the Designer but then added it manually in the editor and the warning appeared. Would this cause it?
Erel B4X founder Staff member Licensed User Longtime User Nov 27, 2019 #6 agraham said: Would this cause it? Click to expand... No. There is no difference between letting the designer add the line or adding it yourself. Maybe you haven't saved the layout file after you added the view and it was saved when you ran the project so it worked fine at runtime.
agraham said: Would this cause it? Click to expand... No. There is no difference between letting the designer add the line or adding it yourself. Maybe you haven't saved the layout file after you added the view and it was saved when you ran the project so it worked fine at runtime.
Cableguy Expert Licensed User Longtime User Nov 27, 2019 #7 Erel said: No. There is no difference between letting the designer add the line or adding it yourself. Maybe you haven't saved the layout file after you added the view and it was saved when you ran the project so it worked fine at runtime. Click to expand... Then the warning should disappear, no? In my case, my views are part of a layout that is loaded into one of three pages of a pagerview. All other views in this layout present no warning, and these two were "edited" at a later point...
Erel said: No. There is no difference between letting the designer add the line or adding it yourself. Maybe you haven't saved the layout file after you added the view and it was saved when you ran the project so it worked fine at runtime. Click to expand... Then the warning should disappear, no? In my case, my views are part of a layout that is loaded into one of three pages of a pagerview. All other views in this layout present no warning, and these two were "edited" at a later point...
Cableguy Expert Licensed User Longtime User Nov 27, 2019 #8 Erel said: ... or when the compiler cannot know that you are loading the layout file. Click to expand... I am loading layout by creating a string array and then passing it to the loadlaoyout method in a for/next loop… Can this be it? If so, this layout file has well over 20 views, but only these 2 are "warning" worthy (!)
Erel said: ... or when the compiler cannot know that you are loading the layout file. Click to expand... I am loading layout by creating a string array and then passing it to the loadlaoyout method in a for/next loop… Can this be it? If so, this layout file has well over 20 views, but only these 2 are "warning" worthy (!)
Erel B4X founder Staff member Licensed User Longtime User Nov 28, 2019 #9 Hard to say anything unless you upload the project or a small project that demonstrates the issue.
Cableguy Expert Licensed User Longtime User Nov 28, 2019 #10 I will later today... But it's no Biggie, the project compiles and works as expected
Cableguy Expert Licensed User Longtime User Nov 28, 2019 #11 So here you go... Attachments CRIT.zip CRIT.zip 22 KB · Views: 433
Erel B4X founder Staff member Licensed User Longtime User Nov 29, 2019 #12 As I wrote in post #4 there are cases that the compiler doesn't know which layout file was loaded: Code: Copy Page(a).LoadLayout(LayoutName(a)) Solution: Code: Copy #IgnoreWarnings: 11
As I wrote in post #4 there are cases that the compiler doesn't know which layout file was loaded: Code: Copy Page(a).LoadLayout(LayoutName(a)) Solution: Code: Copy #IgnoreWarnings: 11