Close Procedure

E

ecnedad

Guest
Good day!

I have a procedure that I want to perform upon the closing of a
Schematic Window.

I have found the command hiRegCloseProc(winId 'myFunction) but it does
not work.

I hope anyone could help me with this problem.

Thank you and God bless!
 
Hi,

Could you please elaborate your usage of this command.
I suspect you're code may not be reading the desired window ID.

Best regards,
I-FAB
 
On Sep 10, 8:44 am, I-F AB <cop0...@gmail.com> wrote:
Hi,

Could you please elaborate your usage of this command.
I suspect you're code may not be reading the desired window ID.

Best regards,
I-FAB
I'm using the following command:

procedure( myFunction(win)
let( (cv x lstShapes)
cv = win~>cellView
lstShapes= setof(x cv~>shapes x~>layerName == "text")
println(list("lstShapes" lstShapes))
);let
);procedure
hiRegCloseProc(getCurrentWindow() 'myFunction)

Is this correct?
 
In article <abf2a1f0-3c0e-4822-b21f-f176b3b925ac@u36g2000prn.googlegroups.com> ecnedad <ecnedad@gmail.com> writes:
On Sep 10, 8:44=A0am, I-F AB <cop0...@gmail.com> wrote:
Hi,

Could you please elaborate your usage of this command.
I suspect you're code may not be reading the desired window ID.

Best regards,
I-FAB

I'm using the following command:

procedure( myFunction(win)
let( (cv x lstShapes)
cv =3D win~>cellView
lstShapes=3D setof(x cv~>shapes x~>layerName =3D=3D "text")
println(list("lstShapes" lstShapes))
);let
);procedure
hiRegCloseProc(getCurrentWindow() 'myFunction)

Is this correct?
The Skill window close proc is called after any internal close procs, so the
cellView may no longer be available from the window at that point.

-Pete Zakel
(phz@seeheader.nospam)

Q: How many surrealists does it take to change a light bulb?
A: Two. One to hold the girrafe and the other to fill the bathtub with
brightly colored machine tools.
 
Hi,
While trying to understand the mechanics of this function, I tried:

procedure( myFunction(win)
println( "This line should be printed!" )
) ;proc myFunction

Sure I got the line in the CIW, but wasn't a "t" also to have been
returned?
Also, using "printf" instead of "println" gave me nothing - not even
the test message.

Am I missing something here?

Regards,
I-FAB
 
On Sep 10, 4:54 pm, I-F AB <cop0...@gmail.com> wrote:
Hi,
While trying to understand the mechanics of this function, I tried:

procedure( myFunction(win)
          println(  "This line should be printed!" )
) ;proc myFunction

Sure I got the line in the CIW, but wasn't a "t" also to have been
returned?
Also, using "printf" instead of "println" gave me nothing - not even
the test message.

Am I missing something here?

Regards,
I-FAB
Thank you for the ideas and information.

What I really want to do is the following:

1. I will write note shape circle on the schematic.
2. Then when the Schematic Window is to be closed, I should do the
following before the closing:
a. Delete all the circle shapes with the layerName "text".
b. Then save the changes (deletion) so the Prompt "If the user
wants to save the changes" will not show.

Since Mr. Pete Zakel told that the window close proc is called after
any internal close procs, it could not be possible that my 'myFunction
will work.

Now, I want to know if it possible to bypass or disable the prompt
asking the user if he/she wants to save the changes?

I hope anyone could help me with this problem.

Thank you and God bless! (^_^)
 
I-F AB wrote, on 09/11/09 00:54:
Hi,
While trying to understand the mechanics of this function, I tried:

procedure( myFunction(win)
println( "This line should be printed!" )
) ;proc myFunction

Sure I got the line in the CIW, but wasn't a "t" also to have been
returned?
Also, using "printf" instead of "println" gave me nothing - not even
the test message.

Am I missing something here?

Regards,
I-FAB
You won't see the return value, because the function was not triggered by a
direct user interaction (e.g. typing in the function call, a bindkey or a menu).
So it's not supposed to show the return value.

As for printf, was it just because you had no "\n" at the end?

Regards,

Andrew.

--
Andrew Beckett
Senior Solution Architect - Cadence Design Systems Ltd (UK)
 
ecnedad wrote, on 09/11/09 02:07:
On Sep 10, 4:54 pm, I-F AB <cop0...@gmail.com> wrote:
Thank you for the ideas and information.

What I really want to do is the following:

1. I will write note shape circle on the schematic.
2. Then when the Schematic Window is to be closed, I should do the
following before the closing:
a. Delete all the circle shapes with the layerName "text".
b. Then save the changes (deletion) so the Prompt "If the user
wants to save the changes" will not show.

Since Mr. Pete Zakel told that the window close proc is called after
any internal close procs, it could not be possible that my 'myFunction
will work.

Now, I want to know if it possible to bypass or disable the prompt
asking the user if he/she wants to save the changes?

I hope anyone could help me with this problem.

Thank you and God bless! (^_^)
There are a couple of possibilities in IC5141.

dbRegPostSaveTrigger - is called after save. You could potentially do the
modification and do a save again (making sure you don't end up in an infinitely
recursive loop).
schRegPostCheckTrigger - is called after the "check" (but prior to save in a
check-and-save).

In IC613 you have better choices:

dbRegSaveTrigger - this is a pre-save trigger, so you can intercept prior to a save.
schRegPreCheckTrigger - this happens before the "check" operation in a
check-and-save.

Regards,

Andrew.

--
Andrew Beckett
Senior Solution Architect - Cadence Design Systems Ltd (UK)
 
Hi,
Why is it that the 'printf' requires a "\n" at the end to be
displayed?
I seem to uncover more questions than help solve one!
Regards,
I-FAB
 
I-F AB wrote, on 09/15/09 04:25:
Hi,
Why is it that the 'printf' requires a "\n" at the end to be
displayed?
I seem to uncover more questions than help solve one!
Regards,
I-FAB
Lines normally don't get printed until a carriage return is included - this is
to allow you to partially print a line in pieces:

printf("hello ")
printf("world ")
printf("\n")

In fact if you use:

procedure( myFunction(win)
printf( "This line should be printed!" )
) ;proc myFunction

And then:

hiRegCloseProc(hiGetCurrentWindow() 'myFunction)

then close the window, and then type:

printf("\n")

in the CIW, the message then appears. println() includes a carriage return
automatically (that's what the "ln" standards for - printing, with a newLiNe).

Regards,

Andrew.
 
In article <db56dd5b-8991-44cd-84bb-0b8021239932@2g2000prl.googlegroups.com> I-F AB <cop02ia@gmail.com> writes:
Hi,
Why is it that the 'printf' requires a "\n" at the end to be
displayed?
println() automatically appends a newline.

printf() does not.

The output buffer is flushed when a newline is encountered.

-Pete Zakel
(phz@seeheader.nospam)

De java (day zha va') n. The feeling, as you put sugar in your coffee,
that you've already put sugar in your coffee.
 

Welcome to EDABoard.com

Sponsor

Back
Top