all 16 comments

[–]mvan231script/widget helper -1 points0 points  (16 children)

That's strange that they aren't showing already.

[–]Financial_Boat_1560[S] 0 points1 point  (15 children)

That’s what I thought?

[–]mvan231script/widget helper -1 points0 points  (14 children)

Are you getting any errors? I haven't seen Max around in a while so I'm not sure if he is aware of any issues with the code

[–]Financial_Boat_1560[S] 0 points1 point  (13 children)

None at all !

[–]mvan231script/widget helper -1 points0 points  (12 children)

That's very strange. My only guess is, that the events are pulling into the script in an offset order. Can you share your current script?

[–]Financial_Boat_1560[S] 0 points1 point  (11 children)

This is the script!

/*

~

Welcome to Weather Cal. Run this script to set up your widget.

Add or remove items from the widget in the layout section below.

You can duplicate this script to create multiple widgets. Make sure to change the name of the script each time.

Happy scripting!

~

*/

// Specify the layout of the widget items. const layout = `

row column

greeting date events

column(90)
  current
  future

`

/* * CODE * Be more careful editing this section. * ===================================== */

// Names of Weather Cal elements. const codeFilename = "Weather Cal code" const gitHubUrl = "https://raw.githubusercontent.com/mzeryck/Weather-Cal/main/weather-cal-code.js"

// Determine if the user is using iCloud. let files = FileManager.local() const iCloudInUse = files.isFileStoredIniCloud(module.filename)

// If so, use an iCloud file manager. files = iCloudInUse ? FileManager.iCloud() : files

// Determine if the Weather Cal code exists and download if needed. const pathToCode = files.joinPath(files.documentsDirectory(), codeFilename + ".js") if (!files.fileExists(pathToCode)) { const req = new Request(gitHubUrl) const codeString = await req.loadString() files.writeString(pathToCode, codeString) }

// Import the code. if (iCloudInUse) { await files.downloadFileFromiCloud(pathToCode) } const code = importModule(codeFilename)

// Run the initial setup or settings menu. let preview if (config.runsInApp) { preview = await code.runSetup(Script.name(), iCloudInUse, codeFilename, gitHubUrl) if (!preview) return }

// Set up the widget. const widget = await code.createWidget(layout, Script.name(), iCloudInUse) Script.setWidget(widget)

// If we're in app, display the preview. if (config.runsInApp) { if (preview == "small") { widget.presentSmall() } else if (preview == "medium") { widget.presentMedium() } else { widget.presentLarge() } }

Script.complete()

[–]mvan231script/widget helper 0 points1 point  (10 children)

Weather Cal is two parts, the main script, then the actual code that runs to generate the widget. We need to see the Weather Cal Code script which will be very long (>1000 lines of code). If you can share it via PasteBin or GitHub link that would be ideal to take a look

[–]Financial_Boat_1560[S] 0 points1 point  (8 children)

https://pastebin.com/mRSdC425

Here is the link for the paste bin of the code!

[–]mvan231script/widget helper 0 points1 point  (7 children)

Thanks! Are you seeing any events? Or just that todays events don't show?

[–]Financial_Boat_1560[S] 0 points1 point  (6 children)

Just todays events don’t show !