NetTalk Central

Author Topic: JFiles : having troube importing into Queues  (Read 2362 times)

AtoB

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
JFiles : having troube importing into Queues
« on: December 11, 2017, 09:44:33 AM »
I'm probably not understanding something about JFiles:

I try to import two nodes ("P_docidQ" and "ids" both on the top level) into two queues ("P_docidQ" and "SELF.PrQ"), but the second one always is empty ... (I've attached a .json file as a .txt file)

Now If I don't load the first Q, the second will load ... I found out that the during the load of second Q it tries to map to the fields of the first Q ...

(I noticed that in  jFiles.clw in the JSONClass._GetFieldName method, that the

  names     cstring(50),dim(100),static,thread

might be why the second Q keeps looking at the fields of the first Q ...]


I probably need to clear/free something first, but I haven't got a clue what

Any help is most welcome!

TIA

The follwing is the code I use:

 
Code: [Select]
  ! data
lJSON                             JSONClass
jsonItem                          &JSONClass
lJP                               &JSONClass
lJP_PdocidQ                       &JSONClass
lJP_PrQ                           &JSONClass

  CODE
  ! ....
  lJSON.LoadFile(lFn)

  lJP &= lJSON.GetByName('doctype', 1)
  IF ~lJP &= NULL
    SELF.Doctype       = lJP.GetValue()
  END

  ! First Q
  FREE(P_DocidQ)
  CLEAR(P_DocidQ)

  lJP_PdocidQ &= lJSON.GetByName('P_docidQ', 1)
  IF ~lJP_PdocidQ &= NULL
    lJP_PdocidQ.Load(P_DocidQ)
  END

  ! Second Q
  FREE(SELF.PrQ)
  CLEAR(SELF.PrQ)
       
  lJP_PrQ &= lJSON.GetByName('ids', 1)
  IF ~lJP_PrQ &= NULL
    lJP_PrQ.Load(SELF.PrQ)
  END
  ods('records SELF.PrQ : ' & RECORDS(SELF.PrQ) )

AtoB

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
Re: JFiles : having troube importing into Queues
« Reply #1 on: December 11, 2017, 02:19:06 PM »
Hi all,

solved : upgrading to the latest and greatest does fix this thing :-)

sorry for the inconvenience !!

regards,
Ton