Final fixes.

This commit is contained in:
Rodrigo Girão Serrão
2023-02-08 11:26:27 +00:00
parent e5e7c08afe
commit c39b23f78d
2 changed files with 1 additions and 23 deletions

View File

@@ -288,7 +288,7 @@ So, thanks to this bit of code in my `Activity` widget...
parent.move_child(
self, before=parent.children.index( self ) - 1
)
self.post_messa_no_wait( self.Moved( self ) )
self.post_message_no_wait( self.Moved( self ) )
self.scroll_visible( top=True )
```

View File

@@ -580,28 +580,6 @@ class MessagePump(metaclass=MessagePumpMeta):
async def on_callback(self, event: events.Callback) -> None:
await invoke(event.callback)
def emit_no_wait(self, message: Message) -> bool:
"""Send a message to self, non-async version.
Args:
message: A message object.
Returns:
True if the message was posted successfully.
"""
return self.post_message_no_wait(message)
async def emit(self, message: Message) -> bool:
"""Send a message to self.
Args:
message: A message object.
Returns:
True if the message was posted successfully.
"""
return await self.post_message(message)
# TODO: Does dispatch_key belong on message pump?
async def dispatch_key(self, event: events.Key) -> bool:
"""Dispatch a key event to method.