On Mon, May 02, 2005 at 08:53:47PM -0700, Alan None wrote:
> I just discovered Prima and am having great fun with
> it. Since I know little OOP, I began playing with the
> sample Image Viewer app in the VB and in short order
> added "zoom in/out" buttons and a "save file" option.
> Also got the InputLine to send any changes to a Label
> widget I added to the Form.
>
> But now I'm stuck: In a new application, I want to
> store changes to one or more InputLines in some data
> structures (array or hash) . At some point, I would do
> some operations on this and then save the results to a
> file, manipulate them in some way, or pass them to
> another widget. But I can't get it to work with even
> one InputLine and a simple array @textlines.
>
> If I define the array anywhere but in the event
> ('InputLine1' =>OnKeyUp) where I push data into it, I
> get a "Can't call method "execute" on an undefined
> value" when I run the app. If I define the array in
> the event where I add the data, no error but it only
> stores that one piece of data.
Hmm. I would use probably onChange notification instead of onKeyUp with
it's code being something like this:
my $self = $_[0];
$main::value = $self->text;
Where $main::value is your scalar (or array, or whatever) defined in the
main body of the program.
=Anton.
-- The moronity of the universe is a monotonically increasing function. -- Jarkko HietaniemiReceived on Tue 03 May 2005 - 08:20:22 CEST
This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:05 CET