browse by category or date

Recently I was editing my Complete Singapore-Indonesia Ferry Schedule JSON data when I encountered a bug. I was editing an array of objects which is the property value of the parent JSON object. In JSON Table Editor terms, this means I am operating on a child window. Tired of scrolling ups and downs, I filtered the rows. I then edit some of the rows, then confirmed my changes.

But when I clicked , only the filtered rows were saved to main object, which is wrong. Rightfully, all rows should be saved to the main JSON object.

After few rounds of trial and error trying to solve this bug, this is my final solution:

// checkedOpener = true if it's a child window
// grid = Ext.grid.Panel instance

if (checkedOpener && grid.filters.getFilterData().length>0) {
    // innerOutput = function to either output the grid's data into 
    // JSON output or updating parent JSON field value
    grid.on('filterchange', innerOutput);
    grid.filters.clearFilters();
}
else
    innerOutput(); 

That’s all folks. Cheers!

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

Update on number of confirmed and discharge cases:

[Sent by Gov.sg]

COVID-19: 27 Feb Update

As of 12pm:
New cases: 3
Total confirmed: 96
Discharged today: 4
Total discharged: 66
Total still in hospital: 30

Of the 3 new cases, 2 are linked to previous cases. Contact tracing is underway for the remaining case.

Most in hospital are stable or improving. 8 are in the intensive care unit.

More: Go.gov.sg/moh27feb

Stay safe everyone!

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

Updates on travel advisory:

[Sent by Gov.sg – 26 Feb]

COVID-19: Travel advisory
Singaporeans are advised to defer all travel to Hubei Province in China, and non-essential travel to the following areas:
– Mainland China
– Daegu city, South Korea
– Cheongdo country, South Korea

✈ Travellers should:
– Check the latest travel restrictions with your airlines and the immigration websites of the places you are travelling to.
– Upon return, monitor your health closely for two weeks. If unwell 🤧, seek medical attention promptly.
-If you have flu-like symptoms, you can go to a PHPC clinic (www.phpc.gov.sg) or polyclinic for subsidised treatment.

Updates on number of confirmed and discharged cases:

[Sent by Gov.sg]

COVID-19: 26 Feb Update

As of 12pm:
New cases: 2
Total confirmed: 93
Discharged today: 4
Total discharged: 62
Total still in hospital: 31

Most in hospital are stable or improving. 7 are in the intensive care unit.

More: Go.gov.sg/moh26feb

2 charged under Infectious Diseases Act
– Gave false information and obstructed contact tracing, which is an offence
– Convicted persons will get fined and/or imprisoned for the first offence
More: Go.gov.sg/26feb-link1

SG Permanent Resident (PR) breached Stay Home Notice (SHN), loses PR status and barred from entering SG: Go.gov.sg/26feb-link2

Stay safe and vigilant everyone!

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant: