Go Back   ZeroC Forums > Bug Reports

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 05-22-2007
ctennis ctennis is offline
Registered User
 
Name: Caleb Tennis
Organization: AEI
Project: Project GINA
 
Join Date: Mar 2006
Posts: 120
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.
Reply With Quote
  #2 (permalink)  
Old 05-22-2007
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
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
Reply With Quote
  #3 (permalink)  
Old 05-22-2007
ctennis ctennis is offline
Registered User
 
Name: Caleb Tennis
Organization: AEI
Project: Project GINA
 
Join Date: Mar 2006
Posts: 120
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.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ice for Ruby under Vista PeteH Help Center 5 03-06-2007 05:19 AM
a problem about facet and IceStorm freshman Help Center 13 11-14-2004 11:16 PM
about facet freshman Help Center 3 11-03-2004 10:13 AM
about facet freshman Help Center 2 11-02-2004 04:23 PM
Facet documentation? brian Help Center 2 10-21-2003 11:23 PM


All times are GMT -4. The time now is 08:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.