Update to DATE breaks Titleclock?

A forum for general AmigaOS 4.x support questions that are not platform-specific
User avatar
daveyw
Posts: 252
Joined: Mon Sep 12, 2011 7:44 pm

Update to DATE breaks Titleclock?

Post by daveyw »

I believe there was an update to C:Date a few months back? I only just installed it.

It seems to break Alex Carmona's elderly Titleclock script http://os4depot.net/share/utility/workb ... eclock.lha .

Now, I get ***Impure resident command 'Date'! Date: Unknown command displayed on my titlebar.

I experimented with removing PURE from Alex's script, and while this restores the strings to my titlebar, it returns an error "C:Date: object is not of required type".

Is anyone able to confirm this?
User avatar
AlexC
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 160
Joined: Wed Dec 22, 2010 7:14 am
Location: Los Angeles
Contact:

Re: Update to DATE breaks Titleclock?

Post by AlexC »

I can confirm the issue. I hadn't noticed as I've been using DigiClock instead.

Since 53.3 Date no longer can be made resident.

IMHO Date is one of those commands which sometimes needs to be run many times and benefits from being resident when disk access is not desirable so I'll see what I can do to fix the bug which prompted the change in 53.3.

For now you can either run it normally from C: or put Date in RAM: instead of making it resident, or use an older version which can be made resident but the bug causes a memguard hit so there's a possibility that it has hidden side-effects.
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: Update to DATE breaks Titleclock?

Post by xenic »

AlexC wrote: Since 53.3 Date no longer can be made resident.
Are you sure it's not that somebody just forgot to set the "PURE" bit before adding it to AmiUpdate??

I set the Date command PURE bit and added it to the resident list successfully. There is no way of knowing if it really is pure, but the reason it can't be added to the resident list appears to be the fact that the PURE bit is not set. If Date really isn't pure (reentrant), it probably wouldn't cause problems unless 2 apps try to access it at the same time.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: Update to DATE breaks Titleclock?

Post by ssolie »

xenic wrote:Are you sure it's not that somebody just forgot to set the "PURE" bit before adding it to AmiUpdate??
100% sure. Many commands are no longer resident. It was a cute feature in its time but hardly needed these days.
ExecSG Team Lead
User avatar
mbrantley
Beta Tester
Beta Tester
Posts: 90
Joined: Sat Jun 09, 2012 3:49 am
Location: Mobile, Alabama USA

Re: Update to DATE breaks Titleclock?

Post by mbrantley »

Ah, so THAT'S what happened to TItleClock. Shame, because I prefer the older titleclock to Alex's newer utility simply because I like the simple look of the date/time text in the menu bar. Not so fancy, but that's me.
User avatar
daveyw
Posts: 252
Joined: Mon Sep 12, 2011 7:44 pm

Re: Update to DATE breaks Titleclock?

Post by daveyw »

mbrantley wrote:Ah, so THAT'S what happened to TItleClock. Shame, because I prefer the older titleclock to Alex's newer utility simply because I like the simple look of the date/time text in the menu bar. Not so fancy, but that's me.
Yes, me too. I find TitleClock a more elegant solution that DigiClock.
User avatar
PJS
Beta Tester
Beta Tester
Posts: 60
Joined: Sat Mar 12, 2011 2:07 am
Location: McLean, VA

Re: Update to DATE breaks Titleclock?

Post by PJS »

Hey guys,

We were chatting about all this on IRC this afternoon... When I heard
what "TitleClock" was I wondered why you guys hadn't just used the
features of AmigaOS to accomplish what you're looking for.

It was really easy.... A four line CLI script:

lab start
date >env:timeNow
wait 30 secs
skip start back

In any case, I threw together that script, a readme and some icons for
your ease of installation. Just call the script in WBStartUp prefs and
configure Workbench prefs to show the results. Easy Peasy!

http://www.pjsa.net/timeNow.lha

Please note, nearly anything that throws out some text you want to see can
be displayed by the Workbench. Weather? EMail stats? Stock quotes?
Just throw together an ARexx script and you're good to go.

I'll leave this archive up for a little while. I'm kind of too embarassed
to put this on OS4Depot. But holler if you feel otherwise.

Thanks,

PJS
User avatar
mbrantley
Beta Tester
Beta Tester
Posts: 90
Joined: Sat Jun 09, 2012 3:49 am
Location: Mobile, Alabama USA

Re: Update to DATE breaks Titleclock?

Post by mbrantley »

You the man, Paul! I did not know about this feature and was happy to receive the lesson. I think it would be valuable on OS4Depot both for its utility and as a lesson in how to put text in the title bar.
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 530
Joined: Sat Jun 18, 2011 3:12 pm
Location: Finland
Contact:

Re: Update to DATE breaks Titleclock?

Post by salass00 »

PJS wrote: lab start
date >env:timeNow
wait 30 secs
skip start back
That is pretty much the same thing that the linked Titleclock script does. The only major difference is that Titleclock tries to add date and wait commands as resident so that they are not loaded from disk again every time they are used and this is not supported with the latest version of the date command at least.

To get Titleclock working you only need to comment out or remove the resident commands (I'm surprised that no-one has suggested this obvious solution yet).
User avatar
PJS
Beta Tester
Beta Tester
Posts: 60
Joined: Sat Mar 12, 2011 2:07 am
Location: McLean, VA

Re: Update to DATE breaks Titleclock?

Post by PJS »

@salass

Not being a TitleClock user, I can't say I know much about it.

But if one wanted to avoid disk access with each Date & Wait command call,
I suppose those two commands could be copied to T: and called from there?

Just add the two copies to the start of the script (ahead of the label)
and add the new path to the command calls.

Thanks,

PJS
Post Reply