view · edit · sidebar · attach · print · history


<< Masa.20120224-fix-migel-view-atc-overview-oddb_org-drop-crawler-request-sbsm | Index | Masa.20120222-fix-grid_rg-htmlgrid-update-readme-ydpm >>

  1. Fix grid.rb htmlgrid
  2. Debug
  3. Check all views with grid.rb
  4. Debug ATC-‹bersicht list

  1. Added Rose logo pictures in doc/resources/zurrose directory (
  2. Changed default logo directory from doc/resources/logos to doc/resources/zurrose and fixed to add new mail_order_price (
  3. Fix Composite#compose method for grid.rb to work correctly (htmlgrid)
  4. Added th_pathinfo in lookandfeelbase.rb to fix subheader style when grid.rb is used (
  5. Added th_percent_exfactory, th_percet_public in lookandfeelbase.rb for price_history view with grid.rb (
  6. Fix Grid#set_row_attributes method. Debugged ArgumentError: wrong number of arguments (3 for 2) when grid.rb is used (htmlgrid)
  7. Fix Recycle Object Error when home-admin is clicked from Benuter view (
  8. Fix Grid#set_colspan for nil argument (htmlgrid)
  9. Fix lookandfeelbase.rb for grid.rb to work correctly in admin/galenic_group view (

Fix grid.rb htmlgrid


  • fix Grid#add_style

Problem (z.B.)

 module ODDB
   module View
     module Admin
 class LoginForm < HtmlGrid::Form
    [0,0]   =>  :email,
    #[0,1]   =>  :pass,
    #[1,2,0] =>  :remember_me,
    #[1,2,1] =>  'remember_me',
    #[1,3]   =>  :submit,
    #[1,4]  =>  :password_lost,
   CSS_MAP = {
    [0,0,2,5] =>  'list',
  • If the 3rd and 4th values of CSS_MAP is added, the CSS_MAP will not be applied.
  • The following looks going well, but the second field of the grid (HtmlGird::Input) does not have 'class'= list' attribute
   CSS_MAP = {
    [0,0] =>  'list',
  • This results in the a little bit narrower look and feel


Error (with grid.rb)

error in SBSM::Session#to_html: /de/gcc/patinfos/range/a
wrong number of arguments (3 for 2)
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/grid.rb:288:in `set_row_attributes'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/list.rb:72:in `block in compose_list'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/list.rb:65:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/list.rb:65:in `each_with_index'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/list.rb:65:in `compose_list'



  • Debugging during checking all the view with grid.rb

Error (both grid.c, grid.rb)

error in SBSM::Session#to_html: /de/gcc/addresses/
undefined method `time' for #<Array:0x00000007289388>
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/stub.rb:113:in `method_missing'
/home/masa/ywesee/ `time'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:68:in `create'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:283:in `compose_component'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:212:in `block in compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:205:in `each'

Check data type

  • bin/admin
ch.oddb>{|ad| ad.class}.uniq
-> [ODDB::AddressSuggestion, Array]
ch.oddb>{|ad| ad.is_a?(Array)}.length
-> 1
ch.oddb>{|ad| ad.is_a?(Array)}.first.class
-> Array
ch.oddb>{|ad| ad.is_a?(Array)}.first.odba_id
-> 28237279
ch.oddb> address_suggestion(28237279).class
-> Array
ch.oddb> delete_address_suggestion(28237279)
-> Array
ch.oddb>{|ad| ad.is_a?(Array)}.length
-> 0


  • No need to fix source code


  1. login
  2. click Admin->Benuter
  3. click Admin-Home
error in SBSM::Session#to_html: /de/gcc/home_admin/
0x3fa81888dc90 is recycled object
(drbssl://localhost:9997) /usr/lib64/ruby/1.8/drb/drb.rb:375:in `_id2ref'
(drbssl://localhost:9997) /usr/lib64/ruby/1.8/drb/drb.rb:375:in `to_obj'
(drbssl://localhost:9997) /usr/lib64/ruby/site_ruby/1.8/odba/drbwrapper.rb:70:in `to_obj'
(drbssl://localhost:9997) /usr/lib64/ruby/1.8/drb/drb.rb:1402:in `to_obj'
(drbssl://localhost:9997) /usr/lib64/ruby/1.8/drb/drb.rb:1704:in `to_obj'


Note (for development)

  • methods of View class need two argument, model and session
  • The first arugment, model, comes from the model that is used when the View is created
  • View@model is set generally in the corresponding State class
  • But it seems that the @model of View::PayPalForm comes from the last state class
  • When we go to Benuter view then the State@model is set as DRbObject
  • Sometimes DRbObject causes Recycle Object error when the object is garbage collected from the DRb server.
  • Sometimes @model as the second argument of HtmlGrid object is used but in this case it looks that the @model is not used critically, so I set it as 'nil'

Check all views with grid.rb

  1. Admin
    1. Addressen - pointer url in Datum column
    2. Benuter
    3. Galenik - galenic_group subheader color
    4. Handelsformen
    5. Indikationen - Error
    6. Patinfo Stat
    7. Sponsor
  2. Arzt
  3. Interaktionen
  4. Medikamente
  5. MiGel
  6. Services
  7. Spital
  8. Zulassungsinhaber
  • Indikationen Error
error in SBSM::Session#to_html: /de/gcc/indications/
nil can't be coerced into Fixnum
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/grid.rb:285:in `+'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/grid.rb:285:in `set_colspan'
/home/masa/ywesee/ `compose_header'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/list.rb:49:in `compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:57:in `init'


Note (to check Ruby load path)

 ruby -e "p $:"

Debug ATC-‹bersicht list


  • ATC list is not enough



  • It looks that only the ATC codes of the first page are shown
view · edit · sidebar · attach · print · history
Page last modified on February 24, 2012, at 07:13 AM