Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Layout (Forms) Designer » Is Upp:: output necesarry in *.lay files?
Is Upp:: output necesarry in *.lay files? [message #57619] Sun, 10 October 2021 22:35 Go to next message
luoganda is currently offline  luoganda
Messages: 180
Registered: November 2016
Experienced Member
Once one opens older layout files with new layout designer(after upp-13664),
"Upp::" is prepended/added to all layout-files controls.
This is many times undesirable since not all control may be a part of Upp:: namespace.
For now, i have to use older upp-ver(13664:2019.2 or lower) to correctly compile code without errors.
At least some option somewhere would be ok to prepend this or not.

By the way, where has bazaar folder went in a few new versions?
I also don't find it on github.
Re: Is Upp:: output necesarry in *.lay files? [message #58354 is a reply to message #57619] Sat, 07 May 2022 00:14 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 639
Registered: December 2005
Location: Budapest, Hungary
Contributor
Put a
namespace;

line at the top of your .usc file.
Or
namespace MyNamespace;

if your control is in MyNamespace.


Bazaar now is UppHub
Re: Is Upp:: output necesarry in *.lay files? [message #58552 is a reply to message #57619] Mon, 13 June 2022 15:18 Go to previous messageGo to next message
Alboni is currently offline  Alboni
Messages: 212
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
Why was this done? It also changes the order of the attributes of the elements and if my colleague and me use different version we're constantly committing order changes to svn for no reason.
And then I get this:
ITEM(LabelBox, dv___0, SetLabel(t_("Kies aub een betaalmethode")).SetInk(Color(28, 0, 200)).SetFont(StdFontZ(14).Bold()).LeftPosZ(13, 388).TopPosZ(7, 349))

changed to
ITEM(Upp::LabelBox, dv___0, SetInk(Color(28, 0, 200)).SetFont(StdFontZ(14).Bold()).SetLabel(t_("Kies aub een betaalmethode")).LeftPosZ(13, 388).TopPosZ(7, 349))

which doesn't even compile.
Error: /home/ruben/MyApps/DisProject/something.lay (580): error: 'class Upp::StaticText' has no member named 'SetLabel'

[Updated on: Mon, 13 June 2022 15:29]

Report message to a moderator

Re: Is Upp:: output necesarry in *.lay files? [message #58553 is a reply to message #57619] Tue, 14 June 2022 21:27 Go to previous message
luoganda is currently offline  luoganda
Messages: 180
Registered: November 2016
Experienced Member
"Why was this done?"
I don't have a clue, but probably because larger code is more organized this way,
one can have same name classes in different namespaces, so that the same name classes
don't mix(wrongly) - which is in the long run for new - larger apps - probably better.

Alboni has a point here also, but this is an old thing probably from always mostly concerning Label...
When one starts to rearanging controls, some get rearanged and don't compile properly.
But i think this was fixed in new versions with subclassing Label... from control also for chaining purposses,
so even if controls gets rearanged - it should compile properly.

The old code still might not compile because opening it with new layout editor would throw Upp:: prefix back again.
One possibility for older non-compatible code with new Upp:: thing would probably be compiling it with command line tool
or the thing like zsoft suggests.


Aha... for bazaar.

[Updated on: Wed, 15 June 2022 11:37]

Report message to a moderator

Previous Topic: How to plot a PIE chart in Form?
Next Topic: bug: color change without wanting it to..
Goto Forum:
  


Current Time: Wed Jun 29 06:19:04 CEST 2022

Total time taken to generate the page: 0.03642 seconds