iOS, what we want ? roadmap ?

I’m close to upload it.
There is only a little bug that I need to solve.

[quote=169193:@Antonio Rinaldi]No it will not replace the default one

It will revise the default one[/quote]

Right. Sorry. I was confusing with the copy file I have used for my own app.

moin Antonio

did you made it?

HTMLViewer.LoadPage, to open a local HTML page from string. That would be really great for creating a customized UI quickly and easily.

The HTMLViewer could be made much more than it is at the moment, and that would enable using HTML5/CSS/Javascript to create fantastic effects. Among things that we would need :

  • CancelLoad // To know the URL navigated to
  • ExecuteJavaScript
  • Titlechanged // To allow passing back information from JavaScript

I have filed a feature request back in November : <https://xojo.com/issue/36882>

Unfortunately, it did not seem to have much success. It is not ranked at the moment.

If it’s not ranked, then not even you added it to your top 5 list.

There is no need to have the title changed event to get back information from JavaScript. The execute JavaScript will return this info directly

As soon I’ll return in my office I’ll post this extension

Untested, but this should do the trick. Add it to a module in your project:

Sub LoadPage(extends viewer as iOSHTMLViewer, html as Text) declare sub loadHTML lib "UIKit" selector "loadHTMLString:baseURL:" (obj_id as ptr, html as CFStringRef, url as ptr) loadHTML(viewer.handle, html, nil) End sub

[quote=169829:@Michel Bujardet]The HTMLViewer could be made much more than it is at the moment, and that would enable using HTML5/CSS/Javascript to create fantastic effects. Among things that we would need :

CancelLoad // To know the URL navigated to[/quote]
I posted a project for that here: https://forum.xojo.com/conversation/post/154521

Again untested, but this should work:

Function ExecuteJavaScript(extends viewer as iOSHTMLViewer, script as Text) as Text declare function execJavaScript lib "UIKit" selector "stringByEvaluatingJavaScriptFromString:" (obj_id as ptr, script as CFStringRef) as Ptr dim result as ptr = execJavaScript(viewer.handle, script) if result <> nil then //no error declare function self_ lib "Foundation" selector "self" (obj_id as ptr) as CFStringRef return self_(result) else //error occurred break return "" end if End function

It is there. I tried removing it and back, feedback would not hear of ranking it.

Sorry I did not remember it. That is great.

[quote=169870:@Jason King]ExecuteJavaScript
Again untested, but this should work:[/quote]

Superb. Thank you. Now if we could only get the title of the page that would allow passing values back to Xojo from JavaScript as we do in desktop. Unless changing the URL and passing a hashtag fires CancelLoad, so it would be possible to like Web Edition and pass values through the hashtag.

I will try to test your posted code and see if changing the URL from within the DOM fires CancelLoad.

Notice that it is “ExecuteJavaScript() as Text”. That code will allow you to return a string from your javascript. I don’t think you need to worry about a TitleChanged event.

No indeed, I just tried a quick Java code to change the hashtag, and it returns the proper URL.

Now we can seriously boost creativity through HTML/CSS/JavaScript. Such a thing allows a lot of things usually found in WE to work in iOS, now that for instance links can be coded as hashtags and enable having HTML buttons trigger code in iOS :slight_smile:

Actually, the solution was here all along since you posted your HTMLViewer Extension. Congratulations, Jason.

[quote=169174:@Antonio Rinaldi]for iOS8:
You have to add some key to the app plist (easy to do in Xojo)
[/quote]
Can I be really thick, and ask how to do this? I can’t see anything obvious for how to do this.

Check out the Core Location project he posted in the iOS Declares thread. It has the necessary plist included.

A cool feature to have access to would be external displays, via AirPlay or HDMI. Being able to control the app with one view on the iOS device and show a second view on a tv screen.

Presenting Content on an External Display