Semen Matusovskiy Well-Known Member Licensed User Jul 18, 2019 #1 Hi, guys -- I want to replace - (BOOL) shouldAutorotate in UINavigationController by very simple code, which in Basic looks so Code: Copy If dataCommon.booleanAllowRotateTemporary Then dataCommon.booleanAllowRotateTemporary = False Return True Else Return dataCommon.booleanAllowRotate End If booleanAllowRotateTemporary and booleanAllowRotate are boolean public variables, declared in dataCommon module. I looked compiled code and converted to Code: Copy if (self->__datacommon->__booleanallowrotatetemporary) { self->__datacommon->__booleanallowrotatetemporary = false; return true; } else { return self->__datacommon->__booleanallowrotate; }; } But compiler talks: 'UINavigationController' does not have a member named '__datacommon'. Any ideas how to refer ? Last edited: Jul 18, 2019
Hi, guys -- I want to replace - (BOOL) shouldAutorotate in UINavigationController by very simple code, which in Basic looks so Code: Copy If dataCommon.booleanAllowRotateTemporary Then dataCommon.booleanAllowRotateTemporary = False Return True Else Return dataCommon.booleanAllowRotate End If booleanAllowRotateTemporary and booleanAllowRotate are boolean public variables, declared in dataCommon module. I looked compiled code and converted to Code: Copy if (self->__datacommon->__booleanallowrotatetemporary) { self->__datacommon->__booleanallowrotatetemporary = false; return true; } else { return self->__datacommon->__booleanallowrotate; }; } But compiler talks: 'UINavigationController' does not have a member named '__datacommon'. Any ideas how to refer ?
Erel B4X founder Staff member Licensed User Longtime User Jul 19, 2019 #2 Example: https://www.b4x.com/android/forum/t...ller-is-the-sidemenucontroller.97287/#content Upvote 0
Semen Matusovskiy Well-Known Member Licensed User Jul 19, 2019 #3 Erel -- Thanx for reply, but I ask not about "autorotate" feature as it is. Imagine that I want to replace Code: Copy NSDictionary* map = [B4IObjectWrapper getMap:self]; NSNumber* n = map[@"tag"]; return n.boolValue; by Code: Copy If dataCommon.booleanAllowRotateTemporary Then dataCommon.booleanAllowRotateTemporary = False Return True Else Return dataCommon.booleanAllowRotate End If How to translate dataCommon.booleanAllowRotateTemporary to objective-c ? Upvote 0
Erel -- Thanx for reply, but I ask not about "autorotate" feature as it is. Imagine that I want to replace Code: Copy NSDictionary* map = [B4IObjectWrapper getMap:self]; NSNumber* n = map[@"tag"]; return n.boolValue; by Code: Copy If dataCommon.booleanAllowRotateTemporary Then dataCommon.booleanAllowRotateTemporary = False Return True Else Return dataCommon.booleanAllowRotate End If How to translate dataCommon.booleanAllowRotateTemporary to objective-c ?
Erel B4X founder Staff member Licensed User Longtime User Jul 21, 2019 #4 Semen Matusovskiy said: How to translate dataCommon.booleanAllowRotateTemporary to objective-c ? Click to expand... Don't. Set the tag as explained in that post. Upvote 0
Semen Matusovskiy said: How to translate dataCommon.booleanAllowRotateTemporary to objective-c ? Click to expand... Don't. Set the tag as explained in that post.
Semen Matusovskiy Well-Known Member Licensed User Jul 21, 2019 #5 I use two fragments: one for ordinary NavigationController and another for SideMenuController Sometimes appears a message Code: Copy Unexpected event (missing RaisesSynchronousEvents): main_shouldautorotate It seems to me, when I replace one controller to another. So there is a wish to delete raiseEvent in Code: Copy (BOOL)shouldAutorotate { return [(NSNumber*)[B4IObjectWrapper raiseEvent:self :@"_shouldautorotate" :nil] boolValue]; } In my case Main_ShouldAutoRotate is very simple. Why not to replace to returning of global variable ? Upvote 0
I use two fragments: one for ordinary NavigationController and another for SideMenuController Sometimes appears a message Code: Copy Unexpected event (missing RaisesSynchronousEvents): main_shouldautorotate It seems to me, when I replace one controller to another. So there is a wish to delete raiseEvent in Code: Copy (BOOL)shouldAutorotate { return [(NSNumber*)[B4IObjectWrapper raiseEvent:self :@"_shouldautorotate" :nil] boolValue]; } In my case Main_ShouldAutoRotate is very simple. Why not to replace to returning of global variable ?
Erel B4X founder Staff member Licensed User Longtime User Jul 22, 2019 #6 In most cases you can ignore these warning as it is only relevant to debug mode. If you want to change the Objective C code then you will need to learn a bit about Objective C. Upvote 0
In most cases you can ignore these warning as it is only relevant to debug mode. If you want to change the Objective C code then you will need to learn a bit about Objective C.