Mail Archives: djgpp/1998/11/16/06:03:42
StefanViljoen writes:
> If I have a custom datafile property defined for a datafile object,
> using the grabber, how the heck do I acces this property's value
> inside my program????
Try something like:
#define XDIM_ID DAT_ID('X','D','I','M')
char *property = get_datafile_property(&dat[index], XDIM_ID);
For example:
DATAFILE *dat = load_datafile("filename.dat");
int i;
for (i=0; dat[i].type != DAT_END; i++) {
printf("Object %d has name %s, xdim %s\n", i,
get_datafile_property(dat+index, DAT_NAME),
get_datafile_property(dat+index, XDIM_ID));
}
Hope that helps...
Shawn Hargreaves.
- Raw text -