HyperCard Mailing List

[HC] How are ID's allocated?
(Msg 1 of 8)
andrewferguson500 <andrewferguson500@[redacted].com>
Sunday, 14-Sep-2014 19:02 GMT
Hello everyone,

I was wondering if anyone knew how HyperCard allocated ID's to objects
(cards, stacks, buttons, fields...)? I tried looking in The Complete
HyperCard Handbook, as well as the HyperTalk Script Language Guide, but I
could not find a detailed description. Is it just a random number that is
chosen when creating an object? Or is there a pattern that is followed?

Thanks,

Andrew
[HC] How are ID's allocated?
(Msg 2 of 8)
beckiergb <beckiergb@[redacted].com>
Sunday, 14-Sep-2014 19:09 GMT
I know that for buttons and fields it is sequential. I believe for other
objects it's random. Stacks themselves don't have an ID. (If they did, it
would always be -1, according to the HyperCard file format.)


-- Rebecca Bettencourt

On Sun, Sep 14, 2014 at 12:02 PM, Andrew Ferguson
andrewferguson500@[redacted].com[HyperCard] <HyperCard-Mailing-List> wrote:

>
>
> Hello everyone,
>
> I was wondering if anyone knew how HyperCard allocated ID's to objects
> (cards, stacks, buttons, fields...)? I tried looking in The Complete
> HyperCard Handbook, as well as the HyperTalk Script Language Guide, but I
> could not find a detailed description. Is it just a random number that is
> chosen when creating an object? Or is there a pattern that is followed?
>
> Thanks,
>
> Andrew
>
>
>
[HC] How are ID's allocated?
(Msg 3 of 8)
Witness.of.TeachText <Witness.of.TeachText@[redacted].net>
Monday, 15-Sep-2014 02:37 GMT
On 14 Sep 2014, at 21:02, Andrew Ferguson andrewferguson500@[redacted].com[HyperCard] <HyperCard-Mailing-List> wrote:
> I was wondering if anyone knew how HyperCard allocated ID's to objects (cards, stacks, buttons, fields...)? I tried looking in The Complete HyperCard Handbook, as well as the HyperTalk Script Language Guide, but I could notfind a detailed description. Is it just a random number that is chosen when creating an object? Or is there a pattern that is followed?

There are certain starting numbers, and then the first free one from that starting number is picked. Card and background parts start at 1 each (so background parts can have the same ID as card parts). I wanted to do a test, but my SheepShaver emulator seems to be crashing at boot :-( IIRC cards/backgrounds start at 2000 or something like that.

Cheers,
-- Uli Kusterer
The Witnesses of TeachText are everywhere...
http://zathras.de



[HC] How are ID's allocated?
(Msg 4 of 8)
evanssl21 <evanssl21@[redacted].net>
Monday, 15-Sep-2014 12:41 GMT
Fortunately my SheepShaver still works. A quick experiment shows that
card buttons and fields start at 1.

Art Evans

At 04:37 +0200 2014.09.15, Uli Kusterer Witness.of.TeachText@[redacted].net
[HyperCard] wrote:
>On 14 Sep 2014, at 21:02, Andrew Ferguson
>andrewferguson500@[redacted].com[HyperCard] <HyperCard-Mailing-List>
>wrote:
>> I was wondering if anyone knew how HyperCard allocated ID's to
>>objects (cards, stacks, buttons, fields...)? I tried looking in The
>>Complete HyperCard Handbook, as well as the HyperTalk Script
>>Language Guide, but I could not find a detailed description. Is it
>>just a random number that is chosen when creating an object? Or is
>>there a pattern that is followed?
>
> There are certain starting numbers, and then the first free one
>from that starting number is picked. Card and background parts start
>at 1 each (so background parts can have the same ID as card parts).
>I wanted to do a test, but my SheepShaver emulator seems to be
>crashing at boot :-( IIRC cards/backgrounds start at 2000 or
>something like that.
>
>Cheers,
>-- Uli Kusterer
>³The Witnesses of TeachText are everywhere...²
>http://zathras.de
[HC] How are ID's allocated?
(Msg 5 of 8)
dannygelder <dannygelder@[redacted].com>
Tuesday, 16-Sep-2014 00:47 GMT
Window IDs are the decimal representation of the toolbox WindowRef handle, so if you have CompileIt, you can peek into the structure and change things.
[HC] How are ID's allocated?
(Msg 6 of 8)
DunbarX <DunbarX@[redacted].com>
Tuesday, 16-Sep-2014 03:03 GMT
Compile-it.


Ah, the memories.


Craig



-----Original Message-----
From: dannygelder@[redacted].com[HyperCard] <HyperCard-Mailing-List>
To: HyperCard <HyperCard-Mailing-List>
Sent: Mon, Sep 15, 2014 8:48 pm
Subject: Re: [HC] How are ID's allocated?






Window IDs are the decimal representation of the toolbox WindowRef handle, so if you have CompileIt, you can peek into the structure and change things..



[HC] How are ID's allocated?
(Msg 7 of 8)
Witness.of.TeachText <Witness.of.TeachText@[redacted].net>
Tuesday, 16-Sep-2014 10:42 GMT
On 15 Sep 2014, at 14:41, Arthur Evans Jr evanssl21@[redacted].net[HyperCard] <HyperCard-Mailing-List> wrote:
> Fortunately my SheepShaver still works. A quick experiment shows that
> card buttons and fields start at 1.

Thats the part I was certain about and remembered. More interesting wou
ld be backgrounds and cards. I think it was just a random number in the 2000s, and it may be that cards and backgrounds are assigned IDs from the samepool (so theyre different and dont both start in the same spot), but
I dont know for sure :-)


On 16 Sep 2014, at 02:47, dannygelder@[redacted].com[HyperCard] <HyperCard-Mailing-List> wrote:
> Window IDs are the decimal representation of the toolbox WindowRef handle, so if you have CompileIt, you can peek into the structure and change things.

Actually, this was pre-Carbon, so they were called WindowPtr and were not Handles :-)

As to having CompileIt, you can get it from the authors web site: http:
//www.ittybittycomputers.com/IttyBitty/CompileIt/

Cheers,
-- Uli Kusterer
The Witnesses of TeachText are everywhere...
http://zathras.de



(Note: 1 duplicate message omitted.)
HyperCard® and HyperTalk™ remain trademarks of Apple, Inc.; other trademarked products and terms mentioned in this archive are the property of their respective trademark holders. Individual messages remain the intellectual property of their respective authors.