Where Xojo isnt fully 64 bit

In Xojo an array is limited to being no more than 2 billion entries (2,147,483,646 )

But arrays are documented as using integers which, in a 64 bit world, should be a LOT more entries than this.

When this post was written the documentation isnt clear about what the maximum size of an array IS. It just said :

sizeIntegerThe upper bound of the array. Size must be a number or a constant.

Thats been altered now and the case noted above marked “fix” . Documenting a shortcoming isnt the same as fixing the shortcoming though.

In a 64 bit application Integer usually means a 64 bit integer but in reality arrays dont use Integer, they use Int32. This limitation isnt considered a bug as

The Integer type is Xojo compiler/framework magic. Behind the scenes, LastIndex (and Ubound) are Int32 because we still support 32 bit OSs. Should the day come when we no longer support 32 bit operating systems, we could then change arrays to Int64 but even that would then be a LOT of work involving updating the compiler, the frameworks, etc.

In most Xojo code and use cases we never have to worry about “compiler magic”1 etc and integer is an Int64 in 64 bit apps and an Int32 in 32 bit programs.

As users we shouldn’t have to know, or care about “magic” – it should just work like it does everywhere else.

1 In a language like C++ this “magic” amounts to something like

// your C++ compiler MAY define specific tags to tell if you're compiling 32 or 64 bit
#if 64Bit // with whatever specific code your C++ compiler needs to tell this is a 64 bit build
   typedef int64_t integer ;
#elif 32Bit // with whatever specific code your C++ compiler needs to tell this is a 64 bit build
   typedef int32_t integer ;
#endif

They even have code in their headers for plugins that handles this (this is from the 2020r2 Plugin SDK include file REALplugin.h)

#if defined(__LP64__) || defined(_WIN64)
	#define TARGET_64BIT 1
#else
	#define TARGET_64BIT 0
#endif

#include <stdint.h>
#include <stddef.h>

typedef int64_t RBInt64;
typedef uint64_t RBUInt64;
typedef int8_t RBBoolean;
typedef uint32_t RBColor;

#if TARGET_64BIT
	typedef int64_t RBInteger;
	typedef uint64_t RBUInteger;
#else
	typedef int32_t RBInteger;
	typedef uint32_t RBUInteger;
#endif

UPDATE : Christian found another spot where Xojo isnt 64 bit

UPDATE : Xojo fixed the documentation and marked the original report “fixed”. But fixing the docs doesnt fix the actual issue reported.
I have an older feature request to make arrays 64 bit

2020r2 desktop changes

Some changes wont be a big deal
If you happened to use the style REALbasic.function name then some of those will need fixing as they have moved from the REALbasic framework into different ones. IF you need to prefix things with the right namespace you’ll have to sort out which one it got moved to but its USUALLY one named the same as the data type. So if you used to write

Dim s As String 

s = REALbasic.Titlecase(someOtherStringVar) // or TitleCase("foo")
s  = someOtherStringVar.Titlecase // this form wont allow "foo".Titlecase

this will need to become

Dim s As String 

s = String.Titlecase(someOtherStringVar) 
s  = someOtherStringVar.Titlecase // this form still wont allow "foo".Titlecase


Some others may cause more work since the replacement isnt as capable
ie/

Dim tinfo1 As Xojo.Introspection.TypeInfo = GetTypeInfo(Integer) // this works in versions up to 2020r2
Dim tinfo As Introspection.TypeInfo = GetTypeInfo( Integer ) // this does not work in 2020r2

Application Deprecated CurrentThread
replace with Thread.Current

Combobox Deprecated Value replace with Text

DateTime
added Public Function ToString(dateStyle As FormatStyles = FormatStyles.Medium, timeStyle As FormatStyles = FormatStyles.Medium) As String
removed Public Function ToString(loc As Locale = Nil, dateStyle As FormatStyles = FormatStyles.Medium, timeStyle As FormatStyles = FormatStyles.Medium) As String
added Public Function ToString(loc As Locale, dateStyle As FormatStyles = FormatStyles.Medium, timeStyle As FormatStyles = FormatStyles.Medium) As String

DateTimePicker added

