Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider making it possible to write an Adam function row_factory() that does what GG::RowFactory's do #34

Open
tzlaine opened this issue Aug 19, 2012 · 1 comment
Assignees
Milestone

Comments

@tzlaine
Copy link
Owner

tzlaine commented Aug 19, 2012

It might look something like this:

row_factory(type, parameters) {
if (type == @regular_row) {
retval: make_empty_row(parameters);
retval = append_control(retval, edit_text());
retval = apply_row_state(parameters.state);
return retval;
} else if (type == @add_row) {
retval: make_empty_row(parameters);
expression: "insert(%1%, size(%1%) - 1, {value: size(%1%) - 1, state: ["Edit me"]})" % parameters.items_cell;
retval = append_control(
retval,
control_button(name: "Add Row", bind: parameters.items_cell, expression: expression)
);
return retval;
}
}

@tzlaine
Copy link
Owner Author

tzlaine commented Aug 19, 2012

This would have the benefits of:

  1. making row elements bindable to the property sheet
  2. making the code that makes GG controls reusable, so that implementers of GG::RowFactory functions don't need to look at the implementations in src/adobe/future/widgets/source to make lookalike widgets

@ghost ghost assigned tzlaine Aug 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant