Giter VIP home page Giter VIP logo

Comments (9)

raniejade avatar raniejade commented on June 25, 2024

It's for internal use.

from mod-lang-scala.

angeloh avatar angeloh commented on June 25, 2024

do you mean I can't use it at my test case?

from mod-lang-scala.

raniejade avatar raniejade commented on June 25, 2024

I don't think doing this is necessary.

lazy val eb = EventBus(vertx.eventBus)

because vertx.eventBus is of type org.vertx.scala.core.eventbus.EventBus.

from mod-lang-scala.

normanmaurer avatar normanmaurer commented on June 25, 2024

If its for internal usage you may want to have a package private constructor ?

Am 02.09.2013 um 10:18 schrieb Ranie Jade Ramiso [email protected]:

It's for internal use.


Reply to this email directly or view it on GitHub.

from mod-lang-scala.

raniejade avatar raniejade commented on June 25, 2024

@normanmaurer I think so too. The user does not need to worry about creating an EventBus object.

from mod-lang-scala.

angeloh avatar angeloh commented on June 25, 2024

@raniejade No, vertx is of type org.vertx.java.core.eventbus.EventBus by default.
Here is my example.

  class SockJSVerticleTest extends TestVerticle with EventBusTestBase {
      lazy val sVertx: Vertx = Vertx(getVertx)
      lazy val eb = EventBus(vertx.eventBus)

Because TestVerticle is from testtools, getVertx or vertx returns java's vertx.

from mod-lang-scala.

raniejade avatar raniejade commented on June 25, 2024

found : org.vertx.scala.core.eventbus.EventBus
required: org.vertx.java.core.eventbus.EventBus
lazy val eb = EventBus(vertx.eventBus)
I think it should requires scala one.

Your first post is saying otherwise.

On Tue, Sep 3, 2013 at 12:01 AM, Angelo H [email protected] wrote:

@raniejade https://github.com/raniejade No vertx is of type
org.vertx.java.core.eventbus.EventBus by default.
Here is my example.

class SockJSVerticleTest extends TestVerticle with EventBusTestBase {
lazy val sVertx: Vertx = Vertx(getVertx)

lazy val eb = EventBus(vertx.eventBus)

Because TestVerticle is from testtools, getVertx or vertx returns java's
vertx.


Reply to this email directly or view it on GitHubhttps://github.com//issues/48#issuecomment-23668063
.

Ranie Jade Ramiso
Software Engineer | Open Source Enthusiast | Professional Slacker
Philippines

w: raniejaderamiso.com
e: [email protected]

from mod-lang-scala.

angeloh avatar angeloh commented on June 25, 2024

From https://github.com/vert-x/mod-lang-scala/blob/master/src/main/scala/org/vertx/scala/core/eventbus/EventBus.scala,

EventBus is accepting org.vertx.java.core.eventbus.EventBus, not scala's. That's why I create this bug. But if this is for internal use, there is no point to change it. I thought this line "val eb = EventBus(vertx.eventBus)" is required for every test case.

But since there is no scala version's TestVerticle, how can I get scala version's EventBus in my test case?

  class SockJSVerticleTest extends TestVerticle with EventBusTestBase {
    lazy val sVertx: Vertx = Vertx(getVertx)
    lazy val eb = EventBus(vertx.eventBus)
  }

from mod-lang-scala.

raniejade avatar raniejade commented on June 25, 2024

The constructor is for internal use, that's why it's accepting o.v.j.c.e.EventBus instead of the scala one.

This should do it, sorry did not understand you at first 😄

lazy val eb = EventBus(vertx.eventBus)

from mod-lang-scala.

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.