Tinderbox Forum

More than one $Rule in every note: One $Rule contains priority code, the other $Rule contains the rest

Pondering priorities…
An example, as per my problem over a year ago, is that connected notes would change their position when a linked predecessor note changed its position. The update took a long time with notes slowly moving on a timeline.
Other parts of my very lengthy $Rule prototype could take their time updating without being a bother.
Comments?

Hey there…I’m confused. For each note, there is only one $Rule, one $Edict, one $OnAdd, etc. Now, within each one of these buckets, you can be running numerous lines of action code, all with varying levels of complexity.

When you refer to “connected notes changing position”, what exactly do you mean? I am assuming you mean in map view, not outline view. Also, what do you mean by moving on the timeline? Is your action code changing dates or timelinebands?

Not sure what you mean by ta $Rule prototype, I assume you mean a action code in a $Rule on a $Prototype.

So, is the issue that your notes are “physically moving”? That your file is getting slow? If the former we’ll need to know more. If the latter, we’d need to look at the code, but I suspect you have code in a $Rule that could benefit from being moved to and $Edict. Likewise, you might want to set up some boolean conditions so that the intrict code only triggers when something changes. It is possible that your update notes with the same data over and over again, like changing the color of a note even though its status has not changed.

Hopefully, these questions will help us zero in on the issue you’re facing.

I have created a Gantt chart system using Tinderbox. Hence, the notes (surgical cases in my situation) are frequently rescheduled to follow, or be followed by, any other surgical case. The case durations are quite volatile depending on multiple resources and probability. A case may have multiple resources tied up in different predecessor cases. Lots of shuffling going on. Yes… chaotic.

I’ll have a look at $Edict again.

It looks as though $Edict could work. It’s the less frequent $Rule that I was looking for.
However… I need to play with it to see if I can tweek its frequency or conditional activity.

update(notes) look good.
Now… Is there a way to use ‘paths’ [Which is a new information feature as in Get info: Paths] within a rule so that I I can cascade update changes from a note(1) to all its links downstream when a select attribute (or any attribute) of that note(1) changes? If I can access (directly or through calculation) the last time the note was updated, then I can decide to update the downlinks notes.

I’ve not used update() yet, but you might like to see this: Tinderbox Training Video 51- Linking With Tinderbox.