Ticket #1769 (reopened bug)

Opened 4 years ago

Last modified 4 years ago

Getting get_integer() not implemented in class 'XXXXX' when using "morph"

Reported by: bluescreen Owned by:
Priority: normal Milestone:
Component: none Version: 2.4.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform: linux

Description

Using the following code its enough to trigger the get_integer error:

.namespace[]

.sub main
     .local pmc obja, objb
     $P0 = newclass 'Object1'
     $P1 = newclass 'Object2'
     obja = new $P0
     objb = new $P1
     morph obja, objb
     .return()
.end

Change History

follow-up: ↓ 2   Changed 4 years ago by nwellnhof

  • status changed from new to closed
  • resolution set to fixed

The second argument of morph should be a Class object ($P1 in the code above). I tried to make the documentation a bit clearer in r48778.

in reply to: ↑ 1   Changed 4 years ago by bluescreen

  • status changed from closed to reopened
  • resolution fixed deleted

Replying to nwellnhof:

The second argument of morph should be a Class object ($P1 in the code above). I tried to make the documentation a bit clearer in r48778.

Now if I try with the class instead I get: "Attempt to create PMC Proxy for invalid type number!"

.namespace[]

.sub main
     .local pmc obja, objb
     $P0 = newclass 'Object1'
     $P1 = newclass 'Object2'
     obja = new $P0
     morph obja, $P1
     $P2 = find_method obja, 'nameMe'
     obja.$P2()
     .return()
.end

.namespace ['Object2']

.sub 'nameMe' :method
     say "Object2"
.end

  Changed 4 years ago by nwellnhof

Yes, I get the same result. Morphing objects is simply not supported.

Note: See TracTickets for help on using tickets.