Monday, November 08, 2010 at 12:00 AM.
system.verbs.apps.cardEditor.examples.newOKbutton
cardEditor.newObject (card.types.buttonType, "okButton", "OK", "card.close ()");
bundle { <<set up attributes of new object
local (atts);
new (tableType, @atts);
bundle { <<set up atts.objectrect
local (width, height, t, l, b, r);
local (gridOn, gridVisible, gridUnits);
cardEditor.getCardSize (@width, @height);
cardEditor.getCardGrid (@gridOn, @gridVisible, @gridUnits);
r = width - gridUnits;
b = height - gridUnits;
l = r - 60; <<60 pixels wide
t = b - 24; <<24 pixels high
atts.rect = rectangle.set (t, l, b, r)};
atts.enab = true;
atts.filc = rgb.set (-1, -1, -1);
atts.txtc = rgb.set (0, 0, 0);
atts.frmc = rgb.set (0, 0, 0);
atts.flag = true; <<it's the default button
atts.font = "Chicago";
atts.size = 12;
atts.styl = 0;
atts.fram = false;
atts.just = 1;
atts.sdwd = 0;
atts.tran = false;
atts.visi = true;
cardEditor.setObjectAttributes ("okButton", @atts)}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.