-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
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
NumPad support with CustomViewControllerBase #182
Comments
Hi ax365, thank you for providing all of details and screenshots. I see that the CustomViewController implements the INumPadInputSubscriberEndpoint interface by declaring the implementsINumPadInputSubscriberEndpoint field. Can you please confirm that this field is initialized and set to true in the view's constructor? I did not see that initialization in the code snippets provided. Thanks! |
Hi @lukedgr, Two follow-up questions related to this:
|
Extensibility request:
Provide support for adding
NumPad
andINumPadInputBroker
to custom pos -views- that extend fromCustomViewControllerBase
.Similar to how custom pos -dialogs- extend from
ExtensionTemplatedDialogBase
and thus get theNumPad
andINumPadInputBroker
brokers “for free” (without requiring extension code to initialize it).Context:
In the legacy RetailSDK, when creating custom views, we extended the
ExtensionViewControllerBase
abstract class.With the introduction of the CommerceSDK,
ExtensionViewControllerBase
is now deprecated.This deprecated abstract class
ExtensionViewControllerBase
had some useful properties:NumPad
to a custom viewINumPadInputBroker
inherited from implementingINumPadContainer
which allowed theNumPad
to intercept keyboard (or scanner) inputWith the new CommerceSDK, the requirement is to extend
CustomViewControllerBase
abstract class instead.NumPad
(with OOTBINumPadInputBroker
) to a custom view.The official sample extension on GitHub for the InStore.BarcodeMsrDialogSample utilizes
IAlphanumericNumPad
but this is for a -dialog- (not a -view-).BarcodeMsrDialog.ts
ExtensionTemplatedDialogBase
which provides the implementation of an input broker "for free" (no need for the extension code to initialize it)As a potential workaround, I've attempted the following:
Implement
INumPadInputSubscriberEndpoint
:Instantiate the broker from the subscriber:
Initialize options and bind the
NumPad
:The workaround described above allows the
NumPad
to render on the custom view.But it's still not behaving fully as intended.
Below describes the main issue:
The screenshot below has been taken immediately upon loading of the custom view.
And I’m typing on the keyboard but none of the digits are rendering on the
NumPad
(it doesn’t recognize it).Because of that, as a test, I decided to click the
NumPad
“input bar” – you can see the dotted lines:Now when I enter keyboard input, the digits show up:
^ If I “click out” of the input bar (no more dotted lines) – then it goes back to the first screenshot behaviour (it does not recognize/update keyboard input).
The text was updated successfully, but these errors were encountered: