ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 4700] WSLUA improvement (ProtoField.bool extension)

Date: Fri, 29 Oct 2010 06:31:02 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4700

--- Comment #22 from Beth <beth.tridium@xxxxxxxxx> 2010-10-29 06:30:52 PDT ---
If it can be fixed by changing my syntax, that's great.  But it's not clear to
me what I need to change it to.

Here's some test code, which fails in the same way:

  local F_test    = ProtoField.bool("myproto.test", "test boolean field")
  postDASP_dissector.fields = { F_test, ... }   


  function myproto_dissector.dissector(tvbuffer, pinfo, treeitem)

    -- Add our extra protocol subtree
    local subtreeitem = treeitem:add(myproto_dissector, tvbuffer)
    subtreeitem:set_text("MyProto Postdissector")

    -- TEST
    local tval = true
    local tst = subtreeitem:add(F_test, tvbuffer(), tval)
    tst:set_text("Testing bool field: " .. tostring(tval))

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.