Skip to content

Commit

Permalink
[feenkcom/gtoolkit#3703] add AsyncForkPollFuture
Browse files Browse the repository at this point in the history
  • Loading branch information
syrel committed Mar 27, 2024
1 parent bdc070e commit 25c81f6
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/GToolkit-Extensions/AsyncForkPollFuture.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Extension { #name : #AsyncForkPollFuture }

{ #category : #'*GToolkit-Extensions' }
AsyncForkPollFuture >> gtCompositionDescription [

^ self printString asRopedText
append: ': ' asRopedText;
append: ((pollBlock ifNil: [ executedBlock ]) printString asRopedText foreground:
BrGlamorousColors disabledButtonTextColor)
]

{ #category : #'*GToolkit-Extensions' }
AsyncForkPollFuture >> gtSourceCodeFor: aView [
<gtView>
pollBlock ifNil: [ ^ aView empty ].

^ aView forward
title: 'Source code';
object: [ pollBlock ];
view: #gtSourceCodeFor:
]

{ #category : #'*GToolkit-Extensions' }
AsyncForkPollFuture >> gtViewExecutedBlockFor: aView [
<gtView>
executedBlock ifNil: [ ^ aView empty ].

^ aView forward
title: 'Executed block';
object: [ executedBlock ];
view: #gtSourceCodeFor:
]

0 comments on commit 25c81f6

Please sign in to comment.