search for: qtrue

Displaying 20 results from an estimated 38 matches for "qtrue".

Did you mean: true
2004 Jul 31
3
Bug in new_work_item
Hi all, Windows 2000 Ruby 1.8.2 R7 VC++ 6.0 I noticed that if I try to call new_work_item and give the task a name that already exists, I get a segfault: C:\eclipse\workspace\win32-taskscheduler>ruby test.rb "0.1.0" test.rb:22:in `new_work_item'': NewWorkItem() function failed (Win32::TaskSchedul erError) from test.rb:22 test.rb:22: [BUG] Segmentation fault ruby
2007 Jul 21
0
[1136] trunk/wxruby2/swig/classes/App.i: Note when the Wx::App is exiting and avoid doing GC if in process of
...nbsp&nbsp&nbsp rb_obj_is_kind_of(rb_obj, cWxWindow.klass) && </span><del>-&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp rb_iv_get(rb_obj, "@__wx_destroyed__") != Qtrue ) </del><ins>+&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ! rb_ivar_defined(rb_obj, rb_intern("@__wx_destroyed__") ) ) </ins><span class="cx"> &nbsp&a...
2007 Jul 05
0
[1109] trunk/wxruby2/swig: Move marking of MenuBar from direct %markfunc to via mark_wxFrame, so
...mp;nbsp// SWIG_RubyUnlinkObjects((void *)wx_obj); - -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE rb_obj = SWIG_RubyInstanceFor((void *)wx_obj); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsprb_iv_set(rb_obj, "@__wx_destroyed__", Qtrue); </del><ins>+&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspGC_SetWindowDeleted(wx_obj); </ins><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspevent.Skip(); </span><span class="cx&quo...
2004 Nov 07
2
Problems with DeviceIoControl()
Hi all, Thanks to Wayne and Park, I''ve got something like this now: static VALUE file_set_compressed(VALUE self, VALUE rbBool){ HANDLE h; BOOL rv; DWORD dwBytesReturned; int fn; USHORT inBuf = COMPRESSION_FORMAT_DEFAULT; if((rbBool != Qtrue) && (rbBool != Qfalse)){ rb_raise(rb_eTypeError,"Argument must be true or false"); } if(rbBool == Qfalse){ inBuf = COMPRESSION_FORMAT_NONE; } fn = NUM2INT(rb_funcall(self,rb_intern("fileno"),0,0)); h = (HANDLE)_get_osfhandle(fn); // Get...
2007 May 21
0
[1026] trunk/wxruby2/swig/shared/control_with_items.i: Memory mgmt: USe __wx_destroyed__ instead of __swig_dead__; fix some
...s="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE rb_obj = SWIG_RubyInstanceFor(ptr); </span><del>-&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( rb_ivar_get(rb_obj, rb_intern("@__swig_dead__") ) == Qtrue ) </del><ins>+&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( rb_iv_get(rb_obj, "@__wx_destroyed__" ) == Qtrue ) </ins><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return; </sp...
2004 Nov 06
3
Calling CreateFile on an instance of File - possible?
...+ DeviceIoControl(). The thing is, I don''t know how to get a valid HANDLE to a instance of an already opened file. I''ve been trying something like this: static VALUE file_set_compressed(VALUE self, VALUE rbBool){ DWORD dwAttr; VALUE rbPath; HANDLE h; if((rbBool != Qtrue) && (rbBool != Qfalse)){ rb_raise(rb_eTypeError,"Argument must be true or false"); } rbPath = rb_funcall(self,rb_intern("path"),0,0); dwAttr = GetFileAttributes(StringValuePtr(rbPath)); h = CreateFile( (LPCTSTR)StringValuePtr(rbPath), FILE...
2007 Jul 20
0
[1123] trunk/wxruby2/swig/wx.i: Check sizers being marked have a ruby rep and are not internal Wx-only,
...,7 +36,8 @@ </span><span class="cx"> void GC_SetWindowDeleted(void *ptr) </span><span class="cx"> { </span><span class="cx"> VALUE rb_win = SWIG_RubyInstanceFor(ptr); </span><del>- rb_ivar_set(rb_win, wx_destroyed_sym, Qtrue); </del><ins>+ if ( rb_win != Qnil ) +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsprb_ivar_set(rb_win, wx_destroyed_sym, Qtrue); </ins><span class="cx"> } </span><span class="cx"> </span><span class="...
2006 Nov 07
0
[722] trunk/wxruby2/swig: Wx::Choice fixes for get_client_data (AF)
...;nbsp&nbsp&nbsp&nbsp&nbsplines << ''#endif'' </span><ins>+ lines << '' VALUE rb_obj = GcGetValueFromPtr(this);'' + lines << '' rb_ivar_set(rb_obj, rb_intern("@__swig_dead__"), Qtrue);'' </ins><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsplines << ''...
2006 Nov 30
0
[765] trunk/wxruby2: Fixed item_data functions for ListCtrl, plus test
..._obj; +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspbool result = self->SetItemData(row, item_data); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( result ) +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return Qtrue; +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturn Qnil; + }&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </ins><span class="cx"> } </span><span class="cx"> </span><ins>+%markfunc wxLi...
2005 Aug 21
15
New inheritance
A good number of the samples I have tested are outright or subtly broken on Windows now. I''m trying to determine what the cause is. Mostly it seems related to the initialize function not being created when it should be. Case in point: ClientDC.i The caret example won''t work at all because initialize isn''t declared any longer. If you comment out the import
2007 May 21
0
[1022] trunk/wxruby2/swig/classes/App.i: Memory mgmt: use Wx::App to mark still-alive Windows, set up Wx::THE_APP const
...mp;nbsp// SWIG_RubyUnlinkObjects((void *)wx_obj); + +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE rb_obj = SWIG_RubyInstanceFor((void *)wx_obj); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsprb_iv_set(rb_obj, "@__wx_destroyed__", Qtrue); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspevent.Skip(); + } + + + static VALUE mark_iterate(VALUE pair, VALUE arg, VALUE self) + { +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE key, val; + +&nbsp&nbsp&nbsp&nbsp&am...
2007 Mar 07
0
A note about #search vs #search_each
...mentioned on this list many moons ago, regarding searches somehow being serialized, such that a long search would cause others to wait noticeably. Anyhow, after coding both :limit and applying homegrown thread time limit monitoring, I discovered that Searcher#search_each uses rb_thread_critical = Qtrue whereas Searcher#search doesn''t. I changed my code to use TopDocs and Searcher#search and viola, concurrent searches! Cheers, Nevill
2005 Jan 20
1
ChangeNotify help wanted
Hi all, I''ve checked in some code to win32-changenotify. Unfortunately, it doesn''t work right. I need some help. I don''t understand what, exactly, I''m supposed to pass to ReadDirectoryChangesW() for the 2nd argument, nor how to read the data back out. There''s also a WCHAR issue that needs to be worked out with regards to the FileName
2007 Sep 05
0
[ wxruby-Bugs-13676 ] xrc listctrl windows custom data crash
...ta; } VALUE set_item_data(int row, VALUE ruby_obj) { if ( row < 0 || row >= self->GetItemCount() ) { rb_raise(rb_eIndexError, "Uninitialized item"); } long item_data = (long) ruby_obj; bool result = self->SetItemData(row, item_data); if ( result ) return Qtrue; return Qnil; } ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=218&aid=13676&group_id=35
2007 Jul 21
0
[1135] trunk/wxruby2/swig/mark_free_impl.i: Convert from DOS to Unix newlines
...p -void GC_SetWindowDeleted(void *ptr) -{ - VALUE rb_win = SWIG_RubyInstanceFor(ptr); - if ( rb_win != Qnil ) -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp{ -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp rb_ivar_set(rb_win, wx_destroyed_sym, Qtrue); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SWIG_RubyUnlinkObjects(ptr); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SWIG_RubyRemoveTracking(ptr); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp} -} - -// Carr...
2007 Sep 04
4
listctrl set_item_data
Hi, I have used set_item_data with ruby objects (an array) and got a crash. The reason is simple, the objects were deallocated by the GC. The easy solution would be to accept only long parameters (like the original interface). The hard is to play by the GC''s rules and increase the reference count and decrease on deletion. Regards, teki
2007 Jul 21
0
[1127] trunk/wxruby2: Move shared C++ GC functions into separate file included into wx.i
...p +void GC_SetWindowDeleted(void *ptr) +{ + VALUE rb_win = SWIG_RubyInstanceFor(ptr); + if ( rb_win != Qnil ) +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp{ +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp rb_ivar_set(rb_win, wx_destroyed_sym, Qtrue); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp} +} + +// Carries out marking of Sizer objects belonging to a Wx::Window. Note +// that this isn''t done as a standard mark routine because ONLY sizers +// that are known to belong to a still-alive window should be...
2017 Feb 02
0
[nbdkit PATCH 2/2] ruby: Support zero callback
...gin_rb_trim (void *handle, uint32_t count, uint64_t offset) } static int +plugin_rb_zero (void *handle, uint32_t count, uint64_t offset, int may_trim) +{ + volatile VALUE argv[4]; + + argv[0] = (VALUE) handle; + argv[1] = ULL2NUM (count); + argv[2] = ULL2NUM (offset); + argv[3] = may_trim ? Qtrue : Qfalse; + exception_happened = 0; + last_error = 0; + (void) funcall2 (Qnil, rb_intern ("zero"), 4, argv); + if (last_error == EOPNOTSUPP || + exception_happened == EXCEPTION_NO_METHOD_ERROR) { + nbdkit_debug ("zero falling back to pwrite"); + nbdkit_set_error (...
2007 Jul 21
0
[1137] trunk/wxruby2/swig/classes/TreeCtrl.i: Call correct shared function to check whether TreeCtrl is deleted in markfunc
...class="cx"> { </span><del>-&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE rb_obj = SWIG_RubyInstanceFor(ptr); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( rb_iv_get(rb_obj, "@__wx_destroyed__" ) == Qtrue ) </del><ins>+&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( GC_IsWindowDeleted(ptr) ) </ins><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return; </span><span class="cx"...
2007 Jul 20
0
[1125] trunk/wxruby2/swig/shared/control_with_items.i: Avoid MSW crashes when unexpected object is returned by SWIG tracking
...uot;> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE rb_obj = SWIG_RubyInstanceFor(ptr); </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( rb_iv_get(rb_obj, "@__wx_destroyed__" ) == Qtrue ) </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return; </span><del>-&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspfflush(stdout); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp...