subclassing NSRRemoteObject decodeRemoteValue #19
Comments
Hm, looks like this is indeed a bug in RubyMotion. Something to do with the 'changes' boolean pointer as a method argument. All the other overrides seem to work. Thanks for posting, I'll send a bug report to Laurent soon. Btw: There's no need to type out |
Removing the 'changes' boolean anyway, which should make this work again. The method'll just look like def decodeRemoteValue(remoteObject, forRemoteKey:remoteKey)
...
end |
off topic from here; but how do you decode a hash; as at present it returns nil; what I mean is [{"id":"500970c2b36c973013000006","obj":{"id":"50096e4ab36c973013000004","type":"Rejection","rejection_note":"cos it","name":"beans","chore_id":"50096e3fb36c973013000001","creator_id":"50082653b36c978ad300025b","recipient_id":"5008265ab36c97758300003c"}] obj is not an association its just a hash that is then represented into json; |
No decoding necessary, this works out of the box. Maybe you forgot to include it in the |
class Activity < NSRRemoteObject
attr_accessor :id, :obj, :created_at
def remoteProperties
super + ["id", "obj", "created_at"]
end
end is what I have; obj is decoded into nil cheers |
Strange. Could you post the server response when you fetch? Like this:
|
And unrelated: it's not recommended to define an |
Could you get it to work? |
havent had a chance to check this over; but thanks for the heads up; will cheers On Tue, Jul 24, 2012 at 6:04 PM, dan hassin <
Richard Hooker Dynamic50 Web Design and Development "Web Development made simple" Mob: +44 (0)7795063320 Dynamic50 is part of the 50Group. The 50Group covers a wide range of *** DISCLAIMER *** Dynamic50 Ltd is a limited company, registered in England and Wales, |
Old - closing this. Everything described works fine on my machine. |
why do I need to do this because I have a hash that I wish to decode
Cannot define method
decodeRemoteValue:forRemoteKey:change:' because no Objective-C stub was pre-compiled for types
v@:@@^c'. Make sure you properly link with the framework or library that defines this message.The text was updated successfully, but these errors were encountered: