thanks for this example, but the class is locked ...
I presume it's all about declares
it's only to know what they are ...
It is a very real issue to decide to use Xojo iOS rather than, say, B4i, for a new project that will print.
Right now I am pressed between the rock and the plate about that. I have almost completed Check printer for iOS in Xojo, using dtPlugins for printing.
But I am more than hesitant to release. I love Jean-Paul, but now that he left the market, I am at the mercy of a change in the system, and as Sam Rowlands has many times testified to it, Apple loves to change stuff on a whim. Printing is at the core of my app (in Fact two apps, Check Printer and Check Writer).
I cannot invest hours and hours of development with a sword over my neck. I need to know what I create will have enough durability to last the several years of app life span.
Using plugins no longer supported is a very real issue. There are a significant number of posts in this forum about people left dead in the water because the system changed and they could no longer follow. I cannot fathom hundreds of App Store customers all the sudden unable to use the app because of a change. With iOS adoption rate, it would be such an uproar, I don't want to risk that.
Given the responses from Xojo, who visibly does not have the slightest concern over the issue, and seems to consider a core feature of a language like a petty feature request ("That IS how the feedback system works."), and although that promises quite a bit of work, I will have to switch to a more complete development tool. I will consider the Xojo development as a mock up, and be done with all that pain and suffering.
At least, with a more serious language, I will have the assurance that the features I need are supported by the publisher in a professional manner.
I will be in good company ; there are a significant number of excellent programmers who had to leave Xojo for similar reasons.
@Jean-YvesPochez I'm sure Michel would buy it with uncrypted source code ...
You may be surprised to know that in fact, even if I had a source code of such a plugin, I would not touch it. Printing in iOS is way more complex than simply setting a property in a class. I looked into it when Xojo iOS came around (actually at the same time as the December 2014 feature request), and it is beyond my current skills.
Sure, I could yet again spend a significant number of hours becoming fluent in Objective C which for some reason, I detest the syntax of, but frankly, this is no way to work.
@Jérémie Leroy I wish you a happy switch, and hope you'll stop complaining each day on the forums!
Sure, bury the problem in the sand, and be done with it. Contrary to some, I take supporting my customers very seriously.
Xojo is not a sect. At least I hope so. I don't always complain, and have always kept a positive outlook, until I bumped into a situation I believe to be unacceptable. Don't worry. I will soon hide the iOS channel, and you can be content sitting in the mud.
If you look at the market of business software there are tons of reasons to have the ability to print. Keep in mind that mobile computing ist the most growing market and we have to notice that tablets and smartphones will be the notebooks and desktops of the near future. If you agree with this look at all the existing software on desktops and notebooks and then tell me again that there is no need to print.
I could really use this facility .
Tempted to try embedding the dtPlugins but Michel has a valid point.
All gravy right up to the day when Apple changes something , then boom.. a key feature stops working and your app is dead in the water.
Place a sharing panel on your screen
If you have a text area containing on screen text....
use a button action as follows:
SharingPanel1.ShareText(AboutTextArea.text, Self, Me)
This opens the iPhone sharing functionality and one can print to Mail, Message, add to notes, and a local printer if connected by wifi or bluetooth.
The text area can be replaced by a record. I haven't tried it with a Xojo report, but it should work.
Here is an example of a record:
Dim v As Int64
Dim Sexas Text
v = SegmentedControl1.value
if v = 0 then
DIm Anticoagulant as text
Dim Slope AS Double = 0.0
if AspirinFlag then
Slope = Aspirin
Anticoagulant = "Aspirin"
If NoOACFlag then
Slope = NoOAC
Anticoagulant = "None"
If ApixabanFlag then
Slope = Apixaban
Anticoagulant = "Apixaban"
If DabigatranFlag then
Slope = Dabigatran
Anticoagulant = "Dabigatran"
If RivaroxabanFlag then
Slope = Rivaroxaban
Anticoagulant = "Rivaroxaban"
If WarfarinFlag then
Slope = Warfarin
Anticoagulant = "Warfarin"
Dim Record As Text = "Summary of Patient Record,"
Record = Record +" Height, Weight, !@#$%, EBV, preHeparinACT, desiredACT,InitialHeparinDose,postHeparinACT,Anticoagulant,Slope" + &u0A
Record = Record + " ,"+ HeightTextField.text + "," + WeightTextField.text + "," + !@#$% + "," + preHeparinTextField.text + "," + desiredACTTextField.text + ","
Record = Record + BolusGivenTextField.text + "," + postHeparinTextField.text + "," + Anticoagulant + "," + Slope.ToText + &u0A
SharingPanel1.ShareText(Record, Self, Me)
Suggested printer pro as a separate app. You don't need it, as you can use the sharing panel to send a document to your self or anyone else using mail on iOS. Then you can do what you like. I don't mean to make your life harder, but trying to make it easier.
Good luck with your projects
you can use the sharing panel to send a document to your self
But we want to print. And not just a couple of lines of shared text - there IS no document.
At a massive push, maybe get away with creating a PDF file (but that too is beyond Xojo)
Set up a sharing panel. Take a look at the options on your phone when you put it in the phone. If you have the ability to print to a networked printer from your phone, you can share a document to that printer. Ie, print from phone. If the app is for distribution to others, you just need to set up wifi printing to a networked printer and tell users how to do this. The easiest is to recommend printer pro from Readdle - a cheap app in the App Store.
I know this is a bit of a work around, but may suit your purposes.