Avatar

Correct answer by
Employee

I downloaded the current SDK and checked that the file rtchooks_controller.rb is in there. Could it be that you moved it into your app or something ?

Regarding the file rubyamf_config.rb, I think it's generated when you install the rubyamf plugin, as specified in the instructions. We don't ship the plugin embedded in the app because of copyright/licensing issues. Even if the plugin is open-source and with a very liberal license we need to submit all the code we ship to our legal department and they need to approve it, so the less external packages we ship, the easier our life is

Regarding the version of rtchooks_controller in the sample applications, yes, that version is specific for the application. The file that you are missing is basically a "template" with all the methods you need to implements.

This, for example, is the template for receiveItem:

  # Called any time publishItem is triggered on a collectionNode
  # which has been subscribed to.
  # Note that ALL MESSAGES, whether private or not,
  # are sent to server listeners.
  # messageItemVO is a simple (POJO-like) representation of a messageItem,
  # which can be deserialized via MessageItem.readValueObject();
  def receiveItem
    token = params[:token]
    roomName= params[:roomName]
    collectionName= params[:collectionName]
    item= params[:item]

    respond_to do |format|
      format.amf { render :amf => true }
    end
  end

Basically you would get the parameters, check that the message is for the room and collection you want to monitor and parse the item.

View solution in original post