Anton Yalyshev [JB]
06/16/2020, 6:59 AMPatrick
06/16/2020, 8:00 AMaleksey.tomin
06/17/2020, 7:10 PMinfo.plist
I’ve set icon for application in Launchpad, file - /Applications/my.app/Contents/Resources/main.icns
If I try to set by
val iconUrl = NSURL(fileURLWithPath = "file:///Applications/my.app/Contents/Resources/main.icns")
app.setApplicationIconImage(NSImage(contentsOfURL = iconUrl))
I have NPE
If I try to set by
val iconUrl = NSURL(fileURLWithPath = "file:///Applications/my.app/Contents/Resources/main.icns")
app.setApplicationIconImage(NSImage(byReferencingURL = iconUrl))
I have error
Cannot lock focus on image <NSImage 0x7f9d75af1370 Size={0, 0} Reps=()>, because it is size zero.
How I can set icon?basher
06/17/2020, 7:15 PMfile://
basher
06/17/2020, 7:16 PMMananpoddarm
06/18/2020, 7:40 AMTfLiteTensorCopyToBuffer(output_tensor, voidPtr1, 5u)
val stableRef3 = voidPtr1.asStableRef<Map<Int,Any>>()
val outputs1 = stableRef3.get()
when I try to print this outputs1 variable, I am getting "trying to access inaccessible/invalid location" what is wrong with printing above variable to console.(I have disposed stableRef3) I don't know what memory leak is generated by printing a variable to console.napperley
06/22/2020, 2:59 AMMananpoddarm
06/22/2020, 6:55 AMtypedef struct {
libnative_KNativePtr pinned;
} libnative_kref_kotlin_collections_List;
I can access libnative_kref_kotlin_collections_List in my c code by including the header but I am not sure on how I can pass listOf strings to this. Is there any documentation around how to access and use the data classes from Kotlin native in c code?
I am trying to write something like below in my c code :
vector<string>recentTasksV;
recentTasksV.push_back("hello");
libnative_kref_kotlin_collections_List recentTasks = libnative_kref_kotlin_collections_List(recentTasksV) ;aleksey.tomin
06/22/2020, 12:50 PMDominaezzz
06/23/2020, 5:43 PMarmeabi-v7a
instead of armeabi
for androidNativeArm32()
targets?Mananpoddarm
06/24/2020, 9:17 AMMananpoddarm
06/26/2020, 11:26 AMPaul Woitaschek
06/26/2020, 2:31 PMPaul Woitaschek
06/26/2020, 2:39 PMPaul Woitaschek
06/27/2020, 5:39 AMTarun Singal
06/28/2020, 7:30 PMSebastien Leclerc Lavallee
06/29/2020, 4:41 PMSnapshots
✗ testSnapshot, App crashed in konan::abort()
I’m running the same tests from inside Xcode or with the command line and it’s working fine. Only with Fastlane does it crash.
How can I see where the common code crashed? Where is this happening?
Thanks!tylerwilson
06/29/2020, 5:23 PMaleksey.tomin
06/30/2020, 5:19 AM$ plutil Info.plist
Info.plist: OK
But in application console I can read
system_profiler[36860:3573263] There was an error parsing the Info.plist for the bundle at URL <0x7f8d0e73dde0>: NSCocoaErrorDomain - 3840
I think I have got a conflict app.kexe and Info.plist
How can I get detail error message?serebit
07/02/2020, 5:11 PMribesg
07/03/2020, 9:06 AMUIView.intrinsicContentSize
in a UIView
subclass in Kotlin? You can override (some?) functions with the @ObjCAction
trick but what about extension properties?salomonbrys
07/12/2020, 10:30 AMinterface Foo {
@Throws(CancellationException::class, MyException::class)
suspend fun bar(param: Int): String
}
This interface gets translated thusly in Swift:
public protocol Foo {
/**
@note This method converts instances of CancellationException, MyException to errors.
Other uncaught Kotlin exceptions are fatal.
*/
func bar(param: Int32, completionHandler: @escaping (String?, Error?) -> Void)
}
I can (and do) implement this interface in Swift, creating a class with coroutine functions that I can use in Kotlin (btw, blown away by the fact that it actually works, amazing job!).
What I don't see, however, is how can the bar
function use the completionHandler
with a MyException
. In other words, I need to express a async failure in Kotlin. In other other words, the bar function may fail asynchronously, and I need the coroutine (not the callback) to throw a MyException
:
class SwiftFoo : Foo {
func bar(param: Int32, completionHandler: @escaping (TCPSocket?, Error?) -> Void) {
someSwiftAsyncApi(param) { result in
if let result = result { completionHandler(result, nil) }
else { completionHandler(nil, MyException("someSwiftAsyncApi failed!")) } // TYPE ERROR
}
}
}
This does not compile because MyException
is not a Swift Error
.
Any way to do this?saket
07/18/2020, 6:11 AMaleksey.tomin
07/20/2020, 11:09 AMimport platform.posix.NI_NUMERICHOST
import platform.posix.NI_NUMERICSERV
import platform.posix.getnameinfo
allowed in macOS/linux but for windows I have to use
import platform.windows.NI_NUMERICHOST
import platform.windows.NI_NUMERICSERV
import platform.windows.getnameinfo
How can I write the same code for both platforms?
PS: 1.3.72aleksey.tomin
07/20/2020, 11:50 AMserebit
07/22/2020, 10:32 PMnatario1
07/23/2020, 12:37 PMcinteropA
, its depends are ok.
• Then I call cinteropB
, and I can see that its depends include A ? Why would they do so?
• If I call cinteropC
, it will be set to depend on A and B... 😄
Now I can definitely see the circular dependencies, but they come from the plugin - not me. How can I workaround this problem? @Artyom Degtyarev [JB]
It even breaks with a single cinterop library.
• Clean env, call cinterop task, depends are OK
• Call cinterop task again, depends now include the lib itself!
• Call cinterop task again, circular dependency detected.BradW
07/23/2020, 11:46 PMA problem occurred evaluating project ':common'.
Unknown target name: zephyr_stm32f4_disco
Piasy
07/26/2020, 7:12 AMMarc Knaup
07/28/2020, 5:31 PMcompileOnly
dependencies in K/N?
The idea is to provide extension functions in a library for classes that may or may not exist in the library consumer’s project depending on other libraries that are included.