[gme-users] getAttribute in Java
Gyorgy Balogh
bogyom at isis.vanderbilt.edu
Wed May 5 10:12:41 CDT 2004
This was a bug. I have attached the fixed gme.jar
Thanks
Gyorgy
-----Original Message-----
From: hernandf at cis.uab.edu [mailto:hernandf at cis.uab.edu]
Sent: Tuesday, May 04, 2004 10:11 PM
To: gme-users
Subject: [gme-users] getAttribute in Java
I was trying to access attributes from an atom using the Java interface,
but the function getAttribute kept returning false. The code that i used
is
JBuilderAtom gmeCredential = (JBuilderAtom)e.nextElement();
String[] temp = {""};
Vector t = gmeCredential.getStrAttributeNames();
if(gmeCredential.getAttribute((String)t.elementAt(1),temp))
JOptionPane.showMessageDialog(null,"success",
Support.APPLICATION,
JOptionPane.INFORMATION_MESSAGE);
else
JOptionPane.showMessageDialog(null,"failure",
Support.APPLICATION,
JOptionPane.INFORMATION_MESSAGE);
i hard coded the name of the attribute, but to avoid mispellings i
used a name returned from getStrAttributeNames. That function correctly
returned three attributes, but whenever i tried to get their values the
else part of the previous code was always executed.
When i traced the function calls, it returned the error: MemberNotFound
(0x8002003), but that shouldn't happen since i'm using the same names
of the attributes that are stored in the atoms. I tried to use the Mga
versions but i kept getting the same error.
The values are there, but it seems that there's a problem for accessing
them
by name, for example this following code retrieves the values:
try{
String attribute =
gmeCredential.getIAtom().getAttributes().getItem(0).getStringValue();
JOptionPane.showMessageDialog(null,attribute,
Support.APPLICATION,
JOptionPane.INFORMATION_MESSAGE);
} catch (Exception err){
Support.reportError(err);
}
am i doing something wrong?
Francisco
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
_______________________________________________
gme-users mailing list
gme-users at list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gme.jar
Type: application/octet-stream
Size: 252789 bytes
Desc: gme.jar
Url : http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20040505/919d5cc6/gme.obj
More information about the gme-users
mailing list