From jon.evans at pobox.com Wed Aug 8 16:25:08 2007 From: jon.evans at pobox.com (Jon Evans) Date: Wed, 8 Aug 2007 21:25:08 +0100 Subject: [Shooting-star-users] Shooting-star and rails metor_strike plugin Message-ID: Hi, I have a rails project where users can view and edit tables of information. It already has an AJAX component to update the database on the server when a cell in the table is edited, what I want to implement with shootingstar is a system to refresh the table in any open browsers when one user edits it. So, if 5 people are viewing the same table of information and one user makes an edit, the other four browsers tables get updated with the new information. I think I've nearly got it - I now have a javascript alert in each browser when other users connect and disconnect. What I can't work out how to do is send a message to all open browsers when a record gets updated. I would also appreciate any advice as to whether I'm coding this the right way. My view contains the following code for testing: <%= meteor_strike 'appname/model', :uid => session.session_id, :tag => [@model.id], :event => %Q{ switch(params.event){ case 'enter': /* params.uid is entered to the channel with params.tag */ alert("enter: " + params.uid + ", " + params.tag); break; case 'leave': /* params.uid is left from the channel with params.tag */ alert("leave: " + params.uid + ", " + params.tag); break; case 'update': /* params.uid is updated status in the channel */ alert("update: " + params.uid); break; otherwise: alert(params.event + "event fired"); } } %> The code I'm trying in my controller, called when a record is updated, is: # this javascript updates the grid javascript = "grid.updateFromXML('/model/#{@model.id}')" Meteor.shoot 'appname/model', javascript, [@model.id] This doesn't work at all, the viewers never get any kind of notification message. It does create a new row in the meteors table though. Thanks Jon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/shooting-star-users/attachments/20070808/1ff5ba7c/attachment.html From jon.evans at pobox.com Wed Aug 8 16:28:24 2007 From: jon.evans at pobox.com (Jon Evans) Date: Wed, 8 Aug 2007 21:28:24 +0100 Subject: [Shooting-star-users] Shooting-star and rails metor_strike plugin In-Reply-To: References: Message-ID: Hi On 08/08/2007, Jon Evans wrote: > > > This doesn't work at all, the viewers never get any kind of notification > message. It does create a new row in the meteors table though. I see a new version was released as I was composing my message. :-) I'll download it and try it out... Jon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/shooting-star-users/attachments/20070808/c3757ba3/attachment.html From sa9lovex at yahoo.co.jp Fri Aug 17 00:07:02 2007 From: sa9lovex at yahoo.co.jp (nic sak) Date: Fri, 17 Aug 2007 13:07:02 +0900 (JST) Subject: [Shooting-star-users] Asteroid 'run': Function not implemented(RuntimeError) Message-ID: <20070817040703.99179.qmail@web3214.mail.kcd.yahoo.co.jp> ?????????? ?????????????????????? ?????????????????????????????????????? ?irb?Asteroid::run('127.0.0.1', 7124, Server') ???????????????? ?'run': Function not implemented(RuntimeError) ?Ruby???????????????????????????? ?# ruby extconf.rb ?# make ?# make install ------------------------------------------------ ???????????????????? ???????????????????????????????????? ?????????run?????????????????????? 1. asteroid_s_run?????? nm asteroid.so | grep run ? ?????????asteroid_s_run?????????? 2. ???????????????? ls asteroid.c asteroid.o extconf.h Makefile asteroid.h asteroid.so extconf.rb mkmf.log gem_make.out?? irb irb(main):001:0> require 'asteroid' => true irb(main):002:0> Asteroid::public_methods.include?('run') => true --------------------------------- Easy + Joy + Powerful = Yahoo! Bookmarks x Toolbar -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/shooting-star-users/attachments/20070817/93aa72ab/attachment.html From takiuchi at drecom.co.jp Fri Aug 17 02:48:04 2007 From: takiuchi at drecom.co.jp (Genki Takiuchi) Date: Fri, 17 Aug 2007 15:48:04 +0900 Subject: [Shooting-star-users] Asteroid 'run': Function not implemented(RuntimeError) In-Reply-To: <20070817040703.99179.qmail@web3214.mail.kcd.yahoo.co.jp> References: <20070817040703.99179.qmail@web3214.mail.kcd.yahoo.co.jp> Message-ID: ?????? ????? ??????????????????????? > irb > irb(main):001:0> require 'asteroid' > => true > irb(main):002:0> Asteroid::public_methods.include?('run') > => true ?????????????????Asteroid::run? ???????????????????? 'run': Function not implemented(RuntimeError) ????????????????????????????????? ????????????????C?????????????? ???????????? ????????????Makefile?asteroid.so????? ?????????????????????????????? On Fri, 17 Aug 2007 13:07:02 +0900, nic sak wrote: > ?????????? > ?????????????????????? > ???????????????????????????????????? > ?? > ?irb?Asteroid::run('127.0.0.1', 7124, Server') ?????????? > ?????? > ?'run': Function not implemented(RuntimeError) > ?Ruby???????????????????????????? > ?# ruby extconf.rb > ?# make > ?# make install > > ------------------------------------------------ > ???????????????????? > ?????????????????????????????????? > ?? > ?????????run?????????????????????? > 1. asteroid_s_run?????? > nm asteroid.so | grep run > ? ?????????asteroid_s_run?????????? > 2. ???????????????? > ls > asteroid.c asteroid.o extconf.h Makefile > asteroid.h asteroid.so extconf.rb mkmf.log gem_make.out?? > > irb > irb(main):001:0> require 'asteroid' > => true > irb(main):002:0> Asteroid::public_methods.include?('run') > => true > > --------------------------------- > Easy + Joy + Powerful = Yahoo! Bookmarks x Toolbar -- ??? DRECOM ???????????????????????? ?????????????????? E-Mail: takiuchi at drecom.co.jp Office: ?150-0013 ?????????1??23-23????????4F Tel: 03-5791-4344?Fax: 03-5791-4556 URL: http://www.drecom.co.jp/ ???????????????????? with Entertainment ?--