Per your feedback, please note that we will be reverting this change in the next release.
Original Post:
Dear developers,
We recently added a new property named Content on Text objects. With this change, your games could be affected if they have a child named Content parented under text objects and scripts use the TextParent.Content syntax to access them.
If you have a game that is affected by this, you can perform a quick fix by doing the following:
Search your code by pressing ctrl+shift+f
Replace instances of .Content with :FindFirstChild(âContentâ)
We apologize for not giving advance notice, and are looking to improve our process in the future. If you were affected by this, please let us know by replying in this thread.
Isnât this the thirdtime this has happened in just a few months? I appreciate the warning but itâs really not very helpful without a grace period for us to fix our games, not to mention there are tons of games that arenât maintained anymore. Itâs one thing if itâs a really complex property, but âContentâ is extremely general and very applicable to a lot of UI designs. I know Iâve used it for sure in multiple projects. Isnât there a more precise property name that can be used that not only doesnât break as many scripts, but also gives the developer a better idea of what the property actually does?
One year at RDC, Roblox gave a pledge to backwards compatibility, but this isnât really supporting that goal. There needs to be some kind of system to prevent these issues as they only seem to become more and more frequent. I shouldnât have to come back to a project thatâs only a year or two old to patch it back into a working state.
What does this new property do? Does it refer to an external text asset? Or is it part of the rich text formatting feature that you guys are working on? Or does it serve a different function altogether?
This TextObject property could just as easily have been TextContent or PlainText or RenderedText or a million other names that would be more descriptive than Content and yet less breaking.
Why does Roblox keep implementing breaking changes when they are so easily avoidable? Content isnât even a good name. Itâs very ambiguous. Itâs a very general name, which is why devs use it for their UI components!
The pivot property is for internal studio tool use only so I donât understand why it isnât given some internal name so it wonât affect developers.
The body physics properties was resolved, but shouldnât have been done that way to begin with.
What is the decision making process behind all these? Giving us heads up is not enough- these changes should not be done this way at all, regardless of how much warning time you give.
Please stop giving surprise updates over and over, given the response on another previous thread you shouldnât have continued to give out these surprise updates.
Is it too late to roll back and call it TextContent? This is much less likely to collide, is more specific and is consistent with other text related properties.
Naming for new API members needs to go through more intensive audit.
I feel the term Content could be confusing since that term usually refers to the Content Data Type, such as rbxassetid://123456 â unless iâm misunderstanding the purpose of the feature.
So, youâre saying that I must go through all my UI related scripts and change the name of everything that falls under a Text Object named ContentâŚSeriously.
While itâs good a post was made to notify developers I canât help but feel it should have been done a lot sooner, especially with something which very well could effect a LOT of games with a common word such as âContentâ. When rolling out changes like this you should always give Developers TIME to change these things BEFORE you roll them out to avoid as much downtime for games as possible. This isnât the first time this has happened and sadly Iâm sure it wont be the last.
Please Roblox, ensure your Developers are given the appropriate time to react to these changes and make the necessary changes.
Well this will break some stuff for sure. If you want to quickly select all âContentâ items in your StarterGui that are under these text UI instances, hereâs a quick snippet you can run in the command bar:
game:GetService("Selection"):Set({})
for _,v in ipairs(game.StarterGui:GetDescendants()) do
if (v:IsA("TextLabel") or v:IsA("TextButton") or v:IsA("TextBox")) then
local content = v:FindFirstChild("Content")
if (content) then
game:GetService("Selection"):Add({content})
end
end
end
Iâm not one who usually likes to repeat whatâs already been said, but this is just beyond frustrating. .Content is just so vague yet so commonly used, there are so many better terms you could have called it that wouldnât break a lot of things. TextContent? RawContent? This isnât the first time. The next time something like this comes up, can your team look into other names as well? I truly think this headache could me adverted if a bit more time was spent thinking it though.
Iâm starting to notice a trend of new properties being added that conflict with names that are often used by developers for children. This has happened with Pivot, BodyAngularVelocity (which was thankfully renamed to AssemblyAngularVelocity) and now Content. I think itâs time to start using FindFirstChild in place of the index operator when getting children, and Iâve already replaced code in the game Iâm currently working on to only use FindFirstChild for all children.
The name Content also doesnât really explain what the property is actually for. It could be confused with the Text property.
In my opinion allowing developers to use the index operator to get children was a bad idea, but that ship has already sailed.
Not sure if this is the best place to ask but what is the content property used for. Iâm on my phone do its hard to search on the dev hub if I could get any links or a quick explanation, Thanks.
I understand the frustration of this, this is one of the reasons I started using lowercase names for everything so if something gets added/renamed it doesnât break stuff.