Text versus String, NthField??

I’m used to strings but there seems to be growing pressure to switch to Text and I notice that I have to use Text, not strings, if I want to use Xojo in iOS.

But NthField, which I use with tab-separated strings, doesn’t appear to work with Text. Do I have to Split the Text into an array instead?

Seems a bit of a faff having to change a lot of code.

Not true.

True.

Yes. You could wrap the code into an extension function on Text called NthField mimicking the behavior of NthField on String.

Thank you both. I’ve just finishing rewriting a method using Text and Split instead of String and NthField and I must admit, it makes the code easier to read. I just don’t want to have to go back and rewrite a lot of stuff that works. I’ll check out Michel’s wrapper.

I came up with the wrapper for myself precisely because I did not want to rewrite all my legacy code. Also because truth be said, the new framework implementation in iOS is sometimes kind of cumbersome. Like having no MsgBox and only the equivalent of MessageDialog.

I try to add new methods that mimic classic framework as I see cases that require it, but if you come up with your own ones, please let me know in order to add them.

I haven’t got started on iOS just yet, but the thing that bothers me most about it at the moment is the lack of a Xojo ListBox. Do you know if one will be added soon? Or is there a simple way to mimic its methods (particularly dragging lines) without reinventing the wheel?

There is an excellent implementation of UITable in dtPlugins for iOS that is multicolumn and has much more features than iOSTable. See https://forum.xojo.com/31758-dtplugins-are-now-free/0

But I do not see exactly what you mean by “dragging lines”. Don’t forget that iOS not using a mouse, there are functions that simply cannot be implemented.

I was hoping I could implement a “fingerdrag” as it were. There is something like it in the iOS TeamViewer, although it is a bit fiddly. If that’s a headache I suppose I could tap to select a line and then tap to indicate an insertion point.

I am already running into problems with Text as against String. This code compiles but causes a xojo.Core.BadDataException when run

s = stream.ReadPString dbName = s.ToText

stream is a BinaryStream, dbName is a Text and s is a String, which is only there because neither of the following worked

dbName = stream.ReadPString

and

dbName = stream.ReadPString.ToText

Text is essentially a series of Unicode code points while String is a series of bytes. In order to convert from String to Text, the String must have a TextEncoding to interpret the bytes, but a BinaryStream gives you a String with a nil encoding.

Use DefineEncoding to assign a TextEncoding and, as long as it’s valid, the conversion will work just fine.

In principle, dragging the finger will scroll the table. So what you describe would have to be used on a fixed table, or require a long press or something else to initiate.

Problem is iOSTable does not have MouseDown/MouseUp (PointerDown/PointerUp) so adding what you describe, if possible at all, will probably require declares.

I don’t count the missing events that render Xojo iOS Soooooo annoying and Soooooo desperately toyish. I do hope Xojo understands that if that many events were removed from Desktop Xojo or Xojo Web, nobody in his right mind would use it anymore :confused:

Thanks, Kem, it’s working fine now.

I’m sorry to hear you say that, Michel. I recently decided to fork out for a Pro licence basically so I could get to grips with iOS using Xojo but I am wondering if it was worth the considerable expense. I’m not very impressed by the missing features and I don’t think the documentation is exciting or extensive enough. Nearly three years down the line, I was expecting a manual at least as comprehensive as the other manuals. I think it should also be possible to use Xojo to develop Android software, I am also surprised that there doesn’t appear to be a road map or timetable for the introduction of more features and I have been thinking of looking at alternatives, such as Swift. I can’t afford to spend time on something “toyish”.

3 ???
iOS was released in 2014r3
Not even 2 yet

Yesterday I read a BKeeney review of Xojo ioS from May 2, 2013, although it was a pre-release version showcased at a conference so it may be unfair to talk about being three years down the road. Even so, I think that Michel’s comments reinforce my general impression. I had hoped more of the Xojo feature set would be available for ioS AND for Androids by now. I had also hoped there would be more proper books available on ioS programming with Xojo by now. I am very grateful for the help available on this forum but a 700-page manual (or bigger) is high on my wish list. But wishes not being fishes, I think I shall have to take the time to look at Swift as a possible alternative ioS tool.

I am sorry too. And am pretty much in the same boat. When Xojo iOS appeared, as justly noted Norman, at the end of 2014, I was a bit dismayed by the crude state of it. But hey, it was a brand new baby. I created the wrapper to work around the new framework.

I pulled the extra money for the new license, firmly convinced that Xojo would rapidly get some love into iOS, especially as Geoff said it would be the case.

Well, now close to two years later, the word is 2016R2 should be the grand appearance of new things for Xojo iOS, but frankly, I have become pessimistic about the prospect to have anything close to even RealBasic 4. The lack of hardware support is a showstopper for many things that are rather elementary in Swift, or even in B4i released at the same time.

Even more annoying, the apparently deliberate absence of events like PointerDown/PointerUp in anything but Canvas, and the absolute ignorance of all feature requests is downright frightening.

As much as I love Xojo Desktop and Xojo Web, the present state of Xojo iOS is much too far back to pretend using it for anything like what users have come to expect. I do hope that will change sooner rather than later. Until then I will be forced to use something else. And you know how it goes : once a project has been completed, rewriting it is close to impossible…

<https://xojo.com/issue/11151> 1st in Feedback Top Cases.

That was a very preliminary showcase
Well before it was released to users

[quote=272476:@Steve Hill]Even so, I think that Michel’s comments reinforce my general impression.
[/quote]
One persons impressions
We do have others that are using it and releasing products in the app store & in their organizations
It may or may not meet your needs

[quote=272476:@Steve Hill]I had hoped more of the Xojo feature set would be available for ioS AND for Androids by now.
[/quote]
Android is an entirely different & separate beast than iOS

[quote=272476:@Steve Hill]I had also hoped there would be more proper books available on ioS programming with Xojo by now.
[/quote]
Electronic versions are on xDevLibrary
They’re the most current you will find

A 700 page manual is unlikely to happen for the same reasons there are no 700 page manuals about most third party tools
There’s just not a big enough market to make doing them a viable proposition
So electronic publications are what you get
Even if you visit oreilly much of what was written about Swift last year may NOT be correct or up to date with Xcode 7 and 8 and Swift 3
Another tool like Delphi has very few current books on Oreilly

Its just the reality that books get outdated quickly as tools are refreshed so frequently and platforms evolve rapidly

[quote=272489:@Norman Palardy]One persons impressions
[/quote]

Sorry Norman, but you know as well as anyone that the opinions of Michel and myself are shared by ALOT more than one person (heck its at least two)

I do fervently wish Xojo soon proves me wrong by issuing a brilliant new version demonstrating how much love has been poured into iOS.

I have always been a fan boy but …

During 2014 : High expectations. Even impatience.
2014 end after beta release : Hum. Kind of disappointed but to a good heart nothing impossible. Wrote the wrapper and a few declares.
2015R1 : Apple diktat : everything must be 64 bit compatible in iOS. Well, new features will wait…
2015R2 til 2016R1 : almost flatline, apart from (goodie goodie) Container Control.
Very discouraging, the numerous feature requests seem to have definitely fallen in def ears. Why bother if nobody cares ?

Now we have been told 2016R2 will be the iOS time. We shall see. Hope it won’t be a politician’s promise…

I wasn’t intending to stipulate a book actually printed on dead trees, although I found Matt Neuburg’s Real Basic definitive guide really useful back in 1999 and still do whenever I return to Xojo to bash out an app for some purpose. (Incidentally, I see you can get used copies of that book on Amazon for a few cents, whereas the Kindle version is over 30 dollars. Go figure. )

I’m quite happy with electronic books and I don’t want to criticise the ones available free with Xojo downloads other than to say they could go a lot further than they do.

But I’m concerned that a question about Text versus Strings has turned into a conversation about the viability of Xojo as an ioS tool. So many thanks, I’ll soldier on with Text in future, cross my fingers for an interesting 2016R2, and bow out now :slight_smile: