Custom Query (162 matches)
Results (28 - 30 of 162)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#179 | fixed | ActiveBasic.Windows.UIでEventHandlerを使用するとコンパイルエラーになる | ||
Description |
ablibから問題の発生する最小限のコードを抜き出すと次のようになります。 Namespace ActiveBasic Namespace Windows Namespace UI TypeDef EventArgs = System.EventArgs TypeDef EventHandler = System.EventHandler Class Control Private finalDestroy As EventHandler Sub RegisterUnassociateHWnd(owner As Control) If IsNothing(owner) = False Then Dim e = New EventHandler(AddressOf(UnassociateHWndOnEvent)) If IsNothing(finalDestroy) Then owner.finalDestroy = e Else owner.finalDestroy += e End If End If End Sub Sub UnassociateHWndOnEvent(sender As Object, e As EventArgs) End Sub End Class End Namespace 'UI End Namespace 'Widnows End Namespace 'ActiveBasic EventArgs/EventHandlerを使用するイベントが全く実装できないため、優先度高にしました。 |
|||
#177 | fixed | Thisを使用してのデリゲートの作成がうまくいかない | ||
Description |
以下のコードでTest (This)とTest (Implicit This)のときにTarget()で出力されるObjPtr(This)とxの値がおかしい。 #console Delegate Sub MyDelegate() Class MyClass Public Sub Test() Print "[Test] This: " + Hex$(ObjPtr(f)) Print "[Test] x: " + Hex$(f.x) Print "----Test (This)----" Dim h = New MyDelegate(AddressOf(This.Target)) h() Print "----Test (別オブジェクト)----" Dim r = This Dim i = New MyDelegate(AddressOf(r.Target)) i() Print "----Test (Implicit This)----" Dim j = New MyDelegate(AddressOf(Target)) j() End Sub Sub Target() Print "[Target] This: " + Hex$(ObjPtr(This)) Print "[Target] x: " + Hex$(x) End Sub x As DWord End Class Dim f = New MyClass f.x = &hc0ffee f.Test() Print "----Global----" Dim h = New MyDelegate(AddressOf(f.Target)) h() System.Console.ReadLine() |
|||
#175 | fixed | ジェネリック型Listを関数の戻り値にすると基本型の場合にエラーとなる | ||
Description |
下記のテストにおいてTest1のケースでエラーとなる ' ↓ ここからプログラムが実行されます Imports System Imports System.Collections.Generic /* Test1 */ Function Test1() As List<Byte> Dim bArray As List<Byte> bArray.Add(1) Return bArray End Function Dim a = Test1() Console.WriteLine( a[0] ) /* Test2 */ Function Test2() As List<String> Dim strArray As List<String> strArray.Add("test") Return strArray End Function Dim b = Test2() Console.WriteLine( b[0] ) Sleep(-1) |
Note:
See TracQuery
for help on using queries.