EndOfLine
added property Android as string
added Public Shared Property CR As String
added Public Shared Property CRLF As String
added Public Shared Property iOS As String
added Public Shared Property LF As String

Graphics
added Public Property Brush As GraphicsBrush
added Public Function LineDash() As Double()
added Public Property LineCap As LineCapTypes
added Public Enum LineCapTypes As Global.Integer
added Public Property LineDashOffset As Double
added Public Property LineJoin As LineJoinTypes
added Public Enum LineJoinTypes As Integer
added Public Property ShadowBrush As ShadowBrush

added Class GraphicsBrush

Class HTTPSecureSocket Deprecated
replace with URLConnection

Class HTTPSocket Deprecated
replace with URLConnection

Label
Text no longer marked Deprecated
Value Deprecated replace with Text

added Class LinearGradientBrush

Listbox header height is now settable

MenuItem
Text no longer Deprecated
Value Deprecated replace with Text

Movie
Deprecated BaseMovieHeight replace with Height
Deprecated) BaseMovieWidth replace with Width
Deprecated Handle
Deprecated MovieHeight
Deprecated MovieWidth
added Property Height As Integer
added Property Width As Integer

Picture
added HandleType iOSUIImage = 6

added Class PictureBrush

PopupMenu
Deprecated SelectedRowValue replace with SelectedRow

added Class RadialGradientBrush

Module REALbasic
removed Abs
removed ACos
removed ASin
removed ATan
removed ATan2
removed CDbl
removed Ceil
removed Ceiling
removed CLong
removed ConvertEncoding
removed Cos
removed CountFields
removed DecodeHex
removed DefineEncoding
removed EncodeHex
removed Encoding
removed Exp
removed Floor
removed InStr
removed InStrB
removed Left
removed Log
removed Lowercase
removed Max
removed Min
removed NthField
removed Pow
removed Replace
removed ReplaceAll
removed Right
removed Rnd
removed Round
removed Sign
removed Sin
removed Split
removed Sqrt
removed StrComp
removed Tan
removed Titlecase
removed Trim
removed Uppercase
removed Val
removed VarType

added Class SearchField

added Class ShadowBrush

String module
added CDbl(Extends str As String) As Double
added Protected Function Chr(value As Integer) As String
added Global Function CLong(Extends str As String) As Int64
added Global Function ConvertEncoding(Extends text As String, newEncoding As TextEncoding) As String
added Global Function CountFields(Extends aString As String, separator As String) As Integer
added Global Function DefineEncoding(Extends text As String, encoding As TextEncoding) As String
added Global Function Encoding(Extends Str As String) As TextEncoding
added Global Function InStr(Extends source As String, start As Integer = 0, find As String) As Integer
added Global Function InStrB(Extends source As String, start As Integer = 0, find As String) As Integer
addedGlobal Function Left(Extends str As String, count As Integer) As String
added Global Function Lowercase(Extends Str As String) As String
added Global Function NthField(Extends aString As String, separator As String, index As Integer) As String
added Global Function Replace(Extends sourceString As String, substring As String, replacementString As String) As String
added Global Function ReplaceAll(Extends sourceString As String, substring As String, replacementString As String) As String
added Global Function Right(Extends str As String, count As Integer) As String
added Global Function Split(Extends source As String, delimiter As String = ” “) As String()
added Global Function StrComp(a As String, b As String, compareMode As Integer) As Integer
added Global Function Titlecase(Extends Str As String) As String
added Global Function Trim(Extends s As String) As String
added Global Function Uppercase(Extends Str As String) As String
added Global Function Val(Extends str As String) As Double

Class TextArea
Deprecated Value replace with Text

Class TextEdit
Deprecated Value replace with Text

Class TextField
Deprecated Value replace with Text

Class Thread
added Public Shared Property Current As Thread
added Public Property CurrentThread As Thread
added Public Property CurrentThread1 As Thread
added Public Shared Sub SleepCurrent(milliseconds As Integer)
added Public Shared Sub YieldToNext()

added Class Worker

