Giter Club home page Giter Club logo

Comments (10)

holgersindbaek avatar holgersindbaek commented on August 29, 2024

@colinta I've looked a bit more into it and it's only when the custom_view.rb file is inside lib/project, that things are not working. If I move the file up into the app folder, then things work perfectly.

What's going on here? Is it just impossible to use Teacup in a gem?

from teacup.

colinta avatar colinta commented on August 29, 2024

My guess is that the stylesheet file isn't getting included. put a 'puts' in that file to be sure.

from teacup.

holgersindbaek avatar holgersindbaek commented on August 29, 2024

I've tried it where I put the style sheet code into the custom uiview as well. So that shouldn't be the problem.

All the best

Holger Sindbaek
Holgersindbaek.com

On Thursday, October 31, 2013 at 8:24 PM, Colin T.A. Gray wrote:

My guess is that the stylesheet file isn't getting included. put a 'puts' in that file to be sure.


Reply to this email directly or view it on GitHub (#132 (comment)).

from teacup.

holgersindbaek avatar holgersindbaek commented on August 29, 2024

You can take a look at the issue here - https://github.com/holgersindbaek/status_bar.

I'm calling the custom view inside app/controllers/demo_controller.rb.

@colinta Any guess? Is there examples of other gems using Teacup?

from teacup.

holgersindbaek avatar holgersindbaek commented on August 29, 2024

I figured it out. I had to add this in my status_bar.rb file:

teacup_insert_point = nil
app.files.each_index do |index|
file = app.files[index]
if file =~ /teacup/
teacup_insert_point = index + 1
elsif teacup_insert_point
# found one, so stop looking
break
end
end

Dir.glob(File.join(File.dirname(FILE), 'project/*/.rb')).reverse.each do |file|
app.files.insert(teacup_insert_point, file)
end

I got it from sweettea. @colinta Can you explain me what exactly it does and why it's needed?

from teacup.

colinta avatar colinta commented on August 29, 2024

It inserts the gem's files before all the files in the app/ folder.

from teacup.

colinta avatar colinta commented on August 29, 2024

Or, in this case, all the files before teacup/

from teacup.

holgersindbaek avatar holgersindbaek commented on August 29, 2024

Hmmm… don't fully get that. Should that happen by adding Teacup as a gem dependency?

All the best

Holger Sindbaek
Holgersindbaek.com (http://Holgersindbaek.com)

Co-founder
Uninkd.com (http://Uninkd.com)
Meer.li (http://Meer.li)

On Thursday, October 31, 2013 at 8:44 PM, Colin T.A. Gray wrote:

Or, in this case, all the files before teacup/


Reply to this email directly or view it on GitHub (#132 (comment)).

from teacup.

colinta avatar colinta commented on August 29, 2024

No, gem dependencies have nothing to do with the RubyMotion compilation process; the order of the files in app.files is important if the detect_dependencies feature can't determine the proper order (which, in this case, it could not)

from teacup.

holgersindbaek avatar holgersindbaek commented on August 29, 2024

Ok… Now I think I get it.

Thanks for the explanation. Rock on.

All the best

Holger Sindbaek
Holgersindbaek.com (http://Holgersindbaek.com)

Co-founder
Uninkd.com (http://Uninkd.com)
Meer.li (http://Meer.li)

On Thursday, October 31, 2013 at 8:47 PM, Colin T.A. Gray wrote:

No, gem dependencies have nothing to do with the RubyMotion compilation process; the order of the files in app.files is important if the detect_dependencies feature can't determine the proper order (which, in this case, it could not)


Reply to this email directly or view it on GitHub (#132 (comment)).

from teacup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.