By registering with us, you'll be able to discuss, share and private message with other members of our community.
Sign up now!The text is what i had in mind. My idea was if i need to handle selecting multiple options going deep into a chat dialog, instead of having X if statements all checking the text, or a for loop looping over them and checking the text, i could just write a pattern that handled all options i need to chooseSupport for ChatDialog.getTitle
In regards to getOption(Pattern), what exactly would it be matching against? The text? Would only one pattern be required in the constructor or should we accept multiple for further simplicity?
I mean currently you can pass in multiple Strings and it will return the first option containing one of them. But I've gone ahead and added the ability to use Patterns within itt.The text is what i had in mind. My idea was if i need to handle selecting multiple options going deep into a chat dialog, instead of having X if statements all checking the text, or a for loop looping over them and checking the text, i could just write a pattern that handled all options i need to choose
You could use the String... argument, since that takes multiple Strings?The text is what i had in mind. My idea was if i need to handle selecting multiple options going deep into a chat dialog, instead of having X if statements all checking the text, or a for loop looping over them and checking the text, i could just write a pattern that handled all options i need to choose
Oh, i didn't realize it already took a vararg. Is there any benefit to having both?I mean currently you can pass in multiple Strings and it will return the first option containing one of them. But I've gone ahead and added the ability to use Patterns within itt.
Yeah lol just found that outYou could use the String... argument, since that takes multiple Strings?
Support for ChatDialog.getTitle
In regards to getOption(Pattern), what exactly would it be matching against? The text? Would only one pattern be required in the constructor or should we accept multiple for further simplicity?
Edit: Added Option getOption(Pattern... patterns)
Ehhh, I'm sure there's still some edge case where varargs are needed, or at least more practical than jamming them all into a single patternTheres no need for it to be varags really, if there are multiple text options that would be viable or must be there the user can already specify this in there regex pattern
My logic was that it's easier to write simple patterns than it is complex ones.Theres no need for it to be varags really, if there are multiple text options that would be viable or must be there the user can already specify this in there regex pattern
I support. Clarity > Compactness.My logic was that it's easier to write simple patterns than it is complex ones.
Anyways, all of this is available in the latest releaseI support. Clarity > Compactness.
You can create separate patterns and join them at compile time easily, though.Ehhh, I'm sure there's still some edge case where varargs are needed, or at least more practical than jamming them all into a single pattern
We use essential cookies to make this site work, and optional cookies to enhance your experience.