yuchi / TiShimmer

Facebook’s Shimmer port for Titanium SDK (iOS and Android)
31 stars 5 forks source link

Invalid Method createShimmerView passed to itTiShimmerModule #4

Open ankesh27 opened 10 years ago

ankesh27 commented 10 years ago

Not able to run the code, found many things missing

1 - FBShimmer files missing 2 - After adding all the files(found it via google) i rand ./built.py 3- Module was created and I added the same on Project and code var Shimmer = require('it.ti.shimmer');

4- Error says "Invalid Method createShimmerView passed to itTiShimmerModule"

screen shot 2014-04-15 at 11 06 36 am

yuchi commented 10 years ago
  1. You need to setup the git submodules
  2. It’s actually called ShimmeringView

This module is not production ready just for the APIs parity between iOS and Android _and_ for the documentation. I’m so sorry.

ankesh27 commented 10 years ago

Ah, does't work :( tried different ways but nothing going my way :(

caspahouzer commented 10 years ago

I also tried the module.

Result is, after adding all submodules and renaming the method call to createShimmeringView: Nothing. Neither the text without shimmer effect is shown.

Are there any news?

Maybe you can provide a dist after the update?

yuchi commented 10 years ago

A completely unstable, but usable, release is coming in a few minutes.

yuchi commented 10 years ago

Please have a look at the release or install via gittio install it.ti.shimmer.

While this is a pre-pre-release, don’t be afraid in reporting issues. A small note: unstable means that API will change for parity between platforms, this module does not crash your app (if it does it’s a bug).

caspahouzer commented 10 years ago

Works!

Thanks for your reply

yozef commented 10 years ago

I've added <module platform="iphone">it.ti.shimmer</module> to tiapp.xml & Installed it via: gittio install it.ti.shimmer from the Project Folder.

Then in the Code:

var Shimmer = require('it.ti.shimmer');
shimmeringLabelOpenedView = Shimmer.createShimmeringView({
    // shimmeringOpacity: 0.5,
    // shimmeringSpeed: 80,
    // shimmeringBeginFadeDuration: 80,
    label:{
        text: 'Hello World',
        textAlign:Ti.UI.TEXT_ALIGNMENT_CENTER,
        color:'#FFFFFF', fontSize:25,
    }
});
self.add(shimmeringLabelOpenedView);
shimmeringLabelOpenedView.startShimmering();

Though I don't see any text being displayed... I'm missing something?

yuchi commented 10 years ago

The APIs are changed, a lot, and the examples have not been updated.

var shimmeringView = require('it.ti.shimmer').createShimmeringView({ /* ... */ });
var label = Ti.UI.createLabel({ text: 'Hallo yozef' });
shimmeringView.add(label);
self.add(shimmeringView);

shimmeringView.startShimmering();
yozef commented 10 years ago

Much appreciated! It's a slick effect ;) Thanks @yuchi

ttaylor commented 10 years ago

I see that you are still working on the API, but setting shimmeringSpeed to different value does not currently seem to change the speed.

yuchi commented 10 years ago

This is pretty strange. I’m sure it worked last time I saw it.

ccavazos commented 9 years ago

Seems like this is not working with Ti SDK. 3.4.1 "invalid method createShimmerView"