I am going to investigate more. I think is has something to do with "rbase_form_action editviewunit '' '' " breaking it. I am thinking it does not like the ; with that statement. Dan Goldberg
_____ From: [email protected] [mailto:[email protected]] On Behalf Of Emmitt Dove Sent: Tuesday, April 28, 2009 11:06 AM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: createobject followup Dan, I did a presentation at last year's conference on dynamic objects. Here's my sequence for a speed button: SET VAR vcompid TEXT = 'exitbutton' SET VAR vleft INTEGER = 625 SET VAR vtop INTEGER = 490 SET VAR vwidth INTEGER = 100 SET VAR vheight INTEGER = 23 SET VAR vcaption TEXT = 'Exit' PROPERTY RBASE_FORM_ACTION makespeed ' ' -- now assign the action SET VAR vaction TEXT = 'CLOSEWINDOW;RETURN' PROPERTY exitbutton 'Custom_EEP->OnClickEEP' .vaction Note the variable vaction has a semicolon between the CLOSEWINDOW and the RETURN, no (CHAR(13)) required. Note that the "makespeed" form action is called; here is that form action (note also that the INIT immediately follows the CREATEOBJECT): SET VAR vcmd TEXT = (CTXT('CREATEOBJECT EnhancedSpeedButton')&CHAR(39)+CTXT(.vcompid)+ +CHAR(39)&CTXT('RBASE_FORM')&CTXT(.vleft)&CTXT(.vtop)&CTXT(.vwidth)&CTXT(.vh eight)) &vcmd SET VAR vcmd = (CTXT('PROPERTY')&CTXT(.vcompid)&CTXT('INIT')&CHAR(39)+ +CTXT('TRUE')+CHAR(39)) &vcmd SET VAR vcmd = (CTXT('PROPERTY')&CTXT(.vcompid)&CTXT('FLAT')&CHAR(39)+ +CTXT('FALSE')+CHAR(39)) &vcmd SET VAR vcmd = (CTXT('PROPERTY')&CTXT(.vcompid)&CTXT('CAPTION')&CHAR(39)+ +CTXT(.vcaption)+CHAR(39)) &vcmd SET VAR vcmd = (CTXT('PROPERTY')&CTXT(.vcompid)&CTXT('FONT_COLOR')&CHAR(39)+ +CTXT('PURPLE')+CHAR(39)) &vcmd SET VAR vcmd = (CTXT('PROPERTY')&CTXT(.vcompid)&CTXT('FONT_NAME')&CHAR(39)+ +CTXT('ARIAL')+CHAR(39)) &vcmd SET VAR vcmd = (CTXT('PROPERTY')&CTXT(.vcompid)&CTXT('FONT_SIZE 9')) &vcmd SET VAR vcmd = (CTXT('PROPERTY')&CTXT(.vcompid)&CTXT('FONT_BOLD')&CHAR(39)+ +CTXT('TRUE')+CHAR(39)) &vcmd SET VAR vcmd = (CTXT('PROPERTY')&CTXT(.vcompid)&CTXT('ALIGNMENT CENTER')) &vcmd SET VAR vcmd = (CTXT('PROPERTY')&CTXT(.vcompid)&CTXT('STYLE')&CHAR(39)+ +CTXT('NORMAL')+CHAR(39)) &vcmd SET VAR vcmd = (CTXT('PROPERTY')&CTXT(.vcompid)&CTXT('SHADOW_COLOR')&CHAR(39)+ +CTXT('BLACK')+CHAR(39)) &vcmd The neat thing about this custom form action is that I can call it to create any speed button, passing the component ID, location, size and caption for the button. I do this with other objects as well. Then the code that wants to create an object gets real simple . just set up the parameters and call the CFA. Emmitt Dove Manager, Converting Applications Development Evergreen Packaging, Inc. [email protected] (203) 214-5683 m (203) 643-8022 o (203) 643-8086 f [email protected] From: [email protected] [mailto:[email protected]] On Behalf Of Dan Goldberg Sent: Tuesday, April 28, 2009 1:01 PM To: RBASE-L Mailing List Subject: [RBASE-L] - createobject followup I have figured out the custom eep problem. The help file is incorrect. The semi-colon needs to be replaced with a carriage return. I use (CHAR(013)) for the carriage return. One problem solved, one to go!! Dan Goldberg _____ From: [email protected] [mailto:[email protected]] On Behalf Of Dan Goldberg Sent: Tuesday, April 28, 2009 9:22 AM To: RBASE-L Mailing List Subject: [RBASE-L] - FW: [RBASE-L] - RE: createobject I do initialize the button and can see it but the eep does not fire. I noticed that the cut and paste did not do any justice on my code. Here it is reformatted. CREATEOBJECT bitbtn 'ceditunitbtn' 'RBASE_FORM' 345 525 96 41 SET VAR vquote = (CVAL('QUOTES')) SET VAR vcommand1 TEXT = + ('PROPERTY rbase_form_action editviewunit '&vquote&' '&vquote&';RETURN') PROPERTY ceditunitbtn 'Custom_EEP->OnClickEEP' .vcommand1 PROPERTY ceditunitbtn init true PROPERTY ceditunitbtn caption 'Edit/View a Unit' Dan Goldberg

