Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Can't get uikit to work [solved] — Gideros Forum

Can't get uikit to work [solved]

Tom2012Tom2012 Guru
edited October 2012 in General questions
Hi,

Trying to get my business related app up and running.

Is there a super easy tutorial to uikit?

Here's what I'm doing.

1) Open Table view example in Gideros
2) Export the app to applications/gideros
3) Copy uikit.mm to the project /plugins/
4) In xcode choose add files and add uikit.mm to the plugins folder
5) Build and run

The error I get is:

"*callFile* stack NOT ok begin:1 end:2 delta:-1
bad argument #-1 to 'new' (string expected, got function)
stack traceback:
"

Comments

  • SimpleLoopSimpleLoop Member
    Accepted Answer
    Sorry this my fault the TableView example app needs updating as I had some functions added to it.

    In the main.lua file in the project change line 33 from

    local tableView = TableView.new()
    to either
    local tableView = TableView.new("Plain")
    or
    local tableView = TableView.new("Grouped")

    depending on which you want.

    Likes: Tom2012

    +1 -1 (+1 / -0 )Share on Facebook
  • You may also want to consider using the GiderosiOSPlayer app that comes with Gideros SDK for testing purposes as you then wont have to keep re-exporting the app.

    It should be a zip file in the Gideros Studio folder.
    Just add the plugins the same way you do with your exported project.

    Then run the GiderosiOSPlayer app either on a device or in the iOS Simulator.

    If it is in the simulator you should be able to just press play in Gideros Studio.

    If it is on a device you will need to go into the player menu in Gideros Studio.
    Click Player Settings, Untick loclahost and type in the IP shoen on the device when the GiderosiOSPlayer app is running on it.
  • Aha! That works thank you!!
  • One more question - I'm using webView and the orientation is stuck in portrait. Is there a fix for this?

    Thanks
  • Tom2012Tom2012 Guru
    edited October 2012
    Aha - I have found a fix:

    You simply set the rotation to 0
    Scene2 = gideros.class(Sprite)
     
    function Scene2:init()
     
    require "ui"
     
    local webview = WebView.new("<a href="http://www.google.com&quot" rel="nofollow">http://www.google.com&quot</a><img class="emoji" src="http://forum.gideros.rocks/resources/emoji/wink.png" title=";)" alt=";)" height="20" />
     
    webview:setRotation(0)
     
    webview:setPosition(0,0)
    webview:setSize(1024,768);
     
    addToRootView(webview);
     
    end
  • Sorry wasn't on the forums, glad you managed to solve it.
    Just a quick thing.
    I see you are using SceneManager please note the UIKit elements that you use will not transition or remove when the scene changes.
    They will need to be manually hidden or removed as they are placed on a view on top of everything else.

    I am working on a modified version of Scenemanager currently so that it can handle UIKit elements (including transitioning them which I have made a modified UIKit Plugin for).

    Hopefully I will have it done soon but have a lot of things on atm so may be a while.

    I'll see if I can get my animation functions added to the UIKit plugin then at least you could detect that the scene has started changing and animate them out appropriately.
  • bowerandybowerandy Guru
    edited October 2012
    @Tom2012, @SimpleLoop.

    Just in case you are interested, if you use the Hot wax (BhWax) plugin, it comes with a component, BhUIViewFrame, that will allow UIKit views to play nicely with the Gideros SceneManager. You can see this demonstrated here with a button and an image view transitioning in and out of a scene.


    Just as an addition, it also shows the live text to speech that you can obtain using the online Google Text To Speech service with a few lines of wax code.

    I've uploaded a new version of the BhWax demo program in the GitHub Repository

    best regards
Sign In or Register to comment.