in reply to Re: Object accessors with unknown data
in thread Object accessors with unknown data
So it's potentially not a great candidate for OOP?
Basically, i'm writing a Spreadsheet to Template program. I've already done it without OOP, but i thought it'd be good to have each line of the spreadsheet as an object.
In other words, I take a config file with a list of the column headings/titles. The program reads the sheet and finds the title row. Each line of the spreadsheet then becomes a hash where the key is the title, and the value is the spreadsheet value. It's then really easy to build templates from the spreadsheet. I use it a lot.
I figured i'd have each line of the spreadsheet as an object and then i could have lot's of little methods i could directly call from the template to modify the data. (Split lists etc).
The problem being i don't know what the title would be so i don't know how i'd access each attribute. The template would know as it would be written by the user in reference to the spreadsheet/config file.
Bad idea to use OOP?
Thanks for all your replies
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Object accessors with unknown data
by mbethke (Hermit) on Jan 26, 2015 at 13:24 UTC | |
|
Re^3: Object accessors with unknown data
by duelafn (Parson) on Jan 26, 2015 at 13:32 UTC | |
|
Re^3: Object accessors with unknown data
by Anonymous Monk on Jan 26, 2015 at 13:50 UTC | |
|
Re^3: Object accessors with unknown data
by Anonymous Monk on Jan 26, 2015 at 13:40 UTC |