def generate_code_id(self, obj, id=None):
    if (id is None):
        id = obj.window_id
    if (not id):
        if ((obj is not None) and obj.check_prop_truth('stockitem')):
            return ('', self.cn(('wxID_' + obj.stockitem)))
        return ('', self.cn('wxID_ANY'))
    id = str(id)
    tokens = id.split('=', 1)
    if (len(tokens) != 2):
        return ('', self.cn(tokens[0]))
    (name, val) = tokens
    if (not name):
        return ('', self.cn(val))
    name = name.strip()
    val = val.strip()
    if (val == '?'):
        val = self.cn('wxNewId()')
    else:
        val = self.cn(val)
    return (('use constant %s => %s;\n' % (name, val)), name)
def generate_code_id(self, obj, id=None):
    if (id is None):
        id = obj.window_id
    if (not id):
        if ((obj is not None) and obj.check_prop_truth('stockitem')):
            return (, self.cn(('wxID_' + obj.stockitem)))
        return (, self.cn('wxID_ANY'))
    id = str(id)
    tokens = id.split('=', 1)
    if (len(tokens) != 2):
        return (, self.cn(tokens[0]))
    (name, val) = tokens
    if (not name):
        return (, self.cn(val))
    name = name.strip()
    val = val.strip()
    if (val == '?'):
        val = self.cn('wxNewId()')
    else:
        val = self.cn(val)
    return (('use constant %s => %s;\n' % (name, val)), name)