Force a redraw or refresh of the screen...[Solved]
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Force a redraw or refresh of the screen...[Solved]
LOL
What did they change the magic incantation to to use the alignment buttons on the bottom of the project browser ? This is a Win7 vm
First I selected the 3 fields on the card, opened the PB, then tried to align tops (which sorta worked), then went to the <-----> arrow icon to put them side to side and ....nothing. I reselected the controls in the PB itself and tried agin ... nothing, not even a menu.
Then I selected the big field and the left most small one on the card, and hit align lefts icon.... all the small fields aligned to the left !
What am I missing?
*Edit - Win 7 vm shows none of the behaviors seen on the linux box, everything moves very smoothly and keeps in sync extremely well.
What did they change the magic incantation to to use the alignment buttons on the bottom of the project browser ? This is a Win7 vm
First I selected the 3 fields on the card, opened the PB, then tried to align tops (which sorta worked), then went to the <-----> arrow icon to put them side to side and ....nothing. I reselected the controls in the PB itself and tried agin ... nothing, not even a menu.
Then I selected the big field and the left most small one on the card, and hit align lefts icon.... all the small fields aligned to the left !
What am I missing?
*Edit - Win 7 vm shows none of the behaviors seen on the linux box, everything moves very smoothly and keeps in sync extremely well.
-
- Posts: 128
- Joined: Thu Jun 30, 2016 3:08 am
Re: Force a redraw or refresh of the screen...[Solved]
Maybe this is off topic for this post, but the title does describe something that is driving me slightly more crazy than usual. That is, How do I reload/refresh a card?
So...
I have one stack and its card. I want to be able to reload or refresh the card when I click a button.
I've tried:
also tried:
Since I'm already on the card, it doesn't refresh or reload the card. Is there an "easy" way to do this. This thread and the solution is pretty convoluted and doesn't really apply to what I'm after. I'm thinking there must be some way to do this. Most other languages have it using a command of some sort.
TIA
-Rachel
So...
I have one stack and its card. I want to be able to reload or refresh the card when I click a button.
I've tried:
Code: Select all
onMouseUp
open card "cMyCard"
endMouseUp
Code: Select all
onMouseUp
go card "cMyCard"
endMouseUp
TIA
-Rachel
May I never be cured of my curiosity!
Re: Force a redraw or refresh of the screen...[Solved]
Question is:
What does not redraw/reload automatically on your card, so this action is necessary?
In other words: What the egg are you doing?
What does not redraw/reload automatically on your card, so this action is necessary?
In other words: What the egg are you doing?
-
- Posts: 128
- Joined: Thu Jun 30, 2016 3:08 am
Re: Force a redraw or refresh of the screen...[Solved]
Well,
For now, I just want the card to refresh whenever I select the "Browse Tool" and run the script.
I've looked at the "Send" message. I wonder if that works? It seems to, but I can't really tell because the code could just be skipping over it.
Then I use the same code in the message box and change the card color to white.
As it stands now, the only way to get the entire stack or the first stack card to refresh is to close the app and reload it. Is that expected behavior in LC? What am I missing here?
-Rachel
For now, I just want the card to refresh whenever I select the "Browse Tool" and run the script.
I've looked at the "Send" message. I wonder if that works? It seems to, but I can't really tell because the code could just be skipping over it.
Code: Select all
on mouseUp pButtonNumber
-- code
send "openCard" to this card
set the backgroundColor of this card to "blue"
end mouseUp
As it stands now, the only way to get the entire stack or the first stack card to refresh is to close the app and reload it. Is that expected behavior in LC? What am I missing here?
-Rachel
May I never be cured of my curiosity!
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Force a redraw or refresh of the screen...[Solved]
The mouseUp handler should work fine. And unless you have or need an opencard handler you can omit that. Also, since messages will go from the button to the card, you should be able to just use "opencard" without the "send".
We really do need a refresh command but the workaround for now is:
Unless of course you want to change the color as above.
Code: Select all
on mouseUp pButtonNumber
-- code
openCard
set the backgroundColor of this card to "blue"
end mouseUp
Code: Select all
set the backgroundColor of this card to the background color of this card
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 128
- Joined: Thu Jun 30, 2016 3:08 am
Re: Force a redraw or refresh of the screen...[Solved]
Thanks @Jackie. This is really bothering me.
I don't want to use a button to refresh, but I can do that. I'm really just testing and learning. I want the whole card to reload when I press the browse button in LC.
As an example, this AM I was grappling with text styling (thank you bogs and hh). One Stack. One Card.
This is in a field:
When I run the code and change it slightly to "bold", then use browse, the field doesn't refresh. The only way that I can see to do that is to use the button. I've tried putting the code in the card and that doesn't work.
TIA
-Rachel (The good news is that the styling text is working)
I don't want to use a button to refresh, but I can do that. I'm really just testing and learning. I want the whole card to reload when I press the browse button in LC.
As an example, this AM I was grappling with text styling (thank you bogs and hh). One Stack. One Card.
This is in a field:
Code: Select all
set the textStyle of line 2 of field "Field" to "italic,underline"
TIA
-Rachel (The good news is that the styling text is working)
May I never be cured of my curiosity!
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Force a redraw or refresh of the screen...[Solved]
Right, the IDE tries to stay out of your way, so you need to provide your own trigger. It can be anything you want, a button press, an exitfield or closefield message, any message the LC engine sends. Or you can create a handler and call it from the message box.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Force a redraw or refresh of the screen...[Solved]
Hi Rachel,
what Jaqueline said, use the MESSAGE BOX, this is our "command line" in LC!
Very helpful for things that you do not want to put into buttons or wahtever.
Best
Klaus
what Jaqueline said, use the MESSAGE BOX, this is our "command line" in LC!
Very helpful for things that you do not want to put into buttons or wahtever.
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Force a redraw or refresh of the screen...[Solved]
For one-off things and short script snippets, I don't even create handlers. I just do them directly from the message box. That's easier than remembering to remove a temporary handler.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 128
- Joined: Thu Jun 30, 2016 3:08 am
Re: Force a redraw or refresh of the screen...[Solved]
Opps! Jacque,
Apologies for misspelling your name! I have a friend that spells it "Jackie" so I forgot.
Thanks to you and to Klaus ,as always, for stepping up to clarify. The commands are what I need to look at. I'll keep working.
-Rachel
Apologies for misspelling your name! I have a friend that spells it "Jackie" so I forgot.
Thanks to you and to Klaus ,as always, for stepping up to clarify. The commands are what I need to look at. I'll keep working.
-Rachel
May I never be cured of my curiosity!
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Force a redraw or refresh of the screen...[Solved]
No apology needed, no one knows how to say or spell my name. You did get the pronunciation right though.
http://jacque.on-rev.com/jacque/jacque.irev
http://jacque.on-rev.com/jacque/jacque.irev
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 52
- Joined: Mon Apr 06, 2020 1:19 pm
- Location: Thailand
- Contact:
Re: Force a redraw or refresh of the screen...
This didn't work for me UNLESS I put that command in a named command in my stack. Even then it doesn't work if I call that named command directly. It DOES work if I send "namedCommand" to this stack in 10 milliseconds.
I don't know if the delay is necessary or not. It's working for me as it stands.
I don't know if the delay is necessary or not. It's working for me as it stands.