Get Designer Comm Mode in 8.1

Not sure if I am missing something obvious here, but it seems no matter what I do when I try to get the Gateway comm mode with DesignerGeneralProps it always returns a 2

I am thinking this is because I am instantiating a new DesignerGeneralProps and not pulling one from my context, but I cant find a prop of anything on the context that would give me those props.

I am open to ideas, but in general, I am trying to see if the designer is in read-only or read-write mode.

Here's a snippet I have laying around:

inline fun requireGatewayReadWrite(lazyMessage: () -> Any) : Boolean {
    if (GatewayConnectionManager.getInstance().connectionMode != ClientGatewayConnection.MODE_FULL) {
        val message = lazyMessage()
        ErrorUtil.showError("$message: Gateway Comm Mode is not Read/Write.")
        return false
    }
    return true
}
4 Likes