List field problem
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 55
- Joined: Sat Sep 10, 2011 12:22 pm
List field problem
Example,
I have a simple list field of 4 items where the user clicks a line to select an item.
I have used
Put empty into line 4 of field "Index"
to remove all content in that last line.
However, line 4 is still selectable and this is undesireable.
How can I prevent the deleted line from highlighting or being selectable?
I have a simple list field of 4 items where the user clicks a line to select an item.
I have used
Put empty into line 4 of field "Index"
to remove all content in that last line.
However, line 4 is still selectable and this is undesireable.
How can I prevent the deleted line from highlighting or being selectable?
Re: List field problem
Happyrever...
put this into the script of your listfield and it will delete the line that you click on...
be well
Dixie

put this into the script of your listfield and it will delete the line that you click on...
Code: Select all
on mouseDown
put word 2 of the clickline into theLineToDelete
delete line theLineToDelete of me
end mouseDown
Dixie
-
- Posts: 55
- Joined: Sat Sep 10, 2011 12:22 pm
Re: List field problem
I dont understand the code. I tried it and it wipes out the whole list. I does however leave the list without any selectable lines.
Perhap not quite what I was expecting. what was the logic behind the code?
Perhap not quite what I was expecting. what was the logic behind the code?
Re: List field problem
Happyrever...
If everything is being deleted when you click on a line in the field, then all of the content that you have in that field must be one long line... I have attached a stack that uses the script I posted earlier... It works here...
If you click on a line then it is deleted... isn't that what you wanted to happen ?.. I would also suggest having a look at the 'clickline' entry in the dictionary..
hope it helps...
Dixie
If everything is being deleted when you click on a line in the field, then all of the content that you have in that field must be one long line... I have attached a stack that uses the script I posted earlier... It works here...

hope it helps...
Dixie
- Attachments
-
- delLine.livecode.zip
- (939 Bytes) Downloaded 245 times
-
- Posts: 55
- Joined: Sat Sep 10, 2011 12:22 pm
Re: List field problem
I do appreciate your time and trouble with your reply, however, you have assumed incorrectly that the user clicks the line in question to delete it.
The line in question i.e. the one with the problem, is always the last item in the list plus 1
Take your example. If you click one of the middle numbers, a blank line is created in that position and the remaining numbers do not move.
In my case, the line clicked causes the numbers below it to move up and no blank line is created. The original item at the end of the list has moved up and there is a blank line where it used to be. The blank line is still highlited and selectable and this is not acceptable.
Answer number of lines in field "Index"
shows the correct answer; the visible list items and not the blank but selectable line that causes the problem.
Do you have an answer to tidy up the offending blank line?
The line in question i.e. the one with the problem, is always the last item in the list plus 1
Take your example. If you click one of the middle numbers, a blank line is created in that position and the remaining numbers do not move.
In my case, the line clicked causes the numbers below it to move up and no blank line is created. The original item at the end of the list has moved up and there is a blank line where it used to be. The blank line is still highlited and selectable and this is not acceptable.
Answer number of lines in field "Index"
shows the correct answer; the visible list items and not the blank but selectable line that causes the problem.
Do you have an answer to tidy up the offending blank line?
Re: List field problem
I'm happy that you sorted it as your explanation has left me now totally confused...
be well
Dixie

be well
Dixie
Re: List field problem
I think the simple miscommunication was that at first Happyrever put empty into the line, whereas dixie, correctly, advised him to delete that line. There is a difference, of course.
Things went downhill from there, and the clicking was likely at fault, but all ended happily.
Craig Newman
Things went downhill from there, and the clicking was likely at fault, but all ended happily.
Craig Newman