Module Xojo.Core.
Deprecated Xojo.Core.Date replace with DateTime
Deprecated Xojo.Core.DateIntervalreplace with DateInterval
Deprecated Xojo.Core.Dictionaryreplace with Dictionary
Deprecated Xojo.Core.DictionaryEntryreplace with DictionaryEntry
Deprecated Xojo.Core.Localereplace with Locale
Deprecated Xojo.Core.MemoryBlockreplace with MemoryBlock
Deprecated Xojo.Core.MutableMemoryBlock replace with MemoryBlock
Deprecated Xojo.Core.Pointreplace with Point
Deprecated Xojo.Core.Rectreplace with Rect
Deprecated Xojo.Core.Sizereplace with Size
Deprecated Xojo.Core.Timerreplace with Timer
Deprecated Xojo.Core.TimeZonereplace with TimeZone
Deprecated Xojo.Core.WeakRefreplace with WeakRef

  Module Xojo.Data
Deprecated Xojo.Core.InvalidJSONException replace with InvalidJSONException

Module Xojo.Introspection
Deprecated Xojo.Introspection.AttributeInfo replace with AttributeInfo
Deprecated Xojo.Introspection.ConstructorInfo replace with ConstructorInfo
Deprecated Xojo.Introspection.MemberInfo replace with MemberInfo
Deprecated Xojo.Introspection.MethodInfo replace with MethodInfo
Deprecated Xojo.Introspection.ParameterInfo replace withParameterInfo
Deprecated Xojo.Introspection.PropertyInfo replace with PropertyInfo
Deprecated Xojo.Introspection.TypeInfo replace with TypeInfo

Module Xojo.IO
Deprecated Xojo.IO.BinaryStream replace with BinaryStream
Deprecated Xojo.IO.FolderItem replace with FolderItem
Deprecated Xojo.IO.IOException replace with IOException
Deprecated Xojo.IO.SpecialFolder replace with SpecialFolder
Deprecated Xojo.IO.TextInputStream replace with TextInputStream
Deprecated Xojo.IO.TextOutputStream replace with TextOutputStream

Module Xojo
added Abs(value As Double) As Double
added ACos(value As Double) As Double
added ASin(value As Double) As Double
added ATan(value As Double) As Double
added ATan2(y As Double, x As Double) As Double
added Ceil(value As Double) As Double
added Ceiling(value As Double) As Double
added Cos(value As Double) As Double
added DecodeHex(s As String) As String
added EncodeHex(s As String, insertSpaces As Boolean = False) As String
added Exp(value As Double) As Double
added Floor(value As Double) As Double
added Log(value As Double) As Double
added Max(value1 As Double, value2 As Double, ParamArray moreValues() As Double) As Double
added Min(value1 As Double, value2 As Double, ParamArray moreValues() As Double) As Double
added Pow(base As Double, exponent As Double) As Double
added Rnd() As Double
added Round(value As Double) As Double
added Sign(value As Double) As Integer
added Sin(value As Double) As Double
added Sqrt(value As Double) As Double
added Tan(value As Double) As Double
added VarType(value As Variant) As Integer

IOSKeyboardTypes
added Deprecated iOSKeyboardTypes replace with MobileTextField.InputTypes


What I sent vs what I got

Sent directly to Dana Brown Thur Nov 19, 2020 @2:01 PM (typos and all)

No I’m not writing to appeal being suspended

What I am wondering is if you would alter this to be “silenced” instead of “suspended”
Functionally silenced has the effect of making it so I cannot post – but it does allow me to log in an access things like the testers forum to be able to download new builds

In the long run the effect is stil lthat I’m not an actuve particpating member since I cannot post in any way
see – https://meta.discourse.org/t/discourse-moderation-guide/63116 “Silence the user”

————–

Thats it. The whole email.

I decided I would wait a decent amount of time before posting anything. Its been a week.

UPDATE : 2:01 Tue Nov 24 – No reply. Only silence.

UPDATE : 2:01 Wed Nov 25 – No reply. Only silence.

UPDATE : 2:01 Thu Nov 26 – No reply. Only silence.

If it compiles when I press run …

