Norman spent far more time on document writing than I ever did, but its very much not a simple problem. Youre both right, it seems simple on the surface. But its really not.
It wouldn’t be such a problem if it only happened once in a while.
I had one project where I’d make a small change and save and 50 files had similar True
changed to "True"
.
A few minutes later, make another small change, saved, then all of the quotes disappeared.
Suppose the IDE writes
TabStop Boolean = True
or some other variation where the type is mentioned then some enterprising soul might think “Oh but I want tt to be an integer” and edit the file to say
TabStop Integer = 6
And now ???
I can hear the “but the IDE should know and fi this” and … well thats sort of where the issues start
The IDE should know the types and the mechanism that it uses to know this … well …
Lets just say I spent a LOT of time getting internals to the point where it was what it was for 2019r1 - still not perfect but way better than it had been
Thoms right though - like so mnay things it seems as simple prolem but it really isnt
I would have no problem if the file breaks when someone edits it using a text editor rather than the IDE.
[quote=498038:@Norman Palardy]Suppose the IDE writes
TabStop Boolean = True
or some other variation where the type is mentioned then some enterprising soul might think “Oh but I want tt to be an integer” and edit the file to say
TabStop Integer = 6
And now ???
I can hear the “but the IDE should know and fi this” and … well thats sort of where the issues start
The IDE should know the types and the mechanism that it uses to know this … well …
Lets just say I spent a LOT of time getting internals to the point where it was what it was for 2019r1 - still not perfect but way better than it had been
Thoms right though - like so mnay things it seems as simple prolem but it really isnt[/quote]
I would say the IDE would store the value in a variant as an integer which might get interpreted as True and might get written back to disk either as an integer or a boolean depending on if something triggered the contents of the variant to be updated or not. Crap In - Crap Out.
Would that be any different to what would happen today if the user changed the data:
TabStop = True
To
TabStop = 6
Seems to me a number of folks here are offering simplistic solutions even though they’ve been told by at least one person in a position to know, that there is no easy solution.
Time to wrap this thread up, I’d say.
[quote=498087:@Tim Streater]Seems to me a number of folks here are offering simplistic solutions even though they’ve been told by at least one person in a position to know, that there is no easy solution.
Time to wrap this thread up, I’d say.[/quote]
Even if it’s “not so easy”. Xojo should at least give us hope that this will one day be fixed…
Lets just say that I did try to fix this
And not break every project in existence at the same time
It remains to be seen what happens next
Not found. (yes, its a bug)
This IDE script is still the best workaround I’ve found. It’s supremely annoying, but less annoying than dealing with all the changes. You only need to run it once per project load.
Module Toucher
Sub TouchPath(Path As String)
Var ProjectItemsString As String = SubLocations(Path)
Var ProjectItems() As String = ProjectItemsString.Split(ChrB(9))
For Each ItemName As String In ProjectItems
Var ItemPath As String = ItemName
If Path <> "" Then
ItemPath = Path + "." + ItemPath
End If
If SelectProjectItem(ItemPath) Then
Var ItemType As String = TypeOfCurrentLocation
If ItemType = "Window" Then
Var HasBackgroundColor As String = PropertyValue("HasBackgroundColor")
PropertyValue("HasBackgroundColor") = If(HasBackgroundColor = "True", "False", "True")
PropertyValue("HasBackgroundColor") = HasBackgroundColor
End If
End If
TouchPath(ItemPath)
Next
End Sub
End Module
Toucher.TouchPath("")
And the Feedback report just for good measure: <https://xojo.com/issue/58751>
Are you loading/saving the projects from two OS (say Windows and macOS) or always on a single machine/OS ? (the projects are shared in a machine and loaded in both machines)
Platform doesn’t matter for this. Same issue happens for the same properties in the same way on both Mac and Windows. Both computers have their own copy of the project, the files are not shared.
Really not a simple problem.
i have this problem too, but no only with “hasbackgroundcolor” but with visible=true or visible=“true” and many other properties
The script just toggles that property because it’s one that I know every Window has. This “dirties” the file so the IDE will write it back to disk in the correct syntax.