narek adonts Well-Known Member Licensed User Longtime User Dec 21, 2018 #1 Hi few issues with the NativeObject.CreateBlock method 1. why max param size is 2 ? I need more 2. Code: Dim n as NativeObject n1=n1.CreateBlock(…) n.RunMethodWithBlock(…) Sub Block_Event(args() object) as Object dim n2 as native object=sender End sub n1 is not equal to n2. I think it should so we could use the tag property 3. There are some methods which call the block several time (ex. enumerateObjectsUsingBlock, etc..) When using WaitFor to wait the event of the block it is raised only one. But when using a sub instead of WaitFor it call several time(as it should be) thank u
Hi few issues with the NativeObject.CreateBlock method 1. why max param size is 2 ? I need more 2. Code: Dim n as NativeObject n1=n1.CreateBlock(…) n.RunMethodWithBlock(…) Sub Block_Event(args() object) as Object dim n2 as native object=sender End sub n1 is not equal to n2. I think it should so we could use the tag property 3. There are some methods which call the block several time (ex. enumerateObjectsUsingBlock, etc..) When using WaitFor to wait the event of the block it is raised only one. But when using a sub instead of WaitFor it call several time(as it should be) thank u
Erel B4X founder Staff member Licensed User Longtime User Dec 23, 2018 #2 Don't use these methods. They were added before the inline OBJC feature was added. Use inline code if you need to work with blocks. Upvote 0
Don't use these methods. They were added before the inline OBJC feature was added. Use inline code if you need to work with blocks.
narek adonts Well-Known Member Licensed User Longtime User Dec 23, 2018 #3 Erel said: Don't use these methods. They were added before the inline OBJC feature was added. Use inline code if you need to work with blocks. Click to expand... I am using inline now. But the issue is that each time you run in debug mode it the compiling take too long. With nativeobjects its fast Upvote 0
Erel said: Don't use these methods. They were added before the inline OBJC feature was added. Use inline code if you need to work with blocks. Click to expand... I am using inline now. But the issue is that each time you run in debug mode it the compiling take too long. With nativeobjects its fast
Erel B4X founder Staff member Licensed User Longtime User Dec 23, 2018 #4 narek adonts said: But the issue is that each time you run in debug mode it the compiling take too long Click to expand... Only when you change the inline code. Upvote 0
narek adonts said: But the issue is that each time you run in debug mode it the compiling take too long Click to expand... Only when you change the inline code.
narek adonts Well-Known Member Licensed User Longtime User Dec 23, 2018 #5 Erel said: Only when you change the inline code. Click to expand... Aha. And its very annoying )) Upvote 0