Interfaces and events

There’s a question about why interfaces dont let you add event definitions to them.

In fact since they just define a signature and leave the implementation else where I suppose they could. There’s no real compelling reason they couldn’t that I can think of.

They just don’t.

And so in the mean time what do you do ? How can you have the effect of an event without being able to define one ?

What you can do is define a method on the interface that takes a delegate and then implementors can call that delegate back at appropriate times – much like you’d do with raising an event.

The upside to using an interface is that you CAN apply it to disparate items – they dont have to all inherit from the same base class or control.

The downside is that its not an event so you can use addhandler to handle it. To be quite frank some of the bugs I’ve seen over the years suggest that AddHandler is overused.

The unofficial list of banned words

We know they ban words and links to sites deemed – unacceptable ?
So far the ones I know of are :

IfNotNil – put this in any post and your post will not be entered. Use an URL shortener like Bitly and you can post it (and if they are all unique then someone else has to check them all and moderate the posts – just to annoy folks on “that place”)

IfNotNil is an alternate Cross platform forum where Xojo and other topics like B4X, Lazarus, Swift, Php, Rust and lots of other programming tool are discussed without bans or erasures.

Anyone know of any others ? Let me know of you get the “You post could not be entered because it contains a banned word” style dialog.

Regaining my optimism

I’ll admit that I have had my enthusiasm and optimism damaged over the years.

Over promise and under deliver has become something of a thing to just expect and so every announcement was met with scepticism and an entire salt mines worth of salt.

But recently I’ve had reason to be poking around with recent tools from “other vendors” – not just Apple but also MS.

And I have to be honest – while Apples idea of x-platform seems to be “iOS, macOS, tvOS, watchOS” MS seems to be “getting it”.

I downloaded the most recent versions of VS for Mac and the first thing I got when it started to set up was this :

Note the choices. So I can build an app for macOS iOS or Android. Hmm OK this seems promising. Installed everything and after a couple giant downloads eventually VS started up. Some minor quibbles with the look (ie/ the main template selector window isnt resizable but …. here is what it gave me as choices

Lots of options and the one I’m most curious about is “App – Multiplatform”. I’m going to see what that means by giving it a whirl.

At any rate if MS can deliver on most of what they seem to be shooting for it will be a real boon for professional developers and those very sophisticated citizen developers.

It seems MS really is trying to go back to their “developers developers developers mantra”. They just dont have to be developing solely for Windows with this roadmap 🙂

Compiler bugs

I have a list of compiler bugs I’ve reported (15) to be accurate

1 has been marked fixed

3 closed for various reasons

Most are marked “reproducible” and I’d sure love to see them fixed

55502 adding a constant to a class cant use an expression while one in code can Xojo
56376 compiler misidentifies syntax error on shared factory in super class
56378 factory pattern cant be implemented properly in Xojo esp when items are in a namespace
56765 compiler weird error message seems to be linked to wrong order of evaluation
57500 debugging a while loop in debugger appears to skip entire loop
58900 compiler incorrectly identifies unused local variables
59004 endexception constructor should probably be restricted in some fashion
59061 compiler gives a very ambiguous error message on select case statement
56264 make it so when a method returns an array you can immediately index into the return result
56272 optional parameters can only be “right most” parameters
60207 command line arguments for debug run cannot use a #constant

Hearing this a lot … again

And its disappointing. The worst part is I dont know if any of the people I’ve talked to that have said this have even bothered saying so to Xojo Inc.

Maybe they have just given up ?

While 2020r1 finally shipped, after what I believe is a record delay between major point 0 releases, reports I’ve had are that even though desktop didn’t change that much its not usable when moving a sizeable project from older 2019 releases. I havent tried moving any of my client projects yet. I’ve opened them and run to see they run but didnt do any work to “update” them as I keep seeing API 2 issues being reported.

And so I’ve heard “I think this might be the death of Xojo in our company.” at least 4 times from long time developers in the past 2 weeks – during the betas as they saw what was coming and now after the release finally came out. At least 4 products and their development teams (no idea in total how many developers that might be) are moving away.

That cant be good for Xojo as these sort of users typically have an investment that, once moved to something else, means they are never coming back.

And thats the kind of conversation I’ve had with these users. That they are moving their entire product away from Xojo for a variety of reasons – usually it amounts to “unsafe for my business to be based on this unreliable product” or some variation of that.

Thats disappointing to hear. A lot.

EDIT : Before this post even published I got word of 2 more that have decided to move to “something else”.

EDIT 2 : Another has mentioned their discussion isn’t “Should we move” but “What should we move to ?”. The decision to leave has been made and they are evaluating what to move to.

Well it finally happened

No idea why, what post(s), etc.
I have a strnog suspicion its for things posted outside the Xojo forums.
But since the notice is fairly anonymous (the sender is “Xojo Forum”) and, in total, says

You have been suspended from the forum until September 4, 3020, 1:00pm.
Multiple violations of 5 forum rules
3rd official rule violation
User has violated numerous community guidelines, including:
-Avoid ad hominem attacks
-Avoid responding to a post’s tone instead of its actual content
-Be civil and respect each other
-Don’t post no-content replies
-Discussion of or links to blogs or websites that share privileged or internal Xojo company information is not permitted

I really dont know.

That said I guess I’ll be on discord https://discord.gg/dGSaDk
And on IfNotNil
You might ask a question on Xojo’s forum and find an answer there

So long and thanks for all the fish seems appropriate

Perhaps Queens “Another one bites the dust”

2020r1 Desktop changes

2020r1 introduces lots of changes. Some seem to be in the category of change for the sake of change.

The clipboard has changes to the names of parameters.

- Public Function RawData(macType As String) As String
+ Public Function RawData(dataType As String) As String
- Public Function RawDataAvailable(macType As String) As Boolean
+ Public Function RawDataAvailable(dataType As String) As Boolean
- Public Function RawData(macType As String, Assigns value As String) As String
+  Public Sub RawData(dataType As String, Assigns value As String)

Probably not a big hit for anyone and likely done for clarity in the tooltip in the IDE.

If you happened to switch your code to using API 2 then you’ll find a few small changes where you will have to update your code. This will break backwards compatibility since older frameworks / iDE’s will have a different definition for the values in the enumeration

Enum HashAlgorithms 
- 		SHA = 1
+ 		SHA1 = 1

MenuItem LastRowIndex has switched form being a method, to being a property. This shouldn’t cause issues UNLESS you happened to subclass MenuItem and implemented that method (in which case now you have to shadow it carefully)

POP3 Secure sockets have had several events removed – again this will break any chance of being backwards compatible.

- 	Event LoginSucceeded()
- 	Event RollbackSucceeded()
- 	Event ServerReplied(command As string, data As string)

PopupMenu had several of its method signatures altered. Again this wont affect you unless you had subclassed any of these and implemented these methods in your subclass.

- 	Public Sub AddAllRows(rows() As String)
+ 	Public Sub AddAllRows(items() As String)
+ 	Public Sub AddAllRows(ParamArray items() As String)

PrinterSetup has had a few properties deprecated in favor of new API 2 versions

PrinterSetup
- 	Public Property IsLandscape As Boolean
+ 	Attributes( "Deprecated" = "Landscape" ) Public Property IsLandscape As Boolean
- 	Attributes( "Deprecated" = "IsLandscape" ) Public Property Landscape As Boolean
+ 	Public Property Landscape As Boolean

Undocumented

Theres a new attribute on some items – RuntimeOnly

Not sure what it means or is used for since its undocumented by Xojo


Dim typeInfo As Introspection.TypeInfo = GetTypeInfo(Checkbox)

Dim propInfos() As Introspection.PropertyInfo = typeInfo.GetProperties

For Each propInfo As Introspection.PropertyInfo In propInfos
  
  Dim attrInfos() As Introspection.AttributeInfo = propInfo.GetAttributes
  
  For Each attrInfo As Introspection.AttributeInfo In attrInfos
    
    System.debuglog attrInfo.Name + If(attrInfo.Value <>"", " = "  +attrInfo.Value, "")
    
  Next
Next

shows this new one

10:47:07 AM : My Application Launched
              Deprecated = AllowAutoDeactivate
              Deprecated = Tooltip
              Deprecated = VisualState
              Deprecated = FontName
              Deprecated = FontSize
              Deprecated = FontUnit
              RuntimeOnly           <<<<<<<<<<<<<<<<<<
10:47:16 AM : My Application Ended