Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Computer Aided Design - CAD > Cadence > Re: How to make...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 7 Topic 3989 of 4373
Post > Topic >>

Re: How to make a GUI open file dialog with SKILL?

by Andrew Beckett <andrewb@[EMAIL PROTECTED] > May 14, 2008 at 06:06 AM

Riad KACED wrote, on 05/12/08 02:14:
> Hi Andrew,
> 
> I think it is worth re-posting it again. The original one seems to end
> in a black hole I'm afraid ;-)
> 
> Riad.

And secondly the example of using it:

/* abSelectFileExample.il

Author     A.D.Beckett
Group      Custom IC (UK), Cadence Design Systems Ltd.
Language   SKILL
Date       Feb 15, 2008
Modified
By

An example of using abSelectFile.il

The main entry point is abSelectFileExample()

***************************************************

SCCS Info: @[EMAIL PROTECTED]
(#) abSelectFileExample.il 02/15/08.10:25:18 1.1

*/

/***************************************************************
*                                                              *
*               abSelectFileExampleCreateForm()                *
*                                                              *
*                   Create the example form.                   *
*                                                              *
***************************************************************/

procedure(abSelectFileExampleCreateForm()
let((fileName selectFile)
     fileName=hiCreateStringField(
	?name 'fileName
	?prompt "File Name"
	?callback "(abUpdateSelectFile)"
     )
     selectFile=hiCreateButton(
	?name 'selectFile
	?buttonText "Select File"
	?callback "(abSelectFileExampleSyncWithSelectFile)"
     )
     hiCreateAppForm(
	?name 'abSelectFileExampleForm
	?formTitle "Choose filename"
	?fields
	    list(
		list(fileName 0:0 405:35 105)
		list(selectFile 105:35 95:30)
	    )
	?callback list('abSelectFileExampleCB 'abSelectFileExampleCancelCB)
     )
))

/***************************************************************
*                                                              *
*           abSelectFileExampleSyncWithSelectFile()            *
*                                                              *
*  Callback for the button on the form. Sets up the link with  *
*                   the select file browser.                   *
*                                                              *
***************************************************************/

procedure(abSelectFileExampleSyncWithSelectFile()
     abSyncWithSelectFile(
	abSelectFileExampleForm
	'fileName
	nil)
)

/***************************************************************
*                                                              *
*                 abSelectFileExampleCB(form)                  *
*                                                              *
*         Callback for form. Views the specified file.         *
*                                                              *
***************************************************************/

procedure(abSelectFileExampleCB(form)
     abEndSyncWithSelectFile()
     if(isFile(form->fileName->value) then
	view(form->fileName->value)
     else
	warn("Invalid file: %s\n" form->fileName->value)
     )
)

/***************************************************************
*                                                              *
*              abSelectFileExampleCancelCB(form)               *
*                                                              *
* Callback for when form is cancelled. Breaks link with select *
*                         file browser                         *
*                                                              *
***************************************************************/

procedure(abSelectFileExampleCancelCB(_form)
     abEndSyncWithSelectFile()
)

/***************************************************************
*                                                              *
*                    abSelectFileExample()                     *
*                                                              *
*     Create the form if it doesn't exist, and display it      *
*                                                              *
***************************************************************/

procedure(abSelectFileExample()
     unless(boundp('abSelectFileExampleForm)
	abSelectFileExampleCreateForm()
     )
     hiDisplayForm(abSelectFileExampleForm)
)
 




 7 Posts in Topic:
How to make a GUI open file dialog with SKILL?
Reotaro Hashemoto <ahm  2008-05-08 08:02:39 
Re: How to make a GUI open file dialog with SKILL?
Reotaro Hashemoto <ahm  2008-05-09 07:10:40 
Re: How to make a GUI open file dialog with SKILL?
"S. Badel" <  2008-05-09 16:49:01 
Re: How to make a GUI open file dialog with SKILL?
Andrew Beckett <andrew  2008-05-09 18:42:10 
Re: How to make a GUI open file dialog with SKILL?
Riad KACED <riad.kaced  2008-05-11 18:14:59 
Re: How to make a GUI open file dialog with SKILL?
Andrew Beckett <andrew  2008-05-14 06:05:10 
Re: How to make a GUI open file dialog with SKILL?
Andrew Beckett <andrew  2008-05-14 06:06:04 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 19:50:38 CST 2008.