Skip to main content

Hello,

We need to extract a portion of code from the INIT operation. In Uniface 9.7 it was simple to find it with :

scan init.uform(my code to search)

and using $result for extracting our code.

But now with U10 INIT operation is moved in the script container with all other operations and triggers.

If I use :

scan uscript.uform("my code to search")

it will find first occurrence of "my code to search"  anywhere in script container instead searching only in operation INIT only

So the question is : Can we do a scan in operation INIT only ?

(don't know if my question is really clear for you  😉)

Bye

Hello,

We need to extract a portion of code from the INIT operation. In Uniface 9.7 it was simple to find it with :

scan init.uform(my code to search)

and using $result for extracting our code.

But now with U10 INIT operation is moved in the script container with all other operations and triggers.

If I use :

scan uscript.uform("my code to search")

it will find first occurrence of "my code to search"  anywhere in script container instead searching only in operation INIT only

So the question is : Can we do a scan in operation INIT only ?

(don't know if my question is really clear for you  😉)

Bye

Hi Pascal,

in U9.7 repository the INIT.UFORM field is the container of the EXEC trigger and in U10.3 AFAIK this field is remained available only to enable the migration; during the migration code from original INIT field is copied/moved into field USCRIPT.UFORM, which is containing an XML structure.
In this XML structure within the tag <SCRIPT></SCRIPT> there are "operations"; the snippet of code you are looking for is the EXEC operation, starting from "operation exec" up to the next "end".

Hope it helps...

Gianni


Hello,

We need to extract a portion of code from the INIT operation. In Uniface 9.7 it was simple to find it with :

scan init.uform(my code to search)

and using $result for extracting our code.

But now with U10 INIT operation is moved in the script container with all other operations and triggers.

If I use :

scan uscript.uform("my code to search")

it will find first occurrence of "my code to search"  anywhere in script container instead searching only in operation INIT only

So the question is : Can we do a scan in operation INIT only ?

(don't know if my question is really clear for you  😉)

Bye

That's why I don't like U10
It's all in one big "pot". Stir it a few times (by editing) and you have the mess.
Is even worser as inhertinance could not be reverser anymore by a double click.

<irony>But U10 must be better as any other text based programm language do it this way</irony>
Ingo


That's why I don't like U10
It's all in one big "pot". Stir it a few times (by editing) and you have the mess.
Is even worser as inhertinance could not be reverser anymore by a double click.

<irony>But U10 must be better as any other text based programm language do it this way</irony>
Ingo

Hi Ingo,

I agree with you.

IMHO in this case it would be nicer if the UCOMMENT field in the UFORM entity would contain a structured USCRIPT XML node instead of just all scripts in one node. Something like:
unimeta
udeclarations ... /udeclarations
uscript
exec ... /exec
store ... /store
accept ... /accept
...
/uscript
formpic ... /formpic
winprop ... /winprop
/unimeta

On each repo table: few lines of codes after reading, few lines of code before writing, an UDF to recognize the old structure while reading. My wish: could it be included into U10.4?

Gianni


That's why I don't like U10
It's all in one big "pot". Stir it a few times (by editing) and you have the mess.
Is even worser as inhertinance could not be reverser anymore by a double click.

<irony>But U10 must be better as any other text based programm language do it this way</irony>
Ingo

Hi Gianni

The simple way is to use TPLACTUAL as the proc-container 🙂
This field is already a XML-construct which holds all procs of all triggers on form-level
For a version control this is a flat text which could be compared
For self coded code to manipulate the proc code, one can use the XML/STRUCT-features of UnifAce.
And if the SQL-DBMS has XML-features you can access thsi by SQL

Ingo