The Direction of the New Framework

[quote=151957:@Karen Atkocius]Yes that is pain too… But I did not think arguing that would do any good!

  • karen[/quote]
    You’re correct there. :slight_smile:

That explains it all.

I recall telling a RS programmer that the new RS ide did not work on with a multiple monitor and that it was much slower than RB. I was told, on the old RealbasicGuru forum that no longer exists, that’s how it was going to be and if I didn’t like it I could go elsewhere. Then after looking at this former RS employee’s no longer existing personal web site what did I find - he worked at home on a single monitor. I was like wtf?

I am getting a real ill feeling in my stomach - the kind of feeling one gets when one reads about a politician in Washington spending the country into financial ruin, but yet having the gall to tell us “little folk” back home how to do things right.

This makes no sense whatsoever. The reason I wanted to use RB, RS, and MAYBE Xojo, was that is was not like trying to learn the math behind physics. The language was easy to use and made sense. Now you are trying to convert it into something so complex and no one would want to use it. How on earth are the planned changes going to be more simple.

Is this suppose to be some kind of very early April Fool’s joke or is this company trying to commit financial suicide?

You seriously need to consider selling the company and leaving us alone because you do not know better than US - which is the message I feel WE have been getting for years.

“Don’t worry, the old framework will exist for years.”

I just don’t believe anything your company says anymore.

But in sone instances, it is. That’s where I’ve been confused by this. Distinguishing between a valid zero and an error it’s extremely difficult. In this case, throwing an exception makes sense.

[quote=151977:@Scott Crick]But in sone instances, it is. That’s where I’ve been confused by this. Distinguishing between a valid zero and an error it’s extremely difficult. In this case, throwing an exception makes sense.

[/quote]

Off the top of my head one way would be (and if both cases were teh same it could be one line):

If Val(text) = 0 Then If Text.Len = 0 Then ' Do something - probably 0 is valid for that ElseIf text.Left(1) <> "0" 'Do Something Else End if End if

But i’ve rarely had a real wold situation where I needed to care outside of user data entry… and for that what I wrote in my previous post was enough

I suppose that had I‘ve been asked beforehand I would have opted for keeping the simplicity of something like Val. But this thread has reminded me of how little thought I had usually spent on how Val would deal with ambiguous cases and I have come to see the wisdom of the new approach. Anyone preferring the old approach could define his or her own version of Val and be done with it; for the others the new approach provides more control and should render one’s applications more robust and reliable.

Hello again,

One question that I do now may seem basic but I came now, and integer conversion to string (or text) will change something?

I use the code below for example, something will change in the new framework ?

TextfieldX.Text=Str(System.MouseX)

[quote=152033:@Paulo Vargas]One question that I do now may seem basic but I came now, and integer conversion to string (or text) will change something?

I use the code below for example, something will change in the new framework ?

TextfieldX.Text=Str(System.MouseX)[/quote]

In the new framework that’d be:

TextfieldX.Text = System.MouseX.ToText

Tanks Travis Hill !

I loved that movie!

[quote=151984:@Karen Atkocius]Off the top of my head one way would be (and if both cases were teh same it could be one line):

If Val(text) = 0 Then If Text.Len = 0 Then ' Do something - probably 0 is valid for that ElseIf text.Left(1) <> "0" 'Do Something Else End if End if

But i’ve rarely had a real wold situation where I needed to care outside of user data entry… and for that what I wrote in my previous post was enough[/quote]

But, your example doesn’t seem that much less code than a TRY/CATCH block.

Again, please don’t get me wrong. I’m not saying your wrong, or there isn’t an issue here. I haven’t used the new framework, not am I likely to in the immedIate future. I’m just not seeing the problem here. That’s all.

[quote=152073:@Scott Crick]But, your example doesn’t seem that much less code than a TRY/CATCH block.

Again, please don’t get me wrong. I’m not saying your wrong, or there isn’t an issue here. I haven’t used the new framework, not am I likely to in the immedIate future. I’m just not seeing the problem here. That’s all.[/quote]

My point was I have never needed to even do that in over 13.5 years of using Xojo… and if a situation arises where I need to I can check easily enough.

Why complicate things the majority of the time for rare cases and make the language less approachable for newbies by doing so?

  • Karen

A hangover from its old roots…

Everybody knows Xojo used to be Real Basic … perhaps at the next makeover it will get called Real c# :slight_smile:

Naïve question:

How do you go from the old frameworks to the new frameworks ?

I have spent the last couple of weeks converting two fairly large modules to use the new framework. I am currently using a Mac exclusively. For the most part I am beginning to like the new framework. There are some oddities and omissions but very usable. Below I list what I see as odd or missing:

  1. The MutableMemoryBlock class (class for working with mutable memoryblocks) has methods that result in non mutable memory blocks (e.g. .Left). This seems odd that this class does not have methods for returning mutable memory blocks. It occurred to me that the solution is to wrap these methods with new MutableMemoryBlock(). It would be nice however if the compiler would convert non mutable to mutable as required when having a statement with Mutable = NonMutable.

  2. I think this was brought up in another thread but there appears to be no integer shift function (or better an operator) in the new framework. I suspect that eventually the Bitwise functions (along with the old framework) will be deprecated and it would be nice to see a shift operator added before that happens.

  3. The documentation suggests that you can apply Using to an entire module or class without explaining how. I would like to use:

using Xojo.Core
using Xojo.Math

across both modules without adding them to each method. Does anyone know how to apply Using across an entire module?

That is a really good question!

Select the Module in the navigator, then Insert…Using Clause

Thanks Travis, that was easy!

At some point we will introduce the new framework for desktop. At that point you can migrate at your leisure. And yes, you can rest assured that the old framework will remain for many years. We are simply taking this opportunity to clean things up, make them more consistent, solve problems that the old framework has, etc., in a way that doesn’t break your existing code.

Just an example of why the new framework could be of hand : https://forum.xojo.com/18842-str-single-with-format-bug

It just so happens format is bugged for singles in the old framework, and ToText format option gives the good result.