Skip to content
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

IntegrationInstance Exception When Running Telegram Button Component #28403

Closed
Tianzh3n opened this issue Sep 13, 2024 · 6 comments
Closed

IntegrationInstance Exception When Running Telegram Button Component #28403

Tianzh3n opened this issue Sep 13, 2024 · 6 comments
Labels

Comments

@Tianzh3n
Copy link

Tianzh3n commented Sep 13, 2024

Steps to reproduce

Hello, I would like to try running the Telegram button component separately in a Twidget. So, I wrote the following code in the main function:
image
Here is the result of the execution:
image
I noticed that there is no button shape at all, just a bar-like object.
When my mouse pointer touches this bar-like object, the program crashes with a null pointer exception. The IDE indicates that the exception is occurring at this point: IntegrationInstance.
image
image
May I ask what causes this?
Looking forward to your reply, I appreciate it very much!!!!!!!!!!!

Expected behaviour

thank you

Actual behaviour

thank you

Operating system

MAC os. M3

Version of Telegram Desktop

new

Installation source

Static binary from official website

Crash ID

thank you

Logs

thank youthank youthank youthank youthank you!
@Tianzh3n Tianzh3n added the bug label Sep 13, 2024
@Aokromes
Copy link
Collaborator

not a bug.

@Tianzh3n
Copy link
Author

not a bug.

Where should I go for help, please?

@john-preston
Copy link
Member

The UI components are not really meant to be used outside of TDesktop. Or, in other words, you need to perform a_lot of work for the widget system to start working in another application.

The fairly minimum example can be found in a ui-test-application wrap:

https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/tests/test_main.cpp

@Tianzh3n
Copy link
Author

Thanks for your answer.

The UI components are not really meant to be used outside of TDesktop. Or, in other words, you need to perform a_lot of work for the widget system to start working in another application.

The fairly minimum example can be found in a ui-test-application wrap:

https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/tests/test_main.cpp

@Tianzh3n
Copy link
Author

The UI components are not really meant to be used outside of TDesktop. Or, in other words, you need to perform a_lot of work for the widget system to start working in another application.

The fairly minimum example can be found in a ui-test-application wrap:

https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/tests/test_main.cpp

May I ask what the main purpose of Integration is? For example, in Telegram, what are BaseIntegration and UiIntegration used for? Is there a necessary connection between them and the functioning of the animations in Telegram's components?

@john-preston
Copy link
Member

Well, this is the way to provide some required code from the client app back to the library level again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants