V
V
Vladislav Pavlenko2016-02-27 00:22:34
Objective-C
Vladislav Pavlenko, 2016-02-27 00:22:34

Why can't I get data from my object?

Hello!
I'm trying to get data from an object. For example, in debugging "po device.deviceTypeID", which returns: "error: Execution was interrupted, reason: Attempted to dereference an invalid ObjC Object or send it an unrecognized selector. The process has been returned to the state before expression evaluation .".
When I display just the object itself, then everything is ok:

(lldb) po device
{
    applianceId = 6;
    applianceImageName = "kettle-scale-icon.png";
    appliancePowerLevel = 1;
    applianceRiskLevel = 1;
// и т.д.
8c98c3c75dfc4e14b6bf744b5213f4ec.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
An, 2016-02-27
@pavlenkovs

The fact that you forced the compiler to perdstavlyat object as DevicesModel does not mean that it became so
. You can see on the left that device is an instance of NSDictionary.
etc. You either need to fill in _rooms.devices correctly up to this point
Or rewrite the loop here so that you form the DevicesModel object from your device dictionary and already work with it

O
one pavel, 2016-02-27
@onepavel

I see that your device is a dictionary and I guess he doesn't know what deviceTypeID is

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question