Thread Rating:
  • 297 Vote(s) - 2.88 Average
  • 1
  • 2
  • 3
  • 4
  • 5
null 判断をシンプルに記述したい
08-28-2013, 04:56 PM, (This post was last modified: 08-28-2013, 04:57 PM by umemura.)
#3
RE: null 判断をシンプルに記述したい
そのまま「if-non-null」のヘルプに記載されていましたか。すいません。

if-non-null 句の中で、カンマで連続してチェックできるんですね。
エラーになるので困っていたのですが、順番が重要なんですね。

Code:
{define-class public Test
  field test-a:#String
  {constructor public {default
                          str:#String = null
                      }
    set self.test-a = str
  }
}
{CommandButton
    label = "外枠クラスを先にチェック",
    {on Action do
        let t:#Test  = null
        {if-non-null t,  t.test-a then
            {popup-message "all-not-null"}
        }
    }
}

{CommandButton
    label = "フィールドを先にチェック(エラー)",
    {on Action do
        let t:#Test  = null
        {if-non-null t.test-a, t then
            {popup-message "all-not-null"}
        }
    }
}


Messages In This Thread
RE: null 判断をシンプルに記述したい - by umemura - 08-28-2013, 04:56 PM
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('960')