We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generator
Stream
hasNext
atEnd
AsyncIteratorStream
By defining Generator>>#hasNext, one can use that class to feed an async stream.
Generator>>#hasNext
Something like below on the class hierarchy would be useful
hasNext ^ self atEnd not
Some example code that makes use of Generator after that change was added locally.
nums := 1 to: 42. counter := 0. generator := Generator on: [ :gen | [ counter := counter + 1. gen yield: (nums atWrap: counter) ] repeat ]. list := BrSimpleList new itemStencil: [ BrLabel new aptitude: BrGlamorousLabelAptitude new + (BrStyleCommonAptitude new selected: [ :aStyle | aStyle background: Color veryVeryLightGray ]); padding: (BlInsets all: 5) ]; itemDataBinder: [ :eachElement :eachInteger :eachIndex | eachElement text: eachInteger asString ]; stream: (AsyncIteratorStream forIterator: generator)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
By defining
Generator>>#hasNext
, one can use that class to feed an async stream.Something like below on the class hierarchy would be useful
Some example code that makes use of Generator after that change was added locally.
The text was updated successfully, but these errors were encountered: