advertisement

Article:
  Embedding F-Script into Cocoa Applications
Subject:   IBLiveMode example needed story detailing scripting
Date:   2002-08-09 10:08:25
From:   pmougin
Response to: IBLiveMode example needed story detailing scripting

Note that object# variables are not script objects. In fact they are outlets that allows you to connect from F-Script to “external” object in IB. When you establish a connection from the F-Script window to an other objet in IB (via the IB connection mechanism (i.e. CONTROL+Drag)) then the connection inspector let you assign the target of the connection to one of the object# outlets. Once this is done, the object# variable becomes defined in the F-Script workspace and will evaluates to the connected object (let’s say, for example, a button). THEN, since you now have a handle on the button, you can configure it, from F-Script, the way you like. For instance, supposing you have connected the object1 outlet to a button, you can assign the button a block as target by typing in the live mode F-Script window:

object1 setTarget:[sys beep]. object1 setAction:#value:

When the button will be pressed, the block will be evaluated and play a beep…


Note that understanding F-Script live mode is not trivial if you don’t master both F-Script basics and IB. I would recommend one to start familiarizing with the F-Script stand-alone application before experimenting more advanced features like live mode in IB.


Phil


1 to 1 of 1
  1. thanks, example gave something to chew on
    2002-08-10 08:26:50  psheldon [View]

    • thanks, example gave something to chew on
      2002-08-11 04:46:37  pmougin [View]

      • thanks, I believe # is F-scripts symbol and have distilled something
        2002-08-12 22:12:01  psheldon [View]

        • Re: thanks, I believe # is F-scripts symbol and have distilled something
          2002-08-14 10:54:48  pmougin [View]

1 to 1 of 1