on_picked

15 views
Skip to first unread message

Jimmy Johnson

unread,
Jun 9, 2024, 2:51:41 PMJun 9
to Eiffel Users
I now have a way to notify the appropriate EV_MODELs in a system when an object is picked (i.e. right clicked, grabbing a pebble.)  The problem is that the changes to a model, such as changing the color of a model, does not show up until the pick-and-put operations is over.  I know the features are called in the correct sequence, but the screen is not updated until the pick-and-put is over.  It seems the pick-and-put is preventing a redraw.

How do I force a redraw (a projection) NOW, before the pick-and-put hijacks the system?
jjj

rfo amalasoft.com

unread,
Jun 9, 2024, 4:26:46 PMJun 9
to eiffel...@googlegroups.com
Hi Jimmy

You can ask the main loop to process all pending events.  Try EV_APPLICATION.process_graphical_events.

On another front, for handy asynch triggers, you might want to experiment with do_once_on_idle.  It really does come in handy from time to time.
R

From: eiffel...@googlegroups.com <eiffel...@googlegroups.com> on behalf of Jimmy Johnson <eiffe...@gmail.com>
Sent: Sunday, June 9, 2024 2:51 PM
To: Eiffel Users <eiffel...@googlegroups.com>
Subject: [eiffel-users] on_picked
 
I now have a way to notify the appropriate EV_MODELs in a system when an object is picked (i.e. right clicked, grabbing a pebble.)  The problem is that the changes to a model, such as changing the color of a model, does not show up until the pick-and-put operations is over.  I know the features are called in the correct sequence, but the screen is not updated until the pick-and-put is over.  It seems the pick-and-put is preventing a redraw.

How do I force a redraw (a projection) NOW, before the pick-and-put hijacks the system?
jjj

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eiffel-users/22f7ab91-d7fd-4bad-ab64-6d316e690dc7n%40googlegroups.com.

Jimmy Johnson

unread,
Jun 9, 2024, 5:21:24 PMJun 9
to Eiffel Users
I just tired process graphical events and no change.  The model still does not get painted until after the pick ends.
jjj

rfo amalasoft.com

unread,
Jun 9, 2024, 6:57:13 PMJun 9
to eiffel...@googlegroups.com
Hmmm.  Might need to post some kind of continuation even then (a la do_one_on_idle) to let go of the thread.
R

Sent: Sunday, June 9, 2024 5:21 PM
To: Eiffel Users <eiffel...@googlegroups.com>
Subject: Re: [eiffel-users] on_picked
 

Jimmy Johnson

unread,
Jun 9, 2024, 7:01:17 PMJun 9
to Eiffel Users
See post about EV_MODEL_WORLD_CELL.
jjj

Reply all
Reply to author
Forward
0 new messages