chico
December 4, 2007, 2:00am
1
Hi… I’m setting the mac address in a global variable and then setting the value as an auto enter in a text field when I create a new record.
The data that shows up is this:
[Ljava.lang.Object;@8c9a7e
What happened? Gremlins? Aliens? Bad newbie programmer?
Chico
What you see is a pointer (memory address) to a Java object. That Mac address you stored was obviously not a string or not stored AS a string.
Where did you get that Mac address ? And what type is this global (media perhaps ?)
Hope this helps.
Harjo
December 4, 2007, 7:20am
3
I think he uses the free tools plugin of IT2BE.
that tool returns the mac-addresses of your computer in an array.
so if you want to store them as text you need to do this.
this is the sample code of Marcel:
var addresses = plugins.it2be_tools.client().MACAddress;
if (addresses) {
for (var i = 0 ; i < addresses.length ; i++) {
message += "MAC address " + (i + 1) + ":\t\t" + addresses[i] + "\n";
}
} else {
message += "MAC address(es):\t\tnot available" + "\n";
}
or
var addresses = plugins.it2be_tools.client().MACAddress;
yourcolumn = addresses.join(',') //will create a string of the array, with comma as seperator
chico
December 4, 2007, 5:03pm
4
That did it. High fives are errupting in the office here!
Servoy Forumers are a speedy crew!
-chico
IT2Be
December 4, 2007, 6:37pm
5
Thank you for replying for me Harjo
Chico, (almost) all plugins come with tooltips and sample code.
The tooltips appear in the status bar.
The sample code can be pushed from the Outline in the method editor.