Quick Links: Download Gideros Studio | Gideros Documentation | Ultimate Guide | Gideros Development Center
UIKit plugin example - Gideros Forum

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with OpenID

In this Discussion

Top Posters

UIKit plugin example

MikeHartMikeHart Guru
edited February 2012 in Plugins
Hi folks,

here is the code I was working on for the UIKit plugin. Take it as you wish.

Cheers
Michael
«13

Comments

  • GregBUGGregBUG Guru
    edited February 2012
    ok. thanks. mike.

    @mikehart or @atilim or any plugin expert! :)

    ps: i'm starting now to study plugin system... only now... :\">

    but if i use c (not c++) i need to use a ..stub file like in sqlite plugin ?

    i created a little plugin.. with very simple function in it and added to player and work fine in Apple iPhone emulator...

    but for desktop (and gideror emulator) ? how do i do?
    +1 -1
  • You should have asked this in a seperate topic. As I don't want be the reason for Görkem having to much fun about me, I let him answer this question.
    +1 -1
  • Sorry, I just being pissed about it. Anyway, I attached the files I used to compile the plugin. Of course it is IOS only.
    +1 -1
  • @MikeHart
    MikeHart said:

    You should have asked this in a seperate topic

    sorry Mike.
    you are right.
    I did not do maliciously.
    i'm so sorry really.

    Gianluca.
    +1 -1
  • Np. But your question will be asked by others in the future too and if it is handled in its own topic, it is easier to find for them. Anyway, do as you please. It was just a suggestion. Right now it is organized here, but on the mexican beer forum, people posted all over the forum. It was such a mess.
    +1 -1
  • @MikeHart - you've done a fantastic job on this, Mike - it's made it easy for other people just to add on the bits that they need for their UI needs.

    Sorry that I haven't been able to contribute - real life issues have come my way, hopefully temporarily.
    +1 -1
  • Thank you and Np, I can understand this totally.
    +1 -1
  • atilimatilim Maintainer
    Thank you Mike :)
    +1 -1
  • Thanks for sharing Mike, looks like I've got some reading to do about plugins and how to get the stuff working.

    Sorry if this is a bit of a noob question but...

    I'm assuming that the plugin can be baked into some kind of library (.a ??) and then reused from project to project - yes ?

    Also as I actually do most of my development on a Windows PC, can that library be used along with the player (compiled and installed on my iPod touch) to develop and upload code from Windows using Gideros Studio??? - or have I got the wrong end of the stick?

    Regards

    Jon...
    +1 -1
  • techdojo said:



    I'm assuming that the plugin can be baked into some kind of library (.a ??) and then reused from project to project - yes ?

    Also as I actually do most of my development on a Windows PC, can that library be used along with the player (compiled and installed on my iPod touch) to develop and upload code from Windows using Gideros Studio??? - or have I got the wrong end of the stick?

    Regards

    Jon...

    1. yes
    2. yes, as long you have compiled and installed the player first with XCode on your device.

    +1 -1
  • Thank you for an excellent library Mike, very useful!

    Note: I got a few compiler warnings.

    Warning: Format string is not a string literal (potentially insecure)
    Warning: 'setStatusBarHidden:animated:'is deprecated (iOS 3.2 and above)

    I removed them by changing the following:

    Line
    81 NSLog(type); to NSLog(@"%@", type);

    1370 NSLog(filename); to NSLog(@"%@", filename);

    1665 NSLog(txt); to NSLog(@"%@", txt);


    Line
    1861 [[UIApplication sharedApplication] setStatusBarHidden:show animated:NO];

    to

    [[UIApplication sharedApplication] setStatusBarHidden:show withAnimation: UIStatusBarAnimationNone];

    1957 [[UIApplication sharedApplication] setStatusBarHidden:true animated:NO];

    to

    [[UIApplication sharedApplication] setStatusBarHidden:true withAnimation: UIStatusBarAnimationNone];

    There is a choice of three animations for the above:

    UIStatusBarAnimationNone
    UIStatusBarAnimationFade
    UIStatusBarAnimationSlide


    Cheers

    evs
    +1 -1
  • gorkemgorkem Maintainer
    @mikehart @evs @techdojo @gregbug @caroline I'd suggest you put this code sample to Github, and start contributing to it by adding a README file, inline comments, a few usage examples etc. I believe it'll be of help to many people in the forum.

    Someone get the ball rolling, please :)
    +1 -1
  • @mikehart @gorkem - I've talked with Mike and put it up on github:

    https://github.com/carolight/MHUIKit

    Not sure how forking works, but I guess we'll find out :).

    Let me know if I need to change anything, or if you find somewhere better to host it.
    +1 -1
  • For usage examples, I think the accompanying Gideros Studio project is very good.

    I haven't tackled inline comments or put in pragma marks.

    I did correct as @evs suggested.
    +1 -1
  • gorkemgorkem Maintainer
    So easy even *I* can understand without comments \:D/
    +1 -1
  • Does anyone know a free good github client?
    +1 -1
  • atilimatilim Maintainer
    edited February 2012
    For Mac, I can recommend http://mac.github.com/ or http://www.atlassian.com/software/sourcetree/ (But I haven't used neither of them, only read good reviews)

    Aye: Caroline

    +1 -1 (+1 / -0 )
  • Scouser Guru
    edited March 2012
    Most of the documentation / forum posts about plugins refer to the iPhone, are there any plans for implementing a plugin system for android?

    I know plugins aren't for everyone but already having experience with the Android NDK and having looked at Caroline's TestPlugin example (http://www.giderosmobile.com/forum/discussion/571/a-simple-c-sample-plugin), I can't see any reason why it shouldn't be possible to implement on android, or am I missing something which prevents the use of plugins in android.

    Edit:
    Doh!!!!, I posted too soon, the last comment I managed to read (http://www.giderosmobile.com/forum/discussion/572#Item_2) mentioned that you're already on the case. :)

    +1 -1
  • gorkemgorkem Maintainer
    edited March 2012
    Yes, as you said, it's currently in the roadmap (http://bugs.giderosmobile.com/projects/gideros-studio-sdk/roadmap)
    +1 -1
  • evsevs Member
    Hello all,

    I've forked off ( "Fnarr! Fnarr!") and added a Simple PickerView with a lua usage example - picker.lua

    https://github.com/evsgithub/MHUIKit

    I also made the following additions to TextField2

    setTextColor(r, g, b)
    setBGColor(r, g, b)

    showKeyboard() - call after adding to view

    I hope It's not too buggy?


    Cheers

    evs


    +1 -1
  • Thank evs, that is a great addition. Any reason why you didn't submit your additions to Caroline's hub?
    +1 -1
  • Does someone know how to fix the scrollview problem?

    The problem here is:

    controls that are added to it, will be collected from the GC once it kicks in. The fastest way ro recognize this is to use the slider as this creates the most events.
    +1 -1
  • evsevs Member
    Hello Mike,

    I'm new to using github, but I read somewhere that it's best to fork off a hub to do your 'experiments', allowing the owner of the original hub to integrate then if they so wish.


    Cheers

    evs
    +1 -1
  • evs said:

    I'm new to using github

    Darn - I had hoped you knew something about it :). So I'll integrate then? I guess I just download your fork into my code and recommit?

    +1 -1
  • Caroline said:

    evs said:

    I'm new to using github

    Darn - I had hoped you knew something about it :). So I'll integrate then? I guess I just download your fork into my code and recommit?

    Please do that.

    +1 -1
  • Doooh

    Scrollview issue... So simple to fix. I got it working. Now I have to figure out how to submit this back to the hub.
    +1 -1
  • Mmmh, I uploaded it but on the web interface it isn't visible. @Caroline, what's wrong with it?
    +1 -1
  • @mikehart - when you say you "uploaded it", what exactly did you do?

    I think I will have to go and read something about git...
    +1 -1
Sign In or Register to comment.