9.6 component level Defines trigger

Author: zoltan.seres@gmail.com (ZoliZoli)

Hi, I have recently installed 9.6.01 and tried to compile sources with "#define" in the component level Defines trigger but the following error happens: (FIND) 1 message/info (FIND) error: 1000 - Syntax error (Statement not valid) error: 1112 - Total Proc compile errors: 1. phase completed with error-code -1 If I move the #define statement into the Operations trigger then the compile is successful. The same component compiles without any error on 9.5.01. Anybody experienced such an issue? Thanks in advance, Zoltan

9 Comments

  1. Hi Zoltan, can you give us some more details (which patch-level you use, what is the #define statement you use). I just gave it a try and under 9.6.01X101 the following worked fine: #define test = 12


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. Hallo Ulrich, thanks for coming back on this quickly! See my configuration below: [startup] ====================================================================== [startup] Date/time : 2013-07-25 14:25:45.79 [startup] Uniface : [MSW] 9.6.02.01, (May 24 2013), $ioprint=0 [startup] Command : \usys9601\common\bin\idf.exe /asn=\9601\adm\idf.asn, pid=8916 [startup] Directory : \cvs\9601\ [startup] OS : Windows 7 Service Pack 1 (Build 7601) [startup] Processor : Intel64 Family 6 Model 30 Stepping 5, Intel(R) Core(TM) i7 CPU 20 @ 1.60GHz, 8124 Mb [startup] ====================================================================== 2013-07-25 14:25:45.75 - Uniface session started My small test form contains a button and a the code below only: In the component level defines trigger: #define DEFC="Component Level Define" In the Local Proc Module: entry FIND message/info end The compile time error is shown above. compile Form: 'TEST02' Form: TEST02 Phase 2: Model definitions Phase 3: Prep. structure Phase 4: Form definitions Phase 5: Background text Phase 6: Component variables Phase 7: Procs compilation (FIND) 1 message/info (FIND) error: 1000 - Syntax error (Statement not valid) error: 1112 - Total Proc compile errors: 1. phase completed with error-code -1 1114 - ****** NO NEW COMPONENT CREATED ******* Compile done: [info 0, warnings 0, errors 1] If I move the #define into the Local Proc Module then no compile time error reported and the test form works as expected. The same form work in my 9.5.01 environment. It looks really odd to me. Thanks in advance for any hint! Cheers, Zoltan


    Author: ZoliZoli (zoltan.seres@gmail.com)
  3. Hi Zoltan, unfortunately, this forum "eats" the less and greater signs and anything in between, so I can only guess. You use 9.6.02.01 and I used the same version. I copied your code and added the DEFC in less/greater after the message/info and it compiled without problems and the proc listing looks as expected: [ 1]****** entry FIND [ 2] 1 message/info "Component Level Define" [ 3] 2 end So what's different in your environment? Do you have defined DEFC somewhere else(globally) as an empty string?


    Author: ulrich-merkel (ulrichmerkel@web.de)
  4. Hello, we use the Defines trigger in most of our (over 3500) components. We have recently migrated our applitacation from U95 to U9.6.01 and these constants seems to work fine (we haven't noticed any problem of this kind so far). So I would search for your code, maybe some kind of typo? Maybe export of your form would help the commuity to find a problem. Or you can always open a support case for an issue. Wink I have noticed the directory cvs... do you use a cvs sw? Might it be, cvs corrupted your source code (during migration)? What king of cvs do you use? In any case I would recommend just to double check the source code in U96 if it is really exactly the same as in U95. Kind regards, Zdeněk


    Author: sochaz (zdenek.socha@fullsys.cz)
  5. Hi Uli, Zdeněk, first of all thanks for your answers! I use cvs and UD6 source code management software from march-hare.com too. To exclude all those additions I have installed a new 9.6.02 env. with plain solid.db and created a very simple test form again from scratch with only 2 buttons and a message/info . CLDT is defined as #define CLDT = "Component Level Defines Trigger" in the Component Level Define trigger. this is the result of my compile: Compile Form: 'TEST' Form: TEST Phase 2: Model definitions Phase 3: Prep. structure Phase 4: Form definitions Phase 5: Background text Phase 6: Component variables Phase 7: Procs compilation (MESSAGE) 1 message/info (MESSAGE) error: 1000 - Syntax error (Statement not valid) error: 1112 - Total Proc compile errors: 1. phase completed with error-code -1 1114 - ****** NO NEW COMPONENT CREATED ******* Compile done: [info 0, warnings 0, errors 1] I do not see the #define in the source code if I do a xml export but it's there in solidDB. Very stange...I'm going to create a support case. below is the record from the solid.db. You can find the #define CLDT = "Component Level Defines Trigger" at the very end. select * from UFORM where ULABEL = 'TEST'; 2013-07-29 14:20:04.37 2013-07-29 14:19:30.99 TEST (null) (null) (null) (null) (null) (null) (null) 3 1 35 85 N N (null) (null) Y (null) (null) (null) (null) (null) (null) (null) N (null) F (null) 0 #Comment ---------------------------------------------- #Comment start_of_references #ifdefined TEMPLATENAME #info symbol TEMPLATENAME is already or also defined as a global or local constant #endif #define TEMPLATENAME= #Comment #Comment end_of_references #Comment ---------------------------------------------- #Comment start_of_mappings #Comment end_of_mappings #Comment ---------------------------------------------- #Comment start_of_symbols #Comment end_of_symbols #Comment ---------------------------------------------- #ifdefined frmEntity ; Generated three tier component: Delegate clear() to FRM Subtype. ; This allows a uniform implementation that can be invoked ; by other objects too (for example, by a 'Clear' Button). $collhandle("<frmEntity>")->clear() #else clear #endif #ifdefined frmEntity ; Generated three tier component: Delegate load() to FRM Subtype. ; This allows a uniform implementation that can be invoked ; by other objects too (for example, by a 'Load' Button). $collhandle("<frmEntity>")->load() #else retrieve if ($status < 0) message $text(1762) ;error endif #endif #ifdefined frmEntity ; Generated three tier component: Delegate load() to FRM Subtype. ; This allows a uniform implementation that can be invoked ; by other objects too (for example, by a 'Load' Button). $collhandle("<frmEntity>")->load() #else retrieve if ($status < 0) message $text(1762) ;error endif #endif #ifdefined frmEntity ; Generated three tier component: Delegate save() to FRM Subtype. ; This allows a uniform implementation that can be invoked ; by other objects too (for example, by a 'Save' Button). $collhandle("<frmEntity>")->save() #else store if ($status < 0) message $text(1500) ; error rollback else if ($status = 1) message $text(1723) ; no change else commit if ($status < 0) rollback else message $text(1805) ; Ok endif endif endif #endif #ifdefined frmEntity ; Generated three tier component: Delegate deleteall() to FRM Subtype. ; This allows a uniform implementation that can be invoked ; by other objects too (for example, by a 'Delete All' Button). $collhandle("<frmEntity>")->deleteall() #else erase if ($status < 0) message $text(1763) ;error rollback else if ($status = 1) message $text(1634) ;not allowed else message $text(1806) ;Ok commit endif endif #endif #ifdefined frmEntity ; Generated three tier component: Delegate save() to FRM Subtype. ; This allows a uniform implementation that can be invoked ; by other objects too (for example, by an 'OK' Button). if ($formmod) $collhandle("<frmEntity>")->save() ; save modifications if ($status < 0) ; check negative status from Save() return (-1) endif endif exit (0) #else #endif entry message message/info <CLDT> end &uFRM;TYP=E&uSEP;NAM=DUMMY.EROS&uSEP;WID=48&uSEP;HEI=4&uSEP;HOC=48&uSEP;VOC=4&uFRM; &uFRM;TYP=F&uSEP;NAM=MESSAGE&uSEP;WID=12&uSEP;HEI=2&uFRM; &uFRM;TYP=F&uSEP;NAM=QUIT&uSEP;WID=12&uSEP;HEI=2&uFRM; #DEF CAPTION=&uSEP;CANRESIZE=&uSEP;CANICONIZE=&uSEP;CANZOOM=&uSEP;CANCLOSE=&uSEP;SYSMENU=&uSEP;IMAGE=&uSEP;MODAL=F&uSEP;ATTACHED=&uSEP;UTYPE=&uSEP;DIRECTION=&uSEP;SPLIT= #include U:zProcError ; Report an unexpected failure in a proc statement. #define CLDT = "Component Level Defines Trigger"


    Author: ZoliZoli (zoltan.seres@gmail.com)
  6. well, in the past sometimes there was a strange situation where it looked like the compiler skipped a couple of codelines. Noone really found out why but the only cure was to retype the complete code of this trigger. Another one of the mysteries of unifaceland.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  7. Hi Zoltan, Is it possible that you have an outdated meta dictionary in your repository? I would advise you to import the umeta.xml provided with Uniface 9.6 (can be found in \uniface\misc), perform a Analyze Model, and create a new URR file (if required). Another workaround is to use standardized deployment with the IDF. This can be done by using the ASN setting $SEARCH_RESOURCES = resources_first or resources_only, and adding the usys:usys.uar and usys:uidf.uar to the [RESOURCES] locations. I hope this helps. Kind regards, Daniel Uniface Customer and Sales Support


    Author: diseli (daniel.iseli@uniface.com)
  8. ZoliZoli said (FIND) 1 message/info (FIND) error: 1000 - Syntax error (Statement not valid)

    Hi Zoltan First, switch on proclisting level 2 Utilities->Preferences->Component-Editor->Generate Proc Listing Type 2 Then change the "message" statement to *) #define NEW_CLDT = 'Component Level Defines Trigger' message/info "<NEW_CLDT>" Does UnifAce compile this statement? Have a look into proc listing, can yoe this line: message/info "'Component Level Defines Trigger'" If not, UnifAce in deed do have a bug If yes, move the define to the global define trigger and repeat the compile Still the rigth statement in proc listing? If yes, play a little bit with #define CLDT = "Component Level Defines Trigger" May be there is a unsupported character in it? *) I hope this less and greater signs are working in this forum:-) This statement should like message/info "[NEW_CLDT]", where the square brackest are the less and greater sign regards Ingo


    Author: istiller (i2stiller@gmx.de)
  9. Hi, I had same problem today with Uniface 9.6.02.02 (patch x202), repository MSS. I tried these 2 steps: "I would advise you to import the umeta.xml provided with Uniface 9.6 (can be found in \uniface\misc), perform a Analyze Model" from diseli post http://unifaceinfo.com/forum/uniface9/9-6-component-level-defines-trigger/#p6047761 and it seems ok now. Thanks. Regards, vz.


    Author: vz2008 (v.zapotocky@infos2001.cz)