[Arsperl-users] Problem with 7.x enum list with gaps (was: Re: Errors opening a form)
Brought to you by:
jeffmurphy
|
From: Michiel B. <mic...@gm...> - 2007-08-26 08:32:36
|
Excuse me, here is my message one more time. sf.net keeps sending messages to me that they've blocked and removed .zip and .pl attachments. I guess I also ran into a problem with the 7.x Enum field when it contains gaps and I have attached a .def file and a perl script to explain it. The list of enum values that is returned when you do an ars_GetField call on a enum field with gaps between the values is empty. Regards, Michiel Here's the perl script: --------- use ARS; use strict; use warnings; use Data::Dumper; my $ctrl = ars_Login( shift, shift, shift ) || die "login: $ars_errstr"; my $schema = "MB:Test"; foreach ('Conventional Enum', 'Enum With Gaps') { print "Fetching values for $_\n"; ( my $fid = ars_GetFieldByName( $ctrl, $schema, $_ ) ) || die $ars_errstr; ( my $field = ars_GetField( $ctrl, $schema, $fid ) ) || die $ars_errstr; print Dumper ( @{ $field->{limit}{enumLimits}{regularList} } ); my @enumvals = @{ $field->{limit}{enumLimits}{regularList} }; print "Status values $_: " . join( ',', @enumvals ) . "\n"; } |