search for: newmethod

Displaying 13 results from an estimated 13 matches for "newmethod".

2006 Jun 18
2
Adding a instance method
Hi all, I''d like to add a instance method to class String. I should be fairly simple with class String; def newmethod; do_something ; end; end and it works perfectly if I test this independently with irb. However if I add this to my application.rb I''ll get an error like (undefined method `newmethod'' for "123456":String) What''s wrong with that? Thanks Jens -- Posted via htt...
2005 Dec 24
8
Prototype OOP example
Hi, Here is what I want to do: Labour = Class.create(); Labour.prototype = { initialize:function(name){ this.name = name; } } What I want to do is create a class called "Worker" which will inherit from "Labour", and the signature of "initialize" is "function(name, position)". May I ask what should do? Thank you all very much for the
2007 May 29
0
Branch 'as' - 6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_js_xml.c libswfdec/swfdec_tag.c player/swfplay.c
...NULL, 1, 0, { NULL, NULL, swfdec_action_return, swfdec_action_return, swfdec_action_return } }, diff-tree 91a151966efb877bc00d769a59700857e8534353 (from e43ad1b2e784b00f6ba8b9955a32ee61388269b1) Author: Benjamin Otte <otte at gnome.org> Date: Tue May 29 14:57:43 2007 +0200 reimplement NewMethod action diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index b9e19ad..42479d2 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1327,54 +1327,44 @@ fail: SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_peek (cx->frame->sta...
2007 Mar 05
0
5 commits - libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c test/trace
...{ "Decrement", NULL, 1, 1, { NULL, NULL, swfdec_action_decrement, swfdec_action_decrement, swfdec_action_decrement } }, [0x52] = { "CallMethod", NULL, -1, 1, { NULL, NULL, swfdec_action_call_method, swfdec_action_call_method, swfdec_action_call_method } }, - [0x53] = { "NewMethod", NULL }, + [0x53] = { "NewMethod", NULL, -1, 1, { NULL, NULL, swfdec_action_new_method, swfdec_action_new_method, swfdec_action_new_method } }, /* version 6 */ [0x54] = { "InstanceOf", NULL }, [0x55] = { "Enumerate2", NULL },
2007 Jun 27
0
Branch 'as' - 3 commits - libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_js_video.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_video_movie_as.c libswfdec/swfdec_video_movie.c
...wfdec_video_movie_as.c | 7 ++++--- 6 files changed, 26 insertions(+), 19 deletions(-) New commits: diff-tree ffe888d4c04af436959d7279bc4e5a8fae6d0acf (from 9bae6b7c4a6fad458140df74ac4d43d4a5491813) Author: Benjamin Otte <otte at gnome.org> Date: Wed Jun 27 13:30:54 2007 +0200 fix NewMethod action diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index b4bcc4f..376f41f 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1365,16 +1365,13 @@ swfdec_action_new_method (SwfdecAsContex constructor = swfdec_as_stack_pop (cx-...
2007 Apr 16
0
Branch 'as' - 3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
..._new_comparison_6, swfdec_action_new_comparison_7 } }, [SWFDEC_AS_ACTION_EQUALS2] = { "Equals2", NULL, 2, 1, { NULL, NULL, swfdec_action_equals2, swfdec_action_equals2, swfdec_action_equals2 } }, @@ -2220,9 +2240,11 @@ const SwfdecActionSpec swfdec_as_actions #if 0 [0x53] = { "NewMethod", NULL, -1, 1, { NULL, NULL, swfdec_action_new_method, swfdec_action_new_method, swfdec_action_new_method } }, /* version 6 */ - [0x54] = { "InstanceOf", NULL }, - [0x55] = { "Enumerate2", NULL, 1, -1, { NULL, NULL, NULL, swfdec_action_enumerate2, swfdec_action_enumera...
2007 Nov 07
0
14 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_script.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_text_field_movie.c
...LL, swfdec_action_decrement, swfdec_action_decrement, swfdec_action_decrement } }, - [SWFDEC_AS_ACTION_CALL_METHOD] = { "CallMethod", NULL, -1, 1, { NULL, NULL, swfdec_action_call_method, swfdec_action_call_method, swfdec_action_call_method } }, - [SWFDEC_AS_ACTION_NEW_METHOD] = { "NewMethod", NULL, -1, 1, { NULL, NULL, swfdec_action_new_method, swfdec_action_new_method, swfdec_action_new_method } }, + [SWFDEC_AS_ACTION_DELETE] = { "Delete", NULL, 2, 1, swfdec_action_delete, 5 }, + [SWFDEC_AS_ACTION_DELETE2] = { "Delete2", NULL, 1, 1, swfdec_action_delete2, 5...
2007 Jan 25
0
Branch 'interpreter' - 28 commits - configure.ac libswfdec/js libswfdec/swfdec_buffer.c libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_player.c
...{ "Decrement", NULL, 1, 1, { NULL, NULL, swfdec_action_decrement, swfdec_action_decrement, swfdec_action_decrement } }, [0x52] = { "CallMethod", NULL, -1, 1, { NULL, NULL, swfdec_action_call_method, swfdec_action_call_method, swfdec_action_call_method } }, [0x53] = { "NewMethod", NULL }, /* version 6 */ diff-tree f2e4bc2ff2bfa289f325e525619b79dcf4815f9c (from 568f6fdf0b44ea7cfcc87b33ed4ac09e88bbd47e) Author: Benjamin Otte <otte@gnome.org> Date: Mon Jan 22 10:23:59 2007 +0100 Implement Jump, If and Not Also includes a fix to voncert booleans t...
2007 Apr 12
0
Branch 'as' - 15 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c
...1, 1, { NULL, NULL, swfdec_action_decrement, swfdec_action_decrement, swfdec_action_decrement } }, [SWFDEC_AS_ACTION_CALL_METHOD] = { "CallMethod", NULL, -1, 1, { NULL, NULL, swfdec_action_call_method, swfdec_action_call_method, swfdec_action_call_method } }, #if 0 [0x53] = { "NewMethod", NULL, -1, 1, { NULL, NULL, swfdec_action_new_method, swfdec_action_new_method, swfdec_action_new_method } }, diff-tree 75d5878407131d54858da7a2443c9ff5e793c86c (from 1f5c7b93200bf3416a9ebad2ef079f46348a76c6) Author: Benjamin Otte <otte@gnome.org> Date: Thu Apr 12 10:51:22 2007 +0200...
2007 Oct 25
0
12 commits - libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c test/trace
...ss, proto; @@ -2856,7 +2900,7 @@ const SwfdecActionSpec swfdec_as_actions[256] = { [SWFDEC_AS_ACTION_CALL_METHOD] = { "CallMethod", NULL, -1, 1, { NULL, NULL, swfdec_action_call_method, swfdec_action_call_method, swfdec_action_call_method } }, [SWFDEC_AS_ACTION_NEW_METHOD] = { "NewMethod", NULL, -1, 1, { NULL, NULL, swfdec_action_new_method, swfdec_action_new_method, swfdec_action_new_method } }, /* version 6 */ - [SWFDEC_AS_ACTION_INSTANCE_OF] = { "InstanceOf", NULL }, + [SWFDEC_AS_ACTION_INSTANCE_OF] = { "InstanceOf", NULL, 2, 1, { NULL, NULL, NULL,...
2007 Apr 04
0
Branch 'as' - 4 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...{ "Decrement", NULL, 1, 1, { NULL, NULL, swfdec_action_decrement, swfdec_action_decrement, swfdec_action_decrement } }, + [0x52] = { "CallMethod", NULL, -1, 1, { NULL, NULL, swfdec_action_call_method, swfdec_action_call_method, swfdec_action_call_method } }, + [0x53] = { "NewMethod", NULL, -1, 1, { NULL, NULL, swfdec_action_new_method, swfdec_action_new_method, swfdec_action_new_method } }, + /* version 6 */ + [0x54] = { "InstanceOf", NULL }, + [0x55] = { "Enumerate2", NULL, 1, -1, { NULL, NULL, NULL, swfdec_action_enumerate2, swfdec_action_enumera...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...ile_get_member }, - { 0x4f, "SetMember", compile_oneliner_pop }, /* apparently the result is ignored */ - { 0x50, "Increment", compile_increment }, - { 0x51, "Decrement", compile_decrement }, - { 0x52, "CallMethod", compile_call_method }, - { 0x53, "NewMethod", NULL }, - /* version 6 */ - { 0x54, "InstanceOf", NULL }, - { 0x55, "Enumerate2", NULL }, - /* version 5 */ - { 0x60, "BitAnd", NULL }, - { 0x61, "BitOr", NULL }, - { 0x62, "BitXor", NULL }, - { 0x63, "BitLShift", NULL }, -...
2007 Mar 12
0
11 commits - libswfdec/js libswfdec/swfdec_loader.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c player/swfdebug.c player/swfdec_player_manager.c test/trace
...n_swap, swfdec_action_swap, swfdec_action_swap } }, [0x4e] = { "GetMember", NULL, 2, 1, { NULL, swfdec_action_get_member, swfdec_action_get_member, swfdec_action_get_member, swfdec_action_get_member } }, @@ -2383,7 +2508,7 @@ static const SwfdecActionSpec actions[25 [0x53] = { "NewMethod", NULL, -1, 1, { NULL, NULL, swfdec_action_new_method, swfdec_action_new_method, swfdec_action_new_method } }, /* version 6 */ [0x54] = { "InstanceOf", NULL }, - [0x55] = { "Enumerate2", NULL }, + [0x55] = { "Enumerate2", NULL, 1, -1, { NULL, NULL, NULL, s...