iOS Question Object not iniialized (UIImage)

tsteward

Well-Known Member
Licensed User
Longtime User
Not sure why this crashes.
xResizeAndCrop puts an image on pnlCroppedImage.
In B4A I didn't need to initialize

My Code is
B4X:
Dim bmpCroped As Bitmap
bmpCroped.Initialize2(pnlCroppedImage.GetBitmap)
In B4A I use
B4X:
Dim bmpCroped As Bitmap
bmpCroped = pnlCroppedImage.GetBitmap

In B4I I get this error
Error occurred on line: 556 (FeedbackEditor)
Object was not initialized (UIImage)
Stack Trace: (
CoreFoundation <redacted> + 252
libobjc.A.dylib objc_exception_throw + 56
CoreFoundation <redacted> + 0
LARA 4 -[B4IObjectWrapper object] + 136
CoreFoundation <redacted> + 144
CoreFoundation <redacted> + 292
LARA 4 +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
LARA 4 -[B4IShell runMethod:] + 448
LARA 4 -[B4IShell raiseEventImpl:method:args::] + 1648
LARA 4 -[B4IShellBI raiseEvent:event:params:] + 1580
LARA 4 __33-[B4I raiseUIEvent:event:params:]_block_invoke + 60
libdispatch.dylib <redacted> + 24
libdispatch.dylib <redacted> + 16
libdispatch.dylib <redacted> + 1068
CoreFoundation <redacted> + 12
CoreFoundation <redacted> + 1924
CoreFoundation CFRunLoopRunSpecific + 436
GraphicsServices GSEventRunModal + 104
UIKitCore UIApplicationMain + 212
LARA 4 main + 128
libdyld.dylib <redacted> + 4
)
 

tsteward

Well-Known Member
Licensed User
Longtime User
Never use Bitmap. Only B4XBitmap.

What is the output of Log(pnlCroppedImage.GetBitmap) ?
The output is:
<B4XBitmapWrapper: (null)>
 
Upvote 0
Top