Has anyone else come across this anomaly?
set the vScroll of field "Progress Records" of card "Progress Notes" to 0
set the htmltext of field "Progress Records" of card "Progress Notes" to aPacket[vText]
visual effect dissolve
go card "Progress Notes"
The field only resets the scroll if the "set the vScroll" line is called when the current card is "Progress Notes" and does not work if called when the current card is another card in the stack. This is most frustrating as I always want the card to open with the most recent (topmost) record visible at the top of the field when the user opens the card. Presently it opens at the previous scroll with the "set the vScroll" line having no effect.
Alex
vScroll Anomaly
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: vScroll Anomaly
Actually, with a bit of fiddling around, I have managed to solve all my problems with the look and feel I was aiming to create.
Firstly my jump to routine.
I found by first scrolling to bottom of the field and then selecting the top line of the record I wanted in the field that this would scroll the field to position the first line of the record I was after at the top of the visible text in the field, precisely what I was after. Without first scrolling to the bottom, the selected line is positioned anywhere in the visible part of the field forcing the eye to search. The user experience is preserved using lock screen.
Secondly, I discovered that only the current card has "open" objects and is the only place where the scroll of a field can be manipulated. Again I use lock screen to preserve my user experience.
I hope someone finds this useful; it's probably already somewhere in these archives but I couldn't find it.
Alex
Firstly my jump to routine.
I found by first scrolling to bottom of the field and then selecting the top line of the record I wanted in the field that this would scroll the field to position the first line of the record I was after at the top of the visible text in the field, precisely what I was after. Without first scrolling to the bottom, the selected line is positioned anywhere in the visible part of the field forcing the eye to search. The user experience is preserved using lock screen.
Secondly, I discovered that only the current card has "open" objects and is the only place where the scroll of a field can be manipulated. Again I use lock screen to preserve my user experience.
I hope someone finds this useful; it's probably already somewhere in these archives but I couldn't find it.
Alex
Re: vScroll Anomaly
Hi ...
quickly off the top of my head, does it make a difference if you swop the first two lines of your example
set the htmltext of field "Progress Records" of card "Progress Notes" to aPacket[vText]
set the vScroll of field "Progress Records" of card "Progress Notes" to 0
visual effect dissolve
go card "Progress Notes"
be well,
Dixie
quickly off the top of my head, does it make a difference if you swop the first two lines of your example
set the htmltext of field "Progress Records" of card "Progress Notes" to aPacket[vText]
set the vScroll of field "Progress Records" of card "Progress Notes" to 0
visual effect dissolve
go card "Progress Notes"
be well,
Dixie
Re: vScroll Anomaly
Hi Alex,
or maybe setting the vscroll of that field in a "preopencard" handler" will help?
Best
Klaus
or maybe setting the vscroll of that field in a "preopencard" handler" will help?
Best
Klaus
Re: vScroll Anomaly
Hi
Dixie: no it makes no difference, the fields you want to scroll have to be on the current card
Klaus: yes I am making my code more modular by using an opencard type routine. I use sockets to access data from a server. This is asynchronous data retrieval so I have written my own "pseudosynchronous" data access which returns the data to the place in my code where it is called; this has greatly simplified control through my programme and enabled me to maintain as near to OOP as possible. The opencard type routine I use is part of this system. Arrays in livecode are extremely powerful and I use them extensively.
Alex
Dixie: no it makes no difference, the fields you want to scroll have to be on the current card
Klaus: yes I am making my code more modular by using an opencard type routine. I use sockets to access data from a server. This is asynchronous data retrieval so I have written my own "pseudosynchronous" data access which returns the data to the place in my code where it is called; this has greatly simplified control through my programme and enabled me to maintain as near to OOP as possible. The opencard type routine I use is part of this system. Arrays in livecode are extremely powerful and I use them extensively.
Alex