Catching nib input?

I found a bit of documentation about catching input from an extended interface from a nib file: http://www.spiderland.org/node/2742

But I am having some problems. Particularly, I am trying to catch input from a slider bar and set it to a variable. I was wondering if anyone could point me towards a simple, clean example of how this is done. This function:

+ to catch-interface-id-xxx with-string s (string):

Makes enough sense by itself, but in InterfaceSwarm and SwarmEvolve, catch-interface-d-xxx is defined in the code, but is never called at any point. I'm guessing that there is something simple yet fundamental that I am missing.

Currently I have an interface built with interface builder, and I can set other objects (text fields) to data from the simulation, but I am unsure of how to make changes in the nib interface affect simulation variables. I've tried mimicking swarmevolve and interfaceswarm with no luck so far.

Thanks in advance for any and all help.

The "catch-interface"

The "catch-interface" methods are never called in the code, but are called automatically by the breve engine when the controls are used.

Make sure you have the ID numbers right in your nib file and in your code. Also, if you haven't already, try making a button control instead of a slider and see if that works.

- jon

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.