Alessandro71 Well-Known Member Licensed User Longtime User Jan 1, 2019 #1 I have several labels defined in the same .bal layout file. All of them are declared in the same activity, like: Code: Private Lbl_EOT_TemplateCont As Label Private Lbl_EOT_Logo As Label Private Lbl_EOT_DateCont As Label but only one of them, namely Lbl_EOT_Logo gets flagged in the above lines with the error: Variable 'Lbl_EOT_Logo' was not initialized. (warning #11) Project compiles fine and runs with no issues: label is perfectly working (in this case it's a BitmapDrawable)
I have several labels defined in the same .bal layout file. All of them are declared in the same activity, like: Code: Private Lbl_EOT_TemplateCont As Label Private Lbl_EOT_Logo As Label Private Lbl_EOT_DateCont As Label but only one of them, namely Lbl_EOT_Logo gets flagged in the above lines with the error: Variable 'Lbl_EOT_Logo' was not initialized. (warning #11) Project compiles fine and runs with no issues: label is perfectly working (in this case it's a BitmapDrawable)
DonManfred Expert Licensed User Longtime User Jan 1, 2019 #2 Hard to help without seeing your project or at least all relevant code. Try to reproduce it in a small project and upload this project. Upvote 0
Hard to help without seeing your project or at least all relevant code. Try to reproduce it in a small project and upload this project.
Alessandro71 Well-Known Member Licensed User Longtime User Jan 1, 2019 #3 that's an interesting test since project is really big, i tried stripping everything to have a minimal project, and the error goes away... now the hard part: which seemingly unrelated code affects this one? Upvote 0
that's an interesting test since project is really big, i tried stripping everything to have a minimal project, and the error goes away... now the hard part: which seemingly unrelated code affects this one?
Alessandro71 Well-Known Member Licensed User Longtime User Jan 1, 2019 #4 No, I’m in release mode, and the error message is shown in the logs window, without even compiling Upvote 0
stevel05 Expert Licensed User Longtime User Jan 1, 2019 #5 Do you have a second instance of Lbl_EOT_Logo anywhere in your code as a local Label variable, a sub or a module maybe? Upvote 0
Do you have a second instance of Lbl_EOT_Logo anywhere in your code as a local Label variable, a sub or a module maybe?
mangojack Expert Licensed User Longtime User Jan 1, 2019 #6 On the odd occasion , I have had a similar problem. Deleting the view from Designer and saving layout, and any global declaration and saving project .. then recreating the view seemed to solve this. Upvote 0
On the odd occasion , I have had a similar problem. Deleting the view from Designer and saving layout, and any global declaration and saving project .. then recreating the view seemed to solve this.
klaus Expert Licensed User Longtime User Jan 1, 2019 #7 This may happen when you add the declaration in the code before adding or naming the view in the Designer. Is the spelling OK? When you change the name in the Designer without pressing Return, this can happen too. Upvote 0
This may happen when you add the declaration in the code before adding or naming the view in the Designer. Is the spelling OK? When you change the name in the Designer without pressing Return, this can happen too.
Alessandro71 Well-Known Member Licensed User Longtime User Jan 1, 2019 #8 stevel05 said: Do you have a second instance of Lbl_EOT_Logo anywhere in your code as a local Label variable, a sub or a module maybe? Click to expand... negative Upvote 0
stevel05 said: Do you have a second instance of Lbl_EOT_Logo anywhere in your code as a local Label variable, a sub or a module maybe? Click to expand... negative
Alessandro71 Well-Known Member Licensed User Longtime User Jan 1, 2019 #9 mangojack said: On the odd occasion , I have had a similar problem. Deleting the view from Designer and saving layout, and any global declaration and saving project .. then recreating the view seemed to solve this. Click to expand... negative i've even tried changing order of both declaration and views in designer Upvote 0
mangojack said: On the odd occasion , I have had a similar problem. Deleting the view from Designer and saving layout, and any global declaration and saving project .. then recreating the view seemed to solve this. Click to expand... negative i've even tried changing order of both declaration and views in designer
Alessandro71 Well-Known Member Licensed User Longtime User Jan 1, 2019 #10 klaus said: This may happen when you add the declaration in the code before adding or naming the view in the Designer. Is the spelling OK? When you change the name in the Designer without pressing Return, this can happen too. Click to expand... negative i've renamed it, recreated it, without any different outcome if i find all references (F7) it's correctly found in the designer layout file same with 2 other labels in 2 different .bal files Upvote 0
klaus said: This may happen when you add the declaration in the code before adding or naming the view in the Designer. Is the spelling OK? When you change the name in the Designer without pressing Return, this can happen too. Click to expand... negative i've renamed it, recreated it, without any different outcome if i find all references (F7) it's correctly found in the designer layout file same with 2 other labels in 2 different .bal files
klaus Expert Licensed User Longtime User Jan 1, 2019 #11 Can you post your project as a zip file, so we could have a look at it. Upvote 0
M malcolm_FM4E New Member Jan 13, 2019 #12 Hi I just resolved the same problem by using [Tools] - [Generate Members] in the Visual Designer and selecting the variables and clicking [Generate Members]. HTH. Upvote 0
Hi I just resolved the same problem by using [Tools] - [Generate Members] in the Visual Designer and selecting the variables and clicking [Generate Members]. HTH.
Alessandro71 Well-Known Member Licensed User Longtime User Jan 13, 2019 #13 no luck for me... Upvote 0