isEmpty doesn't appear in suggestions (Kotlin) - kotlin

I write to you today because I am developping a code for a quizz application and among the things i want to do is to check if a user fill an empty field text but when i do that in Kotlin : it simply doesn't work and I don't know why. Here is my code :
enter image description here
[1]: https://i.stack.imgur.com/vMY9q.png
Could you help please ?

It's isEmpty(), like a function call - not a property

Related

How to create a custom Allure step function for sensible data

I am currently working on a Testing Automation team, using Python and Allure to make reports of all the test cases that we run. Sometimes we deal with sensible data (e.g: passwords) that I can't show on the reports. If I use a function with a step decorator, something like this:
Which takes an element (a text box) and enters the value in it. In the step function I display the value that I want to enter, I could easily change that but the problem resides in the actual report. No matter what I enter on the step title, the report always shows the info that was passed as arguments to the function:
Thus, the "value" argument will always be displayed and that is something that I cannot have on certain projects. Is there anyway to make a custom step function that solves my problem?. I could either use with not showing the value at all or to change it to something like '*****'.
Just a thought.
#allure.step("Entering a value in element {3}")
def setSecureBoxValue(driver, element, value, box_name):
I solved my problem with the use of Fernet cryptography library.
I created a new function for the sensible data that encrypts the strings and then, inside this new function I call the one I shared on the screenshot (with a slight modification to decrypt the data). This results in the following report:

Stimulsoft code based variables won't show their value

I´m losing my mind here, I've tried every example I've found online and still can't get it to work, this is the way im creating the variable on the code that generates the report, I'm working on a .NET application:
report.Dictionary.Variables.Add(New Stimulsoft.Report.Dictionary.StiVariable("test",""))
report("test") = "ANYTHING"
While it does show me the created variables on the Stimuloft gui, it contains absolutely nothing, any ideas on what I'm doing wrong? Thanks!
You should use next code to set value of variable:
report.Dictionary.Variables("test").Value = "ANYTHING"
The code that you use will work after calling report.Compile() method only.

NSComboBox value getting and assigning it to a label

I am new to Mac development. I want to get the value selected from a combo box and assign it to the text of a label in a Mac app using Objective-C. How can I do this?
Following gives the selected value:
[yourComboBox objectValueOfSelectedItem] returns id. Have a try with following, if in case you may require to type cast it to NSString.
[self.yourLabelOutlet setStringValue:[yourComboBox objectValueOfSelectedItem]];
*Not checked, but something similar to this
EDIT:
Find a Sample Project.
The accepted answer only works when your NSComboBox does not use its own dataSource
When using your own dataSource for your NSComboBox you should approach it like this:
[yourDataSourceArray objectAtIndex:[yourComboBox indexOfSelectedItem]]);

display warning when users enter a value greater than the actual value

can anyone give me some idea how to write a code to display warning when users enter a value greater than the actual value, but it still can enter values ​​for other fields. I use VB.net and access database. I think it is able to use onchange but i still don't have any idea to write the code
here is example
Use the built-in validation scheme. Example here :
http://msdn.microsoft.com/en-us/library/system.windows.data.binding.validatesondataerrors.aspx

getting the value of the boundfield in a gridview

I have encountered something strange.
I wanted to have the value of my gridview boundfield so I did this.
SelectedID = objGridView.Rows(0).Cells(4).Text.ToString
At first this seemed to work. I played around a little created a hyperlinkfield wanted to get that value but got an empty string. After some looking around it turned out I could not get it as easily as I could with a boundtextfield. No problem.
But here comes my problem , now all of a sudden my line of code to retrieve the value from the selectedId does not work anymore ( at least I'm getting empty strings back ).
I've build and rebuild my gridview but to no avail.
I'm flabbergasted and don't get it why it doesn't work anymore.
Hence my question.
Does anyone have an idea what's happening or have a solution to this problem.
edit:
I'm seeing this in my item value
"In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user"
Don't know why you dont use the datagridview.
I started with GridView as well but after changing the control type it's really easy to get those values e.g:
SelectedID = dgvExample.CurrentRow.Cells("Columname/Index").Value
dgv compared with gv
There is an answer here
An other one (which was the reason of my problem) could be that the BoundFields are set to Visible = false. Invisible Bound fields are... not bound.
A simple workaround is to make it invisible in CSS instead.
Code behind :
gvColumn.ItemStyle.CssClass = "className"
CSS :
.className { display:none; }