Home > Community > Forums > Custom IC SKILL > Unable to execute SKILL++ package functions from menu items...

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Unable to execute SKILL++ package functions from menu items... 

Last post Sun, Jun 28 2009 1:52 AM by ToMWUT. 2 replies.
Started by ToMWUT 27 Jun 2009 01:17 PM. Topic has 2 replies and 967 views
Page 1 of 1 (3 items)
Sort Posts:
  • Sat, Jun 27 2009 1:17 PM

    • ToMWUT
    • Top 150 Contributor
    • Joined on Mon, Apr 20 2009
    • Warsaw, Poland
    • Posts 48
    • Points 810
    Unable to execute SKILL++ package functions from menu items... Reply

    Hello,

    I've got a problem with triggering events using SKILL GUI functions. There is no problem for me to execute a SKILL function using menu item created like this:

    item_ekstrakcja = hiCreateMenuItem( ?name 'item_ekstrakcja ?itemText "Extract conductiong layers" ?callback "some_function()" )

    But when I try to execute a function which is a part of a SKILL++ package, using code like this:

    item_ekstrakcja = hiCreateMenuItem( ?name 'item_ekstrakcja ?itemText "Extract conductiong layers" ?callback "toplevel('ils) some_package->some_function()" )

    I've got no results... Nothing happens...

    If there is no toplevel('ils) in my callback statement I get an error informing me that “some_package” is unbound variable... What can I do to be able to execute SKILL++ package functions?

    Thanks,

    ToM

     
    • Post Points: 20
  • Sat, Jun 27 2009 1:36 PM

    Re: Unable to execute SKILL++ package functions from menu items... Reply
    You can't use toplevel to do this; it's a bit like starting a new shell, and the statements that follow will only get executed when the toplevel returns, and are not executed within the new toplevel.

    Instead you need to use the inScheme macro.

    So do

    item_ekstrakcja =hiCreateMenuItem( ?name 'item_ekstrakcja ?itemText "Extractconductiong layers" ?callback "inScheme(some_package->some_function())" )

    Note that if the package variable was exported with importSkillVar you should also be able to directly call it from SKILL without needing the inScheme.

    Regards,

    Andrew
    • Post Points: 20
  • Sun, Jun 28 2009 1:52 AM

    • ToMWUT
    • Top 150 Contributor
    • Joined on Mon, Apr 20 2009
    • Warsaw, Poland
    • Posts 48
    • Points 810
    Re: Unable to execute SKILL++ package functions from menu items... Reply

     Worked - thanks :)

    ToM

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by ToMWUT at 27 Jun 2009 01:17 PM. Topic has 2 replies.