PdeG Member Licensed User Longtime User Jan 8, 2024 #1 in the Class_Globals this is created by default, B4X: Copy Sub Class_Globals Private Root As B4XView 'ignore Private xui As XUI 'ignore End Sub what is the meaning of 'ignore and what does it do? Regards, Peter
in the Class_Globals this is created by default, B4X: Copy Sub Class_Globals Private Root As B4XView 'ignore Private xui As XUI 'ignore End Sub what is the meaning of 'ignore and what does it do? Regards, Peter
Solution aeric Jan 8, 2024 Try remove the 'ignore B4X: Copy Private Root As B4XView You will get: B4X: Copy Unused variable 'Root'. (warning #9) Now, try to add 'ignore after the line: B4X: Copy Private Root As B4XView 'ignore The warning is gone. The 'ignore keyword is use to suppress the warning. In most cases, you don't use it. It means the variable has not yet been used.
Try remove the 'ignore B4X: Copy Private Root As B4XView You will get: B4X: Copy Unused variable 'Root'. (warning #9) Now, try to add 'ignore after the line: B4X: Copy Private Root As B4XView 'ignore The warning is gone. The 'ignore keyword is use to suppress the warning. In most cases, you don't use it. It means the variable has not yet been used.
aeric Expert Licensed User Longtime User Jan 8, 2024 #2 Try remove the 'ignore B4X: Copy Private Root As B4XView You will get: B4X: Copy Unused variable 'Root'. (warning #9) Now, try to add 'ignore after the line: B4X: Copy Private Root As B4XView 'ignore The warning is gone. The 'ignore keyword is use to suppress the warning. In most cases, you don't use it. It means the variable has not yet been used. Last edited: Jan 8, 2024 Upvote 1 Solution
Try remove the 'ignore B4X: Copy Private Root As B4XView You will get: B4X: Copy Unused variable 'Root'. (warning #9) Now, try to add 'ignore after the line: B4X: Copy Private Root As B4XView 'ignore The warning is gone. The 'ignore keyword is use to suppress the warning. In most cases, you don't use it. It means the variable has not yet been used.
ilan Expert Licensed User Longtime User Jan 8, 2024 #3 PdeG said: in the Class_Globals this is created by default, B4X: Copy Sub Class_Globals Private Root As B4XView 'ignore Private xui As XUI 'ignore End Sub what is the meaning of 'ignore and what does it do? Regards, Peter Click to expand... if you add a new variable or view to the Class_Globals but it is not used anywhere the IDE will throw a warning. Adding ignore will ignore the warning for the specific variable view Upvote 0
PdeG said: in the Class_Globals this is created by default, B4X: Copy Sub Class_Globals Private Root As B4XView 'ignore Private xui As XUI 'ignore End Sub what is the meaning of 'ignore and what does it do? Regards, Peter Click to expand... if you add a new variable or view to the Class_Globals but it is not used anywhere the IDE will throw a warning. Adding ignore will ignore the warning for the specific variable view
Shelby Well-Known Member Licensed User Longtime User Jan 8, 2024 #4 aeric said: Now, try to add 'ignore after the line: B4X: Copy Private Root As B4XView 'ignore The warning is gone. Click to expand... Wow Aeric, after several years of ignoring some of those warnings (which Erel told me once to ignore in general) I have a way now to eliminate those pesky warnings in my logs window. Yippee! Thanks Aeric, you library of code knowledge you. Now I hope Ivica loves me; maybe, maybe not. Upvote 0
aeric said: Now, try to add 'ignore after the line: B4X: Copy Private Root As B4XView 'ignore The warning is gone. Click to expand... Wow Aeric, after several years of ignoring some of those warnings (which Erel told me once to ignore in general) I have a way now to eliminate those pesky warnings in my logs window. Yippee! Thanks Aeric, you library of code knowledge you. Now I hope Ivica loves me; maybe, maybe not.
PdeG Member Licensed User Longtime User Jan 8, 2024 #5 But isn't easier to use B4X: Copy #IgnoreWarnings: 9 ? Upvote 0
Shelby Well-Known Member Licensed User Longtime User Jan 8, 2024 #6 PdeG said: But isn't easier to use B4X: Copy #IgnoreWarnings: 9 Click to expand... Thanks, does that mean it covers all those warnings with one line? (I had three warnings which I eliminated individually.) Upvote 0
PdeG said: But isn't easier to use B4X: Copy #IgnoreWarnings: 9 Click to expand... Thanks, does that mean it covers all those warnings with one line? (I had three warnings which I eliminated individually.)
DonManfred Expert Licensed User Longtime User Jan 8, 2024 #7 PdeG said: ? Click to expand... if you DON´T want the warning at all, yes. But usually the warning is a good thing. You can not find the problem if you don´t get it. Getting the warning you now are able to decide whether this is OK for the mentioned variable or not. Upvote 0
PdeG said: ? Click to expand... if you DON´T want the warning at all, yes. But usually the warning is a good thing. You can not find the problem if you don´t get it. Getting the warning you now are able to decide whether this is OK for the mentioned variable or not.
LucaMs Expert Licensed User Longtime User Jan 8, 2024 #8 PdeG said: But isn't easier to use B4X: Copy #IgnoreWarnings: 9 ? Click to expand... You may want to ignore warnings (even of other types) only for some "objects" (unused variables, in this specific case), perhaps temporarily, and not for others and therefore use 'ignore instead of #IgnoreWarnings: 9. Upvote 0
PdeG said: But isn't easier to use B4X: Copy #IgnoreWarnings: 9 ? Click to expand... You may want to ignore warnings (even of other types) only for some "objects" (unused variables, in this specific case), perhaps temporarily, and not for others and therefore use 'ignore instead of #IgnoreWarnings: 9.
Shelby Well-Known Member Licensed User Longtime User Jan 8, 2024 #9 LucaMs said: You may want to ignore warnings (even of other types) only for some "objects" (unused variables, in this specific case), perhaps temporarily, and not for others and therefore use 'ignore instead of #IgnoreWarnings: 9. Click to expand... Thanks Don, Luca and Aeric; and Peter for the thread. Upvote 0
LucaMs said: You may want to ignore warnings (even of other types) only for some "objects" (unused variables, in this specific case), perhaps temporarily, and not for others and therefore use 'ignore instead of #IgnoreWarnings: 9. Click to expand... Thanks Don, Luca and Aeric; and Peter for the thread.
P PaulMeuris Well-Known Member Licensed User Jan 9, 2024 #10 If you change the scope of the variable to Public then the warning will not be shown. But be aware that this can cause some unwanted side effects. Upvote 0
If you change the scope of the variable to Public then the warning will not be shown. But be aware that this can cause some unwanted side effects.