Folks come to expect that if I press run and the code compiles that when I press build it will still compile.
And realistically why shouldn’t it ?
Run builds an actual application and, for the most part, the only difference was that now in a Xojo debug run the debug app has a bit of code in it for the IDE to talk to and control and query back and forth.

Other than that its “the same”

Except now.

With the addition of Workers what can happen is you can write code that, when you RUN, uses threads. And that means that certain code will appear to compile – although it might not do anything useful.

But when you BUILD now the IDE will compile that worker in to a separate console application.

Which means that your code that worked while you hit run all the time might no longer work. Or even compile.

I submitted this bug report about it Oct 10, 2020

Things that go unanswered

From Xojo’s forums where no one has bothered to answer that _could_ answer

Container Control Init

Should Container Controls be receiving set calls on computed properties before the open event fires?

Yes. When Xojo creates the layout that contains the container it effectively sets EVERY property regardless. Its as if you wrote :

dim c as new ContainerControl
c.property = value
c.property = value
... and so one for EVERY property ...
and now the Open Event can be raised

Setting left/right margins to 0

I am trying to add “MarginLeft=0” and “MarginRight=0” to the setupstring. I have
settings=ps.SetupString and can dump the values in settings but the margins are not setup by default so I want to force it.

I’ve searched for a while but cannot find a way to add those two entries.

In general no you cant / shouldnt try to stuff values in there manually as this “string” is not meant to always be human readable to modifiable like this. MBS has plugins for Windows & MacOS that will permit you to control this in greater depth

Is it built in or …

Xojo has a pretty handy language feature called “extension methods”

They can be used by anyone to add functionality to any existing class. And they cane/have been used by Xojo to do exactly this.

For instance, the currency class has no built in functions to convert itself to a string, from a string, etc. Yet when you enter code like

Dim c As Currency

s = Currency.

and press tab you will see various methods presented.

You can see some of this when you select one option and then view the hint at the bottom of the editor

Normally it doesnt matter that a function is or isnt done this way.

Unless you expect things in XojoScript to also have these functions. They wont exist because the module(s) that provide all these handy functions are not part of the framework available to XojoScript.

And so code that would work in Xojo may not work in XojoScript.

Is this just rearranging deck chairs ?

On the forum theres a long thread about altering how the points in Feedback work and how they can be assigned.

I have to admit that from my perspective, and seemingly from others, the issue is not so much with gathering reports, but the “processes” that occur after gathering reports.

Currently we can assign points to reports by making them favourites. This at least indicates the 5 items each person considers high priority. And because more points go to higher priced licenses it also gives people who hold Pro and Pro+ licenses more influence when they do select a case to be a favourite.

Xojo frequently says that feedback is NOT the only criteria they use. They also consider the scope of the issue. I’m not sure how they assess this though.

Isn’t that what a lot of users making a case one of their top 5 cases _should_ indicate already ?

Even if the points system is overhauled does that changes the internal processes they have around Feedback ?

What priority _should_ a bug that causes a reproducible crash have – whether it has points assigned or not ? Or an exception that causes the IDE to lose whatever it is you’ve been working on ?

It would seem to me that those kinds of nicely reproducible bugs that cause fatal problems should have high priority regardless of how many points they have.

I’d think the KIND of case matters – sometimes more than how many points it has.

As Thom said on that thread

That’s where I think Feedback’s effort needs to be. The human element. Not to say the technical element is perfect, of course.

https://forum.xojo.com/t/the-feedback-points-system/57327/37

Thom wrote the initial versions of Feedback – they been updated since – but he’s not wrong. He worked at Xojo. As did I.

Case report acquisition isnt the issue. And in my opinion rearranging or redefining the points system is just rearranging deck chairs and not dealing with the actual problem.

Careful with your IDE & Xojo scripts

The project I’m working on uses a TON of XojoScript.

And for the most part I can test things in the IDE script editor window since that also runs XojoScript code. It just has a different context assigned to it that permit access to the IDE.

However, recently my apps with the XojoScript code would crash.

So I then tried the code in the IDE script editor window and to my surprise that crashed the entire IDE.

You can see one of my vastly trimmed down scripts in the feedback case attached to this report and this other one

Heads up !