GRC Block with Selectable Item Type

Hi all,

I made a custom block that I’d like to allow the user to select item
of. I started following in the footsteps of the copy block, but instead
having the drop down menu update the blocks ports to reflect a type
it lists the selected type as text on the face of the block, and does
update the ports at all. The block comes in by default with complex port
types, and selecting any other type does not change this. If I connect a
byte wire to the block it will cause an error, even if I select byte.

So then I looked at the agc block to see if I could find a difference.
it looks like the type selection was implemented by making different
code for each type.

I’d like to implement it the way the copy block does, but I don’t know
what’s wrong. Is there something else I should know about doing this
I’m overlooking?


Nevermind. I overlooked updating the soure/sink ports with $type in the


On Thu, Jun 25, 2015 at 4:54 PM, Richard B. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs