Cursors aren't CURS resources?

Questions regarding the Developer Edition's SuperEdit? This is the place!

Cursors aren't CURS resources?

Postby MotorcycleMichael » Wed May 08, 2013 1:57 pm

Getting down to details on my project here finally, one that escapes me has to do with cursors, specifically the "hand" cursor used by SC's browse tool.
Expected to find it in SC's SharedFile.sc45; cursors are present as CURS including a hand, but these cursors are different than the ones in use. Want to change and return back to this cursor, how do I call it and where's it from? I see an XRtn ObjectBrowser, is that where it is?
Thanks!
MotorcycleMichael
 
Posts: 19
Joined: Tue Jul 08, 2008 10:42 am
Location: Nor Cal

Re: Cursors aren't CURS resources?

Postby codegreen » Wed May 08, 2013 2:34 pm

MotorcycleMichael wrote:Getting down to details on my project here finally, one that escapes me has to do with cursors, specifically the "hand" cursor used by SC's browse tool.
Expected to find it in SC's SharedFile.sc45; cursors are present as CURS including a hand, but these cursors are different than the ones in use. Want to change and return back to this cursor, how do I call it and where's it from?

In Carbon Apple added multi-bit cursors. When you ask for a cursor by name (e.g., 'hand') SC assumes you want the newer version. You can still specify an old-style B&W cursor by passing its resource ID. Look in the SharedFile for the old-style equivalents of the cursors (arrow, watch, hand, open hand closed hand, busy) which get automagically 'upgraded' to multi-bit in Carbon.

-Mark
codegreen
 
Posts: 1518
Joined: Mon Jul 14, 2008 11:03 pm

Re: Cursors aren't CURS resources?

Postby MotorcycleMichael » Wed May 08, 2013 4:23 pm

Hi Mark!
New? Multi-bit cursors? Had to laugh because I left a 'lockCursor' command hanging and the next thing I knew I was looking at the _ancient_ animated hand cursor from back when the OS came on diskettes (sometimes called floppies). During OS installation and "disk swapping" the hand cursor would rotate thru icons with 1 finger, 2 fingers, 3 fingers, 4 fingers, then thumb, then fist, repeat... and that's what I was seeing here until I unlocked the cursor. Where'd THAT come from?!

I can get my custom CURS cursor to appear if I refer to it by name, but any attempt to reference resource ID results in "expected end of line" error.
If I set cursor to hand (by name), I get the CURS hand (or watch, or i-beam, etc.) that are all 1-bit resources from SharedFile like you said. The "normal" hand cursor present in SC (by default, apparently) is even older than those; it has 3 lines like a glove, is 1-bit, and is the same icon that used to count fingers in System 6 and 7 - but I can't tell where it's coming from. The OS? Can't find it anywhere in SC....?

Should I be seeing a newer multi-bit (drop shadow?) cursor in SC? Never have.....
MotorcycleMichael
 
Posts: 19
Joined: Tue Jul 08, 2008 10:42 am
Location: Nor Cal

Re: Cursors aren't CURS resources?

Postby codegreen » Wed May 08, 2013 6:15 pm

MotorcycleMichael wrote:Multi-bit cursors? Had to laugh because I left a 'lockCursor' command hanging and the next thing I knew I was looking at the _ancient_ animated hand cursor from back when the OS came on diskettes (sometimes called floppies). During OS installation and "disk swapping" the hand cursor would rotate thru icons with 1 finger, 2 fingers, 3 fingers, 4 fingers, then thumb, then fist, repeat... and that's what I was seeing here until I unlocked the cursor. Where'd THAT come from?!

It used to be in SC that to keep the 'busy' cursor (once a watch) animating you had to tickle it periodically (otherwise SC could appear locked up). Nowadays the busy cursor animates itself asynchronously with respect to script execution. All the cursors which have constant SuperTalk names are standard theme-savvy system cursors drawn by the Mac Toolbox not by SC.

I can get my custom CURS cursor to appear if I refer to it by name, but any attempt to reference resource ID results in "expected end of line" error.

When you execute 'set the cursor to 4' you get a scriptError?

Should I be seeing a newer multi-bit (drop shadow?) cursor in SC? Never have.....

When you set the cursor to arrow or choose the pointer tool, you don't get a nice soft grayscale shadow underneath it? If not, what system are you running? (IIRC there needs to be support in hardware for this, but I thought all recent Macs had it).

-Mark
codegreen
 
Posts: 1518
Joined: Mon Jul 14, 2008 11:03 pm

Re: Cursors aren't CURS resources?

Postby MotorcycleMichael » Wed May 08, 2013 9:12 pm

Appears I was being too verbose; "set cursor to 1502" works, "res 1502" doesn't. Duh. It's always human error, huh.

The weirdness here is that SC has two hands (both RH, BTW), the "gloved" one SC uses as seen in the tool menu (browse tool) and one in the CURS resources from the old days.

The animated finger-counting hand appeared out of nowhere, not in CURS, and the cursor gets stuck on (non-animated) watch or arrow unless "choose browse tool" is issued - which returns cursor to normal appearance and function. All this began with the "set lockCursor to true" command then setting cursor to a CURS.

Having said that, setting the defaultCursor property to <name/ID> (instead of using lock/unlock) produces a custom CURS cursor that behaves perfectly, just as the browse tool would, so problem solved.

The Mac Toolbox, haven't heard that term in awhile. Was fun to watch that animated hand cursor again, no idea how to call it or why it appeared, was the 1-bit oldie. Yes, arrow cursor and SC's gloved hand have shadows, but others are pretty much old-fashioned 1-bit, all the CURS of course. Then again, how many ways are there to draw an I-beam?

Thanks for your patience and help, Mark!

(Still hangin' with latest SnowLeopard on an 8x MacPro)
MotorcycleMichael
 
Posts: 19
Joined: Tue Jul 08, 2008 10:42 am
Location: Nor Cal


Return to SuperEditing

Who is online

Users browsing this forum: No registered users and 1 guest

cron