Results 1 to 3 of 3

Thread: checkCasting to default facet broke in Ruby?

  1. #1
    ctennis is offline Registered User
    Name: Caleb Tennis
    Organization: AEI
    Project: Project GINA
    Join Date
    Mar 2006
    Posts
    123

    checkCasting to default facet broke in Ruby?

    The documentation state that by using checkedCast with an empty string, we can get back to the default facet of a servant. However, that doesn't seem to be the case with the Ruby bindings:

    I've got an object with two facets, the default and one called "unbuffered". With a proxy to the default, I can checkcast and get a proxy to the "unbuffered" facet. However, attempts to go back don't work:

    >> r168
    => register/168 -f unbuffered -t @ Unico-tc9
    >> r168 = Unico::AnalogOutputRegisterPrx::checkedCast(r168, "")
    => register/168 -f unbuffered -t @ Unico-tc9
    >> r168.ice_getFacet
    => "unbuffered"

    Maybe I'm just misunderstanding the "trick" to get back to the default facet, but if not it looks like this might be a bug.
    Caleb Tennis
    Analytical Engineering, Inc.
    http://www.aei-tech.com
    Project: Our facility infrastructure heavily utilizes Ice

    Gentoo ebuild maintainer for Ice, IceRuby, etc.

  2. #2
    mes's Avatar
    mes
    mes is online now ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    Hi Caleb,

    I agree, that does sound like a bug. Thanks for reporting this.

    As you probably know, a workaround is to call checkedCast like this instead:
    Code:
    >>> r168 = Unico::AnalogOutputRegisterPrx::checkedCast(r168.ice_facet(""))
    Take care,
    - Mark

  3. #3
    ctennis is offline Registered User
    Name: Caleb Tennis
    Organization: AEI
    Project: Project GINA
    Join Date
    Mar 2006
    Posts
    123
    Indeed, quite easy to work around. I just found it when toying around while out a new facet in my code. But it smelled like a bug, so I figured it was worthwhile to report.

    Caleb
    Caleb Tennis
    Analytical Engineering, Inc.
    http://www.aei-tech.com
    Project: Our facility infrastructure heavily utilizes Ice

    Gentoo ebuild maintainer for Ice, IceRuby, etc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Admin facet in python Ice.Application?
    By smandy in forum Help Center
    Replies: 2
    Last Post: 03-02-2010, 12:56 PM
  2. a problem about facet and IceStorm
    By freshman in forum Help Center
    Replies: 13
    Last Post: 11-14-2004, 10:16 PM
  3. about facet
    By freshman in forum Help Center
    Replies: 3
    Last Post: 11-03-2004, 09:13 AM
  4. about facet
    By freshman in forum Help Center
    Replies: 2
    Last Post: 11-02-2004, 03:23 PM
  5. Facet documentation?
    By brian in forum Help Center
    Replies: 2
    Last Post: 10-21-2003, 10:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •