Pardon my aside on the subject, but I'm sure you know all the names must be unique to the entire page (DOM). Otherwise strange things happen (not that I've ever made that mistake ). But, I don't remember it causing an AV. Probably not your problem, but definitely worth keeping in mind when you're building names at runtime.
04-21-2023, 02:53 PM (This post was last modified: 04-21-2023, 02:57 PM by PaulWeem.)
(04-21-2023, 12:39 AM)Alexandre Machado Wrote: Here is how you can easily create this. Use methods CreatePage and CreateSection of the IWjQPageControl and IWjQAccordion:
Code:
newSection := AccordionRemarks.CreateSection('Caption of the section here');
or
newPage := YourPageControl.CreatePage('Caption of the page here');
CreatePage and CreateSection do lots of things under the hood to guarantee that the new page or section will work correctly.
You also don't need to worry about index and name of the section. The methods will do that for you and you only need set these if you need to change.
Thank you, unfortunately, this isn't working in my app.
I'll wait for the demo and see what that does.
(04-21-2023, 01:29 AM)DanBarclay Wrote: Dan
Hi Dan,
Thanks for the heads up, but I'm pretty sure the names I created are unique.
04-24-2023, 07:49 AM (This post was last modified: 04-24-2023, 07:54 AM by PaulWeem.)
Hi Alexandre,
I have taken the liberty take the IWPageControlDemo and create an IWAccordionDemo (attached).
What isn't working:
When starting the browser, sections are created, but activating the 1st section doesn't work.
When changing sections, the OnAsyncBeforeSectionChange is triggered, but the OnAsyncSectionChanged is not.
But the most annoying thing is, when you create a section in the IDE at design time and later on, when you delete this section and save the project, an AV presents itself (see attachment 2).