[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Dialog item problem



At 17.04 -0400 1999.05.06, Noe Dinnerstein:  President, BodhiSoftWare wrote:
>SetDialogCancelItem ($dlg->window(), 1) or die "failed setting Cancel";
>SetDialogDefaultItem($dlg->window(), 2) or die "failed setting Search";
>SelectDialogItemText($dlg->window(), 4) or die "failed to set Dialog item
>text";
>}
>
>__END__
>
>When I run the script the dialog box come up, but fails on the
>SelectDialogItemText call.   I looked the call up in Inside Macintosh and
>got the following:
>
> PROCEDURE SelectDialogItemText (theDialog: DialogPtr;
>                                                      itemNo: Integer;
>			      strtSel: Integer;
>			      endSel: Integer);

You should put $^E in all your die's and warn's for toolbox calls:

  or die "failed to set Dialog item text: $^E";

That should tell you why it failed.

Oh, and while this questions is probably OK on this list, there is another
list specifically for toolbox module discussions.  See
http://www.macperl.org/ for details.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org