Curl Global Community

Full Version: View.get-default-owner が取得できない?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dialog を継承したクラスで、showメソッドをオーバーライドしたいのですが、
引数 owner? の初期値として、 {View.get-default-owner} を指定すると、
「アクセスコードが同じパッケージないため・・・」と、エラーになってしまいます。

{View.get-default-owner} を取得する方法はないのでしょうか。

Code:
{define-class public CustomDialog {inherits Dialog}
  {constructor public {default ...}
    {construct-super {splice ...}}
  }
  {method public {show
                     title:String = {host-localize "Pop-up Window"},
                     modal?:bool = true,
                     center?:bool = true,
                     owner:#View = {View.get-default-owner},
                     style:DialogStyle = DialogStyle.standard,
                     large-icon:#Pixmap = null,
                     small-icon:#Pixmap = null
                 }:void
    {super.show
        title = title,
        modal? = modal?,
        center? = center?,
        owner = owner,
        style = style,
        large-icon = large-icon,
        small-icon = small-icon
    }
  }
}
'View.get-default-owner' is not a public API for internal use only, and cannot be accessed from developers's code directly.