[GH-ISSUE #73] no template named 'WithDlgLayout' in namespace 'Upp' in GUI tutorial Gui16 #40

Closed
opened 2026-05-05 03:35:45 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @erusyd on GitHub (May 4, 2022).
Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/73

In GUI Tutorial, section “16.2 Upp namespace agnostic implementation”, the given code compiles with following error:

error: no template named 'WithDlgLayout' in namespace 'Upp'; did you mean simply 'WithDlgLayout'?

I need to remove the "Upp::" before "WithDlgLayout" to:

struct MyAppWindow : public WithDlgLayout<Upp::TopWindow> {
    MyAppWindow() {
        CtrlLayout(*this, "MyDialog");
    }
};

And, it seems that, by default, Layout Designer does not add "Upp::" before "InsetFrame()" in SetFrame(). I need to manually add "Upp::" before "InsetFrame()" in dlg.lay from:

LAYOUT(DlgLayout, 208, 64)
	ITEM(Upp::Label, dv___0, SetLabel(t_("Label")).LeftPosZ(8, 40).TopPosZ(8, 19))
	ITEM(Upp::EditString, text, SetFrame(InsetFrame()).LeftPosZ(48, 92).TopPosZ(8, 19))
	ITEM(Upp::Option, option, SetLabel(t_("Option")).LeftPosZ(8, 112).TopPosZ(36, 16))
END_LAYOUT

to

LAYOUT(DlgLayout, 208, 64)
	ITEM(Upp::Label, dv___0, SetLabel(t_("Label")).LeftPosZ(8, 40).TopPosZ(8, 19))
	ITEM(Upp::EditString, text, SetFrame(Upp::InsetFrame()).LeftPosZ(48, 92).TopPosZ(8, 19))
	ITEM(Upp::Option, option, SetLabel(t_("Option")).LeftPosZ(8, 112).TopPosZ(36, 16))
END_LAYOUT
Originally created by @erusyd on GitHub (May 4, 2022). Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/73 In GUI Tutorial, section “16.2 Upp namespace agnostic implementation”, the given code compiles with following error: **error: no template named 'WithDlgLayout' in namespace 'Upp'; did you mean simply 'WithDlgLayout'?** I need to remove the "Upp::" before "WithDlgLayout" to: ``` struct MyAppWindow : public WithDlgLayout<Upp::TopWindow> { MyAppWindow() { CtrlLayout(*this, "MyDialog"); } }; ``` And, it seems that, by default, Layout Designer does not add "Upp::" before "InsetFrame()" in SetFrame(). I need to manually add "Upp::" before "InsetFrame()" in **dlg.lay** from: ``` LAYOUT(DlgLayout, 208, 64) ITEM(Upp::Label, dv___0, SetLabel(t_("Label")).LeftPosZ(8, 40).TopPosZ(8, 19)) ITEM(Upp::EditString, text, SetFrame(InsetFrame()).LeftPosZ(48, 92).TopPosZ(8, 19)) ITEM(Upp::Option, option, SetLabel(t_("Option")).LeftPosZ(8, 112).TopPosZ(36, 16)) END_LAYOUT ``` to ``` LAYOUT(DlgLayout, 208, 64) ITEM(Upp::Label, dv___0, SetLabel(t_("Label")).LeftPosZ(8, 40).TopPosZ(8, 19)) ITEM(Upp::EditString, text, SetFrame(Upp::InsetFrame()).LeftPosZ(48, 92).TopPosZ(8, 19)) ITEM(Upp::Option, option, SetLabel(t_("Option")).LeftPosZ(8, 112).TopPosZ(36, 16)) END_LAYOUT ```
Author
Owner

@klugier commented on GitHub (May 4, 2022):

Hello @erusyd,

Thank you for your report! Should be fixed in d670725115. Please verify GUI tutorial page tomorrow on our website (it is updated once per day).

Also, to tutorial dictionary. I had created Gui16a & Gui16b. The second one is Upp namespace agnostic implementation. The nightly build that contains this change will be available tomorrow, too.

I am closing this ticket now, if something will be wrong, please reopen.

Klugier

<!-- gh-comment-id:1117487358 --> @klugier commented on GitHub (May 4, 2022): Hello @erusyd, Thank you for your report! Should be fixed in https://github.com/ultimatepp/ultimatepp/commit/d670725115b0f98d874bc7b886e1003958bbb376. Please verify GUI tutorial page tomorrow on our website (it is updated once per day). Also, to tutorial dictionary. I had created Gui16a & Gui16b. The second one is Upp namespace agnostic implementation. The nightly build that contains this change will be available tomorrow, too. I am closing this ticket now, if something will be wrong, please reopen. Klugier
Author
Owner

@mirek-fidler commented on GitHub (May 4, 2022):

I think this does not solve Upp::InsetFrame() issue. That needs some work...

<!-- gh-comment-id:1117621026 --> @mirek-fidler commented on GitHub (May 4, 2022): I think this does not solve Upp::InsetFrame() issue. That needs some work...
Author
Owner

@erusyd commented on GitHub (May 6, 2022):

I think this does not solve Upp::InsetFrame() issue. That needs some work...

Yes. Anyway, U++ is a great software framework. Thank you guys!

<!-- gh-comment-id:1119195925 --> @erusyd commented on GitHub (May 6, 2022): > I think this does not solve Upp::InsetFrame() issue. That needs some work... Yes. Anyway, U++ is a great software framework. Thank you guys!
Author
Owner

@mirek-fidler commented on GitHub (May 7, 2022):

I believe it should be finally solved in current master.

<!-- gh-comment-id:1120154718 --> @mirek-fidler commented on GitHub (May 7, 2022): I believe it should be finally solved in current master.
Author
Owner

@klugier commented on GitHub (May 9, 2022):

I can confirm that both cases has been fixed. @erusyd you could verify this by downloading latest nightly builds from https://www.ultimatepp.org/www$uppweb$download$en-us.html.

<!-- gh-comment-id:1121298988 --> @klugier commented on GitHub (May 9, 2022): I can confirm that both cases has been fixed. @erusyd you could verify this by downloading latest nightly builds from https://www.ultimatepp.org/www$uppweb$download$en-us.html.
Author
Owner

@erusyd commented on GitHub (May 10, 2022):

Verified. Thanks!

<!-- gh-comment-id:1122399161 --> @erusyd commented on GitHub (May 10, 2022): Verified. Thanks!
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#40
No description provided.