Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when converting NSNumber to NSNumber in Operation #2

Open
drekka opened this issue Apr 2, 2013 · 0 comments
Open

Crash when converting NSNumber to NSNumber in Operation #2

drekka opened this issue Apr 2, 2013 · 0 comments

Comments

@drekka
Copy link

drekka commented Apr 2, 2013

We have been experimenting with calling the touchx:y: category method on a UIVIew from the frank console. The command we used was this

frankly_map("view:'RootView'", "touchx:y:", 510, 468)

This would crash out the app. Digging around we saw an error in the console indicating it could not convert an NSNumber to a @.

I think there is a bug in the Operation.h code. The applyToObject: and castNumber:toType:intoBuffer: methods appear to assume that if the passed argument is a NSNumber, then the type on the target method will be a primitive type. However with the touch:y: method the arguments are NSNumber objects. This causes castNumber:toType:intoBuffer: to through an error.

I think some code needs to be added to check that if the target argument type is a NSNumber object, then the passed in NSNumber can just be passed through.

For the moment we are getting around this by adding quotes so that the numbers are seen as strings like this:

frankly_map("view:'RootView'", "touchx:y:", '510', '468')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant