comparison libinterp/corefcn/octave-link.cc @ 19987:028b2302f940

inputdlg: allow input prompts of varied size, return answer as column vector (Bug 44552) * libinterp/corefcn/octave-link.cc: (__octave_link_input_dialog__): return result as column vector * scripts/gui/inputdlg.m: use prompt num elements to size rowscols value, verify inputline spec size matches prompt elements size
author John Donoghue <john.donoghue@ieee.org>
date Tue, 17 Mar 2015 21:54:53 -0400
parents 4197fc428c7d
children f7846f0ea6db
comparison
equal deleted inserted replaced
19986:8c20fb6caa16 19987:028b2302f940
398 std::list<std::string> items_lst 398 std::list<std::string> items_lst
399 = octave_link::input_dialog (prompt_lst, title, nr, nc, 399 = octave_link::input_dialog (prompt_lst, title, nr, nc,
400 defaults_lst); 400 defaults_lst);
401 401
402 nel = items_lst.size (); 402 nel = items_lst.size ();
403 Cell items (dim_vector (1, nel)); 403 Cell items (dim_vector (nel, 1));
404 octave_idx_type i = 0; 404 octave_idx_type i = 0;
405 for (std::list<std::string>::iterator it = items_lst.begin (); 405 for (std::list<std::string>::iterator it = items_lst.begin ();
406 it != items_lst.end (); it++) 406 it != items_lst.end (); it++)
407 { 407 {
408 items.xelem(i++) = *it; 408 items.xelem(i++) = *it;