noreply at rubyforge.org
2006-Oct-26 14:51 UTC
[Win32utils-devel] [ win32utils-Patches-6335 ] pure ruby implementation
Patches item #6335, was opened at 2006-10-26 16:51 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=6335&group_id=85 Category: win32-shortcut Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jano Svitok (janek) Assigned to: Nobody (None) Summary: pure ruby implementation Initial Comment: This is (not finished) pure-ruby implementation of Win32::Shortcut. Differences: - new takes block (yield self at the end of initialize) - open, relative_path, resolve and icon_number are not implemented - instead of show_cmd window_style is used Other than that, it should be pretty usable. I''ve attached simple unit test as well ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=6335&group_id=85
noreply at rubyforge.org
2006-Oct-26 14:51 UTC
[Win32utils-devel] [ win32utils-Patches-6335 ] pure ruby implementation
Patches item #6335, was opened at 2006-10-26 16:51 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=6335&group_id=85 Category: win32-shortcut Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jano Svitok (janek) Assigned to: Nobody (None) Summary: pure ruby implementation Initial Comment: This is (not finished) pure-ruby implementation of Win32::Shortcut. Differences: - new takes block (yield self at the end of initialize) - open, relative_path, resolve and icon_number are not implemented - instead of show_cmd window_style is used Other than that, it should be pretty usable. I''ve attached simple unit test as well ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=6335&group_id=85
Daniel Berger
2006-Oct-28 02:57 UTC
[Win32utils-devel] [ win32utils-Patches-6335 ] pure ruby implementation
noreply at rubyforge.org wrote:> Patches item #6335, was opened at 2006-10-26 16:51 > You can respond by visiting: > http://rubyforge.org/tracker/?func=detail&atid=413&aid=6335&group_id=85 > > Category: win32-shortcut > Group: None > Status: Open > Resolution: None > Priority: 3 > Submitted By: Jano Svitok (janek) > Assigned to: Nobody (None) > Summary: pure ruby implementation > > Initial Comment: > This is (not finished) pure-ruby implementation of Win32::Shortcut. > > Differences: > - new takes block (yield self at the end of initialize) > - open, relative_path, resolve and icon_number are not implemented > - instead of show_cmd window_style is used > > Other than that, it should be pretty usable. > > I''ve attached simple unit test as well >What do folks think of using WScript.Shell like this? - Dan
Patrick Hurley
2006-Oct-29 03:48 UTC
[Win32utils-devel] [ win32utils-Patches-6335 ] pure ruby implementation
On 10/27/06, Daniel Berger <djberg96 at gmail.com> wrote:> What do folks think of using WScript.Shell like this?In general I love it -- the pure Ruby code is succinct and easy to understand (as it lays on top of a high level api). My only concern is that I have experienced difficult to reproduce hangs and odd behavior (very rarely, but none the less), using WinOLE. I really only use it against Excel and in my case it is not a big deal as it is easy to stop and restart and things generally then preform as expected. Has anyone else ever encountered this type of behavior? (or is it Excel specific?) pth
Berger, Daniel
2006-Oct-30 13:32 UTC
[Win32utils-devel] [ win32utils-Patches-6335 ] pure rubyimplementation
> -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > Patrick Hurley > Sent: Saturday, October 28, 2006 9:48 PM > To: Development and ideas for win32utils projects > Subject: Re: [Win32utils-devel] [ win32utils-Patches-6335 ] > pure rubyimplementation > > > On 10/27/06, Daniel Berger <djberg96 at gmail.com> wrote: > > What do folks think of using WScript.Shell like this? > > In general I love it -- the pure Ruby code is succinct and > easy to understand (as it lays on top of a high level api). > My only concern is that I have experienced difficult to > reproduce hangs and odd behavior (very rarely, but none the > less), using WinOLE. I really only use it against Excel and > in my case it is not a big deal as it is easy to stop and > restart and things generally then preform as expected. Has > anyone else ever encountered this type of behavior? (or is it Excel > specific?) > > pthAlthough I haven''t experienced the problems you describe personally, I don''t doubt you. I know there are bugs in win32ole, and that library could probably use a major refactoring. If someone on this list ever felt like doing a rewrite of win32ole, I certainly wouldn''t mind. I''d be happy to host it, too. :) In the meantime, I''ve committed a pure Ruby version of win32-shortcut to CVS (look for it in the toplevel directory, not under the win32utils directory). I took Jano''s basic patch and expanded it to match the current API, although there are some minor differences, mostly improvements: - The Shortcut.new method now takes a block, yields self, and automatically calls Shortcut#save at the end of the block. - The Shortcut#icon_number method is gone (not supported). Pretty useless method anyway, really. - The Shortcut#hotkey method now takes a more human readable string instead of a hex value. Nicer. - The Shortcut#show_cmd method was renamed Shortcut#window_style, as per Jano''s request (with an alias for b.c.) - The Shortcut#window_style accessor now accepts/emits human readable strings, as well as constants. - The Shortcut.open method is more or less the same as Shortcut.new, since pointing to an existing shortcut opens it by default - no special code required. Regards, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
noreply at rubyforge.org
2006-Oct-31 04:58 UTC
[Win32utils-devel] [ win32utils-Patches-6335 ] pure ruby implementation
Patches item #6335, was opened at 2006-10-26 07:51 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=6335&group_id=85 Category: win32-shortcut Group: None>Status: Closed >Resolution: AcceptedPriority: 3 Submitted By: Jano Svitok (janek)>Assigned to: Daniel Berger (djberg96)Summary: pure ruby implementation Initial Comment: This is (not finished) pure-ruby implementation of Win32::Shortcut. Differences: - new takes block (yield self at the end of initialize) - open, relative_path, resolve and icon_number are not implemented - instead of show_cmd window_style is used Other than that, it should be pretty usable. I''ve attached simple unit test as well ---------------------------------------------------------------------->Comment By: Daniel Berger (djberg96)Date: 2006-10-30 21:58 Message: I''ve accepted the general idea in principle. No need to submit any more patches for a bit - I''ve already got it done in CVS - unless you think I''ve missed something critical. I''m going to put out a release tonight. Feel free to submit any more patches or bug reports against the 0.2.0 release. Many thanks, Dan ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2006-10-27 19:51 Message: Thanks for this Jano. It''s definitely simple, but I need to discuss whether or not using Wscript.Shell is a good idea. - Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=6335&group_id=85