Hello !
perhaps this might be a n00b markaby question but...we are finding some
issues to display records with a simple space inside a view (both with
sqlite, mysql or kirbybase so it is not db related).

E.g. to have a formatted (with a simple space between the records so
nothing fancy like Stock Name  Apple Ticker  AAPL number of
stocks 10 bought at  580.13$  on  2012-04-17 Total position 5801.3)
list I have to do  something like this


def index
      kirby = KirbyBase.new
      stocks_tbl = kirby.get_table(:stocks)
      results =
stocks_tbl.select(:name,:ticker,:tradeprice,:tradedate,:quantity,:totalposition,:recno).sort(+:totalposition)
      for result in results
        text 'Stock Name &nbsp'
        text result.name
        text '&nbsp'
        text 'Ticker &nbsp'
        text result.ticker
        text '&nbsp'
        text 'number of stocks'
        text '&nbsp'
        text result.quantity
        text '&nbsp'
        text 'bought at &nbsp'
        text result.tradeprice
        text '$ &nbsp'
        text 'on &nbsp'
        text result.tradedate
        text '&nbsp'
        text 'Total position'
        text '&nbsp'
        text result.totalposition
        br


Now I am sure that there is perhaps a better way to do it ? :)
Thanks in advance
David
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to