Project

General

Profile

Actions

Bug #4263

closed

`pack': can't convert Fixnum into String (TypeError)

Added by SamTreweek (Samuel Treweek) over 14 years ago. Updated about 14 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
Backport:
[ruby-core:34349]

Description

=begin
I get the following error:
C:/Ruby192/lib/ruby/1.9.1/Win32API.rb:22:in pack': can't convert Fixnum into String (TypeError) from C:/Ruby192/lib/ruby/1.9.1/Win32API.rb:22:in block in call'
from C:/Ruby192/lib/ruby/1.9.1/Win32API.rb:21:in each' from C:/Ruby192/lib/ruby/1.9.1/Win32API.rb:21:in each_with_index'
from C:/Ruby192/lib/ruby/1.9.1/Win32API.rb:21:in call' from C:/Documents and Settings/samuel.treweeks/Desktop/lib/wintir.rb:73:in object_exists'
from C:/Documents and Settings/samuel.treweeks/Desktop/lib/wintir.rb:616:in initialize' from C:/Documents and Settings/samuel.treweeks/Desktop/lib/wintir.rb:147:in new'
from C:/Documents and Settings/samuel.treweeks/Desktop/lib/wintir.rb:147:in button' from close_msgbox.rb:6:in '
0

Exit code: 1

  1. Create folder structure:
    main\lib
  2. In lib put the attached file 'wintir.rb' file in
  3. In Main puts the attached file 'close_msgbox.rb' in
  4. Execute close_msgbox.rb
  5. Error appears in Win32API

Note:
This does not occur in Ruby 1.86
The code is trying to close a msgbox opened from a IE
=end


Files

close_msgbox.rb (337 Bytes) close_msgbox.rb SamTreweek (Samuel Treweek), 01/11/2011 09:43 PM
wintir.rb (27.3 KB) wintir.rb SamTreweek (Samuel Treweek), 01/11/2011 09:43 PM
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 14 years ago

  • Status changed from Open to Rejected

=begin
You use the result of FindWindowX as the first argument at next call,
but the returned value and the first argument don't match.

 FindWindowEx = Win32API.new('user32', 'FindWindowEx', ['P'] * 4, 'L')

should be:
FindWindowEx = Win32API.new('user32', 'FindWindowEx', 'LPPP', 'L')

=end

Actions

Also available in: Atom PDF

Like0
Like0