Hi, it seems that the following code isn''t supported: AnchorStyles.Bottom | AnchorStyles.Left I believe IronPython supports this (see EnumOps.cs). Is that syntax planned ? -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090325/31cf9fef/attachment.html>
Yes, we can do that. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: Wednesday, March 25, 2009 2:39 AM To: ironruby-core Subject: [Ironruby-core] Flagged enums Hi, it seems that the following code isn''t supported: AnchorStyles.Bottom | AnchorStyles.Left I believe IronPython supports this (see EnumOps.cs). Is that syntax planned ? -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090325/969ddca9/attachment.html>
IronRuby should support this. Enum values are ints anyway, so that behavior shouldn''t be hard to implement. ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Thibaut Barr?re [thibaut.barrere at gmail.com] Sent: Wednesday, March 25, 2009 2:39 AM To: ironruby-core Subject: [Ironruby-core] Flagged enums Hi, it seems that the following code isn''t supported: AnchorStyles.Bottom | AnchorStyles.Left I believe IronPython supports this (see EnumOps.cs). Is that syntax planned ? -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090325/47ea2e10/attachment.html>
> > Yes, we can do that. > > thanks for the answer.I''ll try to create some code to handle that manually until then. cheers, -- Thibaut> > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Thibaut Barr?re > *Sent:* Wednesday, March 25, 2009 2:39 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] Flagged enums > > > > Hi, > > > > it seems that the following code isn''t supported: > > > > AnchorStyles.Bottom | AnchorStyles.Left > > > > I believe IronPython supports this (see EnumOps.cs). > > > > Is that syntax planned ? > > > > -- Thibaut > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090326/d5801984/attachment.html>
In case it''s useful to someone else (until flagged enums combination is supported by IronRuby), I wrote some custom code to support that. I''m now allowing code like :anchor => [:bottom,:top] in Magic. Relevant code is here: - http://github.com/thbar/magic/commit/e236e6fa455ea783b42dd08513dea7d80b4705d5 - http://github.com/thbar/magic/blob/e236e6fa455ea783b42dd08513dea7d80b4705d5/lib/magic/enum_support.rb cheers, -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090329/ca2277cc/attachment.html>