Then it'll be a bit more complicated, probably. First give the feat a chooser to pick the class it applies to. Then the eval script might go something along these lines, probably in PostAttr:
perform field[usrChosen1].chosen.setfocus
~ First get the value of the attribute this class uses, add 2, and convert it to the modifier
var bonusspell as number
bonusspell = focus.field[cSplAttVal].value + 2
bonusspell = round((bonusspell -10)/2, 0, -1)
~ To handle modifiers higher than 9 you'll have to subtract from bonusspell in increments of 9. It loops around like that, right? Or do you get more than 1 bonus spell of a particular level before hitting a +10 modifier? If so, more complex still. Not near my pdfs atm, so I'll let you check on that.
~ Now go to the array value for that spell level, if it has spells > 0, then add 1 more.
if (focus.field[cMemMax].arrayvalue[bonusspell] > 0) then
focus.field[cMemMax].arrayvalue[bonusspell] += 1
endif
~ Do the same for cCastMax
if (focus.field[cCastMax].arrayvalue[bonusspell] > 0) then
focus.field[cCastMax].arrayvalue[bonusspell] += 1
endif
As always, the above is not tested by me, you'll probably have to fiddle with it, but if you can't figure out how to make it work, tell me what's giving you trouble and I'll try to help out further.